Chapter 1. Introduction

This chapter contains the following topics:

  • Getting the Most Out of SlickEdit®

  • New Features and Enhancements

  • Documentation

  • Supported Languages and Environments

  • Installation

  • Startup and Exit

  • Startup and Exit

  • Product Support

  • Product Improvement Program

  • Performance Tuning

Getting the Most Out of SlickEdit®

At SlickEdit, our belief is that it's the code that really matters. We are a company of power programmers working to develop the tools that power programmers demand, tools that provide the best editing capabilities to help you write your code the way you want.

We take great pride in delivering unparalleled power, speed, and flexibility to our customers. Our goal is to remove the tedious tasks involved with programming, allowing you to focus on the reason you first got into programming: the thrill of writing great code.

Learn About Our Cool Features

SlickEdit® contains the most powerful and comprehensive set of features available in any editor. Many are unique to SlickEdit. To see a list of features we think are particularly cool, click Help → Cool Features from the SlickEdit main menu. Each feature is described and you can watch a short demo of the feature in action.

Write More Code, Faster

The keys to programming efficiency are the same in SlickEdit® as any other editor. These strategies will help you write more code, faster than you ever have before:

  • Keep your hands on the keyboard - Time is wasted each time you reach for the mouse. SlickEdit contains 14 editor emulations with predefined key bindings that are ready for use in performing common tasks. Define your own key bindings or invoke editor operations from the SlickEdit command line. For more information, see Using the Mouse and Keyboard.

  • Type as little as possible - SlickEdit contains many features that reduce the number of keystrokes you type, including: completions, syntax expansion, aliases, macros, code templates, and code generators. For information about these features, see the topics in the Editing Features chapter.

  • Rapidly navigate code - Instantly jump from a symbol to its definition or view a list of references. Preview definitions for the current symbol without having to open the file. Use bookmarks to mark important locations in the code. SlickEdit includes powerful browsers and search capabilities, allowing you to quickly find the code you want. See Navigation for more information.

  • Access information quickly - SlickEdit uses visual indicators to provide you with information about your code, including syntax highlighting and color coding. Special tool windows are also available for viewing information about files, classes, symbols, definitions, and more. To learn more, see Toolbars and Tool Windows, Symbol Browsing and the Editing Features chapter.

  • Let SlickEdit do the formatting - Syntax indenting, SmartPaste®, and code beautifiers are just a few of the automatic formatting features in SlickEdit. For more information, see the topics in the Editing Features chapter.

  • Time-saving utilities - SlickEdit provides many utilities for working with your code, such as DIFFzilla®, 3-Way Merge, Spell Check, FTP, a RegEx Evaluator, math commands, and even a calculator. See the topics in the Tools and Utilities chapter for more information.

  • Integrate with other tools - SlickEdit integrates with other tools to make your world complete, including source control systems, compilers, debuggers, profilers, and analyzers. See Tools and Utilities for more information.

Quick Start

SlickEdit offers a Quick Start Configuration Wizard to help configure the most commonly changed options. Use this to get up and running with SlickEdit as quickly as possible. It also helps you set up a workspace and project, which is essential for getting the most out of SlickEdit.

The User Guide also includes the Quick Start guide. It describes how to set the options featured in the Quick Start Configuration Wizard plus a few more common user preference settings. It also describes how to quickly create a workspace and project, if you want to do that without using the wizard.

Register Your Product

Registering your product allows SlickEdit to provide you with automatic notification of free updates and new releases, and enters your name into a weekly drawing for a SlickEdit gift pack. To register your product from within SlickEdit®, from the main menu, click Help → Register Product , then follow the steps indicated.

Get Maintenance & Support

Subscribe to Maintenance and Support Service to receive the following benefits:

  • Unlimited technical support via telephone or e-mail for 12 months.

  • Access to new releases, upgrades, and fixes at no additional charge.

  • The ability to participate in SlickEdit® beta programs and receive a free copy of SlickEdit beta software as a preview of the next release.

To check the status of your Maintenance and Support Service from within SlickEdit, click the menu item Help → Check Maintenance . This will launch the SlickEdit Maintenance and Support Web page in a browser, showing the status of your service.

To subscribe to Maintenance and Support Service or learn more, contact SlickEdit Sales (sales@slickedit.com).


New Features and Enhancements

This section describes the new features and enhancements in SlickEdit®.

File Tabs Enhancements

Now you can order the files tabs by most recently opened, most recently viewed, and by dragging and dropping to manually order the tabs. An icon has been added to the File Tabs tool window to display a list of open buffers so that you can select one to edit. For more information, see File Tab Sort Order.

windbg Support

You can now use the SlickEdit debugger front end with WinDbg, allowing you to debug applications on Microsoft Windows without having MS Visual Studio installed. For more information, see Using WinDbg.

Set Options for All Languages

SlickEdit now provides the capability to set many options for all languages instead of for each language you use. For more information, see All Languages.

Microsoft Visual Studio 2010 Support

SlickEdit has been updated to support changes to the project files introduced in Visual Studio 2010.

Subword Navigation

To facilitate navigation, copying, and deletion within a symbol name, Subword Navigation will stop at words within CamelCased words, and also following an underscore or dash. This feature can be enabled for all languages by selecting Tools → Options → Editing → Cursor Movement and setting Subword Navigation to True. For more information, see Subword Navigation.

Auto-Close and Overtype

Typing an open parenthesis, square bracket, angle bracket, double quote or single quote will automatically insert the corresponding closing symbol. When the cursor is positioned in front of a closing symbol, typing the closing symbol will move the cursor after the closing symbol instead of inserting another closing symbol. This feature can be configured for each language. For more information, see Auto-Close.

Subversion History

When using the Subversion source control tool, SlickEdit builds a version cache that allows us to quickly build and display a version history for the file, including branches. For more information, see Subversion.

Subversion File Status

File trees and lists, such as the Project tool window, now display different icons next to file names to represent their status in SVN.

Eclipse Emulation

An Eclipse emulation has been added that contains the key bindings for commonly used operations. To enable this emulation select Tools → Options → Keyboard and Mouse → Emulation .

Doc Comment Updates

You can now update an existing doc comment to match changes made in the function signature. For more information, see Doc Comments.

Google Web Toolkit Support

SlickEdit now includes support for the Google Web Toolkit, used to build browser-based applications. New Java and Python project types are provided to help build and deploy your code. For more information, see Working with Google Web Toolkit Projects.

Outline View for XML

The Defs tool window can now show a customizable outline for XML files. This displays the information you find interesting so you can better understand and navigate these files. For more information, see Outline View for XML.

Notifications

SlickEdit displays icons in the status line to notify you of actions being performed by the editor. A pop-up message is briefly displayed with additional information about that operation. Different notification icons are displayed for background tasks, feature notifications, and when the debugger is listening for a connection. For more information, see Notifications.

Product Improvement Program

This feature collects anonymous information about your use patterns in SlickEdit. It reports on things like the languages, project types, and tool windows you use. This information will help us to make better choices for future enhancements. No personally identifying information, source code, file names, project names, workspace names, or other confidential information is sent. You can opt out of the program using Tools → Quick Start Configuration or by selecting Tools → Options → Application Options → Product Improvement Program . For more information, see Product Improvement Program.

Additional Enhancements

Along with the new features listed above, we have made many other enhancements in SlickEdit. The following are particularly noteworthy:

  • Backup History Enhancements: Backup History now allows you to store a comment with any entry in the history list. This is helpful when you have a long list of revisions and you need to find a specific one.

  • Tagging for Properties Files: Tagging is now extended to .property files to allow navigation between property references and their declarations.

  • Tagging for Docbook: Docbook files are now tagged to allow navigation between elements with IDs (such as sect1 and sect2) and refereneces to those elements (such as xref).

  • Basic language support for Erlang, Haskell, F#: Color coding and basic tagging support is now offerend for these languages.


Documentation

Documentation for SlickEdit® consists of:

  • A fully integrated Help system, including context-sensitive Help, a searchable index, and categorized lists of C and Slick-C® macro functions. See The Help System for more information.

  • The SlickEdit® User Guide, which provides the same information as the Help system in PDF format for viewing and printing as a manual.

  • Emulation charts in PDF format for the following editors: BBEdit, Brief, CodeWarrior™, CodeWright®, CUA (SlickEdit's default emulation), Epsilon, GNU Emacs, ISPF, SlickEdit (Text Mode edition), Vim, Visual C++® 6, Visual Studio® default, Xcode®, and Eclipse.

  • Slick-C® reference material in PDF format, which includes the Slick-C Macro Programming Guide and Slick-C Macro Conventions and Best Practices for End Users.

PDF documents are located in the docs directory on the root of the product CD. After SlickEdit is installed on your computer, these documents are located in the docs subdirectory of [SlickEditInstallDir].

Documentation for SlickEdit is also available on the SlickEdit Web site at www.slickedit.com/products/slickedit/product-documentation.

Documentation Updates/Feedback

In-product documentation is current as of the build date of the product. Revisions to the product documentation are made regularly with the most current version being made available on the SlickEdit Web site (www.slickedit.com).

We welcome your comments and suggestions regarding the documentation. Please send feedback to docs@slickedit.com.

Other Resources

The following additional resources are available:

  • The SlickEdit Community Forums - Learn more about SlickEdit products and interact with other users at http://community.slickedit.com.

  • "Hello World"'the SlickEdit Developer Blog - Read thoughts, tips, and tricks from the developers at SlickEdit at http://blog.slickedit.com.

  • The SlickEdit® book - After years of developing code with SlickEdit, expert John Hurst brings his wealth of knowledge to readers in Professional SlickEdit (Indianapolis, Wiley Publishing, 2005, ISBN - 978-0470122150).

Documentation Conventions

The conventions listed below are used in SlickEdit® documentation.

Default Emulation/Key Binding Mode

CUA is the default editor emulation mode. Therefore, key bindings and shortcuts listed in the documentation follow the CUA emulation.

Platform-Specific Notes

Platform-specific notes appear throughout the documentation and are included for Microsoft Windows, UNIX® (which includes Linux®), and Mac OS® X.

Mac OS X Notes

SlickEdit® can be used on a Mac OS X operating system, displayed as an X11 application. The X11 application can be customized to accommodate your preferences.

Throughout the user documentation, information that is available for Linux and UNIX operating systems will be the same or similar when using SlickEdit on a Mac OS X operating system. The documentation contains specific information for the Mac OS X operating system where relevant. Mouse and keyboard shortcuts in the documentation are written for Microsoft Windows, but can be adapted for Mac OS X using the information below.

Tip

In SlickEdit, a key or key sequence that is bound to an operation is called a key binding. See Using the Mouse and Keyboard and Key and Mouse Bindings for more information.

Mouse and keyboard shortcuts on Windows and Mac OS X have the following similarities:

  • The Command (Cmd) key on the Mac keyboard functions the same as the Windows Control (Ctrl) key.

  • The Cmd key plus a mouse click on the Mac keyboard functions the same as right-clicking the mouse on Windows.

  • Single-button mouse support (available through the preferences menu for the X11 application).

The following table shows some of the differences between mouse and keyboard shortcuts on a Windows operating system and the Mac OS X operating system:

Microsoft Windows | Mac OS X
Right-click with the mouse | Cmd+Click
Left-click with the mouse | Single mouse click
Ctrl+F (Find) | Cmd+F (Find)
Ctrl+G (Find again) | Cmd+G (Find again)
Print Screen | Cmd+P (Print)

Note

Until they are disabled, X11 keyboard shortcuts override SlickEdit shortcuts. For example, in SlickEdit, Cmd+Q quits the SlickEdit application, but in X11, Cmd+Q quits the X11 application. To disable X11 keyboard shortcuts:

  1. With SlickEdit in the foreground, go to the X11 menu.

  2. Select Preferences (Cmd+Comma).

  3. On the Preferences dialog, under the Input category, uncheck the option Enable key equivalents under X11.

Menus and Dialogs

Instructions for navigating to items accessed from the main menu are written in the form: MainMenuItem → SubMenuItem .

For example, the text "click File → Open " indicates that you should first select File from the main menu, then select Open from the submenu. Brackets are used to indicate that the menu item is a variable. Some menu paths include tree nodes in dialogs. For example, Tools → Options → Languages → [Language Category] → [Language] → Indent is a quick way to write "select Tools → Options from the main menu, then in the Options tree, expand the Languages node, the category for the language you want and the language you're using, then select the Indent node".

Instructions for using the product make up the bulk of our documentation, while listings of dialog boxes and options can be found in the Menus, Dialogs, and Tool Windows chapter. Buttons on dialogs, such as OK, Close, and Help, are not usually documented since the meaning is obvious.

Code Syntax Conventions

  • Commands, switches, keywords, properties, operators, options, variables, and text to be typed by the user are shown in bold type.

  • User-input variables and placeholders are shown in bold italic type.

  • Code samples and file names are displayed in a monospaced font.

  • File extensions and environment variables are written with an UPPERCASE font.

  • SlickEdit® commands that contain two or more words are written with underscore separators: for example, cursor_down. Note that in the user interface, however, these commands are displayed with hyphen separators: for example, cursor-down. Both of these forms work in SlickEdit, so you can use whichever style you prefer.

The Help System

The searchable Help system is installed with the product. In addition to information about the SlickEdit application, it provides categorized lists of C and Slick-C® macro functions.

The Help system can be accessed in several ways:

  • To view a list of all topics in the Help system, from the main menu, click Help → Contents . This is useful for browsing topics depending on your needs.

  • To look up specific keyword(s) in the Index, click Help → Index . Use the Index to find specific information, for example, "changing emulations" or "toolbars". You can also use the index to find information about a specific option in SlickEdit by looking up the label, for example, "One file per window". When you type in the Index, the list of terms is searched incrementally.

  • To search the entire Help system for every instance of a word used, click Help → Search . This can be particularly useful to discover information about API functions or more obscure topics. Use quotation marks around the term if it contains spaces.

  • To invoke the Help entry for toolbars, tool windows, menus, and dialog boxes, press F1.

You can also configure SlickEdit to display Word Help for the item at the cursor in files. See Advanced Help Configuration for information.

Help Key Shortcuts

The table below lists keyboard shortcuts that can be used when working in the Help system.

Shortcut | Description
Tab | Next hypertext item
Shift+Tab | Previous hypertext item
Enter | Go to hypertext item
Alt+I | Displays Help index
Ctrl+S or Alt+S | Display Help Find dialog box
Ctrl+C or Ctrl+Ins | Copy selection to clipboard
Home | Start of topic
End | End of topic
Up arrow | Scroll up
Down arrow | Scroll down
PgUp | Page up
PgDn | Page down
Click+Drag | Selects text
Shift+Click+Drag | Extends a selection

Supported Help Web Browsers

The Help system runs on many browsers. If you are using Microsoft Windows, you must have Microsoft Internet Explorer® installed for the Help system to function. Based on our testing on other operating systems, we recommend the following:

  • If you are using a UNIX, Linux, or another UNIX-based operating system, use the Firefox® browser.

  • If you are using Macintosh®, use the Safari™ browser.

Note

SlickEdit® provides a way to configure what Web browser to use when SlickEdit needs to launch a browser (such as when you click Help → SlickEdit Support Web Site ). This configuration does not apply to the Help system. For more information, see Web Browser Setup Options.


Supported Languages and Environments

This section outlines the languages and file types supported by each SlickEdit® feature, including special features for the Mac®, as well as supported emulations, project types, and version control systems.

Supported Languages and File Types

The table below indicates the languages and file types that support key SlickEdit® features. Features that are not language-specific, such as DIFFzilla®, are not listed here.

Language | List Members Parameter Information | Auto List Compatible Parameters | Code Navigation | Syntax Expansion | Syntax Indent | SmartPaste® | Code Beautifier | Selective Dispaly | Expand/ Collapse Code Blocks
ActionScript 2.0 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Ada | Yes | No | Yes | Yes | Yes | No | Yes | Yes | Yes
Ant | Yes | No | Yes | Yes | Yes | No | Yes | Yes | Yes
ANTLR | No | No | Yes | No | No | No | No | Yes | No
AppleScript | No | No | No | No | No | No | No | No | No
Assembly Language | No | No | Yes | No | No | No | No | No | No
AWK | No | No | Yes | Yes | Yes | Yes | No | No | No
Bourne shell scripts | No | No | Yes | No | No | No | No | No | No
C, C++ | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes
C# | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes
C Shell | No | No | Yes | No | No | No | No | No | No
CFScript | Yes | No | Yes | Yes | Yes | No | No | Yes | No
Ch | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes
CICS | Yes | No | Yes | No | No | No | No | Yes | No
COBOL | Yes | No | Yes | Yes | Yes | No | No | Yes | Yes
D | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes
DB2 | No | No | Yes | No | No | No | No | Yes | Yes
DTD | Yes | No | Yes | Yes | No | No | No | Yes | No
Fortran | No | No | Yes | Yes | Yes | No | No | Yes | Yes
High Level Assembler | Yes | No | Yes | No | No | No | No | Yes | Yes
HTML, CFML | Yes | No | Yes | Yes | Yes | No | Yes | Yes | Yes
IDL | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
INI, config files | No | No | No | No | No | No | No | No | No
InstallScript | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
J# | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes
Java 5.0, JDK 1.5 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes
JavaScript | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes
JCL | No | No | Yes | No | No | No | No | Yes | No
JSP | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | No
Lex | No | No | Yes | No | No | No | No | Yes | No
Lua | Yes | No | Yes | Yes | Yes | No | No | Yes | No
Makefile | No | No | Yes | No | No | No | No | No | No
Modula-2 | No | No | Yes | No | No | No | No | Yes | Yes
Objective C | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
Pascal | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
Perl | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
PHP 5 | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
PL/I | Yes | No | Yes | No | No | Yes | No | Yes | No
PL/SQL | No | No | Yes | Yes | Yes | No | No | Yes | Yes
PowerNP Assembler | No | No | Yes | No | No | No | No | Yes | No
Progress 4GL | No | No | Yes | No | No | No | No | No | No
PV-WAVE | Yes | No | Yes | Yes | Yes | Yes | No | Yes | No
Python | Yes | No | Yes | Yes | Yes | Yes | No | Yes | No
REXX | No | No | Yes | Yes | Yes | No | No | Yes | No
Ruby | Yes | No | Yes | Yes | Yes | Yes | No | Yes | No
SAS | No | No | Yes | Yes | Yes | No | No | Yes | No
Slick-C | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes
System Verilog | Yes | No | Yes | Yes | Yes | Yes | No | No | No
Tcl | No | No | Yes | Yes | Yes | Yes | No | Yes | Yes
Transact-SQL | No | No | Yes | Yes | Yes | No | No | Yes | No
VBScript | Yes | No | Yes | Yes | Yes | No | No | Yes | No
Vera | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes
Verilog | Yes | No | Yes | Yes | Yes | No | No | Yes | No
Visual Basic | No | No | Yes | Yes | Yes | No | No | Yes | Yes
Visual Basic .NET | Yes | No | Yes | Yes | Yes | No | No | Yes | Yes
VHDL | Yes | No | Yes | Yes | Yes | No | No | Yes | No
Windows batch files | No | No | Yes | No | No | No | No | No | No
Windows PowerShell | No | No | Yes | No | No | No | No | Yes | No
x86 Assembly | No | No | Yes | No | No | No | No | Yes | No
XML, XSD | Yes | No | Yes | Yes | Yes | No | Yes | Yes | Yes
Yacc | No | No | Yes | No | No | No | No | Yes | No

Special Features for Mac OS X

The following features are available for programmers using Mac OS X:

  • Xcode project support

  • Objective-C language support

  • Emulations for CodeWarrior, BBEdit, and Xcode

  • Mac OS X default line endings are the same as UNIX

See Platform-Specific Notes for information on Mac OS X documentation conventions and keyboard and mouse commands.

Embedded Languages

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, Context Tagging picks up embedded tags. For example, the Defs tool window displays function names if any exist. Embedded language colors are user-defined.

Embedded Languages in HTML

SlickEdit® supports any embedded language in HTML. However, Web browsers usually only support VBScript, JavaScript, and/or Java, while Web servers typically support VBScript, Java, or PHP. The following screen is an example of VBScript, JavaScript, and Java embedded in HTML:

Embedded Languages in Perl and Other Scripting Languages

To allow SlickEdit® to recognize embedded source in a Perl script or UNIX shell, prefix the HERE document terminator with the color coding lexer name. The following Perl example shows HTML embedded in a Perl script. Unknown languages are color-coded in string color.

Supported Editor Emulations

SlickEdit® provides keyboard emulations for the following editors:

  • BBEdit

  • Brief

  • CodeWarrior

  • CodeWright

  • CUA (SlickEdit's default)

  • Epsilon

  • GNU Emacs

  • ISPF

  • SlickEdit (Text Mode edition)

  • Vim

  • Visual C++ 6

  • Visual Studio default

  • Xcode

  • Eclipse

See Emulations for more information.

Supported Project Types

SlickEdit® supports the creation of projects that use the Microsoft Visual C++ Toolkit and Microsoft .NET Framework Software Development Kit. Many other project types are supported, including many for Java. For a list of all supported types, see the list box on the Project → New dialog. For information about working with projects, see Workspaces and Projects .

Supported Version Control Systems

SlickEdit® provides support for the version control systems listed below. To learn more about working with version control in SlickEdit, see Version Control .

  • CCC/Harvest

  • ClearCase®

  • ComponentSoftware RCS

  • CVS

  • MKS Source Integrity®

  • Perforce

  • PVCS®

  • RCS

  • SCC

  • StarTeam®

  • Subversion

  • TLIB

  • Visual SourceSafe®


Installation

System Requirements

SlickEdit® is supported for many operating systems. The table below shows the available platforms and space requirements for each. 256 MB of available memory is recommended. SlickEdit may need more depending on your usage.

Platform/Version | Requirements
Microsoft® Windows® 7, Vista™, XP, 2000 | 170 MB disk space
Linux®, 32-bit or compatible, kernel 2.6 or later, and LSB compliant | 240 MB disk space
AIX 5.3 and later | 300 MB disk space
HP-UX® 11 and later | 310 MB disk space
Solaris™ SPARC® 7 and later | 290 MB disk space
Solaris x86 10 and later | 270 MB disk space
Mac OS® X v10.4 and later (X11 required) Note that the Mac OS X version of SlickEdit supports universal binaries to run on Intel® and Power PC® Macs. | 240 MB disk space

Installing SlickEdit®

Use the information below to install SlickEdit® on your Windows, Linux, UNIX, or Mac OS X platform.

Note

When you start SlickEdit for the first time after an installation, several dialog boxes automatically appear that require action. See Running SlickEdit for more information.

Windows

When you place the CD in the drive, the setup program starts automatically. Use the setup wizard to complete the installation. To start setup if it does not start automatically, or if you are installing a downloaded product, double-click the .msi file to start the setup.

Note

The Windows installer will not allow you to install more than one copy of SlickEdit® with the same version number on the same machine. For example, you can have SlickEdit v13.0.2 and SlickEdit 2009 installed, but you cannot install two copies of SlickEdit 2009. To create a second installation, copy the installation directory to another location.

Linux/UNIX

Complete the following steps to install SlickEdit® on a computer running Linux or UNIX:

  1. Mount the CD-ROM block device to a local directory. To prevent file name casing issues on HP-UX®, use the -o cdcase option when mounting.

  2. At an xterm or full-screen prompt, change to the applicable UNIX platform directory on the CD-ROM (where <cdrom> is your CD-ROM mount point):

    • AIX - <CD-ROM>/aix/rs6000

    • HP-UX - <CD-ROM>/hpux/hp9000

    • Linux x86 - <CD-ROM>/linux/x86

    • Solaris™ Sparc® - <CD-ROM>/solaris/sparc

    • Solaris x86 - <CD-ROM>/solaris/x86

  3. Start the installation at the prompt: # ./vsinst

Mac

Complete the following steps to install SlickEdit® on a computer running Mac OS X:

  1. Ensure that X11 is fully installed on your system (see the Note below).

  2. Browse to the mac folder on the product CD.

  3. Double-click slickedit.dmg. A disk image is mounted, with Finder™ displaying the contents.

  4. Double-click slickedit.pkg, and the installation process begins.

The default installation path is /Applications.

After installing SlickEdit, if you want to use SlickEdit keyboard shortcuts instead of X11 shortcuts, you will need to disable X11 keyboard shortcuts. See Mac OS X Notes for instructions.

Note

SlickEdit runs as an X11 application, so X11 must be installed prior to installing SlickEdit. To check if X11 is installed, click Finder → Applications → Utilities . A file named X11.app should exist at this location. Otherwise, you will need to install X11 from your OS X installation CD:

  1. Using installation disk 1, run the Optional Installs.mpkg utility.

  2. At the Install Type phase, expand the Applications tree and select X11.

  3. Continue with the X11 installation.

Unattended Installation

Using command line switches and arguments, SlickEdit® can be installed in an unattended manner. This is useful for network administrators to deploy SlickEdit on multiple client machines with standardized settings. Instructions can be downloaded in PDF format from www.slickedit.com/docs/unattended.

Licensing

SlickEdit uses FLEXnet® Publisher from Macrovision to manage licenses for both Named User and Concurrent User licenses. Named User licenses are stored on the local machine. Concurrent User licenses use a FLEXnet server to access a license.

Concurrent User Licenses

Concurrent License users will find complete instructions for setting up a license server at www.slickedit.com/flexnet. This also contains information on how to configure an installation of SlickEdit® to find the server.

When you run SlickEdit, if a license is not found, the SlickEdit License Manager wizard is run. This wizard is only for configuring Named User licenses. Please exit the wizard and contact your FLEXnet administrator for assistance in configuring your installation to correctly locate the FLEXnet server.

Named User Licenses

SlickEdit uses a license file to authenticate your license. A Full License file is not bound to a particular machine and may be used on as many machines as allowed by the End User License Agreement. A Trial License file is bound to a single machine.

In most cases, the location of the license file is managed by SlickEdit and depends on your platform. However, if you are setting up a portable installation of SlickEdit, to run on a USB drive for example, you should manually copy the license file to the win subdirectory of your SlickEdit installation on Windows or the bin subdirectory on all other platforms.

License Manager

When SlickEdit is run, it checks for a license. If one can't be found, the SlickEdit License Manager wizard is run. You can also manually run the SlickEdit License Manager by selecting Help → License Manager . The SlickEdit License Manager provides the following options:

  • Request a Trial License - To try out SlickEdit, click the option to obtain a Trial License. This will take you to a Web page where you can register for a trial. A license key will be e-mailed to you. A trial can be converted to a Full License by entering a Full License key at any time in the SlickEdit License Manager, or by downloading a Full License file.

  • Purchase a license - To buy a Full License, visit the SlickEdit Web site at www.slickedit.com or select this option, which will take you directly to the product page for SlickEdit.

  • Use a license server (concurrent licenses) - Use this to configure concurrent licenses using a FLEXnet server.

  • Request a license for a purchased product - If you have already purchased a license for SlickEdit, you can download a license file to this computer from the SlickEdit Web site.

  • Install a license file - Copies a downloaded license file to the location SlickEdit uses to store the file.

Upgrading SlickEdit®

We recommend keeping up with SlickEdit releases and updates to get the latest features and bug fixes. Major versions contain many new features and enhancements to SlickEdit. Minor versions are usually released subsequently to a major version and contain additional enhancements. Hot fixes are published frequently and contain a smaller set of changes to address a specific problem with the previous release.

Upgrading to a New Version

Checking for Updates

SlickEdit® automatically checks and notifies you when a new major or minor version is available. When an update is available, the Update Manager displays a dialog showing a list of available updates and descriptions, and provides a link to download the update.

You can set the frequency of how often SlickEdit checks for these updates and change proxy settings through the Update Manager Options dialog. To access these options, from the main menu, click Help → Product Updates → Options (or click the Options button on the Update Manager dialog).

You can also check for updates manually. From the SlickEdit main menu, click Help → Product Updates → New Updates . Or, visit the Support Web site at www.slickedit.com/support and click Updates.

Migrating Settings

SlickEdit® creates a versioned subdirectory in your configuration directory corresponding to each version of SlickEdit you have installed. SlickEdit migrates your settings to a new subdirectory corresponding to the new version the first time the new version is run. However, as a precaution, we recommend that prior to installing an update, exit SlickEdit and make a backup of your user configuration directory. For information about the user config directory's location and the files it contains, see User Configuration Directory.

Certain customizations that you have made to the editor are not preserved. These are:

  • Modifications to menus and toolbars

  • Custom forms

If you have added your own toolbar, you can reload the macros that contain these customizations. Most of these changes are saved in vusrobjs.e (Windows) or vunxobjs.e (UNIX/Linux/Mac). To reload these macros, first, copy the vusrobjs.e or vunxobjs.e file from the previous configuration directory to your new configuration directory. Then, to load these files, simply activate the SlickEdit command line (by pressing Esc in most emulations), and enter the file's full path and file name. If the path contains spaces, be sure to surround it with double quotes.

See Creating and Distributing Custom Toolbars for more information about backing up user-created toolbars and toolbar buttons.

Note

All customizations or additions to the main SlickEdit toolbar (known as the Standard toolbar) are lost after an upgrade, because SlickEdit rebuilds the toolbar for each new version.

Keeping the Previous Version

You can continue to run a previous version of SlickEdit® by installing the new version into a new directory. Because the config directories are versioned, each version of SlickEdit will locate the matching settings.

Applying Hot Fixes

Hot fixes are small, localized changes to address a specific problem with the previous release. They can consist of Slick-C® modules, configuration files, installation files, or DLL files. Hot fixes are distributed as ZIP files and made available on the SlickEdit Support Web site at www.slickedit.com/support. For convenience, a number of hot fixes may be aggregated into a single ZIP file.

Note

If a user loads a hot fix on a multi-user installation of SlickEdit®, only that user will be updated. To apply a fix to a multi-user installation, please contact Product Support for assistance.

Installing Hot Fixes

To install a hot fix, complete the following steps:

  1. Save the ZIP file to any location on your computer.

  2. From the SlickEdit® menu, click Help → Product Updates → Load Hot Fix (or use the command load_hotfix). The Apply Hot Fix dialog appears.

  3. Browse to and select the hot fix ZIP file, then click OK.

  4. A confirmation prompt appears describing the hot fix. Click Yes. The installation starts.

Details about the installed fix will be sent to the Output tool window.

Listing Installed Hot Fixes

To see the list of hot fixes installed, from the SlickEdit® menu, clickHelp → Product Updates → List Installed Fixes (or use the command list_hotfixes). A summary sheet appears with the location of the hot fix ZIP file, its revision number, the date it was published, and its description.

Unloading Hot Fixes

To unload a hot fix, use the unload_hotfix command from the SlickEdit® command line. At the prompt, select the hot fix to unload and click OK.

Caution

Unloading a hot fix will reload the original files distributed with the previously installed release of SlickEdit. If other hot fixes include the same file or are dependent on the unloaded files, SlickEdit may behave unpredictably. If more than one hot fix has been installed, you may need to reinstall the other hot fixes after removing one of them.

Uninstalling SlickEdit®

To remove SlickEdit from your computer, use the information below specific to your platform.

Note

Uninstalling SlickEdit does not automatically remove the user configuration directory. See User Configuration Directory for more information.

Windows

If your computer is running Windows, complete the following steps to uninstall SlickEdit®:

  1. From the Windows Control Panel, open Add or Remove Programs.

  2. Click Change or Remove Programs.

  3. Select the SlickEdit installation that you want to remove.

  4. Click Change/Remove or Remove. This will delete the installation directory as well as any registry settings. You may be prompted to reboot for the changes to take effect.

Alternatively, double-click on the original .msi installation file, located on the product CD or in your product installation download, and select Remove.

Linux/UNIX

To uninstall SlickEdit® on a computer running Linux or UNIX, simply delete the installation directory.

Mac

To uninstall SlickEdit® on a computer running Mac OS X, open the Application folder, and drag the SlickEdit icon to the Trash, then empty the Trash.


Startup and Exit

Running SlickEdit

You can launch SlickEdit in a variety of ways, depending on the operating system you are using:

  • Desktop Icon - On Microsoft Windows and Mac OS X operating systems, use the SlickEdit icon displayed on your desktop. On Windows, you can customize the command used by the icon to set Invocation Options.

  • Start Menu - Some operating systems, including Microsoft Windows, provide a menu for launching installed applications.

  • Command Line - Use the operating system command line to invoke the vs binary. This is the primary method for launching SlickEdit on Linux and UNIX. The command line accepts Invocation Options that can be used to change the behavior of SlickEdit.

The vs executable is stored in the win subdirectory of your SlickEdit installation on Windows and the bin subdirectory on Linux/UNIX/Mac.

Tip

  • You can make settings so that certain items such as files, clipboards, and Selective Display are restored each time SlickEdit is started. See Restoring Settings on Startup for more information.

  • You can also set a macro to be run upon startup. See the section "Hooking Exit and Other Events" in the Slick-C® Macro Programming Guide for more information.

Running SlickEdit for the First Time

The first time SlickEdit is started after an installation, several dialog boxes may be automatically launched that require action:

  • If SlickEdit cannot locate a valid license for this version, the License Manager will run. It provides options to install or download a license file. For more information, see License Manager

  • The Quick Start Configuration Wizard will guide you through the steps of setting up the most common options. It also allows you to view the release notes and other useful information. For more information, see Quick Start Configuration Wizard.

Note

For Mac OS X, SlickEdit requires a one-time background caching of the font list. This will take a few minutes, after which SlickEdit will start normally.

Running Multiple Instances

You can run multiple instances of SlickEdit® at the same time. On Windows or Mac OS X, right-click on the SlickEdit icon displayed on the desktop. In the Target field, append the text +new to the end of the existing text.

When launching SlickEdit from the operating system command line, append +new to the invocation command (for example, vs +new).

Caution

SlickEdit cannot save configuration changes when another instance is running. If you attempt to close an instance that contains configuration changes, while another instance is running, a save-failed message is displayed, then a prompt asks whether or not to exit anyway.

Invocation Options

SlickEdit can be invoked with a variety of options to control key editor behaviors. This allows you to specify things like a file or multiple files to edit and a different location for your SlickEdit configuration. A full list of invocation options is listed in the table, below.

The command line syntax for invoking SlickEdit is as follows:

    vs {options} file1 {options} file2

The vs executable is stored in the win subdirectory on Windows and the bin directory on Linux/UNIX/Mac.

Invocation options can also be stored in the VSLICK environment variable. When SlickEdit is invoked, it inserts the value of this variable before the options typed on the command line. See Environment Variables for a list of variables you can use with SlickEdit.

The table below shows a list of available invocation options.

Invocation Option

Description

-? (Windows) or -h[elp] (UNIX)

Display a summary of command line switches and their usage.

+ 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 instance. Default is -new.

-sc config_path

Specifies the configuration directory. This directory will be used to find and save configuration files. Sets the SLICKEDITCONFIG environment variable to config_path.

-supf kbdfile

(UNIX only) Specifies a keyboard file for mapping the keyboard at the X (modmap) level. Some UNIX systems have keyboard mappings that need to be modified so that keys like Backspace and Delete (and sometimes others) function properly. Use the xmapkeys program to generate the keyboard file.

-sr restore_path

Specifies the directory containing 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 1000 kilobits). 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 200 K.

-sm max_file_size

Specifies the maximum amount of buffer text (in megabytes) that may be edited at one time. Additional memory will automatically be allocated to allow for the editing of up to 2 GB of files. Choosing this option will provide you with better performance.

-suxft

(Linux only) Disables Xft font support. Use this option only if you have problems with fonts under Linux and would like to use non-Xft fonts, like previous versions of SlickEdit.

-summ "[ x_1 y_1 ] width_1 height_1 ,

[ x_2 y_2 ] width_2 height_2 "

(UNIX only) Specifies multiple monitor configuration. You must specify at least two monitors. By default, SlickEdit tries to automatically detect if you have two monitors. However, this only works if your monitors have the same width, height, and y values. In a left-to-right monitor configuration, x and y are not necessary. The following two examples are equivalent because the monitors are in a left-to-right configuration:

  • -summ "1024 768,1024 768"

  • -summ "0 0 1024 768,1024 0 1024 768"

Specifying the -summ option in the previous example would not be necessary because it would be automatically detected correctly. However, the following monitor configurations would not be detected correctly:

  • -summ "1600 1200,1024 768"

  • -summ "0 0 1024 768,0 768 1024 768"

  • -summ "1024 768,1024 768,1024 768"

The above examples represent the following configurations: left-to-right, 2 monitors; top-to-bottom, 2 monitors; left-to-right, 3 monitors.

Note that you can specify this option in the VSLICK environment variable and set it in your vslick.ini file so you don't need to specify this for every invocation. For more information, see Setting Environment Variables in vslick.ini.

-sul

Disables the byte-range file locking that SlickEdit normally performs. Enable this option when receiving an "access denied" error with remote files.

-x pcode_name

Alternate state file (.sta) or pcode file (.ex).

-m menu_file

Name of menu resource to use for the SlickEdit menu bar.

-p cmdline

Execute command with arguments given and exit. No other options or file names 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 file names 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. File names 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 the command has spaces (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.

+ 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 UNIX format temporary buffer with name buf_name.

+TM [ buf_name ]

Start a Macintosh format temporary buffer with name buf_name. Classic Mac line endings are a single carriage return (ASCII 13).

+TD [ buf_name ]

Start a DOS format temporary buffer with name buf_name.

+ or -E

Turn on/off expand tabs to spaces when loading file. Default is off.

Exiting the Program

To safely exit SlickEdit®, from the menu, click File → Exit (Alt+F4). You can also use the SlickEdit command line to exit. Activate the command line by pressing the Escape key or by clicking on the message line with the mouse, then typesafe_exit. If files have not been saved or closed upon exit, you will be prompted with a dialog to save or discard any changes.

Tip

  • You can make settings so that certain items such as files, clipboards, and Selective Display are restored each time SlickEdit is started. See Restoring Settings on Startup for more information.

  • You can also set a macro to be run upon exit. See the section "Hooking Exit and Other Events" in the Slick-C® Macro Programming Guide for more information.

Exiting with Modified Buffers

If files have not been saved or closed upon exit, you will be prompted with a dialog to save or discard any changes. The buffer names in the list box are buffers which have not been saved. See Exiting with Modified Buffers Dialog for option descriptions. See also Saving Files.

Default Exit Options

To access default options for saving configuration changes, click Tools → Options → Application Options → Exit . See Exit Options for descriptions of these options.


Product Support

Product Support is provided to customers with a current Maintenance and Support agreement. Limited support is also available to new customers and trial customers to help them get started. For more information, please visit the SlickEdit Product Support web page at www.slickedit.com/support .

The Product Support Web site provides a list of frequently asked questions and answers as well as information about upgrades and hot fixes. You can launch this site in a browser by clicking the menu item Help → SlickEdit Support Web Site or by going directly to www.slickedit.com/support. You can also access the FAQ page directly by clicking the menu item Help → Frequently Asked Questions .

SlickEdit has an active user community supported by forums, where users can posts questions and get answers. Though created as a means for users to help other users, the SlickEdit team monitors the forums and answers selected questions. Visit the forums at http://community.slickedit.com.

See Documentation for more help resources.

Contacting Product Support

To contact Product Support, use the menu item Help → Contact Product Support . This will automatically gather your program information, such as the current version and serial number, which helps us to better answer your questions. If SlickEdit won't run, you can report problems via the web at: www.slickedit.com/support.

For problem reports, please provide the following information:

  • A description of the problem.

  • The language you are working in (C/C++, Java, etc.).

  • SlickEdit program information (automatically provided if you use Help → Contact Product Support ). Select Help → About SlickEdit , then select the Program Information tab, click Copy To Clipboard and paste the information in the problem report.

  • A code snippet to help us reproduce it (if possible).

To speak to a member of our Product Support team, call the Support line at 1.919.473.0100. Telephone support is only available during business hours for customers with a valid Maintenance and Support Service Agreement.


Product Improvement Program

SlickEdit strives to meet the demands of its customers. Without knowing what features or languages our customers are using, it is a challenge to determine which areas of the product need our attention most. To close this information gap, we developed the Product Improvement Program. The program runs in the background, logging events as they happen in your daily usage.

We gather a variety of data, including information about command invocation, toolbars and tool windows, settings, project and workspace usage, error messages, and file types. We do not make any record of file, project, or workspace names, directory structures, or source code.

Periodically, the compiled data is sent to SlickEdit. The first time the program tries to send data, you are prompted.

The dialog contains a link to preview the data that was compiled before deciding to send it to SlickEdit. You can also get more information by clicking the Product Improvement Program Info link, which takes you to an informational page on SlickEdit's website. Select the Yes radio button to send the data and continue your participation. If you do not wish to have any data logged or sent to SlickEdit, select the No option. After making your selection, click OK. You can also click the Ask me later button to postpone the data transmission. No data will be sent at that time, and you will be prompted again later. You can also change your participation status at any time by going to Tools → Options → Application Options → Product Improvement Program . For more information about these options, see Product Improvement Program Options.

After this first prompt, if you agree to participate in the program, all data transmissions are completely silent. Transmission only occurs at start-up of the application or when the editor has been idle for a period of time, thus causing the least possible disruption to your work.

All data is completely anonymous. We do construct a source ID to enable us to determine how many data sources we have. This ID is a concatenation of machine name, user name, and serial number that is then hashed. The hash result is used as the ID. Therefore, even with a unique ID for each user, we are unable to associate an ID with any particular person or source.


Performance Tuning

SlickEdit was designed with speed in mind. Most operations perform nearly instantaneously. However, the size and location of your codebase can affect SlickEdit performance along with various settings within SlickEdit. This guide will help you to make sure that you get the best performance possible.

First Steps

In some cases, Symbol Coloring can cause delays while typing. If you are experiencing performance problems while typing, please turn off that feature to see if the problem is fixed. For more information, see Symbol Coloring.

File Locations

Whenever possible, make sure that your source code, projects, and workspaces are stored locally. SlickEdit is subject to normal file latency. When files are stored remotely they take longer to access.

Source Files

Storing your source files remotely will increase the amount of time it takes to open and save files. Additionally, it will increase the amount of time it takes to tag your files. Tagging is the process of building a symbol database, which is used for many advanced operations in SlickEdit. On a fast, reliable network you may find that storing your source files remotely does little to harm performance. On a slow network, these operations will likely take unacceptably long to complete.

Workspaces and Project Files

Even if you store your source files remotely, you should try to store your workspace and project files locally. These files are referenced and updated frequently by SlickEdit, so you want to be sure they can be processed quickly. Further, the location of your workspace determines the location of your tag files. The tag files are used for operations, like completions, that happen while you type. Storing your tag files remotely often introduces unacceptable latency into this access, slowing down SlickEdit's response time.

You set the location of workspaces and projects when you create them using Project → New . For best performance, be sure to specify a location on a local drive. SlickEdit makes no assumptions about the location of your source code files. They need not reside in the same subdirectory as the project. So you can still add remote source files to a project that you are storing locally. For more information see Workspaces and Projects.

SlickEdit Configuration Files

Your SlickEdit Configuration files should also be stored locally. This is where SlickEdit stores a great deal of information about your options and the state of SlickEdit. Having these files located remotely will introduce latency at unpredictable times.

By default, SlickEdit stores your config files in \\My Documents\My SlickEdit Config on Windows and in $HOME/.slickedit on UNIX, Linux, and Mac. These are typically on a local drive. You can specify a different location for your config using the -sc option when SlickEdit is launched:

vs -sc /dev/seconfig

If necessary, use this option to specify a new location for your config files that is on a local drive.

Memory and Caching

Along with making sure that your tag files are stored locally, you should make sure that SlickEdit has enough memory to hold all of your tag files in memory. When it doesn't, it has to page sections of the tagging database in and out of the cache.

To increase the size of your tag file cache, select Tools → Options then expand Editing → Context Tagging and change the value for Tag file cache size (KB). Try to make it large enough (within reason) so that we can get your entire workspace tag file and extension specific tag files into memory. To determine that size, open Tools → Tag Files . This lists all of the tag files in SlickEdit. Not all of them are used at any one time, though. You may also want to adjust the value for Tag file cache maximum (KB). This setting controls the maximum amount of memory that can be dedicated to the tag file cache depending on the amount of memory available on your machine at the time that SlickEdit starts. If you have a machine with lots of memory available, setting this maximum to a large value is the simplest way to get good tag file performance without having to worry about adding up the total sizes of your tag files as described below.

For a given workspace, you need to add the size of your workspace tag file, listed at the top of the tree, to the size of the extension-specific tag files used in that workspace. If you are only using a single language, then it will just be the one extension-specific tag file. If you are using a mixture of languages, you will need to add the tag file for each language. If you have tagged multiple tool chains in a given language, like GNU C/C++ and Microsoft Visual Studio, you need only factor in the one used by that workspace. The Tag Files dialog will tell you the location of the tag files. Use the operating system to determine the size of the files. Add them together, and use that value for the tag file cache size.

The tag file cache size is a global value that is used for all workspaces, so you should set this value for your largest workspace. If that workspace is atypical or infrequently used, set it based on the tag file sizes used by a more typical workspace.

It is possible that you could hit a threshold where increasing the cache size reduces performance. This is likely to be the case if the tag file cache size exceeds the amount of free memory available on your system. So, once you've set this value check your operating system and make sure it isn't being forced to do a lot of paging. If it is, you should decrease the tag file cache size. Like most performance tuning, this could be an iterative process until you find a value that provides the best speed for your codebase and system.

You can configure SlickEdit to increase the size of the tag file cache based on the amount of memory available at startup, up to a certain amount. This allows you to define a sliding window for the tag file cache size depending on the amount of available memory on your machine at the time SlickEdit is started. To adjust this setting, select Tools → Options then expand Editing → Context Tagging and change the value for Tag file cache maximum (KB). The default for this upper limit is 192M.

Tuning Context Tagging

After you've checked the items above, the next optimizations to try are the various control settings for Context Tagging. SlickEdit's Context Tagging system provides many of the advanced features that make using SlickEdit so great. Context Tagging creates a database of all the symbols in your code and where they are located. This is used to provide rapid navigation from a symbol to its definition, for all kinds of completions, and for rapid symbol searches. All of that information is great, but it does you no good if you have to wait too long to get it.

As mentioned above, Symbol Coloring can cause performance problems while it attempts to identify and resolve symbols. If you are having a performance issue while typing, the first thing to do is to shut off Symbol Coloring. For more information, see Symbol Coloring.

To configure Context Tagging, open Tools → Options and expand Editing → Context Tagging . This screen contains a number of parameters you can use to control the performance of Context Tagging.

Background Tagging

If you are experiencing sporadic pauses in SlickEdit, the first thing to check is that Background tagging of other files is off. It's generally fine to leave Background tagging of open files on. We recommend that you turn that off only after you've applied all other tuning approaches. Likewise, you should leave Tag file on save enabled. This ensures that the tag database is always current by tagging a file when it is saved.

The context tagging engine is single threaded with SlickEdit, and background tagging has been known to introduce random periods of unresponsiveness. Generally, you don't need to tag other files in the background. Once you've tagged your workspace, you only need to tag files that are being changed, and SlickEdit does this automatically if you leave the other two values on.

The exception to this is if you fetch updated files from a source code repository. Then, other developers may have changed files or added new ones. SlickEdit won't know about those changes until you retag the workspace. For normal size projects, SlickEdit can tag the workspace in a few minutes. On extremely large projects, this can take over an hour. Your strategy for how and when to tag depends on the size of your codebase.

For a normal codebase, you can open the Project tool window and right-click on the workspace entry, and select Retag Workspace. You will have to wait while SlickEdit retags your workspace. Retagging is generally faster since it only has to look at new or modified files.

For extremely large codebases, you may want to script this process. You could set up a nightly process that fetches all new and updated files from source control, adds the new files to appropriate projects, and then runs the tagging engine on them.

Context Tagging Maximums

These tuning options for Context Tagging set maximum values for specific tagging operations. You can change these values when a specific operation is found to be too slow. For example, if you type in a function call, like

foo();

After typing the open parenthesis, SlickEdit will look for a list of local variables that match the parameters in foo. The value, Maximum candidates for list parameters determines the upper limit in that search. By default it is set to 200. Once that number is reached, it will stop looking for matches. If you find that SlickEdit is taking too long in this situation, you can decrease that number to, say, 100. You have to weigh the tradeoff between completeness and responsiveness.

We won't go into each of the values in that list. When you select an item in the Options dialog, help is provided that will guide your decision on whether to change that value.

Warning

You can easily degrade the performance of SlickEdit by changing the Context Tagging defaults. You should compare your changes to the performance using a default configuration. To create a default configuration, use the -sc options on the command line:

vs -sc config

This will launch SlickEdit putting the configuration in a "config" directory below your SlickEdit install directory. Be sure to use a new location or delete that directory before launching SlickEdit in this manner, or it will use the config that was already in place.

References

The Context Tagging options also contain a group for References. If you are experiencing performance issues with reference lookup (when using Ctrl +/ or push-ref), then you may want to change some of the values in this group. Turning on Build workspace tag file with references makes reference look-ups faster, but it makes creating tag files take longer. For normal sized codebases the slow-down is negligible, so we often turn this on.

If you have a large codebase, you may want to turn on Find references incrementally (faster). When set to True, reference queries are faster because SlickEdit does not open each candidate file to eliminate invalid references. So, you get your answer more quickly, but it may not be fully accurate.

Add Wildcard

When you set up a project, you can use Add Wildcard on the Project Properties dialog to specify directories to search for new files. This capability is useful when other team members are not using SlickEdit. In that case, other programmers will be adding files without updating and checking in the project files.

Each time SlickEdit is launched, projects that were configured using Add Wildcard search the specified directories for new files. This is an exhaustive search and can take a long time, particularly on large projects or if source directories are stored on network resources.

If you are experiencing delays when launching SlickEdit, you may want to redefine your projects using Add Tree instead of Add Wildcard. When new files are added, you will have to use Add Tree to find and add them to your projects. Which approach is better for you depends on how frequently you look for new files and the size of your codebase.

For more information on Add Wildcard see Add Wildcard.


Chapter 2. Quick Start

SlickEdit is one of the most powerful programming editors available today, and one of the most flexible. SlickEdit contains hundreds of options to let you work your way. Most people don't have time to read the whole user guide. Take a few minutes to go through the Quick Start Configuration Wizard, and you'll be up and running with SlickEdit in no time.

Quick Start Configuration Wizard

The Quick Start Configuration Wizard helps you to set up common options and shows you where these options are usually accessed. Each set of options is accessible outside of the wizard, through the normal SlickEdit Options dialogs, by selecting Tools → Options from the main menu. Several pages have Customize links to their normal Options location.

The Quick Start Configuration Wizard has two methods of navigation. You can use the Previous and Next buttons to visit the adjoining parts of the wizard. You can also jump directly to a section by clicking on the section name in the tree on the left side of the wizard. You can run the wizard again later by selecting Tools → Quick Start Configuration from the main menu.

The following items are configurable through the Quick Start Configuration Wizard:

  • Emulation - select which other editor SlickEdit will emulate.

  • Colors - set your color scheme.

  • Fonts - set your font for unicode and non-unicode languages.

  • Coding - set common coding preferences, like indentation, brace styles, and the use of syntax expansion.

  • Associate File Types - determine which file types should automatically be loaded in SlickEdit.

  • Workspaces & Projects Setup - allows you to quickly set up a new project and workspace.

  • Context Tagging - build tag files for common compiler libraries to aid in code navigation.

  • More Information - allows you to export your newly configured options, as well as see the Release Notes and some Cool Features of SlickEdit.

Emulation

CUA is the default emulation, which provides key bindings familiar to Microsoft Windows users. Emulations are provided for other popular editors including Vim, GNU Emacs, Brief, and more. If you are already an experienced user of one of these other tools, you will find that these emulations will help you get up and running quickly. Otherwise, you may find that the CUA emulation is best.

You can change your emulations at any time by selecting Tools → Options from the main menu. Then expand Keyboard → Emulation . For more information, see Emulations.

Colors

Many users are particular about the colors they use. On this form, you can select a color scheme that will be used to color all editor windows. You can also select your symbol coloring scheme, which defines how different symbols are detected and colored. Preview your selections in different languages using the preview window and the language combo box.

To change your colors later, select Tools → Options from the main menu. Then expand Appearance → Colors . For more information on setting your colors, see Colors, Color Coding, and Symbol Colors.

Fonts

Fonts are another matter of personal preference. The Quick Start Configuration Wizard lets you choose different font styles for Unicode (HTML, XML, etc) editor windows and Non-Unicode editor windows. Use the preview windows to view your selections in the languages of your choice.

To set fonts later, select Tools → Options from the main menu, then expand Appearance → Fonts in the options tree. For more information on setting fonts, see Fonts.

Coding

SlickEdit features many options to control your editing experience. On this form you can set three important ones for all language modes. Normally these are set one language at a time. You can set the following options:

  • Indent settings - controls your indent amount and tab size, as well as whether you would like to indent using tab or space characters.

  • Brace style - controls the location of braces in C-style languages.

  • Syntax Expansion - specifies whether or not you want SlickEdit to automatically expand block structures like if or for for all languages. This option uses a tri-state checkbox. A check indicates that Syntax Expansion will be turned on for all languages. Unchecked indicates that it will be turned off for all languages. When it is grayed in, the individual language settings will be retained and no changes will be made.

  • Line Numbers - controls display of line numbers for all languages. This uses a tri-state checkbox. A check indicates that Syntax Expansion will be turned on for all languages. Unchecked indicates that it will be turned off for all languages. When it is grayed in, the individual language settings will be retained and no changes will be made.

To see where these options are normally configured, click the Customize link next to each setting.

Associate File Types

This screen lets you select the file types that will be automatically opened in SlickEdit from Windows Explorer. For more information see Associate File Types Options.

Workspaces and Projects Setup

To get the most out of SlickEdit, we need to tag your source code files. This is done automatically for files that are part of a project. This lets you use powerful features like SlickEdit's Symbol Navigation to quickly jump from a symbol to its definition or see a list of references.

It is critical that you use the correct project type. Click Launch Project Setup Wizard to choose the right project type based on the language and compiler you are using. You can run this wizard later by selecting Project → New from the main menu. There is also a checkbox to shut off the wizard once you become more familiar with the project types you are using.

Context Tagging

Context Tagging creates a database for all the symbols in your code. This allows SlickEdit to rapidly jump from a symbol to its definition or show a list of references. Other features, such as completions, also use this information. To properly work with your code, SlickEdit will need to tag the libraries associated with the compiler you are using. Click Tag Compiler Libraries to begin that process.

If you choose to skip this step now, SlickEdit will automatically tag your compiler libraries if you are using Microsoft Visual Studio, GNU C/C++, or Java. For other compilers, you can tag them later by selecting Tools → Tag Files and then clicking the Auto Tag button. For more information about Context Tagging, see Context Tagging

More Information

The final step in the Quick Start Configuration Wizard, allows do three things:

  • Export Options - this is useful to save your settings. You can do this to share your settings with others or to restore your settings later.

  • View Cool Features - this is a list of the key features that set SlickEdit apart from other editors. Look through this list to learn how you can become more productive.

  • View the Release Notes - this contains a list of known limitations and other useful information pertinent to this release.


Additional Settings

The Quick Start Configuration Wizard helps you set the most commonly changed settings in an editor. This section lists some additional settings you may want to alter. SlickEdit contains a vast number of settings to allow you to work your way. It can be very helpful to browse through the options hierarchy and see what else is available.

Options are changed using the Options dialog, which is displayed when you select Tools → Options from the main menu. Option settings are divided into two categories: General Options and Language-Specific Options.

General Options

General options affect all languages. All menu paths are relative to the Options dialog (Tools → Options ).

  • Clicking past the end of a line - To have the ability to place the cursor past the end of a line, select Editing → Cursor Movement , then set the option Click past end of line to True.

  • Specifying cursor up/down behavior - By default, cursor_up and cursor_down commands go to the same column of the next or previous line, unless that line is shorter than the current column, in which case the cursor is placed at the end of the line. To have the cursor placed in virtual space at the end of the line, click Editing → Cursor Movement , then set the option Cursor up/down places cursor in virtual space to True.

  • Changing the line insert style - In code, a line of text is a meaningful unit of functionality. SlickEdit® treats line selections differently than character selections. Line selections are pasted either above or below the current line, saving you from tediously positioning the cursor at the beginning or end of a line prior to pasting. To specify where line selections are pasted, click Editing → General , then set the Line insert style option to Before or After.

  • Expanding/collapsing with a single click - Selective Display Plus and Minus bitmaps can be expanded or collapsed with a single click rather than a double-click. To specify this option, select Appearance → Advanced , then set the value of Expand/collapse to Expand on single click.

Language-Specific Options

Language-specific options are configured for each language that you work with in SlickEdit. These options are accessed from the Options dialog ( Tools → Options ) under Languages → [Language Category] → [Language] . All menu instructions below are relative to this path.

Tip

A quick way to access language-specific options for the current buffer is to use the Document → [Language] → Options menu item (or the setupext command).

  • Setting symbol navigation - For C and C++, by default, with each attempt to navigate to a definition (Ctrl+Dot or Search → Go to Definition ), you will be prompted for whether you wish to navigate to the definition (proc) or the declaration (proto). To specify that Go to Definition preferably navigates to one or the other, select the language-specific Context Tagging category, then select one of the Prioritize navigation to symbol options.

  • Showing the info for a symbol under the mouse - By default, as the mouse cursor floats over a symbol, the information and comments for that symbol are displayed. To turn this behavior off, select the language-specific Context Tagging® category, then clear the option Show info for symbol under mouse.

  • Configuring C/C++ preprocessing - For C and C++, your source code base will typically include preprocessor macros that you use in your code for portability or convenience. For performance considerations, Context Tagging® does not do full preprocessing, so preprocessing that interferes with normal C++ syntax can cause the parser to miss certain symbols. To configure your preprocessing to avoid these omissions, see C/C++ Preprocessing.


Set Up a Workspace and Project

The Quick Start Configuration Wizard contains a step to launch the New Project Wizard. This helps you select the correct project type based on your programming language and compiler. This section will help you set up a new project and workspace if you choose not to use the wizard.

A workspace defines a set of projects and retains the settings for an editing session. A project defines a set of related files that build and execute as a unit. For each project you can specify the set of files it contains, a working directory, a set of commands to build and execute the project, compiler options, and dependencies between other projects. A tag file for each project's source files is automatically created and maintained, enabling SlickEdit's advanced navigation and unique Context Tagging® lookup features.

For more detailed information than is provided here, see the following sections:

  • Workspaces and Projects

  • Building and Compiling

  • Running and Debugging

Create a New Workspace

Typically, you create a new workspace by creating the first project for that workspace (see Create a New Project. To create a new workspace without a project, complete the following steps:

  1. From the main menu, select Project → New . This will display the New Project Wizard. Click Cancel to close the wizard.

  2. Select the Workspaces tab.

  3. In the Workspace name text box, give a name to your workspace.

  4. In the Location text box, type a path or use the Browse button to pick a location.

Create a New Project

To create a new project, complete the following steps:

  1. From the main menu, click Project → New .

  2. It is important that you select the correct project type. The New Project Wizard will help you choose the correct project type based on your language and compiler. If you already know the correct project type to use, you can click Cancel to close the wizard. Then select the type of project that you want to use from the list box on the left side of the dialog.

  3. In the Project name text box, give the project a name.

  4. In the Location text box, type a path or use the Browse button to pick a location. If the directory does not exist, a prompt appears to create it when you click OK.

  5. In the Executable name text box, type the name of the executable file or output file.

  6. If the new project is for an existing workspace, select Add to current workspace. If this is the first project in a new workspace, select Create new workspace.

  7. Specify whether this project depends on another project in this workspace by checking the Dependency of check box and selecting the depended on project from the drop-down list.

  8. Click OK.

Add Files to the Project

To add files to your new project, complete the following steps:

  1. From the main menu, click Project → Project Properties .

  2. Select the Files tab.

  3. To add individual files, click Add Files, and select the files that you want to add.

  4. To add the source files in a directory, click Add Tree. Then select the directory and the file filter that you want to use.

  5. When you are finished adding files, click OK.


Start Coding

After settings have been configured and a workspace and project are set up, you are ready to start coding. See the Editing Features chapter to learn more about how SlickEdit® can help in your everyday work.

Tutorials are available for C/C++ and Java that describe how to create, build, and run a sample Hello World program. See Hello World Tutorial (C/C++) or Hello World Tutorial (Java).

If you're not ready to get to work just yet, you may want to configure even more preference options. For information, see the User Preferences chapter.


Chapter 3. User Interface

This chapter contains the following topics:

  • Screen Layout

  • Toolbars and Tool Windows

  • Accessing Menus

  • SlickEdit® Command Line

  • Screen Management

  • Using the Mouse and Keyboard

  • Printing

Screen Layout

The SlickEdit Interface

SlickEdit® uses a Multiple Document Interface (MDI), which opens all documents for the application within the application's main window, called the MDI frame or window. To open a file in a different window, you can run another instance of SlickEdit. For more information see Running Multiple Instances.

The screenshot, below, shows a representative SlickEdit session and identifies common items on the screen:

SlickEdit contains the following screen elements:

  • Title bar - The title bar shows the product name and the name and path of the file currently in focus.

  • Main menu - The main menu is displayed under the title bar (File, Edit, Search, etc.).

  • Standard toolbar - Toolbars are groups of buttons (called toolbar controls) that allow you to perform specific operations. The Standard toolbar is displayed and docked under the main menu by default. Toolbars can be moved by clicking and dragging the grab bars (or title bar if floating). See Toolbars and Tool Windows for more information.

  • Editor pane - The editor pane is the viewing area within SlickEdit inside of which editor windows (files or buffers that are being editing) are floating or docked.

  • Editor windows - Editor windows are files or buffers that are open for editing and are docked or floating inside of the editor pane. See Files, Buffers, and Editor Windows for more information.

  • File tabs - File tabs are displayed for open buffers and files. Right-click on file tabs to display a menu of save, close, and window splitting options. Display of file tabs can be toggled from the main menu by clicking View → Tool Windows → File Tabs .

  • Tool windows - Tool windows are similar to toolbars except they may also contain settings and/or allow the viewing of information, and they can be docked. You can auto-hide a tool window by clicking on the Pin button in the top right corner. See Toolbars and Tool Windows for more information.

  • Size bars - Size bars indicate the parts of SlickEdit that can be resized. When the pointer becomes a double-headed arrow, click and drag to adjust the size in the direction indicated.

  • Message line and SlickEdit command line - The message line appears at the bottom of the SlickEdit application window. It displays a single line of information, providing feedback from various operations in SlickEdit. The message line and the command line share the same screen space. As a result, when clicking the message line or invoking an editor command that requires the command line, the message line is hidden and the command line is displayed. See SlickEdit® Command Line for more information.

  • Status line - The status line holds the following indicators:

    • Line and column indicators - To the right of the message/command line are the line and column indicators for the current cursor position. Click on these indicators to move the cursor position.

    • Selection indicator - This displays the number of lines or characters in the current selection. This is useful to measure the length of a word or string, or the number of lines in a function. Click on the indicator or use the select_toggle command to create successively larger common selections. For example, if you have a character selection, you can click on the indicator or use select_toggle to extend the selection to include the entire word. See Selection Indicator for more information.

    • Permissions toggle - This area indicates the read/write permission setting of the file or buffer in focus. The letters RW indicate that the current file or buffer is read-write. The letters RO indicate that the file or buffer is read-only. Click on the letters to toggle between modes.

      You can configure the editor to prevent modification of read-only files. To access this setting, click Tools → Options → Editing → General , then set the option Protect read-only mode to True. Now the editor will not let you modify a file that is in read-only mode. The save command will always prompt for a different output file name if the file is in read-only mode.

    • Macro recording indicator - When a macro is being recorded, the recording indicator REC is active (not dimmed). Click on the indicator or use the record_macro_toggle command to toggle recording on and off. See Recorded Macros for more information.

    • Insert or Replace toggle - The Insert/Replace toggle is located to the right of the recording indicator. The letters Ins indicate that the editor is in Insert mode (default). In Insert mode, typing a character pushes characters at and after the cursor to the right. The letters Rep indicate that the editor is in Replace mode. In Replace mode, typing a character replaces the character under the cursor. Click on the letters to toggle between modes.

      To start in Replace mode instead of the default Insert mode each time the editor is invoked, from the main menu, click Tools → Options → Editing → General , then set the Start mode option.

    • Current character indicator - When editing an SBCS/DBCS mode file or non-Unicode file, the current character is displayed in hexadecimal format. If the current character is a double byte character (DBCS), then two bytes and its Unicode equivalent are displayed in hexadecimal (95 74 U+4ED8). When editing a Unicode file, the current composite character is displayed in hexadecimal. The indicator field is blank when the cursor is past the end of the line. See Encoding for more information about Unicode.

    • Alert Icons - Used to display information about operations within SlickEdit. It can contain icons for things like Feature Notifications (see Notifications) and Background Tagging (see Creating Tag Files for Compiler Libraries).

Tabular Lists

Several dialogs and tool windows in SlickEdit®, such as the Bookmarks Tool Window and the Key Binding Options screen, present data in a tabular list.

To sort the data, click on a column header to sort in ascending order, or click again to sort in descending order. An arrow in a column header indicates that the data is sorted by this column, and the direction of the arrow indicates the ascending (up arrow) or descending (down arrow) sort order.

You can resize columns by clicking and dragging the column separators. If a file path column is not large enough, the text is elided so that you can always see the file name. If a text column is not large enough, the contents are abbreviated. You can always hover over a row with the mouse to see a tooltip that shows the entire contents of each cell.


Toolbars and Tool Windows

Toolbars are groups of buttons (called toolbar controls) that allow you to perform specific operations. Tool windows are used to display and manipulate various kinds of information. Both toolbars and tool windows can be docked. For documentation purposes, the terms "toolbars" and "tool windows" are sometimes used interchangeably.

Displaying Toolbars and Tool Windows

By default, the Build, Output, Preview, References, and Search Results tool windows are docked into a tab group on the bottom of the editor, while the Defs, FTP, Open, Projects, and Symbols tool windows are docked into a tab group on the left side of the editor. The Standard toolbar contains commonly appearing icons, docked at the top of the editor.

There are many more toolbars and tool windows that are not displayed by default. You can view and toggle the display of these by clicking View → Toolbars or View → Tool Windows , then selecting the item to display.

Note

Some tool windows that are used for debugging are only available when the editor is in debug mode. See Debug Tool Windows for a list.

Docking and Grouping Toolbars and Tool Windows

Toolbars and tool windows have display and docking options, which are accessed by right-clicking on the tool window's title bar on Windows or the tool window's background on UNIX/Mac:

  • Dockable - Toolbars and tool windows can be docked, or locked into, any edge within the editor pane. When this setting is on, you can click on the toolbar or tool window's title bar and drag and drop the window into position. When multiple tool windows are docked to the same location, they are automatically organized into tab groups.

  • Floating - This is the default setting when a toolbar or tool window is first displayed. It allows you to click on the toolbar or tool window's title bar and drag it around within the editor pane. When this option is selected, the toolbar or tool window always appears on top of any open editor windows.

  • Auto-hide - This setting is only available for tool windows when they are docked. When the tool window is not being used, it "slides" out of view and is replaced with a tab showing the name of the tool window. Click on the tab to "slide" the tool window back into view. Click the Pin button on the right of a tool window's title bar to pin a tool window in place or unpin it to let it slide.

  • Hide - This setting hides the toolbar or tool window. To view it again, from the main menu, click View → Toolbars or View → Tool Windows .

Caution

If you undock a tool window that has been docked, the tool window may be destroyed and re-created, so you may lose any data that has been entered.

Customizing Toolbars

Toolbars can be customized by using the Toolbar Options. To display these options, from the main menu, click Tools → Options → Appearance → Toolbars . Or, right-click on any toolbar's background and select Customize.

To add a button to a toolbar, drag the button from the Toolbar Options Category tab to the intended toolbar (see Toolbar Options, Categories Tab). To remove a button, drag it off the toolbar.

Changing Toolbar Button Command Properties

To change a toolbar button's command binding, on the actual toolbar, right-click on any control and select Properties. This will display the Toolbar Control Properties Dialog. You can change the command, the description, and the button image, as well as the command key binding and auto-enable properties.

Customizing Tool Windows

Tool Windows can be customized using the Tool Window Options. To display these options, from the main menu, click Tools → Options → Appearance → Tool Windows or right-click in the tool windows title bar and select Customize.

Available Toolbars and Tool Windows

The display of toolbars and tool windows can be toggled on and off by clicking the items in the View → Toolbars or View → Tool Windows menus.

Toolbars

The available Toolbars are described below. They are listed in the View → Toolbars menu.

Debug

Provides buttons for commonly used debugger commands including start, restart, step, toggle breakpoint, and add watch. It is also very useful when you are not in debug mode. For more information about debugging within SlickEdit®, see Debugging.

Edit

Contains operations to edit text, such as convert to uppercase, indent lines, etc. These are the same options found under the main menu item Edit. For more information, see Basic Editing.

HTML

Used to insert tags and values into an HTML file, spell check from the cursor or on selected text, beautify the document, open an FTP connection for transferring files, and more. For more information about these operations, see the topics HTML, Spell Checking, and FTP.

Project Tools

Contains options for the current project to process compiler error messages, run the build and compile commands, and check files in or out of version control. See Building and Compiling and Version Control for more details on these operations.

Selective Display

Allows you to collapse unwanted lines of code so you can better see the structure of your code. Buttons allow you to outline a file with function headings, hide selected lines or lines inside code blocks, display the Selective Display dialog box, and end selective display. See Selective Display for more information about this feature.

Standard

Toggles display of the Standard toolbar, which contains buttons for commands common to most applications, including Open File, Save, Cut, Copy, Paste, Undo, Redo, etc. By default, this toolbar is docked along the top of the editor just under the main menu.

Context Tagging®

Contains several buttons for manipulating tags and navigating. For information about these operations, see the following topics: Building and Managing Tag Files, Find and Replace, Bookmarks, and Navigation.

Tools

Contains shortcut buttons for commonly used tools and operations within SlickEdit®, such as beautification, DIFFzilla®, merging, spell checking, and more. For more information about these operations, see the following topics: Beautifying Code, Comparing and Merging, Find File Dialog, Using the Calculator and Math Commands, Spell Checking, and Hex Mode Editing.

XML

Contains options to beautify and validate XML documents. See XML for more information about these operations.

Tool Windows

The tool windows listed below are used for various operations. Some tool windows are only available while debugging. They will only appear in the View → Tool Windows menu while you are debugging. Those tool windows are listed separately, in Debug Tool Windows.

Backup History

Creates a backup version of a file each time it is saved, creating a detailed version history for this file. This is useful to track changes between check-ins. Use this tool window to compare previous versions to the current version or restore a previous version of the file. For more information, see Backup History.

Bookmarks

Displays a list of bookmarks and provides operations to add, delete, and navigate to a selected bookmark. This window can also be accessed by clicking Search → Bookmarks → Bookmarks Tool Window . For more details, see Bookmarks.

Breakpoints

Lists breakpoints (and exception breakpoints for Java) and allows you to modify them. You must use this tool window to set breakpoint properties. It can be used when you are not in debug mode. Right-click within the tool window to display a context menu which allows you to jump to the location of a breakpoint or modify breakpoints. The Breakpoints tool window can also be accessed from the Debug → Windows menu. For more details on this topic, see Setting Breakpoints .

Build

Docked as a tab along the bottom of the editor by default, the Build tool window, sometimes called the "concurrent process buffer," is a shell window that allows you to type operating system commands and see the results. It 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.

Right-click in the Build window to access build, search, and clipboard options. There are two options settings that apply to the Build tool window:

  • Auto exit process - To have the Build tool window automatically exited when the buffer is closed or when exiting the editor, from the main menu, click Tools → Options → Editing → General , then set the option Auto exit build window to True.

  • CR w/o LF erases line in build window - It is possible that output sent to the Build window may contain carriage return (CR) characters without subsequent line feed (LF) characters. This causes the line to be erased in the Build window. To prevent SlickEdit from erasing lines in this situation, from the main menu, click Tools → Options → Editing → General , then set the option CR w/o LF erases line in build window to False.

For more details on this topic, see Building and Compiling.

Class

Docked as a tab on the left side of the editor by default, the Class tool window provides an outline view of both the members of the current class as well as any visible inherited members. This tool window also shows the inheritance hierarchy of the current class. This is useful for object-oriented programming languages such as Java. In addition to the menu item, you can activate or toggle this window by using the activate_tbclass or toggle_tbclass commands. See Class Tool Window for more information.

Clipboards

Allows you to preview and manage clipboards. Shows a list of recently used clipboards and lets you insert a clipboard into the current buffer. The tool window contains a Preview area that lets you see the entire contents of a clipboard with color coding. In addition to the View → Tool Windows → Clipboards menu item, there are several other ways to display the tool window:

  • Using the menu item Edit → List Clipboards (Ctrl+Shift+V or list_clipboards command)

  • Using the activate_clipboards command

  • Toggle the window with the toggle_clipboards command

See Clipboards for more information.

Code Annotations

Code Annotations allow you to store information about code--such as task notes, personal comments, and review comments--without actually modifying the code. This tool window provides a detailed view of annotations that you have created as well as operations for adding, modifying, and removing annotations. You can also use the tool window to create your own annotation types. See Code Annotations for more information.

Current Context

Docked in the top upper-right section of the editor by default, Current Context displays the logical location of the cursor within your code. If it is within a class, it displays the class name. If it is within a function, it displays the function name. If the function is within a class, it displays the class and the function name. See Current Context Toolbar for more information.

Defs

Docked as a tab on the left side of the editor by default, the Defs (Definitions) tool window contains the defs browser, which provides an outline view of symbols in the current workspace. In addition to the menu item, you can activate or toggle this window by using the activate_defs or toggle_defs commands. See Defs Tool Window for more information.

Exceptions

Allows you to add, edit, disable, and delete breakpoints. For more information, see Setting Breakpoints .

Feature Notifications

Displays a list of notifications about features that have altered the contents of your file. For example, a feature notification is displayed when Syntax Expansion expands an if or for statement. For more information see Notifications.

File Tabs

Toggles visibility of the tabs for the open buffers in the editor. By default, these tabs are visible and the maximum number that can be displayed is 255. Right-click on the file tabs to display a menu of save, close, and window splitting options. For more information, see Files, Buffers, and Editor Windows.

Files

Allows you to view open files, project files, and workspace files, sortable by file name or path. Contains a filter to narrow the list of files incrementally, as well as shortcuts for basic file operations (Open, Save, etc.). This tool window can also be displayed by clicking Document → List Open Files (Ctrl+Shift+B), or by using the list_buffers command. For more information, see Files Tool Window.

Find and Replace

Used to perform search and replace operations. This tool window can also be displayed by using the key binding Ctrl+F or by clicking Search → Find . See Find and Replace and Search Dialogs and Tool Windows for more information.

Find Symbol

Used to locate symbols which are declared or defined in your code. It allows you to search for symbols by name using a regular expression, substring, or fast prefix match. See Symbol Browsing and Find Symbol Tool Window for more information.

FTP Client

Used to connect to FTP servers and transfer files. As with most FTP clients, local directories and files are displayed in the left section of the tool window and the FTP server directories and files are on the right. Right-click on files to display a menu of FTP operations. See Working with FTP for more information.

FTP

Used to connect to FTP servers and open files. Right-click on files to display a menu of FTP operations. See Working with FTP for more information.

Message List

Automatically displays output messages from processes running in SlickEdit®, such as build warnings and errors. This tool window is docked into the bottom tab group of the editor by default. In addition to the menu item, you can activate or toggle this window by using the activate_messages or the toggle_messages command, respectively. See Message List for more information.

Open

Docked as a tab on the left side of the editor by default, the Open tool window can be used to browse directories and open files on disk. Right-click in the Files list to display a menu of options. For more information, see Open Tool Window. For more information about opening files, see Opening Files.

Output

Docked as a tab on the bottom of the editor by default, the Output tool window displays output from various operations within the editor, such as errors.

Preview

Docked as a tab on the bottom of the editor by default, the Preview tool window provides a portal for viewing information in other files without having to open them in the editor. It automatically shows this information when you are working with certain features. In addition to the menu item, you can activate or toggle this window by using the activate_preview or toggle_preview commands. See Preview Tool Window for more information.

Projects

Contains the project browser, which allows you to browse the files in your open workspaces. It is docked as a tab on the left side of the editor by default. See Workspaces and Projects for more information.

References

Docked as a tab on the bottom of the editor by default, the References tool window displays the list of symbol references (uses) found the last time that you used the Go to Reference feature (Ctrl+/ or push_ref command (see Symbol Navigation for more information). In addition to the menu item, you can activate or toggle this window by using the activate_refs or toggle_refs commands. See References Tool Window for more information.

Regex Evaluator

Provides the capability to interactively create and test regular expressions. You can also access this window by clicking Tools → Regex Evaluator . See The Regex Evaluator for more details.

Search Results

Docked as a tab on the bottom of the editor by default, this window displays the results of multi-file searches, or when the option List all occurrences is selected on the Search Dialogs and Tool Windows. See Find and Replace for more information about searching and replacing.

Slick-C® Stack

Displays errors that occur within the editor. If errors occur during normal use, you can send this information to Product Support as a reference (see Contacting Product Support). If an error occurs in one of your macros, you can use this information to help debug it. Double-clicking on a line of code in this window will open the file and go to the line in the file that contains the error.

Symbols

Docked as a tab on the left side of the editor by default, the Symbols tool window contains the symbol browser, which lists the symbols from all of the tag files. In addition to the menu item, you can activate or toggle this window by using the activate_symbols or toggle_symbols commands. See Symbols Tool Window for more information.

Symbol Properties

Displays detailed information about the symbol at the cursor location. Note that you cannot use this window to change the properties. See Symbol Properties Tool Window for more information.

Unit Testing

Provides an interface to run JUnit unit tests and view the results. See JUnit Testing for more details.

Debug Tool Windows

The tool windows listed below are used for debugging. In debugging mode, the View → Tool Windows menu displays these items along with the other tool windows. See Debugging for more information about working with these features.

Autos

Displays the contents of auto, local, and member variables used before and after the current execution line. Right-click within the tool window to display a context menu which allows you to jump to the definition of a variable or add a variable to the watches.

Breakpoints

This tool window is also available when not in debug mode. See Breakpoints tool window described previously.

Call Stack

Displays the stack for the thread selected in the Thread combo box. Double-click on a method to navigate to any stack execution point.

Loaded Classes

(Java only) Displays the currently loaded classes. Double-click on a class to display class properties. Double-click on a member to go to the definition of the member. Right-click on a method and select Set breakpoint to add a breakpoint to a method. Right-click on a member variable and select Add Watch to add a watch on a static class member. Use the Show system classes check box to display classes outside the scope of your workspace, like classes in the JFC.

Debug Sessions

Lists the open debugging sessions.

Exceptions

The Exceptions tool window is also available when not in debug mode. See Exceptions tool window described previously.

Locals

Displays the locals variables for the method selected in the Stack combo box. You can modify the values of variables by double-clicking in the Value column of simple types.

Members

Displays the value of static and non-static members for any method context. You can modify the contents of a member variable by specifying a valid Java expression. Right-click within the tool window to display a context menu which allows you to jump to the definition of a variable or add a variable to the watches. You cannot add or remove entries from an array.

Memory

(GNU C/C++ only) Displays the contents of the specified memory address. Enter the memory location in a hexadecimal, decimal, or any valid C expression. In addition, you may specify the number of bytes to display.

Registers

(GNU C/C++ only) Displays the contents of hardware registers.

Threads

Allows you to view the threads currently running and choose a thread context, so you can view the stack for a particular thread. It displays the thread, group, status, and state.

Watch

Contains watch tabs that are used to display the value variables or expressions you specify for the context method. There are several ways to add a new watch variable or expression:

  • Double-click on the <add> text in the Name column of the tool window.

  • Right-click on a variable or selected expression and select Add Watch.

  • Select a variable or expression, then from the main menu, click Debug → Add Watch .

To display a context menu which allows you to jump to the definition of a variable or delete a watch expression, right-click within the Watch tool window.


Menus

The SlickEdit main menu, displayed at the top of the editor, provides a way to access most of the editing features of SlickEdit. Context menus are available in the editor windows and tool windows with operations specific to those windows. For listings of all the menus and associated dialogs and tool windows, see the Menus, Dialogs, and Tool Windows chapter.

Menu items are mapped to commands, so all of the items that you can access through a menu have command line counterparts. For example, to cut selected text, you could use the menu item Edit → Cut , or you could use the cut command.

You can customize menus by adding items, deleting items, or changing the command that is executed. See Creating and Editing Menus for more information.

Right-Click Context Menus

Click the right mouse button to access submenus or context-sensitive menus that list commonly used editing functions. Context-sensitive menus are supported in edit windows, all toolbars, and in many dialog boxes, including the DIFFzilla® Dialog, the Multi-File Diff Output Dialog, and the Context Tagging - Tag Files Dialog.

Context Menu Settings

Language-specific settings are available for specifying which context menu to display in the editor window, based on whether text is selected.

To access these options, from the main menu, click Tools → Options → Languages , expand your language category and language, then select General. Choose from the following options in the Context menus group box:

  • Menu if no selection - This specifies that the context menu is displayed when right-clicking in an editor window that does not have a selection.

  • Menu if selection - This specifies that the context menu is displayed when right-clicking in an editor window that does have a selection.

  • Select first (affects all extensions) - When checked (default), a selection can be made with the right mouse button instead of displaying the language-specific menu. When this is not checked, select menu items by clicking and dragging the mouse.

Menu Hotkeys

A menu hotkey allows you to choose items from the main menu using the keyboard. This is done using the Alt key and a letter in the menu item. This works independently from key bindings, which bind arbitrary key sequences to commands. If a menu item has a key binding, it is shown to the right of the menu entry. See Key and Mouse Bindings for more information about key bindings.

SlickEdit provides two options for menu hotkeys:

  • Alt Menu - When selected, pressing the Alt key switches focus to the menu bar and underlines the hotkeys. Now, when you type a letter, it selects an the corresponding item on the menu.

  • Alt Menu Hotkeys - For emulations other than CUA, selecting this option gives priority to the menu hotkeys, overriding any key bindings using the same Alt key combination.

Alt Menu

When you press the Alt key in SlickEdit without following it with another key, focus shifts to the menu bar, and the hotkeys in the menu names are underlined. Pressing one of the underlined letters will activate the corresponding menu or menu item. For example, press Alt,V,A to invoke the View → Show All command. Pressing Alt again toggles the focus back to the cursor location. This is controlled by the Alt menu option (Tools → Options → Keyboard and Mouse → Advanced ), which is on by default.

Tip

On Microsoft Windows, to force menu names to be underlined all the time instead of just when you press Alt:

  1. Right-click on the desktop and select Properties.

  2. Select the Appearance tab.

  3. Click on Effects.

  4. Uncheck Hide underlined letters for keyboard navigation until I press the Alt key.

  5. Click OK.

Alt Menu Hotkeys

This option applies only to non-CUA emulations. You can make Alt-prefixed key bindings display the corresponding drop-down menu. For example, when you press Alt+F (where F corresponds to the underlined letter on the File menu), the File menu drop-down is displayed. Thus, pressing Alt+F,D will invoke the File → Change Directory command. To enable this option, set the Alt menu hotkeys option (Tools → Options → Keyboard and Mouse → Advanced ) to True.

Caution

When this option is enabled, the Alt menu hotkeys may override your normal key bindings.

Short Key Names in Menus

The SlickEdit® main menu displays the key bindings for commands associated with each menu entry. These bindings can be condensed for non-CUA emulations. For example, Ctrl+O becomes C-O. To enable this behavior, set the option Short key names (Tools → Options → Appearance → Advanced ) to Condensed.

See Key and Mouse Bindings for more information about working with bindings in SlickEdit.


SlickEdit® Command Line

SlickEdit provides a command line as a means to execute most SlickEdit operations without taking your hands off of the keyboard. This is useful for less frequently used operations that may not warrant a key binding, or complex commands that require arguments.

Note

For information about passing arguments to SlickEdit from the operating system command line, see Invocation Options.

Tip

  • SlickEdit® commands that contain two or more words are written throughout our documentation with underscore separators: for example, cursor_down. Note that in the user interface, however, these commands are displayed with hyphen separators: for example, cursor-down. Both of these forms work in SlickEdit, so you can use whichever style you prefer.

Activating the Command Line

To activate or toggle the SlickEdit® command line in any emulation, click on the message line with the mouse. Key bindings are also provided for toggling the cursor to the command line, based on your emulation:

  • BBEdit - Esc

  • Brief - Esc

  • CodeWarrior - Esc

  • CodeWright - F9

  • CUA (SlickEdit's default emulation) - Esc

  • Epsilon - Alt+X or F2

  • GNU Emacs - Alt+X or F2

  • ISPF - Esc

  • SlickEdit (Text Mode edition) - Esc

  • Vim - Ctrl+A

  • Visual C++ - Esc

  • Visual Studio default - Esc

  • Xcode - Esc

  • Eclipse - Esc

See Emulations for more information.

Command Line History

The SlickEdit® command line maintains a command history, allowing you to quickly reuse previously entered commands. Once the command line is open, use the arrow keys to scroll up and down in the command history.

Command Line Completion

As you type a command on the SlickEdit® command line, a list of matching completions is displayed, including any command line arguments used in a previous command. Use Tab or the Down arrow to move to the next command in the list, and Shift+Tab or the Up arrow to move to the previous command. Press the Enter key to select the current command.

Some commands, like set_var, prompt for arguments. SlickEdit maintains a history of arguments used for each command. Use the same completion and history mechanism as described above for commands to complete arguments. Typically, the most recent argument you typed is automatically displayed.

Tip

Command completions are useful for discovering operations in SlickEdit. For instance, to find all operations that begin with "find", type find in the command line, and SlickEdit will display a list of those commands. Some search commands do not begin with "find", like gui_find, so you may not discover all related commands this way. To find all commands containing the word "find," use the Key Bindings options page (Tools → Options → Keyboard and Mouse → Key Bindings or gui_keybindings command). See Key and Mouse Bindings for more information.

For information about other items that can be automatically completed, see Completions.

Disabling Command Line Completions

To disable command line completions, from the main menu, click Tools → Options → Appearance → General and set the option List command line completions to False. Note that this option does not apply to the Vim command line.

Using Shortcuts Inside the Command Line

The SlickEdit® command line is a text box control just like the text boxes that appear in various dialog boxes. For a list of key shortcuts that can be used inside the command line and other text boxes within SlickEdit, see Key Shortcuts in Text Boxes.

Using the Command Line to View Key Binding Associations

You can use the SlickEdit® command line to determine what keys are associated with what commands, and vice-versa.

Tip

Alternatively, you can use the Key Bindings options page (Tools → Options → Keyboard and Mouse → Key Bindings or gui_keybindings command) to see a list of command/key binding associations. See Key Binding Options for more information.

Determining the Command of a Key Binding

To determine the function of a key or key binding, use the what_is command (Help → What Is Key ). For example:

  1. Click Help → What Is Key , or activate the SlickEdit® command line (by pressing Esc) and type what_is (or type what and press the spacebar for auto-completion), then press Enter.

  2. The command line will prompt with the text What is key. Enter the key sequence in question. A message box will be displayed with the information. If the key or key sequence is not bound to a command, no message will appear.

Determining the Key Binding of a Command

To determine the key to which a command is bound, use the where_is command (Help → Where Is Command ). For example:

  1. Click Help → Where Is Command , or activate the command line and type where_is, then press Enter.

  2. The command line will prompt with the text Where is command. Enter the command in question. The status line will display the key binding or state that the command is not bound to a key.

Command Line Switches

In addition to setting options through the graphical interface, you can specify or override some options on the SlickEdit® command line for immediate, one-time use. This way, you don't need to constantly open the Options dialog to change an option every time you want to enable or disable it. For example, when using the save or save_as command, you can specify many of the Save File Options, such as Expand tabs to spaces, for just this one operation.

Switches are described in the documentation when the switch is helpful or applicable. To use a switch, type it between the command and file name. Depending on whether you want to enable or disable the option, type a plus (+) or minus (-) sign before the switch character. No matter the default setting, the specified switch will be used.

For example, perhaps you have the Save File Option Expand tabs to spaces set to False. This means that when you save a file, tabs are not expanded to spaces. However, you may want to quickly save a file with tabs expanded. To enable the option just this once, use the save command with the E switch, as follows:

      save +E

Starting a Program from the Command Line (Shelling)

You can use the SlickEdit® command line to start a program. Click on the command line or press Esc to toggle the cursor to the command line. Type the program name and arguments and press Enter. When entering a command that the editor does not recognize as an internal command, a path search is performed to find an external program to execute. To use a program whose name contains space characters, enclose the name in double quotes. For example, "this is" will start a program named this is.exe if it exists.

Executing the command dir (or ls) from the command line will invoke the SlickEdit File Manager. To bypass an internal command, prefix the command with "dos". To execute the dos dir command, type dos -w dir and press Enter.

To get an operating system prompt, type the command dos with no arguments or from the main menu, click Tools → OS Shell .

Command Line Prompting

Many commands that display dialog boxes have equivalent commands that prompt for arguments on the SlickEdit® command line. For example, the gui_open command (File → Open or Ctrl+O), which displays the Open file dialog, corresponds to the edit command, which is used to open files via the SlickEdit command line. If you frequently use key bindings to open dialogs, a faster method of entering arguments is to use Command Line Prompting. When this feature is enabled, you are prompted on the command line for arguments that you would otherwise select as options on a dialog. For example, instead of displaying the Open file dialog when you press Ctrl+O, the SlickEdit command line is invoked, so you can type the name of the file to open and any other desired arguments. To enable Command Line Prompting, from the main menu, select Tools → Options → Keyboard and Mouse → Advanced and set the Command line prompting option to True.

The following table contains a partial list of user interface commands and their command line counterparts.

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

Common SlickEdit® Commands

Commands are essentially the names of functions. The Help system contains a list of macro functions, organized into categories (see Help → Contents Macro Functions by Category). The following is a list of twenty commands that we use frequently in our own work, which you may also find useful.

1. | e file | Edit a file
2. | sa file | Save file as
3. | number | Go to line number
4. | f symbol | Find a symbol
5. | / search_string / options | Search for a string
6. | c/ search / replace / options | Replace a string
7. | gt/ search / options | Substring search for a symbol
8. | sb name | Set a bookmark
9. | gb name | Jump to a bookmark
10. | help topic | View Help on topic
11. | man command | Show UNIX man page
12. | cd directory | Change directory
13. | dir directory | Show directory in the File Manager
14. | list wildcards | Show directory tree in the File Manager
15. | del filename | Delete file
16. | pushd directory | Push directory
17. | popd | Pop directory
18. | set env=value | Set environment variable
19. | dos command | Execute command outside of editor
20. | math expr | Evaluate expression


Screen Management

There are several features regarding the handling of the monitor screen, as described below.

Full Screen Mode

To get the largest possible view of your code, use Full Screen Mode. This hides all of the toolbars and tool windows, expanding the editor frame to fill the application window. This is useful when you need screen real estate for editing large files and/or when tool windows and toolbars are not needed.

To activate full screen mode, from the main menu, click View → Full Screen , or use the fullscreen command.

Multiple Monitor Support

SlickEdit® supports the use of multiple monitors on Windows, UNIX, and Mac OS X platforms. When the application, or any dialog or tool window, is moved to a particular monitor, the location is remembered. If you are running UNIX or Mac OS X and using multiple monitors that have different width and height values, you will need to set the invocation option -summ. See Invocation Options for more information.

JAWS Screen Reader Software

JAWS®, the widely used Windows-based screen reading software developed by Freedom Scientific, allows applications to be accessible by vision-impaired software developers. All toolbars, menus, tab controls, and tree controls are accessible, along with all labels, controls, and contents of dialog boxes. Additionally, JAWS accurately reads the contents of the editor pane, Output tool window, and Projects tool window. Key bindings allow fast and accurate code navigation and control of other functionality.

The Context Tagging® features Color Coding, Go to Definition, and Go to Reference are not supported. Access is provided to third-party integrated development environments and version control systems. However, each third-party product is responsible for its own accessibility functionality.

Configuring JAWS

The installation program auto-detects if JAWS is installed. If detected, you are prompted to configure JAWS. To manually configure JAWS, type the following text in the environment section of the win\vslick.ini file (located in your SlickEdit® installation directory):

        VSLICKJAWS=1

This is the only configuration needed.


Using the Mouse and Keyboard

SlickEdit® provides four ways to launch operations: commands, menu items, key bindings, and buttons. For example, to launch the Open dialog box in order to open a file, you could use any of the following methods:

  • Type the gui_open command on the SlickEdit command line.

  • Click File → Open .

  • Press the key binding F7 or Ctrl+O.

  • Click the Open button on the Standard toolbar.

The command forms the basis of each method. As you can see, commands are often bound to more than one key sequence. They can also be bound to mouse events, including the spin wheel. Key bindings are the fastest and most efficient means of executing operations.

See SlickEdit® Command Line for more information about commands, and Key and Mouse Bindings for more information about bindings.

Key Shortcuts in Text Boxes

Most keyboard shortcuts for basic text operations can be used inside any text box in SlickEdit®, including the SlickEdit command line, which is also a text box. The table below shows a list of these shortcuts, based on the CUA emulation.

Note that even if you are not using the CUA emulation, by default, you can still use the common Cut/Copy/Paste keyboard shortcuts inside text boxes (Ctrl+X/Ctrl+C/Ctrl+V, respectively). To disable this capability, so that you can use your emulation's Cut/Copy/Paste shortcuts, from the main menu, click Tools → Options → Editing → General , then set the option CUA text box to False.

Text Box Editing Operation | Key Shortcut
Append Cut | Ctrl+Shift+X
Append to Clipboard | Ctrl+Shift+C
Copy Word to Clipboard | Ctrl+K
Copy | Ctrl+C
Cut Line | Ctrl+Backspace
Cut to End of Line | Ctrl+E
Cut Word | Ctrl+Shift+K
Cut | Ctrl+X
Delete Character Under Cursor or Selection | Delete
Delete Previous Character or Selection | Backspace
Expand Alias | Ctrl+Shift+O
Expand Partially Typed Parameter or Insert Space | Spacebar
Extend Selection to Mouse Position | Shift+Click
Insert Mode Toggle | Insert
List Clipboards | Ctrl+Shift+V
List Matches to Partially Typed Parameter | ?
Lowercase Word | Ctrl+Shift+L
Move Cursor Left | Left arrow
Move Cursor Right | Right arrow
Move Cursor to Beginning of Line | Home
Move Cursor to End of Line | End
Next Word | Ctrl+Right arrow
Paste | Ctrl+V
Previous Word | Ctrl+Left arrow
Select Line | Triple-click
Select Text Between Cursor and Beginning of Line | Shift+Home
Select Text Between Cursor and End of Line | Shift+End
Select Word | Double-click

Redefining Common Keys

Many users have a preference for the functions of the keys Backspace, Delete, Enter, Tab, and Home. Options are available for changing the function of these keys. To access these options, from the main menu, click Tools → Options → Keyboard and Mouse → Redefine Common Keys .

For a description of each option, see Redefine Common Key Options. For more information on changing Tab key functions, see Indenting with Tabs.


Printing

Printing within SlickEdit varies slightly between Windows, UNIX, and Mac OS X platforms.

Printing on Windows

To print, from the main menu, click File → Print (or use the gui_print command). The Print dialog is displayed, which allows you to specify the printer to use and set configuration options. After the printer is specified and options configured, click Printto print the selection or active buffer.

Alternately, you can use the print command to immediately print the active buffer, or the print_selection command to immediately print the selection, both based on the current configuration.

Windows Printer Configuration

To configure printing options, from the main menu, click File → Print (or use the gui_print command). The Print dialog is displayed, as pictured below.

To print immediately using the current settings, click Print. To select the font used for printing, click Font. For printer setup, click Setup.

For a complete list of the options on this dialog, see Print Dialog for Windows. The sections below describe a few of the features.

Header/Footer Print Settings

To define the contents of printed headers and footers, use the Header/Footer tab of the Print dialog. Type directly into the text boxes to specify text for the top left, center, and right headers and bottom left, center, and right footers. Click the arrow to the right of each text box pick from a list of escape sequences to be inserted. Escape sequences are values that are replaced with real data, such as %f (which will be replaced with the file name) and %d (which will be replaced with the date).

Print Margin Settings

To define margin spacing, use the Margins tab of the Print dialog. In the After header and Before footer fields, enter the amount of spacing to come between the header and the first line on a page, and the amount of spacing to come between the last line on a page and the footer.

In the top, bottom, left, and right margin fields, enter the amount of spacing in inches to come between the outer edge of the paper and the printed text.

To print the maximum amount of text, specify "0" for all margins.

Print Schemes

Print schemes are a way to manage different printing configurations. For example, you might want to define one scheme that prints two up, landscape, and uses a small font, and another scheme that prints the same configuration with a different font. To define or select a print scheme, use the Print Schemes of the Print dialog, which is pictured below.

The default scheme is named "SlickEdit". When you change the configuration options on the other tabs in the Print dialog, the scheme name changes to append the text "(Modified)" to the end. Click Save to give a name to the modified scheme. Click Delete and Rename to delete and rename schemes, respectively.

System schemes are stored in the print.ini file located at the product installation directory. User-defined schemes or modified system schemes are stored in the uprint.ini file.

Printing on Mac OS X

To print, from the main menu, click File → Print , or use the keyboard shortcut Cmd+P. You can also invoke the gui_print command.

Use the print_selection command to print the selection.

SlickEdit uses the enscript tool to format your code for printing. Once enscript has finished formatting, the standard Mac OS X print panel is displayed, allowing you to select a printer or save the print job as a PDF document.

Mac Printing Configuration

The Print Options dialog (pictured below) is displayed the first time you print. It can also be shown from File → Print Setup... , or by invoking the print_setup command. The Print Options dialog allows you to specify font, paper size, and other formatting options.

To modify the text for headers and footers, right-click (or Cmd+Click) in the edit fields to see a context menu with common enscript formatting symbols.

Printing on UNIX and Linux

To print, from the main menu, click File → Print (or use the command gui_print). The Text Mode Print dialog is displayed, which allows you to specify the device to use and set configuration options. After the device is specified and options configured, click OKto print the active file or buffer.

Alternately, you can use the print command to immediately print the active buffer, or the print_selection command to immediately print the selection, both based on the current configuration.

Note

Graphical printing options (such as print preview) are not supported for UNIX.

UNIX and Linux Printer Configuration

To configure printing options, from the main menu, click File → Print (or use the command gui_print). The Text Mode Print dialog, pictured below, is displayed.

This dialog contains some of the same options as the Windows Print dialog. See Print Dialog for Mac, Linux, and UNIX for a complete list of the available options.

Inserting a Formfeed

The 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 Ctrl+Q (quote_key command), and Ctrl+L. Alternatively, you can use the Insert Literal dialog box (Edit → Insert Literal or insert_literal command) to insert a formfeed or any other character (see Inserting Literal Characters).


Chapter 4. User Preferences

This chapter contains the following topics:

  • Introduction to User Preferences

  • Emulations

  • Key and Mouse Bindings

  • Cursor, Mouse, and Scroll Settings

  • Fonts

  • Colors, Color Coding, and Symbol Colors

  • Restoring Settings on Startup

  • Setting File Associations

For a complete description of all Options screens, see Options Dialog.

Introduction to User Preferences (Options)

SlickEdit is one of the most configurable editors available. User preferences, also called options, can be set to change the appearance and control the behavior of most editing features.

User preferences are set using the Options dialog, which can be displayed from the main menu by clicking Tools → Options . For more information including a detailed breakdown of options, see Options Dialog.

SlickEdit contains two kinds of preferences:

  • Global Options - affect all languages.

  • Language Specific Options - affect only the specified language.

Tip

If you are using SlickEdit in a multiple user environment, each user must define a SLICKEDITCONFIG environment variable that refers to a local directory. This allows each user to have their own configuration. If making modifications to vslick.ini, make a local copy of this file and place it in the SLICKEDITCONFIG directory file. See Environment Variables for more information.

Global Options

Global options affect all languages and include the following:

  • Emulation modes (see Emulations)

  • Fonts (see Fonts)

  • Colors (see Colors, Color Coding, and Symbol Colors)

  • Auto Restore settings (see Restoring Settings on Startup)

  • File associations (see Setting File Associations)

Other global preferences, such as default search options and selection styles are also available for setting through the Options dialog (Tools → Options ). These options are described in the documentation on a contextual basis. For a listing of option categories, see Option Categories.

Language-Specific Options

The behavior of the editor can be customized for files based on specific languages. indent, word wrap, comment, auto-complete, Context Tagging®, and other code-style settings are all language-specific. These settings are located on the Options dialog (Tools → Options or config command) under Languages → [Language Category] → [Language] . The options are described in the documentation on a contextual basis. For a flat listing of the language-specific options, see Language Options.

Tip

A shortcut method to access language options for the current buffer is to use the Document → [Language] Options menu item (or the setupext command). This will open the Options dialog to the General language-specific option screen for that language.

For more information about working with languages and language extensions, see Introduction to Language-Specific Editing.

Saving, Restoring, and Backing-up User Preferences

SlickEdit records all state information and option settings in your config directory. Some items are saved in the state file, and others are stored in specific files. For more information, see Configuration Directories and Files.

Periodically, you should make a backup of your config directory. Some errors in SlickEdit may cause your configuration to be corrupted. Having a backup of this directory allows you to fall back to a known, good configuration, rather than having to start over with a clean, default configuration.

Options Export and Import

SlickEdit also provides the capability to Export and Import your options settings. You can create an export package of all or part of your SlickEdit options. You can use this to:

  • Backup and restore your option settings.

  • Share selected options with other team members.

  • Transfer your options from one machine to another.

Note

Moving options to a machine with a different operating system is not supported. Also, options should not be exported from one version of SlickEdit and then imported into another. While these operations may work for some options, we cannot predict when this will cause a problem.

For more information see Export/Import Options.


Emulations

Emulation is the process of imitating another program. SlickEdit® provides emulations of key bindings for 14 editors so that you can use the style to which you are accustomed, making your coding experience as efficient as possible.

The Key Bindings option screen allows you see what keys or key sequences are bound to what commands. Emulation charts are also available in the Help system and as printable PDF documents in the docs subdirectory of your SlickEdit installation directory. See Key and Mouse Bindings for more information.

Supported Emulations

This section describes each emulation mode and any special notes. For a list of key bindings that open the SlickEdit® command line in each emulation, see Activating the Command Line.

  • BBEdit

  • Brief - This emulation relies heavily on Alt key bindings. In addition to Brief emulation support, SlickEdit also supports Brief regular expressions. See Brief Regular Expressions for more information.

  • CodeWarrior

  • CodeWright

  • CUA - CUA is an acronym for Common User Interface, a standard set of user interface guidelines similar to those used in Microsoft products. This is the default emulation mode used by SlickEdit.

  • Eclipse

  • Epsilon - This emulation relies heavily on Ctrl+X and Escape (meta) key bindings.

  • GNU Emacs - This emulation relies heavily on Ctrl+X and Escape (meta) key bindings. It does not include an Emacs Lisp emulator.

  • ISPF - Support is included for ISPF prefix line commands, the ISPF command line, rulers, line numbering, and some XEDIT extensions. In addition to the ISPF emulation charts, additional documentation about using this emulation is available (see Using the ISPF and XEDIT Emulations).

  • SlickEdit® (Text Mode edition)

  • Vim - The Vim emulation contains special keys and key sequences that are case-sensitive. A plus (+) sign separates the simultaneous key presses and a comma (,) indicates sequential key presses. For example, the key binding Ctrl+w,W, which moves the cursor to the window above, indicates to press at the same time, the Ctrl key and lowercase w, release, then immediately press Shift plus w to enter the uppercase W. Another example is the key binding gP, which pastes the text before the cursor. Press the G key (to enter a lowercase g), release, then press Shift plus p at the same time (to enter the uppercase P).

Tip

SlickEdit supports the vimtutor command. This opens a practice file in the editor that you can actually edit as you learn Vim commands. See Vim Tutorial for more information.

  • Visual C++ 6

  • Visual Studio default - The key bindings provided for the Visual Studio default emulation are not the same as the key bindings used in Visual C++, but there might be some overlap. If Microsoft Visual Studio does not provide a default key binding for a particular SlickEdit command, the corresponding Visual C++ key binding is used.

  • Xcode

Changing Emulations

After SlickEdit® is installed, you are prompted to choose an emulation. CUA is the default emulation mode for SlickEdit. Key bindings and shortcuts mentioned in our documentation are based on this emulation. You can change emulation modes at any time by using the Emulation Options. To access these options, from the main menu, click Tools → Options , expand Keyboard in the tree, and select Emulation.

Custom key/mouse bindings for the current emulation are always saved before switching emulations. This ensures that when you return to the original emulation those bindings are automatically available. For example, if you have created and saved custom bindings in the CUA emulation, and then switch to Vim, switching back to CUA will make your custom bindings for CUA available again.

To remove custom key bindings for an emulation, resetting to the defaults, click the Restore to default key bindings button on the Emulation options page.

See Managing Bindings for more information on working with custom bindings.

Determining Keys/Functions

When/if you switch emulations, the key bindings that are assigned to commands change according to the emulation chosen. You can use the Key Bindings option screen to look up what command is bound to what key or key sequence (or vice-versa), or you can use the SlickEdit® menu and command line to determine these items. See Key and Mouse Bindings and Using the Command Line to View Key Binding Associations for more information.


Key and Mouse Bindings

Key and mouse bindings are quick ways to execute operations in SlickEdit®. Key bindings are the most efficient. Time is wasted each time you lift your hand from the keyboard to grab the mouse, and more time is wasted when you move your hand back to the keyboard in preparation for more typing. Therefore, if you learn the key bindings associated with operations that you use most frequently, you will save time coding. If an operation you use frequently isn't already bound by default, create your own easy-to-remember binding.

What is a Binding?

A key or mouse binding is a key sequence or mouse event associated with a command. Key terms are defined as follows:

  • Mouse event - The clicking of any button or motion of the mouse wheel.

  • Key - Any single key on the keyboard.

  • Key combination - Two or more keys pressed simultaneously, for example, Ctrl+O (in CUA emulation, associated with the gui_open command, File → Open , and the Open button on the Standard toolbar). The plus (+) sign between the keys indicates that these keys must be pressed simultaneously: press the Ctrl and O keys at the same time. Note that the last key is case-insensitive. You do not need to press Shift.

  • Key sequence - A series of one or more keys or key combinations, for example, Ctrl+X,R (in Vim emulation, this binding is associated with the redo command, Edit → Redo , and the Redo button on the Standard toolbar). The comma (,) indicates that each key must be pressed consecutively: press Ctrl and X at the same time, release, then press the R key.

  • Key binding range - A command bound to a range of keys. For example, the alt_bookmark command is bound by default to the key combination range of Ctrl+0 through Ctrl+9. Press Ctrl+0 to create a bookmark named "0", Ctrl+1 to create a bookmark named "1", etc.

To view or change bindings, create new bindings, and export/import custom bindings, see Key and Mouse Bindings.

The available key bindings change depending on the selected emulation. While SlickEdit® provides emulations for 13 editors, CUA is the default emulation, so key bindings listed throughout the documentation are for the CUA emulation. To change the emulation mode, click Tools → Options → Emulation . For more information, see Emulations.

Note

  • For documentation purposes, both mouse events and keys that are bound to commands are often referred to collectively as key bindings.

  • The SlickEdit main menu displays the key bindings for commands associated with each menu entry. See Accessing Menus and Creating and Editing Menus for more information.

  • A menu hotkey is a key sequence that corresponds to an underlined letter on a menu name. See Menu Hotkeys for more information about these items.

Managing Bindings

Create and manage key bindings using the Key Bindings option screen. This displays a list of all SlickEdit® commands, including macros that you have recorded, their associated key sequences, and the language editing mode in which the key binding can be used. Documentation for the selected command, if available, is also displayed. The Key Bindings screen provides capabilities to incrementally search by command or by key sequence, export and import custom bindings, save an HTML chart of your bindings, and run a selected command or user-recorded macro.

To access the Key Bindings option screen, from the main menu, click Tools → Options → Keyboard and Mouse → Key Bindings , or use the gui_keybindings command.

The first time the Key Bindings screen is invoked, the Building Tag File progress bar may be displayed while Slick-C® macro code is tagged.

Bindings are based on the editor emulation mode (CUA is the default). To change the emulation mode, click Tools → Options → Keyboard and Mouse → Emulation . For more information, see Emulations.

The Search by commandand Search by key sequence boxes are used to filter the data. See Viewing and Filtering Bindings.

The Command column shows all of the SlickEdit commands including macros that you have recorded. The Key Sequence column shows the key sequence or mouse event to which the command/macro is bound. If there is no binding, this field is empty. The Mode column shows the language editing mode to which the binding is assigned. The Recorded column indicates if the item is a command (No) or user-recorded macro (Yes).

Tip

TIP What is a language editing mode? SlickEdit uses the extension of the current file to determine what language you are using, thereby only making available the options and features that are possible or useful in that language. You can also manually set the language editing mode. See Language Editing Mode for more information.

The bottom of the screen contains documentation (if available) for the selected command.

Columns can be sorted by clicking on the column headers. An up or down arrow in the column header indicates ascending or descending sort order. All of the columns as well as the documentation pane can be resized by dragging the separator bars.

The following sections describe different ways to use the Key Bindings option screen:

  • Viewing and Filtering Bindings

  • Creating Bindings

  • Editing Bindings

  • Removing Bindings

  • Exporting and Importing Bindings

  • Saving a Bindings Chart

  • Running a Command/Macro using the Key Bindings Dialog

  • Resetting Default Bindings

  • Working with Key Binding Ranges

Viewing and Filtering Bindings

You can filter the data on the Key Bindings screen by using the Search by command and Search by key sequence boxes at the top. This is useful for finding a command/macro for creating, editing, or removing a binding, and for determining what key sequences are associated with a command/macro and vice-versa.

  • To find a command/macro, search for it by entering a string in the Search by command box. The column of commands is filtered incrementally as you type, to show only commands that contain the specified string. Commands that have more than one key sequence associated with them are listed on separate rows. For example, in CUA emulation, the command gui_open is bound to F7, Command+O (on the Mac), and Ctrl+O. Therefore, gui_open appears in the Command column three times, one row per key sequence.

  • To find a key sequence, place the focus in the Search by key sequence box (by tabbing or using the mouse) and then press the actual key or key sequence. The column of key sequences is filtered to show only bound sequences that contain the specified key(s). For example, to see all commands/macros that are bound to Ctrl+O, with the focus in the search box, simply press Ctrl+O.

  • To find a mouse event, place the focus in the Search by key sequence box (by tabbing or using the mouse) and click the mouse event you want to find. If the mouse event involves the scroll wheel, click the Mouse Event button ( [image] ) to the right of the field. This displays the Select Mouse Event dialog containing a list of all mouse events. If the event involves pressing a modifier key or keys, such as Ctrl, Alt, Shift, Cmd, Ctrl+Alt, etc., in conjunction with a mouse click, for example, Ctrl+RButtonDn, press the modifier key(s) when clicking the Mouse Event button. Then the Select Mouse Event dialog shows a list of modifier-prefixed mouse events. After selecting the mouse event you want to look up, click OK. The option screen updates to show only those commands that are bound to that mouse event.

To clear either field, click the red X button to the right of each box. This is especially handy for the key sequence search, due to the fact that the field recognizes any keyboard/mouse input including Backspace.

Alternatively, you can use the what_is and where_is commands (Help → What Is Key and Help → Where Is Command ) on the SlickEdit® command line to determine binding associations. See Using the Command Line to View Key Binding Associations for more information.

Creating Bindings

You can work more efficiently if you create key/mouse bindings for commands or user-recorded macros that you use frequently. To create a new key or mouse binding:

  1. Using the Key Bindings options screen (Tools → Options → Keyboard and Mouse → Key Bindings ), find the command or user macro you want to bind. You can search for a command/macro by entering a string in the Search by command box (see Viewing and Filtering Bindings).

  2. Initiate the binding by using one of the following methods:

    • Select the row, then click the Add button.

    • Select the row, then press Enter.

    • Double-click on the row.

  3. When you initiate a binding, the Bind Key dialog is displayed with focus in the Key Sequence box.

    • For a key binding, press the key sequence just as you would to use it. For example, to bind surround_with to Ctrl+W, simply press Ctrl+W. The key sequence you pressed is displayed in the box.

    • For a mouse binding, click the Mouse button next to the Key Sequence field, and select the mouse event you want to use from the Select Mouse Event dialog. For example, to bind surround_with to the right-click mouse event, select RButtonDn and click OK.

    Use the red X button to clear the input field if you make a mistake. If you enter a key sequence or mouse event that is already assigned to another command/macro, a warning prompt is displayed. If you continue, the previous binding is unbound and reassigned.

    Tip

    • SlickEdit® allows key sequences that are very long, but shorter sequences are easier to remember and more practical to use.

    • Do not begin key sequences with keys that are normally used in typing. Otherwise, these keys will launch the operation and not appear when you type. For example, binding a command to the A key will prevent you from using that letter in your code. It is best to always begin your key sequences with a Ctrl or Alt key combination.

  4. The default language editing mode is the default language editing mode for new bindings, which means the binding will work in all language editing modes. If you want the binding to work only in a specific language editing mode, you can change it now by clicking the Advanced button on the Bind Key dialog. Click Bind to mode, then from the drop-down list, select the mode for which the binding should apply. Bindings assigned to a specific language editing mode override those assigned to default.

    Tip

    You can create multiple bindings for the same command/macro and have one binding set to default and the others set to specific modes. In this case, when you are editing in a specified mode, that binding is in effect, and when editing in any other language editing mode not specified, the default binding will be in effect. For example, in CUA emulation, Ctrl+L is bound to select_line by default, but when in HTML mode, you may want to use Ctrl+L to insert an HTML link instead (insert_html_link command). Therefore, you can bind Ctrl+L to insert_html_link and specify the HTML mode for use only when editing HTML files.

  5. When finished, click Bind. The key sequence or mouse event now appears in the Key Sequence column.

Editing Bindings

To change the binding or language editing mode for a command/macro that is already bound, you will need to first unbind the command/macro, then recreate it. See Removing Bindings and Creating Bindings. If you have advanced knowledge of SlickEdit®, you can edit the Slick-C® key binding source directly. See Editing the Key Binding Source for more information.

Removing Bindings

To remove a binding:

  1. Using the Key Bindings options screen, find the command/user macro or key sequence that you want to unbind. You can search by using the search boxes at the top (see Viewing and Filtering Bindings).

  2. With the command/macro row selected, click Remove, or press Delete. You are prompted to confirm the unbind operation.

If a command is bound to a range (see Working with Key Binding Ranges), for example, Ctrl+0 through Ctrl+9, the entire range is unbound.

Exporting and Importing Bindings

Key and mouse bindings can be exported out of SlickEdit® and imported in, useful for creating backups, sharing with other team members, or taking with you should you switch computers.

Exporting Bindings

When exporting, custom bindings for all language editing modes in the current emulation are exported into an XML file with a name and location that you can specify.

To export your bindings:

  1. Click the Export button on the Key Bindings option screen. The Save As dialog is displayed.

  2. If you want, change the directory location and change the file name to something more meaningful to you, such as myname_cua.xml.

  3. Click Save.

Importing Bindings

Imported bindings override any existing bindings for the selected emulation. For example, if you have the surround_with command bound to Ctrl+W, and import surround_with bound to Ctrl+Q, then Ctrl+Q is now the binding for that command in the selected emulation. When you import for the selected emulation, SlickEdit® resets the key bindings to the default, then loads the user key bindings.

If you import a key bindings file from a different emulation than the one currently selected, SlickEdit displays a warning and prompts whether or not you want to continue. If you continue, the emulation mode is changed and the key bindings are loaded for that emulation.

To import bindings into SlickEdit:

  1. Click the Import button on the Key Bindings option screen. The Open dialog is displayed.

  2. Find and select a bindings file that was previously exported, then click Open.

Saving a Bindings Chart

Click the Save Chart button on the Key Bindings option screen to save an HTML reference chart of all current bindings for all language editing modes in the selected emulation. Commands and user macros that are not bound are not included.

Running a Command/Macro using the Key Bindings Dialog

If you have the Key Bindings option screen open, you can conveniently run a selected command or user-recorded macro by clicking the Run button.

Resetting Default Bindings

To reset bindings for the selected emulation to the SlickEdit® defaults, from the main menu, click Tools → Options → Keyboard and Mouse → Emulation , then select the Restore to default key bindings option on the Emulation options screen. See Emulations for more information.

Working with Key Binding Ranges

A key binding range is a command that is bound to a range of keys. For example, the alt_bookmark command is bound by default in CUA emulation to the key combination range of Ctrl+0 through Ctrl+9. Press Ctrl+0 to create a bookmark named "0", Ctrl+1 to create a bookmark named "1", etc. Key binding ranges are displayed in the Key Sequence column on the Key Bindings option screen. For example, the range for alt_bookmark is displayed as Ctrl+0 -> Ctrl+9 in CUA emulation. Key binding ranges are also shown when using the Export and Save Chart features.

You cannot remove a single key combination from within a range, but you can rebind the key range to a different command. If you unbind a command that is bound to a range, the entire range is unbound.

Key Binding Settings

The following are settings that you can make pertaining to key bindings.

Key Message Delay

For key bindings that contain multiple key combinations, like Ctrl+X,Ctrl+C, you can specify the maximum delay between the two combinations. If that time limit is exceeded, this key sequence will be interpreted as two separate bindings, executing the command bound to Ctrl+X followed by the command bound to Ctrl+C, rather than the command bound to Ctrl+X,Ctrl+C.

To change this option, click Tools → Options → Keyboard and Mouse → Advanced , then set the Key message delay for the amount, in tenths of a second, to delay before a prefix key. The prefix key is not displayed if the next key is pressed before the delay specified in this text box.

Using Shorter Key Names in Menus

The SlickEdit® main menu displays the key bindings for commands associated with each menu entry. These bindings can be condensed for non-CUA emulations. See Short Key Names in Menus for more information.


Cursor, Mouse, and Scroll Settings

This section describes settings for the cursor, mouse, and scroll style. For cursor navigation information, see Cursor Navigation.

Setting the Cursor Style

You can use a text mode style cursor instead of a vertical cursor. To set this option, from the main menu, click Tools → Options → Appearance → General , then select Use block cursor from the Cursor style drop-down list.

Hiding the Mouse Pointer

To hide the mouse pointer when typing, from the main menu, click Tools → Options → Appearance → General , then set the option Hide mouse pointer to True. The mouse pointer is then only displayed when moving the mouse or when a dialog box is displayed.

Displaying Tool Tips

By default, hovering the mouse pointer over a button displays a tool tip about the item. To turn tool tips off, from the main menu, click Tools → Options → Appearance → Advanced , then set the option Show tool tips to False. To change the amount of time before tool tips are displayed, change the value of the option Tool tip delay. The delay value is in tenths of a second.

Scroll Bar and Scroll Style Settings

The scroll bars on the right and bottom edges of the editor windows are optional in SlickEdit. To turn these on or off, from the main menu, click Tools → Options → Appearance → General , then set the options Horizontal scroll bar and/or Vertical scroll bar. When these options are set to True, the scroll bars are displayed. These options do not affect edit window controls on dialog boxes.

To set the scroll style, from the main menu, click Tools → Options → Appearance → General , then set the Scroll stylesettings that you want to use. Commands that move the cursor more than one page of text, such as searching, always center scroll text into view. The following scroll settings are available:

  • Smooth horizontal scroll - When set to True, editor windows scroll column-by-column when the cursor moves out of view. When set to False, the cursor is centered and the text is scrolled one-fourth the width of the window when the cursor moves out of view.

  • Smooth vertical scroll - When set to True, editor windows scroll line-by-line when the cursor moves out of view. When set to False, the cursor is centered and the text is scrolled half the height of the window when the cursor moves out of view.

  • Scroll when - Specifies how close (in number of lines) the cursor may get to the top or bottom of the window before scrolling occurs.


Fonts

This section describes how to set the fonts used in various screen elements.

SlickEdit® provides the capability to change the fonts used by edit windows, the command line, status text, and other screen elements. Recommended fonts are listed. You can also set fonts for editor windows.

Tip

Xft fonts are supported on Linux by default. To turn off Xft font support, start SlickEdit with the -suxft command line option. See Invocation Options.

Setting Fonts for Screen Elements

To configure font settings for screen elements, use the Fonts options screen (Tools → Options → Appearance → Fonts ). For a description of each option, see Font Options.

Tip

"Regular" editor windows that do not use Unicode fonts are controlled by the SBCS/DBCS Source Windows element.

Recommended Fonts for Elements

Font recommendations are given for the best screen display. The information below contains recommended fonts for some of the screen elements.

Note

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 Windows and UNIX.

Command Line Fonts

The following table contains recommendations, based on the operating system, for the Command Line font element:

Platform | Font Recommendation
Windows | Choose Courier, Courier New, OEM Fixed Font, or Terminal fonts for the most visually appealing character displays.
Linux | Choose Courier, Lucida Sans Typewriter or a console font for the most visually appealing character displays. If these fonts are not visible, look for the UNIX fonts below.
UNIX | Choose Adobe Courier, B&H Lucida Typewriter, or Width x Height family fonts for the most visually appealing fixed fonts.
Selection List Fonts

Choose Courier for best display of selection lists that need a fixed font.

Dialog Box Fonts

Choose MS Sans Serif as an attractive font for dialogs.

Text Box Fonts

Choose System or MS Sans Serif for fonts used in text boxes.

SBCS/DBCS Source Window Fonts

This is the element used for all non-Unicode source windows. Choose Terminal for the most attractive visual display.

Unicode Source Window Fonts

Default Unicode Font is the default font for the Unicode Source Windows element. When this font is selected, the Arial Unicode MS font is used if it is installed. Otherwise, the ANSI Fixed Font is used, which only supports the English character set. Arial Unicode MS is a fairly complete font which is included with Microsoft Office. Currently, no version of Windows ships with a complete Unicode font. For more information on Unicode support, see Using Unicode.

Setting Editor Window Fonts

You can set the font for editor windows by selecting the SBCS/DBCS Source Windows element or the Unicode Source Windows element in the Fonts dialog, as described above. You can also change the font for editor windows by selecting Window → Font , or by using the wfont command. The Window Font dialog is displayed. Font, size, and style options are the same as those on the Font Options screen.

Tip

Use the Window Font dialog to set the font for a single editor window.

From the Window Font dialog, choose the Scope that you wish to affect. Select the Current window option if you only want to change the current window's font. Select the All windows and Default option to set the font for all editor windows that are open as well as newly-created windows.

For a complete list of the options on the Window Font dialog, see Window Font Dialog.


Colors, Color Coding, and Symbol Colors

SlickEdit provides a great deal of control over the colors in the editor, using two complimentary coloring systems. With Color Coding you can color your code based on syntactic information about the elements: keywords, strings, operators, etc. Using Symbol Coloring, you can definie rules to color symbols based on scope, visibility, and other detailed properties. Symbol Coloring provides more detailed information for identifiers that would otherwise be colored the same using Color Coding.

Note

Colors for the SlickEdit application window are controlled by the operating system. This includes the font and background color for tool windows and dialogs. The colors in editor windows are controlled by SlickEdit.

This section is divided into the following subsections:

  • Colors - describes how to set the colors for various entities in the editor window. These colors are applied to items identified by the Color Coding engine.

  • Symbol Coloring - describes how to define rules to color symbols based on scope, visibility, etc.

  • Color Coding - provides information about the Color Coding engine.

Colors

Use the Colors option screen ( Tools → Options → Appearance → Colors or the color command) to set the color for different screen elements in SlickEdit. This includes syntactic elements in the editor window, like keywords, comments, strings, etc. as well as other user interface elements like the message area or the status line. Window colors and backgrounds are set using the facilities provided by the operating system.

Setting Colors for Screen Elements

Colors can be set either individually or by editing a scheme. To change the default colors, complete the following steps:

  1. From the main menu, click Tools → Options → Appearance → Colors (or use the color command). The Colors option screen is displayed.

  2. Select the element you want to change from the list of customizable items. The items are categorized by their purpose. For descriptions of the individual color elements, see Color Options).

    Tip

    The element selected in the list matches the symbol at the cursor position when this screen was opened. You can use this to determine what kind of symbol SlickEdit thinks it is. If you're not sure which screen element to pick, close the options screen and put the cursor in the symbol you want to color, and then reopen the options screen.

    Note

    If you have chosen the Selection or Current line screen element, note that SlickEdit will attempt to render the text using your normal color settings for the Foreground color. The selected foreground color will only be used if there is not enough contrast between the foreground color for the underlying text element and selected background color to be readable. It is best to specify a Background color for selections that is as close as possible to your normal background color, ensuring that the color-coded text is still easy to read.

  3. Set the Foreground and Background colors by clicking on the color squares. The Color Picker dialog is displayed, allowing you to pick a color from the palette, or set your own custom color using RGB values.

    Note

    Several colors for syntactic screen elements such as comments, keywords, and numbers inherit their background color information from the Window Text color. This allows you to change the background color for an entire color scheme merely by changing the background color for Window Text.

  4. If you want, choose a Font Style for the text.

For a complete list of all of the options available, see Color Options.

Using Color Schemes

Color schemes store the settings for all screen elements, allowing you to quickly change the look of your editing environment. Several predefined color schemes are provided, and you can create your own.

To use a color scheme, from the Scheme drop-down, select a color scheme and click Apply or OK.

To define a new color scheme, set your colors for the various screen elements and click Save Scheme. User-defined color schemes are stored in the uscheme.ini file located in your configuration directory. You can change the name of a scheme by clicking Rename Scheme.

Setting an Embedded Language Color

Colors for editor screen elements also have an embedded background color. This color is used as the background when in embedded code. It is best to select an embedded background color that is only a slight tint from your standard background color. This makes it easier to select common foreground colors that will display with enough contrast in both embedded and normal code.

Embedded Language color is used when a file of one type embeds a language of another type within it, like HTML files containing JavaScript. For HTML, the 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 the color coding lexer names to get embedded language color coding. The following is an example for Perl:

Symbol Coloring

Use the Symbol Coloring options screen (Tools → Options → Appearance → Symbol Coloring to set the color for symbols identified by Context Tagging®. This includes function declarations, function definitions, variables, class names, package names, type names, defines, enumerated types, constants, as well as undefined symbol names.

Note

Symbol Coloring is turned off by default. Symbol Coloring can be enabled on a per-language basis by going to Tools → Options → Languages → [Language Category] → [Language] → View and checking Symbol Coloring. You can also enable Symbol Coloring for a specific file by selecting View → Symbol Coloring → Enable Symbol Coloring . This will override the language specific setting, but only for the current file.

Symbol Coloring is different from Color and Color Coding. The base color scheme, along with the Color Coding lexer, are used to identify and color lexical elements found in source code, such as comments, strings, numbers and keywords. Symbol coloring augments the base coloring by overlaying additional color information for identifiers based on the corresponding symbol's name, type, and attributes. This allows you to define symbol coloring rule sets for focusing in on certain symbols or groups of symbols. It also makes it easier to distinguish between different symbol types, such as local variables and constants. See Color Coding and Colors for more information about lexical color coding and color configuration.

When you point at a symbol with the mouse cursor, SlickEdit displays a pop-up that includes information from Symbol Coloring about what rule was applied. If that symbol is not colored by Symbol Coloring, no information about the symbol color will be displayed in the pop-up.

Symbol Coloring under some circumstances can cause SlickEdit to pause momentarily while you type. If you experience these pauses, please turn off Symbol Coloring by unchecking View → Symbol Coloring → Enable Symbol Coloring which will turn off symbol coloring for the current file. If these pauses happen in all files for that language, you can turn Symbol Coloring off for that language by going to Tools → Options → Languages → [Language Category] → [Language] → View and unchecking Symbol Coloring.

Note

The standard symbol coloring schemes shipped with SlickEdit® are very thorough and attempt to assign a color to nearly every symbol type. While this is useful, it may be more information that is necessary. The schemes are this way because it is easier to edit or remove rules than it is to add new rules or create a new scheme from scratch. You can use the standard symbol coloring schemes as templates that you prune down to create your own, more focused, symbol coloring schemes suiting your specific needs.

Symbol Coloring can be used to highlight unidentified symbols. These are symbols for which the SlickEdit Context Tagging engine can not find a definition. If you are working without a workspace or your libraries are not fully tagged, you would see a lot of unidentified symbols. Because of this, the capability to highlight unidentified symbols is turned off by default, even if you enable Symbol Coloring. To enable highlighting of unidentified symbols, select Tools → Options → Languages → [Language Category] → [Language] → View and put a check in Highlight unidentified symbols. The Symbol coloring checkbox must be checked for this control to become active.

Symbol Coloring Schemes

A symbol coloring scheme is a set of rules defining what color to assign to a symbol with a specific name, type, and attributes. You can think of a scheme as a colored lens for looking at your code that highlights the specific symbols you are interested in. Since you can quickly switch symbol coloring schemes, it is very easy to use a special lens for specific tasks, like refactoring out global variables or identifying where your code uses preprocessing.

A symbol coloring rule consists of the following elements.

  • A Rule name.

  • Symbol types -- A matching symbol's type must be one of the specified types. The special *SYMBOL NOT FOUND* type is used to identify symbols which Context Tagging® can not locate. See Symbol types for detailed descriptions of each symbol type.

  • Symbol attributes -- The attributes can be either required, ignored, or disallowed. A matching symbol must have all the required attributes, and none of the disallowed attributes. See Symbol attributes for detailed descriptions of each symbol attribute.

  • Class name -- A matching symbol must belong to a class matching the regular expression.

  • Symbol name -- A matching symbol's name must match the regular expression.

  • Color and font attributes -- The color definition includes foreground color, background color, and font attributes. This is the color the symbol will be highlighted using. A color definition can base it's color on another rule, for example, in order to inherit background color and font attributes for consistency.

Symbol coloring rules are matched in order from the top to bottom of the list of rules in the symbol coloring scheme. For a symbol to match a rule, it must be the first rule in the symbol coloring scheme that matches all of the requirements above.

Unidentified Symbols

An unidentified symbol is one for which the context tagging engine cannot locate the type information. This could be because the code is incomplete, the source file for that definition has not been tagged or is out of date, or the definition wasn't located before a specified timeout or limit was hit. We use the term "unidentified" instead of "undefined" because the symbol may be defined even though the tagging engine doesn't know it. Unidentified symbols are found using the *SYMBOL NOT FOUND* symbol type.

Symbol Coloring contains a scheme, Unidentified Symbols Only, that can be used to spot these symbols. You can select that scheme via the Symbol Coloring options page, Tools → Options → Appearance → Symbol Coloring . You can also select that scheme from the View menu, View → Symbol Coloring → Unidentified Symbols Only . Lastly, you can toggle the view of unidentified symbols from the view menu using View → Symbol Coloring → Highlight Unidentified Symbols This will work with any scheme, even if it doesn't contain a rule for unidentified symbols..

Color Scheme Compatibility

Symbol coloring augments the standard lexical color coding for keywords, comments, strings, numbers, and other items. Since the symbol colors will be overlayed and typically inherit background color information from the base color scheme, it is important for the selected foreground color to be chosen such that the symbol name is still visible and readable against the editor window background.

The standard symbol coloring schemes shipped with SlickEdit are marked with the standard base color schemes they are compatible with. Some schemes, such as Protected and Private are compatible with all color schemes. Others are fine-tuned to work best against a dark background, a light background, or a specific color scheme. User-defined color schemes can specify which base color schemes they work best with.

In addition, each base color scheme has a designated, default symbol coloring scheme preferred for that scheme. This allows you to switch color schemes and automatically get a corresponding symbol coloring scheme which is compatible. See Colors for more information.

Selecting a Symbol Coloring Scheme

Symbol coloring rules can be set either individually or by editing a scheme. To change the default symbol coloring scheme, complete the following steps:

  1. From the main menu, click Tools → Options → Appearance → Symbol Coloring . The Symbol Coloring options screen is displayed.

  2. Using the Scheme combo box, select a scheme name. If your current scheme is modified, those modifications will be automatically saved to that scheme. If you select a scheme which is incompatible with your current base color scheme, you will be prompted to confirm that you really want to use the selected color scheme. See Color Scheme Compatibility for more information.

  3. The list of rules will be shown for the selected symbol coloring scheme. You can get a quick overview of the scheme from the list and see detailed information about each rule by selecting the rule.

  4. Press OK or Apply to commit the changes. The change will be applied to all open files using the default symbol coloring scheme.

Editing a Symbol Coloring Scheme

To edit the current symbol coloring scheme, from the main menu, click Tools → Options → Appearance → Symbol Coloring . The Symbol Coloring options screen is displayed.

Select a rule from the list of rules. Note that the rule list not only displays the name of the rule, but also a brief summary of the rule settings. You can add a new rule after the currently selected rule by clicking on the plus icon. Likewise, you can remove the current rule by clicking on the delete icon. Rules can be moved up or down in the rule order by clicking on the up or down arrows.

See Color Rules for detailed descriptions of each of the standard symbol coloring rules shipped with SlickEdit®.

The current rule can be renamed by clicking in the text box under Rule name, modifying the name, then hitting Enter .

The display color and font choices for a rule allow you to inherit color and font information from another rule or from certain items from the base color scheme. By default a rule will inherit from the Window Text color defined in your base color scheme.

Set the Foreground and Background colors by clicking on the color squares. The Color Picker dialog is displayed, allowing you to pick a color from the palette, or set your own custom color using RGB values. You can also select Inherit in order to specify that the rule use the same color as it's parent rule. Set the font attributes by clicking on Normal, Bold, Italic, or Underline. Select Inherit Font to specify that the rule should use the same font attributes as it's parent rule.

Select a set of symbol types from the list of symbol types supported by the Context Tagging® engine. A symbol must be one of the selected symbol types in order to match the rule. You can select as many symbol types as you want. Select the special *SYMBOL NOT FOUND* symbol type to define a rule for what to do with symbols that could not be found using Context Tagging®.

Caution

Not all symbol types apply to every language.

Symbol attributes can have three states. The default state is a grayed state which says we don't care if this attribute is set or not for this rule. If an attribute is checked, it must be set in the matching symbol.

Note

If an attribute is unchecked, it must not be set. Some attributes, such as Public, Protected, and Private, are mutually exclusive by nature. If you configure a rule that checks both Public and Private, that rule will never be matched. You should instead either define two rules, or one rule with Protected and Package unchecked.

In addition to the symbol type and attribute specifications, you can further refine a symbol coloring rule by adding a Class name or Symbol name regular expression, using the regular expression syntax of your choice. The class name regular expression is matched against the name of the scope (class, package, struct) which a symbol is defined in. Do not confuse this with the name of the scope in which the symbol is used. The symbol name regular expression is matched against the name of the symbol. For example, a Wildcards expression of "vs*" would match all symbols starting with the characters "vs". Case sensitivity for the regular expression matching is regulated by the language's case-sensitivity. See Color Coding for more information.

Creating a New Symbol Coloring Scheme

New symbol coloring schemes can be created by selecting an existing scheme and adding or subtracting rules, then saving the scheme under a new name. To create a new symbol coloring scheme from scratch, start with the None scheme and then add your own custom rules.

Selecting a Symbol Coloring Scheme for the Current File

From the main menu, click View → Symbol Coloring This will bring up the Symbol Coloring view menu.

The menu will list only symbol coloring schemes known to be compatible with the current base color scheme. Select a scheme to switch to that scheme for the current file. Select the (None) scheme to disable symbol coloring for the current file.

Selecting a specific scheme for the current file will not change the symbol coloring scheme for any other files, nor will it change the default symbol coloring scheme. The selected symbol coloring scheme will be saved in your file history so that the next time you open that file, it will return to using the same symbol coloring scheme you selected, as long as your base color scheme does not change.

Language-Specific Symbol Coloring Settings

Certain Symbol Coloring features can be disabled on a per-language basis. To edit language-specific symbol coloring options, from the main menu, click Tools → Options → Languages → [Language Category] → [Language] → View . The Language View options are displayed.

From this dialog, you can configure the following on a per-language basis.

  • Turn off Symbol Coloring entirely for the language. This would be a good idea if symbol analysis was particularly slow or ineffective for a language, such that symbol coloring was only slowing you down.

    Note

    Symbol coloring is automatically disabled for HTML and other XML variants. It is also automatically disabled in all modes which do not have any Context Tagging® implemented. Finally, Symbol Coloring is disabled in all embedded language contexts. This means that Symbol Coloring is disabled for all PHP code, since PHP is always embedded in an HTML or XML processing instruction ( <?php ).

  • By default, Symbol Coloring will bold the name part of symbol declarations and definitions. This is particularly useful for languages which allow implicit local variable declarations. It is also helpful when the declaration syntax is not always visually distinct from the rest of the code. This bolding behavior can be turned off by unchecking Use bold for symbol names in definitions and declarations.

  • Symbol Coloring is able to select the Symbol not found rule for symbols with are not found by Context Tagging®. This can serve effective as a live error checker with respect to spelling and capitalization of symbols.

    However, in certain languages, especially scripting languages that allow variables to be declared implicitly, Context Tagging® can be rather ineffective, simply because the code can not be analyzed statically. In this case, you might see an unusually large number of symbols highlighted as unidentified symbols. This can also happen if you do not have Context Tagging® configured correctly for the code and libraries you are working with.

    For this reason, this feature is disabled by default. You can enable highlighting of unidentified symbols by checking Highlight unidentified symbols.

  • By default, Symbol Coloring uses fairly strict language specific symbol lookups in order to identify symbols. In some languages, it is necessary to relax the rules in order to find symbol definitions. This can, for example, be useful in heavily templated or preprocessed C++ code which is too complex for Context Tagging®. Unchecking Use strict symbol lookups will tell Symbol Coloring to revert to a simple, symbol name lookup, ignoring scope and visibility rules, if the strict symbol lookup does not yield results.

Symbol Coloring Performance Settings

Symbol Coloring requires the editor to do symbol lookup and analysis for every symbol visible on the current page of the current file. This can be expensive, especially for extremely large files or large, complex code bases. Because of this, it attempts to only color the symbols which are currently visible, not the entire file. Furthermore, instead of immediately painting like basic syntax driven color coding does, symbol coloring works on a delay timer. This way you should never have to wait for symbol coloring to finish working except under extreme circumstances. Besides coloring the current page, symbol coloring will also look ahead slightly to surrounding lines. This makes it possible, in the typical case, to page up one page and not have to wait for symbol coloring to draw because the information was already prefetched.

Caution

For typical users, the default performance settings will be good enough. Tinkering with these settings without regard to the implications could result in very poor performance and/or annoying drawing behavior.

Symbol Coloring performance can be fine-tuned through the user interface. To edit symbol coloring performance options, from the main menu, click Tools → Options → Editing → Context Tagging® . The Context Tagging® options are displayed.

From this dialog, you can configure the following settings.

  • Update after (ms) idle -- This is the amount of idle delay symbol coloring should wait before updating the Symbol Coloring for the current page. Increasing this value can prevent interruptions to your normal typing due to symbol coloring updating, however, it will cause symbol coloring updates to lag further behind your editing. Decreasing this value too much can have the effect of making symbol coloring updates behave nearly synchronously and can create very bad editor response times. A good setting is four times your average keypress gap, which you can estimate by looking at how many words per minute you type when coding.

  • Timeout after (ms) -- This the maximum amount of time that symbol coloring should spend trying to do symbol analysis before giving up and trying to finish in the next pass. Increasing this time can cause increased intrusiveness. Decreasing this time too much can cause symbol coloring to not have enough time to paint the entire page. As a result, you would see lines get colored as symbol coloring makes subsequent passes to finish coloring the page.

  • Number of lines to color above and below the current page -- This is the amount of prefetch symbol coloring should do for pages surrounding the current visible page of code. Setting this very high can have the effect of forcing symbol coloring to color the entire file in one shot. Setting it to 0 will force symbol coloring to only color the visible page and not do any prefetch at all.

  • Number of off-page lines to color per pass (chunk size) -- When prefetching symbol coloring for off-page lines, this is the number of lines to prefetch per pass. Setting this to a large number can make symbol coloring performance more intrusive. Setting this to a small number, such as 1, will force symbol coloring to make many passes before it can color all the off-page lines it is supposed to. As a result, a Page Up might reveal a page which is only partially colored.

Color Coding

For information on how to set up colors for various entities in the editor, see Colors This section describes how to configure the Color Coding engine, which identifies entities to color.

Adding Color Coding Keywords to Supported Languages

To add color-coded keywords to a supported language, complete the following steps:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Color Coding.

  2. Click New.

  3. Enter the new keywords separated with a space character.

  4. Click OK.

  5. Click OK on the Color Coding options screen.

For more information, see Color Coding Configuration.

Creating Color Coding for a New Language

To create color coding support for your language, complete the following steps:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Color Coding.

  2. Select the Color Coding Tokens Tab , then click New. The Enter New Keywords dialog box is displayed.

  3. Enter the new lexer name. Usually this is a language name such as C or Java. Click OK.

  4. On the Tokens tab, make sure the new keyword is selected, then correct the ID start characters. These are valid characters which can be the start of an identifier.

  5. 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.

  6. Select the Color Coding Comments Tab . This lists the comments currently defined and allows you to define new multi-line and line comments. For each comment, click New to add a line or multi-line comment.

  7. Select the Color Coding Numbers Tab to display various numeric style options.

  8. Select the Color Coding Strings Tab to display various string literal options.

  9. If you have not found all the options you need, click the Color Coding Language Tab. This displays even more advanced language-specific options.

  10. Click OK on the Color Coding options screen.

Color Coding Configuration

To configure color coding, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Color Coding. This screen lets you change the list of tokens and other information that is color coded in the editor. The options on each tab are described in the section, Language-Specific Color Coding Options.

Click Colors at the bottom of the dialog to display the Color Settings dialog, which allows you to specify the color for color coding elements and other editor elements (see Setting Colors for Screen Elements).

Advanced Color Coding Configuration

The vslick.vlx file defines language-specific coloring support. For information about modifying this file, and how to create a new lexer name, see VLX File and Color Coding.


Restoring Settings on Startup

By default, the files, current directory, and more from the previous edit session are automatically restored when you switch workspaces or close and re-open SlickEdit®.

To control which elements of your SlickEdit environment that are automatically restored, from the main menu, click Tools → Options → Application Options → Auto Restore . See Auto Restore Options for more information.


Setting File Associations

Files of certain types can be associated with SlickEdit®, so that when those files are opened from Windows Explorer, they run in the SlickEdit application. To set up these associations, use the Associate File Types Options. To access these, from the main menu, click Tools → Options , expand File Options, then select Associate File Types (or use the assocft command).

Select the file types you wish to associate in the Unassociated File Types list box. Click the Associate button to move them to the Associated File Types list box. Use the Disassociate button to remove associations from the list.

Note

NOTE If you are associating workspace files (.vpw extension) to SlickEdit, SlickEdit restores the edit session and the project when opening the .vpw file. See Workspaces and Projects for more information about working with projects and workspaces.


Chapter 5. Workspaces, Projects, and Files

This chapter contains the following topics:

  • Workspaces and Projects

  • Working with Files

Workspaces and Projects

Overview of Workspaces and Projects

Workspaces and projects provide a way to organize your work. Much of the power provided by SlickEdit® derives from the information in your projects. So, it's important to set them up correctly.

A workspace defines a set of projects and retains the settings for an editing session. Opening a workspace returns a session to the same state as when you last worked on it, including which files are open, the working directory, and more. To see the auto restore options, click Tools → Options → Application Options → Auto Restore . The data for each workspace is stored in a text file with the extension .vpw.

A project defines a set of related files that build and execute as a unit. For each project you can specify the set of files it contains, a working directory, a set of commands to build and execute the project, compiler options, and dependencies between other projects. Files can only be added to projects, not directly to a workspace. A file may belong to multiple projects, and a project may belong to multiple workspaces. The data for each project is stored in a text file with the extension .vpj.

When you create a project, you select the project type based on the language and tool chain you are using. A tool chain is the combination of compiler and debugger used. Selecting the right project type is essential to configure SlickEdit to build, run, and debug your program. Once a project type is selected, it is not possible to change it. For more information on this topic, see the section on Managing Projects.

The number of projects you create in a given workspace depends on the type of program you are creating. Typically, you create a separate project for each build target in your program. In C/C++ you would create a separate project for each DLL or SO and one for each executable. In Java, you might only create a single project.

If you have a workspace with multiple projects, you can use project dependencies to ensure that projects are built in the correct order (see Defining Project Dependencies). You may find it useful to define an umbrella project that depends on all other projects. This provides an easy way to rebuild all of your projects. Even if you have no project that meets this criterion, you can create an empty project for that purpose.

Files in a workspace are processed by the Context Tagging® feature, building a database of the symbols they contain. This information is used for completions, providing parameter information, navigating from a symbol to its definition or references, and more. The Context Tagging database provides near-instantaneous access to information for which you would otherwise have to search, saving you a great deal of time.

You can define as many workspaces as you like. For large systems that decompose into multiple subsystems and programs, you can create a separate workspace for each program or subsystem. This helps you manage the complexity by limiting the number of files in your workspace. It also prevents irrelevant information from being presented by Context Tagging when doing symbol lookups.

SlickEdit has a default workspace that is active before you define a workspace or after you close a workspace. However you can not add projects or files to this workspace. You can open files and edit them, and state will be saved, but using SlickEdit in this way is like using a basic editor and will not provide the full benefit of SlickEdit's symbol analysis. For more information on these features, see Context Tagging.

Organizing Files

SlickEdit® places no restrictions on the location of your files. Your source files do not have to be located in the same directory as your project (.vpj) or workspace (.vpw) files. Adding files to a project does not copy the files to a new location. It simply associates those files with the project. Likewise, adding an existing project to a workspace does not copy the project. This gives you a great deal of flexibility to organize your files.

In general, there are two approaches to organizing your files:

  • Single Root Approach - All files are stored under a single root directory. In this approach, the workspace .vpw file is typically located in the root folder and there is a subfolder for each project. Each project folder contains the project .vpj file and the source files.

  • Multiple Root Approach - No single folder contains all of the workspace files exclusively. Each project may be created in a different directory unrelated to each other, and the workspace .vpw file may be placed in yet another directory.

The single root approach is common when all team members are working with SlickEdit. This organization provides a simple approach to storing your files and facilitates interaction with source control systems. The multiple root approach may be used on complex programs that share framework code with other programs. In this case, you may not want to duplicate the shared code to place it under the root directory for this program.

A hybrid approach may be used if you have a single root source hierarchy but the whole team is not using SlickEdit. In that situation, they may not want to have the SlickEdit project (.vpj) and workspace (.vpw) files checked into the same location as the source files. You can still check out the source tree into a single directory. Then define a separate subdirectory for your workspace and project files. If other team members are using SlickEdit, you can check these files into a different area in source control, allowing you to share them with other SlickEdit users but not interfere with non-SlickEdit users.

Storing files remotely will have a definite impact on performance since network latency is added to disk latency. If your standards require you to work with remote files, you should still try to set up your workspace locally. SlickEdit reads and writes workspace files frequently, so storing them remotely will reduce performance. Workspaces are just a list of projects, so setting up a local workspace is quick and easy.

Version Control

If the whole team is using SlickEdit®, then project (.vpj) and workspace (.vpw) files should be checked in any time they are updated by SlickEdit. That way, all team members will see any new files or projects you add to the workspace. Even if you are the only person using SlickEdit, it's a good idea to check in your project and workspace files. This protects you from loss and allows you to fall back to earlier versions of the program.

Do not check in the .vpwhist file. It contains breakpoints, bookmarks, file positions, list of open files--information that is unique to an editing session.

For more information about using version control with SlickEdit, see Version Control.

Add Wildcard

If all team members are using SlickEdit® for their development, you will pick up newly added files by getting the latest version of the .vpj files. If some of your teammates are not using SlickEdit, then you can use Add Wildcard when adding files to your projects in order to pick up newly added files. Each time you start SlickEdit, the wildcards are evaluated and the file list is updated (see Managing Source Files for more information).

Working with Libraries

A typical program also makes calls to library routines. A library is a pre-built unit of code providing application-independent functionality. Standard libraries are provided by the compiler, and many programs use third-party libraries. Some development projects have their own libraries.

Libraries should not be added to your workspace as a project. The key distinction is that libraries are pre-built and will not be edited as part of the development effort. If you have library routines that you plan to edit and build as part of your development, these should be added to your workspace as a project.

SlickEdit® automatically tags the standard libraries for C/C++, Java, .NET, and COBOL as part of normal installation. This adds the same type of symbolic information for these libraries to the symbol database that is created for your source code. If you skipped auto-tagging or you switch compilers and need to tag those libraries, you can re-run auto-tagging by clicking Tools → Tag Files and then clicking the Auto Tag button.

If you use third-party libraries or your own internal libraries, you will want to tag them as well. See Creating Language-Specific Tag Files for instructions on how to tag libraries.

Managing Workspaces

Workspaces are just a means to aggregate projects and store values from an editing session. They are easy to create, and you can quickly switch from one workspace to another. The Projects tool window allows you to browse the projects within a workspace and the files contained in those projects. It is docked as a tab on the left side of the editor by default and display can be toggled by clicking View → Tool Windows → Projects .

Opening and Closing Workspaces

To open an existing workspace, click Project → Open Workspace (Ctrl+Shift+O or workspace_open command). Locate the workspace file (.vpw) and click Open.

To close a workspace, click Project → Close Workspace (workspace_close command). Only one workspace can be open at any given time. If you open another workspace when one is already open, the existing workspace will be automatically closed first.

Creating Workspaces

Workspaces are typically created by creating a new project. At that time you have the option to create a new workspace for this project or add it to the current workspace. If no workspace is open, you can only elect to create a new workspace. If you choose to create a new workspace, your current workspace will be closed and the new one opened. For more information on creating projects, see Creating Projects.

Creating a workspace without creating a project is useful when you plan to import existing projects or if you want a workspace for editing files that aren't part of a project, like shell script files.

To create a workspace without creating a project, complete the following steps:

  1. From the main menu, click Project → New and select the Workspace Tab.

  2. Type a value in the Workspace name field.

  3. Type the location (or use the Browse button to the right of this field to pick a location) for the new workspace.

Managing Projects within a Workspace

To list projects in the current workspace, add or remove projects from the current workspace, or to set the active project, use the Workspace Properties dialog box. The dialog, pictured below, can be accessed from the main menu by clicking Project → Workspace Properties .

For more information on using this dialog, see Workspace Properties Dialog.

Sharing Projects between Workspaces

A project can be used in more than one workspace. Adding an existing project to a workspace does not copy the project or its source files; it simply creates an association between the two. If you want a local copy of the project, you will need to copy it before you add it to the workspace.

To share an existing workspace, complete the following steps:

  1. From the main menu, click Project → Workspace Properties .

  2. Click Add.

  3. Locate the file and click Open.

Working with Third-Party Workspaces

SlickEdit® provides compatibility with the following third-party workspaces. Use Project → Open Workspace to open these project types.

  • Visual Studio .NET - SlickEdit can directly open .sln and .vpw files. Visual Studio 2005 has added many new project types, and not all of these are supported. If you have difficulty opening a Visual Studio 2005 solution or workspace, please contact Product Support. SlickEdit cannot create Visual Studio workspaces. You need to create the workspace in Visual Studio and define the project structure there. Once created, SlickEdit can add files to existing projects.

  • Tornado

  • Xcode

Managing Projects

Projects are used to hold a set of related files. In compiled languages, a project typically represents the files for a single build unit, either an executable or a library. For interpreted languages, you can use projects to aggregate files into logical groups, though it is common to have a single project.

The most important thing to remember when working with SlickEdit® projects is to use the correct project type. The project type determines the build options and other behaviors for the project. Once created, the project type cannot be changed. For more information, see Creating Projects.

Once a project has been created, you need to add the source files to it. See Managing Source Files for more information.

Project Types

SlickEdit provides a variety of project types that match commonly available languages, tool chains (defined by the compiler and debugger you are using), and types of programs. Some project types create main programs, starting you off with a fully compilable program.

The (Other) project type is provided for use when a specific project type does not match the language or tool chain you are using. When you use this project type, you are responsible for configuring all build, run, and debug commands.

Warning

It is not possible to configure the Other project type to work with supported tool chains. For example, if you are using the GNU compiler or debugger, you need to use the GNU C/C++ Wizard. The Other C/C++ project type supports the GNU debugger but does not contain the configuration options for the GNU compiler.

You can create a custom project type if none of the existing project types match your development. By doing this you avoid having to redefine the build, run, and debug commands or other project properties each time you set up a new project. You can customize the (Other) project type to create a completely new project type or customize one of the language-specific project types, like Java, to tailor it to your needs. See Creating Custom Project Types for more information.

The sections below describe the most commonly used project types.

GNU C/C++

SlickEdit® provides a GNU C/C++ Wizard that leads you through the configuration options for setting up a new GNU C/C++ project. Using this wizard, you can quickly configure a new project that will build, run, and debug.

SlickEdit prompts you whether this project will build an executable, a shared library, or a static library. You can specify whether this project will use C++, C, or ANSI C. Further, you can select whether to create an empty project, an application with a main() function, or a "Hello World" application. Finally, you are prompted whether to use SlickEdit's build system or to use a makefile.

SlickEdit detects the presence of GNU tools on your system and configures the new project correspondingly. You can make changes to these settings by clicking Project → Project Properties .

See C and C++ for more information about SlickEdit's C/C++ features.

Microsoft Visual Studio

SlickEdit® cannot create Visual Studio solutions or projects. Visual Studio users should create a solution in Visual Studio, and define the projects it contains using Visual Studio.

Solutions can be opened in SlickEdit by clicking Project → Open Workspace . Navigate to the directory containing the solution and select the .sln file to be opened. SlickEdit reads the .sln file and configures the build, run, and debug operations to be performed just as they would in Visual Studio.

Note

You can add files to projects using SlickEdit, but any modifications to the workspace or project settings must be performed using Visual Studio. This includes adding any new projects to the workspace.

SlickEdit lists a Visual Studio project type on the New Project dialog, but it will simply warn you that SlickEdit cannot create a project of that type and that you need to do that in Visual Studio.

For C#, a tutorial is available that describes how to build a simple C# console application with SlickEdit, no Visual Studio required. See Hello World Tutorial (C#).

Other C/C++ Compiler Compatible with GDB (UNIX only)

Some compilers, like the Sun™ compiler, are compatible with the GNU tool chain. For these, you should start with the GNU C/C++ project and customize it to use the compiler, debugger, and do builds the way you want. Doing this allows you to launch the integrated debugger using Debug → Step Into rather than Debug → Attach → Debug Other Executable . (See C and C++ for more information about C/C++ features in SlickEdit®.)

Other C/C++ Compiler

SlickEdit® provides a project type for Borland® C++, both 16- and 32-bit for Windows and for Symantec™ C++. These were created for older versions of these products and may not work with the most recent versions. In that case, or when using any other C/C++ compiler, you should select the Other C/C++project type. You will then have to configure the build, compile, link, run, and debug commands for both the Release and the Debug configurations. (See C and C++ for more information about C/C++ features in SlickEdit.)

Java

SlickEdit® provides a broad selection of Java project types. Select the appropriate choice based on whether you are creating an applet or application and the type of program. SlickEdit detects the installed JDK on your system and configures the build, run, and debug commands. (See Java for more information about SlickEdit's Java features.)

Perl, PHP, and Python

SlickEdit has project types for Perl, PHP, and Python. These are needed so that SlickEdit knows how to run and debug programs for these languages. If you are using one of these languages, pick the associated project type when you create a new project.

Other Dynamic Languages, Including Ruby

Dynamic languages do not get compiled. Most of the settings in the project types provided in SlickEdit® are related to compiling and debugging your program. Therefore, SlickEdit has no project types that are specific to these languages. Use the (Other) project type and add your files there. You can configure run and debug commands by clicking Project → Project Properties and selecting the Tools Tab. Create a custom project type for this language to avoid having to redundantly configure projects each time you create them (see Creating Custom Project Types).

Creating Projects

To create a project, complete the steps below. For more information on creating new projects, see Project Tab.

  1. From the main menu, select Project → New .

  2. Select the type of project that you want. It is critical that you select the correct project type. See Managing Projects for a full discussion of project types.

  3. Type the project name.

  4. Select a directory location. If the directory does not exist, a prompt appears to create it when you click OK.

  5. Type the name of the executable file or output file.

  6. Select either Create new workspace or Add to current workspace. If adding this project to the existing workspace, specify whether this project depends on another project in this workspace by checking the Dependency of check box and selecting the depended-on project from the drop-down list.

  7. Click OK.

Tip

You can also create a project by importing a makefile. To do this, from the main menu, click Project → Open Other Workspace → Makefile (or use the workspace_open_makefile command). See Importing Makefiles for more information.

Creating Custom Project Types

If an existing project type does not meet your needs, you can define a new project type or customize an existing one.

To create a custom project type, complete the following steps:

  1. Click Project → New , then click the Customize button.

  2. On the Customize Project Types dialog, click the New button.

  3. Enter a name for the new custom project type.

  4. Select the project type to use as the starting point for your custom project. Use the (Other) project if you are defining a project type for a completely new language/compiler or select one of the existing project types to make modifications.

  5. Click OK to bring up the Project Properties dialog.

  6. Configure the project settings for this project type. This is similar to the process of configuring a single project, except that you cannot add files to a project type.

  7. Click OK when done to save your changes and return to the Customize Project Types dialog. Click OK to return to the New Project dialog. Click Cancel in these dialogs to discard your changes.

To customize an existing project type, complete the following steps:

  1. Click Project → New , then click the Customize button.

  2. On the Customize Project Types dialog, select the project type to customize and click the Edit button.

  3. Make the changes needed for this project type.

  4. Click OK when done to save your changes and return to the Customize Project Types dialog. Click OK to return to the New Project dialog. Click Cancel in these dialogs to discard your changes.

Creating or customizing a project type creates a new project template stored in the userprjtemplates.vpt file located in your configuration directory. Other team members can use this template by copying the template file into their own configuration directories. If they have also created custom project types, they can use DIFFzilla® to compare and merge the two versions of the file.

Setting the Active Project

Each workspace contains one project that is the active project. The active project is the one that is built when you click Build → Build . If the active project depends on other projects, those projects will be built first.

To make a project active, click Project → Set Active Project , and pick the project to make active. Alternately, you can use the Workspace Properties dialog box to set the active project (see Managing Projects within a Workspace).

Defining Project Dependencies

Dependencies define a relationship between two projects, causing the dependent project to be built after the projects it depends on. This ensures that elements in a depended-on project are up-to-date prior to building the dependent project. Project dependencies can be defined when a project is created.

To specify dependencies, complete the following steps:

  1. Click Project → Workspace Properties .

  2. Select the project you want to have depend on other projects.

  3. Click the Dependencies button. The Project Properties dialog box opens with the Dependencies Tab displayed.

  4. Mark the check box next to the projects upon which the selected project should depend. These dependencies will be built before the project is built when a build or rebuild is performed.

  5. Click OK.

Project Configurations

Projects can have multiple configurations, each with different values for project settings. The most common use of project configurations is for creating a debug or release version of a project without having to define a new project. The Project Configuration Settings dialog box (Build → Configurations ) is available for viewing, adding, and deleting project configurations. You can change the active configuration by selecting Build → Set Active Configuration from the main menu.

SlickEdit creates a "Debug" and "Release" configuration for each new project. These configurations are identical, until you change the project settings associated with them. When you select Project → Project Properties , the drop-down list at the top lets you select the project configuration you are modifying. The "All configurations" value is selected by default. By selecting a configuration you can change things that are specific to that configuration, like setting compiler flags or changing the list of source files.

Note

  • Visual C++ - If you open a Visual C++ v5.0 or later workspace, the configurations are automatically retrieved from the Visual C++ project. Some typical configurations for Visual C++ v5.0 or later are "CFG=MyApp - Win32 Debug" and "CFG=MyApp - Win32 Release." Use Visual C++ to change the configurations.

  • Mac OS X - Opening an Xcode project imports styles that you cannot change using SlickEdit®. You will need to change the styles using Xcode. You can work with the project in SlickEdit, but you cannot change the project settings.

For information on using Project Configurations in builds, see Project Configurations in Builds.

Configuring Project Directories

The Directories tab of the Project Properties dialog box (Project → Project Properties ) allows you to set the working directory, references file, and include file search directories for the current project. See Directories Tab for a list of the options.

Configuring Project Tools

The Tools tab of the Project Properties dialog box (Project → Project Properties ) is used to change project commands and their properties.

The options on the Tools tab vary, depending on the tool name that is selected in the Tool name text box. This text box contains a list of the tools/commands that can be used for projects. You can have different tools for different projects, and you can choose whether or not each tool should appear on the Build menu.

Use the up and down arrows to move the tools up and down in the list. This order corresponds to the order in which the tool appears on the Build menu. Click the red X button to remove a user-defined tool (default tools cannot be deleted). Click the New button to add a tool. Click the Advanced button to change environment variables (see Environment Variables).

Setting Language-Specific Options

The Options button on the Project Properties Tools tab is only available for selected tools that support language-specific options. Click the Options button to display options specific to the language with which you are currently working. From there you can make settings for the command that gets executed for the tool specified in the Tool name combo box. For more information on changing language options, see the topic for your language in the Language-Specific Editing chapter.

Tip

(Java only) You can easily change Java tool options including the class path. Click the Options button here to display the Java Options dialog box, which allows you to customize options supported by Javac, Javadoc, and JAR. To change the compiler from Javac to another compiler (such as SJ or Jikes™), from the Java Options dialog, select the Compiler tab, then select the Other tab, and type the compiler name.

Command Line Execution

The Command line text box on the Project Properties Tools tab is only available (and visible) for selected tools that support a command line execution. It defines the command line that is set to be executed for the selected tool in the Tool name combo box. This field is initially blank when you modify settings for "All Configurations", and the settings differ for different configurations. Click the buttons to the right of this text box to insert files and escape sequences (such as %f which inserts the current buffer name) that you can use to build your command line.

Specifying a Command Directory

For each tool listed on the Project Properties Tools tab, you can specify the directory from which to run the command in the Run from dir text box. By default, all of the tools are run from the working directory that is specified using the %rw or %rp escape sequences, which indicate the working directory or project directory, respectively. When running programs like ant or make, this is typically set to the directory containing the makefile.

Other Options

The remaining options on the Project Properties Tools tab allow you to specify output, save, display, and other settings.

Note

(UNIX only) Output of text mode programs that are executed using xterm cannot be captured. To see the output, uncheck the Output options Capture output and Output to build window, then prefix the program name in the Command line field with xterm -e or dos -w (this waits for a key press).

All of the options and settings on the Project Properties Tools tab are outlined in the section Tools Tab.

Configuring Build Settings

The commands project_compile (Shift+F10 or Build → Compile ) and project_build (Ctrl+M or Build → Build ) start the compile and build commands respectively for the current project.

The commands next_error (Ctrl+Shift+Down or Build → Next Error ) and prev_error (Ctrl+Shift+Up or Build → Previous Error ) allow for quick navigation of compiler errors. For information about building and compiling projects, see Building and Compiling.

To change the build and compile commands for projects as well as other project options, use the Build tab of the Project Properties dialog (Project → Project Properties ). The Build tab allows you to run programs and/or execute commands before or after a build. You can run different programs and commands for different projects as the information is stored per-configuration. The contents of this tab are unavailable for extension-based projects.

Each line in the Pre and Post Build Commands text boxes can contain a program to execute a command. For example, the set command could be used to set environment variables. Double-click on the text as indicated in the text boxes to add commands. Use the Up and Down arrows to the right of the text boxes to move the commands up and down in the list. The order corresponds to the order in which the command will be run.

When the Stop on error option is checked and the current project depends on other projects, the vsbuild utility (see Using Build and Compile Operations) will be used to build the projects and check for error codes. When the vsbuild program detects an error, it does not continue building other dependencies.

Note

(Windows only) Under Windows 95 or later, vsbuild cannot detect error codes returned from a batch program.

Build System Options

The build method options on the Build tab apply to GNU C/C++ projects only and affect all configurations. With these options, you will not need to convert the current build methods to use the GNU debugger; you can select one of these methods when you create a new GNU C/C++ Wizard project.

  • Build without a makefile (dependencies automatically checked) - Automatically checks dependencies and does not generate a makefile. Instead, the vsbuild utility (see Using Build and Compile Operations) determines what should be compiled dynamically. This option is useful when you are not concerned with how the build gets done. Make sure the project include directories are set up correctly (Project → Project Properties , Directories Tab) so include files may be found (see Configuring Project Directories).

  • Build with a user-maintained makefile or custom build command - Sets the build command to make and does not generate a makefile. The build command can be changed from the Tools tab of the Project Properties dialog box (see Configuring Project Tools). Select this option when you already have your own method for building the source.

  • Build with an auto-generated, auto-maintained makefile - Automatically generates a makefile and updates when files are added to the project. This option is useful when you need a makefile and do not want to use the built-in vsbuild utility (see Using Build and Compile Operations). Specify the path to the makefile in the Makefile field. Make sure the project include directories are set up correctly (Project → Project Properties , Directories Tab) so include files may be found (see Configuring Project Directories).

To start a build from outside the application, execute the following command where make is the name of the make program, Makefile is the name of the makefile, and ConfigName is the name of the configuration:

          make
           -f
          Makefile
           CFG=
          ConfigName

Defining Language-Specific Projects

If you are building something that only contains one source file and no project, you can define a language-specific project. Language-specific projects are based on the language of the current file. However, the working directory is ignored for these projects. All language-specific projects are stored in the file project.vpe (UNIX: uproject.vpe).

To define a language-specific project, complete the following steps:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select General.

  2. Click Language-Specific Project.

Managing Source Files

Adding and Removing Files

To get the benefits of SlickEdit’s Context Tagging features or to use the SlickEdit build system, SlickEdit must know about the set of files you are working on. The Project Properties dialog contains a Files tab that lists the files associated with this project. Files can be added to the project explicitly or implicitly.

You explicitly add files to the project using Add File or Add Tree. Files can also be explicitly added to your project when you select File → New (added by default) or when you select File → Save As (file not added by default). Explicitly added files are listed on the Files tab.

You can add files implicitly using the Add Wildcard button. With this mechanism, you define a filespec which SlickEdit will use to search for matching files. This search is performed each time the editor is launched. Using this method, only the filespec is listed in the Files tab, not the matching files.

These two approaches can be mixed. You can have some files in your project picked up by wildcard and others that are explicitly added. In that case you will see both filespecs and actual files listed. You should be careful not to explicitly add any files in directories that will be matched by a wildcard, or the file will be picked up and added to the project twice.

SlickEdit works the same whether the file was added explicitly or implicitly. In both cases, the file will be tagged and can be built using the SlickEdit build system. Which mechanism you choose depends on how you work and whether your whole team is using SlickEdit. The following questions govern how to set up your projects:

  • Is the whole team working with SlickEdit?

  • Do you want to use the SlickEdit build system?

  • Do your directories often contain scratch files that should not be included into a project?

  • Do you have a large or remotely stored codebase?

If the whole team is working with SlickEdit, then you can easily manage the list of files explicitly. You use Add Tree and Add File when first setting up your projects. Then newly added files are picked up when you create them, using File → New . By checking in your workspace and project files along with your source files other team members will see newly added files when they update from the repository. This approach is particularly useful if you plan to use the SlickEdit build system.

If some team members are not using SlickEdit, then they will be creating new files without updating the workspace and project files. You can use Add Wildcard to create the file list, and it will pick up these newly added files, assuming the files were added in a location specified by one of the Add Wildcard filespecs.

One drawback in using Add Wildcard is that it may pick up files that you don't want to include in the project. This is typically the case if you create scratch files with the same extension and leave them in the same directories as your source files. While this is not a problem for Context Tagging, except for the occasional unneeded symbol, it can pose a bigger problem for the build system. Since SlickEdit uses the same file list for both, you need to consider your work habits when using Add Wildcard with the SlickEdit build system.

Performance also needs to be considered before choosing Add Wildcard. If you have a normal sized project and all of the source files are stored locally, the Add Wildcard check will only take a few seconds. In testing, a project with over 1,000 source files took less than 10 seconds to build the initial file list and less than a second to scan for updates. If you have a very large project or your source files are stored on a network share, this can take significantly longer.

Add Files

Use Add Files to add a single file or the files from a single directory to your SlickEdit project. When you click the Add Files button, SlickEdit displays the Add Source Files dialog. With this, you can browse to a directory and select one or more files to add. You can filter the list of displayed files by selecting from the Files of type drop down list.

Add Tree

Use Add Tree to add all or some of the files under a specified directory. SlickEdit displays the Add Tree dialog, which allows you to select a directory from which to add files. Select a value or enter a new value in the File types combo box to specify which kinds of files are added. To enter your own file types, use * to match any characters and separate multiple file types using a semicolon. For more information on this dialog, see Add Tree Dialog.

The Recursive checkbox is checked by default, so SlickEdit will search any subdirectories under the selected directory. To limit the search to the selected directory, uncheck Recursive.

You can also specify files, file types, or directories to exclude using the Exclude field. Separate multiple patterns with a semicolon.

Table 5.1. Examples:

Pattern | Result
*.hpp | Excludes all files with the "hpp" extension.
junk* | Excludes all files that begin with the word "junk".
CVS\ (Windows) CVS/ (Linux, UNIX, Mac) | Excludes all directories named "CVS".
*.hpp;junk*;CVS\ | Excludes all of the above.

Add Wildcard

Add Wildcard lets you add a single filespec at a time. The filespec is a pattern that is used to search for matching files. If the files you want to match are below your project directory, the directory which contains the SlickEdit .vpj file, then you only need to specify a file pattern. If you want to search a different directory, you can specify a full or relative path.

Put a check in Recurse to search in subdirectories below the specified directory. This checkbox is unchecked by default.

You can also specify a set of patterns for files and directories to exclude using the Exclude filespecs field. These work the same as for Add Tree, documented above.

Note

You can only specify a single filespec in the Filespec field. Each separate location you want to search must be added with a separate click on the Add Wildcard button.

Table 5.2. Examples of Filespecs:

Pattern | Result
*.cpp | Finds all files with the "cpp" extension in or below the project directory.
..\src\*.hpp | Finds all files with the "hpp" extension in or below a directory named "src" that is a peer to your project directory.
C:\dev\MyProj\src\*.cpp | Finds all files with the "cpp" extension in or below the "C:\dev\MyProj\src" directory.

Add or Remove Individual Files From a Project

To add or remove files from a project, complete the following steps:

  1. From the main menu, click Project → Project Properties . The Project Properties dialog is displayed.

  2. Click to display the Files tab.

  3. Perform the file operation:

    • Add Files - Use for adding individual files.

    • Add Tree - Use for adding files in a directory or directory tree. Click Add Tree, then select the directory and the file filter to use.

    • Add Wildcard - Use for adding files from a directory or directory tree matching the specified wildcard. This expression is evaluated each time SlickEdit is loaded, adding new files from the specified directory.

    • Remove - To remove the selected files.

    • Remove All - To remove all files from this project.

    • Refresh - To update the list of files, re-evaluating any wildcards that have been specified.

    • Import - Loads files and directories specified in an import file. See Importing Files for more details.

Creating New Files

There are two different approaches to adding a new file to a project:

  • Create a buffer with the correct name and then do a File → Save As to store the file in the correct location and, optionally, add it to the project.

  • Use File → New or Project → Add New Item from Template to create the file and put it in the correct place in the project.

Many developers prefer the first approach because it is faster and allows you to keep your hands on the keyboard. A new buffer named foo.cpp can be created from the command line by typing e foo.cpp.

To create a new source file using the second approach, complete the following steps:

  1. From the main menu, click Project → New and select the File tab.

  2. Select the document mode from the list on the left.

  3. To add the new file to an existing project, mark the Add to project check box and select the project from the drop-down list.

  4. Type a file name, including the extension, in the Filename field.

  5. Verify that the Location is correct.

  6. Change the Encoding as needed.

  7. Click OK.

This same approach can be used with the SlickEdit® Code Templates by clicking File → New Item from Template . See Code Templates for more information.

Importing Files

The Import File dialog (Project → Project Properties , select the Files tab, then click the Import button) allows you to load files and directories specified in an import file into your project.

Importing Makefiles

You can create a project by importing a makefile. SlickEdit® parses the targets, finds all referenced source files, and adds them to the project. When you import a makefile, SlickEdit creates a new workspace and adds the project to it. If the same makefile is ever imported again, the corresponding workspace can be opened without creating a new redundant workspace.

The new project automatically imports all files that are referenced by the makefile. All of the make targets are also added and made available for execution from the main menu under Build → Execute Makefile Target . For makefiles that contain invocations of other makefiles, the other makefiles can be optionally added to the workspace as separate projects, or all their files added into one project.

The Build option for the makefile project is set to Build with a user-maintained makefile or custom build command (Project → Project Properties , Build tab) and the build command is set to make. See Build System Options for more information.

To create a new project by importing a makefile, from the main menu, click Project → Open Other Workspace → Makefile (or use the workspace_open_makefile command). The Open Makefile as Workspace dialog is displayed.

In the Makefile field, specify the makefile to import. Use the Browse button to browse for the makefile. Check Scan for recursive makefile calls if you want to also scan for invocations of make on other makefiles and to include them in the project. In this case, you can also check Make recursive makefile calls separate projects if you want a new, separate project created for each of the referenced makefiles. Then, specify any file types to include or exclude by using the drop-down lists or by typing the file extensions separated with semicolons. The "*" wildcard is permitted. For example, *.ch;*.chf;*.chs;*.cpp;*.h can be used to include or exclude all referenced files with those extensions.

Loading Project Files for Editing

The Files tool window can be used to open one or more files from the current project or the current workspace. To display the tool window, from the main menu, click Project, then select Open Files from Project or Open Files from Workspace (project_load command). The files that are shown in the tool window depend on the menu item selected. A button on the tool window also lets you toggle between viewing current project files and current workspace files.

To open a selected file, press Enter. Use Ctrl+Click to select more than one file. See Files Tool Window for more information about operations in this window.


Working with Files

Overview

SlickEdit® provides familiar operations for creating, opening, and working with files. There are many ways to perform these tasks and many options available for specifying your preferences.

Topics in this section are:

  • The Working Directory

  • Creating Files

  • Opening Files

  • Saving Files

  • File Backups

  • Closing Files

  • The SlickEdit® File Manager

Here are a few tips to keep in mind as you read through this section and work with files:

  • SlickEdit supports file names up to 200 characters long.

  • If you're using the command line and need to edit a file whose name contains space characters, place double quotation marks around the name.

  • Options are available for specifying actions that automatically occur when a file is opened or saved, including adjustments for the line format. When you specify a file to edit, the format is automatically recognized and necessary adjustments are made, based on whether the file type is DOS, Linux, UNIX, or Mac (classic Mac line endings are a single carriage return, ASCII 13). An EOF character will not be appended to Linux, UNIX, or Mac text file formats when saved, regardless of the Save options.

  • When the text in one text file is copied to a buffer that has a different type of text file format, the line separation characters are reformatted to conform to the format of the destination buffer.

A Word of Caution for Binary Files

The default Load and Save options are safe for editing binary files since all reformatting is turned off. As an extra precaution to ensure that no reformatting takes place when opening and saving binary files, set the encoding to Binary when opening the file.

While the default options are safe, it is NOT safe to edit binary files with the following non-default settings, due to the risk of damaging or losing the files. These options are located on the Load and Save option screens (Tools → Options → File Options ):

  • Show EOF character - False

  • Expand tabs to spaces - True

  • Append EOF character - True

  • Remove EOF character - True

  • Strip trailing spaces - True

The Working Directory

SlickEdit® uses the current working directory for various operations that involve file navigation, and to save you from tediously browsing and typing long path names when navigating files. For example, when you use the e command to open a file for editing (see Using the e Command), you don't need to specify the complete path if the file is in the current working directory.

To see the current working directory at any time, use the pwd command on the SlickEdit command line.

SlickEdit automatically changes the working directory to save you time in various situations. You can also manually set the working directory at any time. Note that the working directory in SlickEdit is different from the working directory used by the Build tool window. See the following topics:

  • Automatic Changes to the Working Directory

  • Manually Changing the Working Directory

  • Working Directory in the Build Window

Automatic Changes to the Working Directory

SlickEdit® automatically sets or changes the working directory in the following situations:

  • By default, when you start SlickEdit, the working directory is automatically set to the directory from the previous editing session. You can turn this behavior off with the option Auto restore working directory (Tools → Options → Application Options → Auto Restore ).

  • The working directory is automatically set or changed when you switch projects, according to the specified project directory or the directory specified in the Working directory field on the Directories tab of the Project Properties dialog (Project → Project Properties ).

  • By default, the working directory is automatically set or changed if you specify a directory with the open or save_as commands or specify a directory location in the Open and Save As dialogs (File → Open and File → Save As ). You can change this behavior by setting the Change directory option (Tools → Options → Appearance → General ) to False.

  • The working directory changes to match directories you select in the Open tool window. This window is docked to the left tab group of the editor by default, and can also be displayed by clicking View → Tool Windows → Open from the main menu.

  • The working directory can be automatically set to the corresponding directory when you navigate to a file, if the configuration variable def_switchbuf_cd is modified (see Configuration Variables). This is similar to the Change directory option mentioned in the preceding bullet, except it also works for any file navigation operation (such as e or edit or when SlickEdit opens a file automatically, such as with Symbol Navigation). This feature is on by default in GNU Emacs emulation and off in all other emulations.

Manually Changing the Working Directory

You can change the working directory at any time with the Change Directory dialog (from the main menu, click File → Change Directory or use the gui_cd command). If you want to also change the directory in the Build window, select the option Process chdir. To use an alias for the directory name, select Expand alias. Click Save Settings to preserve your preferences. The settings here are also used when you use the command line version of this feature.

Changing Directories From the SlickEdit® Command Line

To change the directory from the SlickEdit command line, use the cd command as follows, where the p option corresponds to the Process chdir option on the Change Directory dialog, and a corresponds to Expand alias:

cd {+p|-p} {+a|-a} drive/and/path/to/directory

You can also change the working directory with the pushd and popd commands. The pushd command adds the current working directory to the top of the directory stack, and makes the specified directory the new working directory. For example:

pushd drive/and/path/to/directory

If no arguments are given, the current working directory is swapped with the directory at the top of the directory stack. After using pushd, you can use the popd command to remove the top directory from the directory stack and make it the new working directory.

Working Directory in the Build Window

The working directory in the editor is different from the working directory in the Build tool window. The Build window is a shell that displays build and compile output, and also allows you to type operating system commands and see the results. It is docked to the bottom tab group of the editor by default. It can also be displayed by clicking View → Tool Windows → Build from the main menu.

The working directory is shown in the prompt inside the Build window. When you first launch SlickEdit®, the window is blank. Type a command in the window for the prompt to be displayed.

By default, when the directory is changed in the editor, it is also changed in the Build window. However, the reverse is not true: changing the directory in the Build window does not change the directory in the editor. To make the working directory completely independent so that a change directory does not affect the Build window, make sure the Process chdir option on the Change Directory dialog is off (not selected) and save the settings (see Manually Changing the Working Directory).

The Files Tool Window

The Files tool window has three tabs to display:

  • the list of open buffers.

  • the list of files in the current project.

  • the list of files in the workspace.

See Files Tool Window for more information.

Creating Files

SlickEdit® provides four methods for creating new files:

  • Using the e Command

  • Using the New File Dialog

  • Using Code Templates

  • Using Write Selection

Using the e Command

One of the quickest ways to both create and open files in SlickEdit is to use the e command on the SlickEdit command line. Press the ESC key to open the command line (in most emulations), then type e file, where file is the name of the file. The e command is just shorthand for the edit command, so you can use edit instead, if you prefer.

Tip

Many people prefer to use the e command to create new files. Typing e myfile.ext is the fastest way to create a new file in SlickEdit. Including the extension on the filename is all that is needed to let SlickEdit know what file type you are editing so it can use the correct language mode.

Depending on your options, SlickEdit will match the characters you type against the files in the current working directory, open files, and files in the current workspace. To configure this option, select Tools → Options , expand File Options → Open and set e/edit command Smart Open to one of these values:

  • Smart Open off - matches only against files in the current working directory.

  • Smart Open open documents - matches files in the current working directory and those that are already open. Matching open files is useful if you have a lot of files open.

  • Smart Open workspace files and open documents - matches against files in the current working directory, open files, and files in the current workspace.

  • Smart Open workspace files - matches against files in the current working directory and files in the current workspace.

If you're opening a file that is not in the current working directory, use the full path. Command Line Completion will help entering file names and paths.

If the file already exists, the file will be loaded in a new buffer. If the specified file does not exist, a new buffer by that name will be created. For new files, be sure to specify the file extension so SlickEdit knows what language mode to use.

Using the New File Dialog

If you prefer working with the GUI, use the menu item File → New to create a new file. This displays the New dialog open to the File tab. First select the Document Mode for the new file (recently chosen modes are listed at the top). The Add to Project box determines whether the new file will be added to the active project. Its value is retained from the last time this dialog was used. Specify a Filename, the Location, and Encoding, then click OK. See the section on the New dialog's New Dialog for more information about these fields.

You can create a new, untitled buffer by unchecking Add to Project, then double-clicking on a language in the Document Mode list.

Using Code Templates

Code templates are pre-defined units of code that you can use to automate the creation of common code elements, like a standard class implementation or design patterns. See Code Templates for more information and details about this feature.

To instantiate a predefined Code Template, complete the following steps:

  1. From the main menu, click File → New Item from Template (or use the add_item command). The Add New Item dialog is displayed.

  2. In the Categories list, expand Installed Templates, then click through the tree to select the language and category of the file you want to create.

  3. In the Templates box, select the template you want to use.

  4. In the Name field, type the name of the new file.

  5. In the Location field, type the directory path where you want to store the new file, or click Browse. This field is prepopulated with the active directory.

  6. Optionally, select Add to current project.

  7. The type of template you selected may generate more than one file. If you want to view a confirmation list of the files that will be created after you click Add, select Confirm files before adding.

  8. Click Add.

Using Write Selection

SlickEdit also lets you create a file from a selection. Select the text you want to write, then from the main menu, click File → Write Selection (or use the gui_write_selection command). The Write Selection dialog is displayed, with fields for specifying the file name and location (similar to the Save As Dialog). The selected text is written to the specified file.

Opening Files

SlickEdit provides many ways to open files. With most editors, you must explicitly open each file you want to view or edit. To do that you must know the filename and location of the file. In SlickEdit, you often open files implicitly, by browsing into them. With these mechanisms, you don't have to know the filename or where the file is located to open it.

Explicitly Opening Files

To open a file by name, use any of the following mechanisms:

  • One of the quickest ways to open a file is to use the e command (in the syntax efile), which can also be used to create files. SlickEdit uses completions to match the filename you type against the current directory, open files, and files in your workspace. If you are entering the full path to a file, completions will assist you with that as well. See Using the e Command for more information.

  • If you prefer to open files with the GUI, select File → Open (or use the gui_open command). SlickEdit will prompt whether to open files using a standard file browser or using Smart Open.

    • If you choose to use a file browser, then SlickEdit uses the standard Open dialog on Windows. On Linux, UNIX, or Mac, a Windows 3.1-style Open dialog is displayed. See Standard Open Dialog and Windows 3.1-Style Open Dialog for more information about the fields on these dialogs.

    • Smart Open uses the Open tool window to browse and open files. This tool window allows you to browse through directories and view a list of files. You can type a filename and the list of displayed files will be filtered to match those from the active directory and, optionally, open files and files in your workspace. See Open Tool Window for more information.

  • The Files Tool Window displays a list of files in the current project or workspace. You can open a file by typing a portion of the filename and then selecting a matching file from the list.

  • On Windows platforms, you can open a file by double-clicking on it in the Windows Explorer. This assumes that you have associated the SlickEdit application with the extension of that file. See Setting File Associations for more information.

  • The Projects tool window displays a list of the files contained in the projects in this workspace. You can open a file by double-clicking on it in the tree.

Implicitly Opening Files

You open a file implicitly by using information from another window or process rather than explicitly opening the file by name and location.

  • SlickEdit's Symbol Navigation allows you to jump from a symbol to its definition or from a symbol to a reference.

  • The Preview Tool Window displays the definition for the symbol at the cursor. You can open that file for editing by double-clicking in the Preview window.

  • For C and C++, you can quickly open the header or source file that is associated with the current file. From the main menu, select Document → Edit Associated File (or use the edit_associated_file command).

  • You can quickly navigate from an error message in the Build tool window to the associated code location. See Navigating from Build Errors to Source Locations.

  • You can jump from an item in the Message List to the corresponding code location. See Message List.

  • SlickEdit contains a number search mechanisms that allow you to search based on the contents of the file or part of the filename. For more information, see Find and Replace and Finding Files.

Recently Opened Files

SlickEdit keeps two lists of recently opened files: a list of recently opened files on the File menu and a list of recently opened workspaces on the Project menu. To manage these lists, select Tools → Options , expand Appearance and select History. You can see the history of items recently opened from the File or Project menu. See History Options for more information.

Finding Files

SlickEdit® provides a Find File feature so you can search for one or more files to open. To access this feature, from the main menu, click Search → Find File (or use the find_file command). The Find File dialog is displayed. You can also access the dialog by clicking the Find File button on the Open dialog (File → Open ). See Find File Dialog for information about using this dialog.

Opening URLs

In addition to opening files on your computer, SlickEdit® lets you open files on the Web for editing. To open a file located at a particular Web address, from the main menu, click File → Open URL . The Open URL dialog is displayed. In the URL text box, enter a URL to open. You can use forward or backward slashes, and the prefix "http://" is not required. The URL will be opened in a new editor window. For a description of this dialog, see Open URL Dialog.

Tip

URLs in SlickEdit editor windows are treated as links. You can open these links in a Web browser by hovering over the link with your mouse pointer and using the binding Ctrl+Click (or Cmd+Click on the Mac). See Navigating to URLs for more information.

Inserting Files

The Insert File feature can be used to insert a file at the cursor location in the current buffer. To access this feature, from the main menu, click File → Insert a File (or use the gui_insert_file command). The Insert File dialog is displayed (similar to the standard Open dialog), which lets you specify the file to insert.

Invoke and Edit

Using your operating system command line, you can invoke SlickEdit® with a file(s) loaded for editing. The syntax is:

        vs {options} file1 {options} file2

If the file that you want to edit is not found, an empty buffer is created with that name.

The table below shows some invocation examples. See Invocation Options in the Appendix for more options and information.

Invocation Example | Description
vs project1.vpw | Auto Restore from workspace file. If you specify .vpj, SlickEdit Auto Restores the project.
vs project1.dsw | Auto Restore from a Visual C++ 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 Windows file manager and list the entire drive contents.
vs -x rich.sta autoexec.bat | Specify a different state file (rich.sta) and edit the file autoexec.bat.

Options for Opening Files

SlickEdit provides several options related to opening files:

  • Activating Change Directory

  • Setting Global Load Options

    • Working with Large Files

    • Different Options for Different Drives

  • Setting Language-Specific Load Options

Activating Change Directory

You can specify that the current directory is changed in the editor when the directory is changed in the Open, Save As, and Change Directory dialogs. From the main menu, click Tools → Options , expand Appearance and select General, then set the option Change directory to True.

Setting Global Load Options

SlickEdit® provides many global Load options, such as specifying which file is active after multiple files are loaded at once, expanding tabs to spaces, size limits for files to be loaded, and Auto Reload preferences. These options affect the Open dialog box and any other command that uses the e or edit commands to open a file. In fact, you can override many of these global Load options by selecting the corresponding option on the Open dialog. To access global Load options, from the main menu, click Tools → Options , then expand File Options and select Load. See Load File Options for information about each option.

Working with Large Files

The editor reads the entire file for files that are color-coded. However, theLoad partial option enhances system performance because the original file is used as a read-only spill file. To determine when the entire file is read, go to the bottom of the file. If the line number is displayed at the bottom of the file, the entire file has been read; however, this does not mean the entire file is in memory. When the entire file is not loaded, it will be locked, and other applications will not be able to write to it.

By default, 2 MB is used for the buffer cache. When the cache is full, modified blocks are written to the spill file. Blocks that are not modified and that can be reread from the original file are discarded. Scrolling through a 2 GB file requires no more than 2 MB of memory (default). A search and replace operation that hits every block requires that almost all blocks be spilled. Saving a 2 GB file requires 4 GB of disk space. The file data must first be spilled before saving the file. Turn backups off before saving a large file since this requires additional disk space, equal to the size of the file. The block size is 16 K.

Different Options for Different Drives

If you want to specify different global Load options for different disk drives, define an environment variable called VSLICKLOAD and specify each drive followed by the appropriate switch. For example, the following command specifies preloading files from jump drives M and N:

            set VSLICKLOAD= m: +L n: +L

Tip

TIP See Command Line Switches for information about enabling and disabling switches on the SlickEdit® command line.

Setting Language-Specific Load Options

Some options for loading files, such as loading as binary and expanding tabs to spaces, can be set on a language-specific basis. Language-specific File options override all global File options as well as any other options set for that language. To access these, from the main menu, click Tools → Options . Expand Languages, the language category and language, then select File Options. See Language-Specific File Options for more information.

Saving Files

You can use the following methods to save files in SlickEdit®:

  • To save the current file or buffer: From the main menu, click File → Save (Ctrl+S or save command). Alternately, right-right click on a file tab and select Save [file] from the context menu.

  • To save the current file or buffer with another name: From the main menu, click File → Save As (gui_save_as command). On Windows, the standard Save As dialog is displayed. On Linux, UNIX, or Mac, a Windows 3.1-style Save As dialog is displayed. Both dialogs provide similar fields and options. Select the Keep old file option if you do not want the buffer name to be changed. See Save As Dialog for more information.

  • To save all open buffers: Click File → Save All (save_all command). Alternately, right-click on any file tab and select Save All from the context menu.

If a Save operation fails, for example, because the file does not have write permissions, the Save Failed dialog box is displayed, presenting some alternate choices. See Save Failed Dialog for a description of this dialog.

Options for Saving Files

SlickEdit® provides many options regarding the saving of files:

  • Setting Global Save Options

  • Setting Language-Specific Save Options

  • Setting Backup Options

  • Setting AutoSave Options

  • Setting Files of Type Filter Options

Setting Global Save Options

Global Save options are available to specify actions that automatically occur when a file is saved, such as appending/removing EOF characters, expanding tabs to spaces, and setting the line format. You can override some of these global Save options by selecting the corresponding option on the Save As dialog. To access global Save options, from the main menu, click Tools → Options , then expand File Options and select Save. See Save File Options for information about each option.

Setting Language-Specific Save Options

Some options for saving files, such as saving as binary and expanding tabs to spaces, can be set on a language-specific basis. Language-specific Save options override all global Save options as well as any other options set for that language. To access these, from the main menu, click Tools → Options . Expand Languages, the language category and language, then select File Options. See Language-Specific File Options for more information.

Setting Backup Options

When a file is saved, SlickEdit can automatically create a backup of the file. To enable Backup and configure Backup options, from the main menu, click Tools → Options , then expand File Options and select Backup. See File Backups for more information.

Setting AutoSave Options

SlickEdit® can save temporary versions of files, in the event of power failure or other unforeseen circumstances. To enable AutoSave and set your AutoSave preferences, from the main menu, click Tools → Options , then expand File Options and select AutoSave. When AutoSave is enabled, SlickEdit creates temporary files in the autosave directory of your user config. These files are deleted the next time AutoSave occurs. AutoSave does not save buffers that are not named. See AutoSave File Options for more information.

Setting Files of Type Filter Options

You can change the file specifications that appear as choices in the drop-down lists for the Files of type and Save as type fields on the Open and Save As dialogs, respectively. By default, all files are listed; however, you might want a smaller list that displays only the source files you typically edit. To edit these file filters, from the main menu, click Tools → Options , then expand File Options and select Files of Type Filters. See Files of Type Filter Options for more information.

File Backups

SlickEdit provides two mechanisms for creating backup files:

  • Backup History - creates a backup each time you save a file, forming a version history that you can browse, compare, and restore.

  • Single backup on first save - saves a backup file the first time in an editting session that you save a file. This preserves the state of the file prior to you working on it.

Backup History is on by default. To change how SlickEdit makes backup files, from the main menu select Tools → Options , expand File Options and select Backup, then set the Make backup files option to one of the following:

  • Create backup history on save

  • Create backup file on first save

  • Off

You can set other Backup options such as the location of the backup files, the number of backups to keep for each file, and a limit for the maximum size of a particular backup. For more information see Backup File Options.

Backup History

Backup History maintains a version history for a file, creating a new version each time you save. This creates a more fine-grained version history that bridges the gap between checkins with your source control system. With Backup History you can compare the current version to previous versions, compare two previous versions, or open a previous version for editing. SlickEdit creates and stores deltas to conserve disk space.

To access Backup History for the current file, from the main menu click File → Backup history for or select View → Tool Windows → Backup History ). An icon is also available in the Standard toolbar to open the Backup History.

Once opened, use the context menu or icons to perform the following operations on the Backup History:

  • Save Selected Backup As - saves the selected version to the location of your choosing.

  • Open Selected Backup - opens the selected version for editing. The file is opened as a copy with a number appended to the filename.

  • Run Diff on Selected Backup - compares the selected version to the current version. You can also select two versions and compare them to each other.

  • Revert to Selected Backup - loads the selected version for editing as the most recent version of this file.

  • Add Comments to Selected Backup - allows you to enter a comment on a version.

  • View Source Control History - displays the source control history for the selected file.

For more information on diffing files and using DIFFzilla, see DIFFzilla®.

Backing Up Network Files

Windows Backups

Sometimes the default backup style does not work correctly when a network file is saved. By default, backups are placed in a subdirectory named backup under the SlickEdit® installation directory. For this backup style to work, make sure the application has access rights to this directory and that this directory exists. Specify the backup directory in the Backup directory path field on the Backup File Options screen (Tools → Options → File Options → Backup ).

Linux, UNIX, and Mac Backups

The default backup style will work properly under Linux, UNIX, and Mac platforms because backup files are placed in the $HOME/.vslick directory, which should always have read-write permissions.

A backup file is created the first time a file is saved in a given edit session. Therefore, the backup file may not represent the last save.

Closing Files

Files can be closed in SlickEdit® with the methods below. Prior to closing, you will be prompted to save any changes.

  • To close the current file: Click File → Close (F3 or q command), or right-click on the file tab and select Close [file] from the context menu. You can also use Shift+LeftClick or the middle mouse button on a file tab to close a file, even if the focus is not on the file to be closed. Note that the middle mouse button must be configured to send a Middle Button event.

Tip

The q command is a shortcut for the quit command. Use q (or quit) in the syntax q [file], where [file] is a file or list of files to close. Wildcards are permitted. For example, q c:\temp\*.* closes all files in the temp directory that you had open.

  • To close all open files: Click File → Close All (close_all command) or right-click on the file tab and select Close All from the context menu.

  • To close all open files except for the one currently in focus: Right-click on the file tab and select Close Others from the context menu.

See Opening and Closing Workspaces for information about closing workspaces and projects.

The SlickEdit® File Manager

The 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 change file attributes, copy, move, delete, or back up the selected files.

File Manager operations and options can be accessed from the main menu by clicking File → File Manager .

Topics in this section:

  • Creating a New File List

  • Selecting Files in the File List

  • Operating on Selected Files

Creating a New File List

Before managing files in the File Manager, you must first create a list of files to be managed. To create a new file list, use the fileman command, or from the main menu, click File → File Manager → New File List . The List Files dialog is displayed, with the following options:

  • 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 option is set on the Open dialog box (see Standard Open Dialog).

  • 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 option is set on the Open dialog box (see Standard Open Dialog).

  • Subdirectories - When checked, all subdirectories below each file specified in the File name text box are searched.

The listing of files will appear in a new buffer window.

You can append files to your current file list. From the main menu, click File → File Manager → Append File List or use the fileman command. The Append File List dialog contains the same fields and options as the List Files dialog described above.

Tip

TIP To modify and close a file list without being prompted to save each time, from the main menu, click Tools → Options → Editing → General , then set the Throw away file lists option to True.

Selecting Files in the File List

To select files in the file list, use the File Manager selection functions. To access these functions, from the main menu, click File → File Manager → Select , then choose one of the following sub-menu items:

  • All - Selects all files in the list.

  • Deselect All - Deselects all files that were previously selected.

  • InvertSelect - Invert the selection.

  • Attribute - Selects files that contain a specific attribute search string that you specify.

  • Extension - Selects all files with the specified extension. Enter the extension without the Dot character.

  • Highlight - Selects all files within a marked area.

  • Deselect Highlight - Deselects highlighted files.

Operating on Selected Files

The following operations are available on the File Manager menu (File → File Manager ):

  • Sort - (fsort command) Sorts the files listed in 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.

  • Backup - (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.

  • Copy - (fileman_copy command) Copies the selected files (lines with ">" character as first character of line) to a directory you choose.

  • Move - (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.

  • Delete - (fileman_delete command) Prompts whether to delete the selected files.

  • Edit - (fileman_edit command) Opens the selected files for editing.

  • Select - Displays a menu of selection commands. See Selecting Files in the File List.

  • Files - Displays a menu of the following file commands:

    • Unlist All - (unlist_all command) Removes all files from the list.

    • Unlist Selected - (unlist_select command) Removes selected files from the list.

    • Unlist Extension - (gui_unlist_ext command) Removes files with a specific extension from the list.

    • Unlist Attribute - (unlist_attr command) Removes files with a specific attribute from the list.

    • Unlist Search - (unlist_search command) Deletes lines which contain a search pattern you specify.

    • Read List - (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 file name which contains the names of files to append to the current list. The file may be a list of file names or may be a file in the same format as a file manager list. You may use the Write List dialog box to write a list containing the selected file names.

    • Write List - (write_list command) Writes a list of the currently selected file names to a file you choose. The Open dialog box is displayed to prompt you for a file.

  • Attribute - (fileman_attr command) Sets the Read Only, Hidden, System, and Archive attributes of the selected files.

  • Repeat Command - (for_select command) Runs internal or external commands on selected files.

  • Global Replace - (fileman_replace command, or Alt+Shift+G) The Global Replace dialog box performs a search and replace on the selected files in the File Manager. The following options are available:

    • 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 language, use the Word chars box on the language-specific General options screen (Tools → Options → Languages → [Language Category] → [Language] → General ). See Language-Specific General Options.

    • Regular expression - When checked, a regular expression search is performed. See Find and Replace with Regular Expressions for more information.

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

  • Global Find - (fileman_find command) Performs a search on selected files.


Chapter 6. Context Tagging®

This chapter contains the following topics:

  • Context Tagging

  • Building and Managing Tag Files

Context Tagging Features

Context Tagging® is a feature set that performs expression type, scope, and inheritance analysis as well as symbol look-up within the current context to help you navigate and write code. Context Tagging uses an engine that parses your code and builds a database of symbol definitions and declarations® commonly referred to as tags. Context Tagging features work with your source code, not just standard APIs (application program interfaces). Symbols information is updated dynamically as you edit your source code.

The Context Tagging feature set includes:

  • Tag-Driven Navigation

  • List Members

  • Parameter Information

  • Auto List Compatible Parameters

  • Completions

  • Symbol Browsing

  • Statement Level Tagging

Before you begin working with these features, some configuration is required. See Building Tag Files.

Tag-Driven Navigation

The Context Tagging database allows you to navigate your code, jumping from a symbol to its definition or its references. For more information, see Symbol Navigation.

List Members

When typing a member access operator (Dot, Comma, "->", and ":" for C++; Dot for Java; IN and OF for COBOL), members are automatically listed. You can access this feature on demand by pressing Alt+Dot, finding identifiers when there is no member operator (list locals, global variables, current class members, etc.). For example, for the C language, to find a string function, type the string on the command line and press Alt+Dot. If you want to disable automatic listing and only list members on demand, turn List Members off, as follows:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Context Tagging.

  2. Clear the Auto-list members check box.

The following example shows the results of what is displayed after typing a Dot when entering Java source. Notice that the Javadoc comments are displayed in a mini-HTML browser. To view documentation for Java APIs, you must install the source files as part of the JDK. If clicking on a URL, the default HTML browser starts. Clicking on other hypertext links navigates within the comment window. The equals method in the example below 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 the display after typing a Dot when entering C++ source code. The stack class is one of the C++ standard template library classes.

Parameter Information

The prototype for a function is automatically displayed when typing a function operator such as the open parenthesis. This also highlights the current argument within the displayed prototype. When working with C++, parameter info is also automatically displayed when typing a template argument operator such as <.

The following example shows the result of pressing Alt+Comma inside the argument list of the Java API String method startsWith. The Javadoc comments are displayed in a mini-HTML browser. To view documentation for Java APIs, you must install the source files as part of the JDK. If clicking on a URL, the default HTML browser starts. Clicking on other hypertext links will navigate within the comment window. The startsWith method has two overloads that accept different arguments. Press Ctrl+PgDn or Ctrl+PgUp to select the next or previous occurrence.

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

Auto List Compatible Parameters

When typing a function operator such as the open parenthesis, "(", a list of compatible variables and expressions for the current argument is displayed. Auto List Compatible Parameters can also be used instead of List Members, in assignment statements (x=<Alt+Comma>) and when listing members of a class or struct. Keep in mind, not all possible variables and expressions are listed. Press Alt+Dot if the symbol that you want is not listed. To access Auto List Compatible Parameters on demand, press Alt+Comma. If you want to disable automatic listing and only list parameters on demand, turn Auto List Compatible Parameters off, as follows:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Context Tagging.

  2. Clear the Auto-list compatible parameters check box.

The following example displays the results of pressing Alt+Comma after an assignment operator. The Rect, pRect, and argv are not listed because their types do not match.

Completions

Completions save keystrokes as you are typing code by providing a way to automatically complete partially-typed text. Press Ctrl+Space for SlickEdit® to automatically complete the rest of the symbol you're currently typing. If a unique match is not found, a list is displayed allowing the selection of the exact match. See Completions for more information.

Symbol Browsing

SlickEdit® gives you the ability to browse and view symbols in your files or workspaces. There are several tool windows that display information as you work to help you find what you need exactly when you need it:

  • Class - This tool window provides an outline view of both the members of the current class as well as any visible inherited members. It also shows the inheritance hierarchy of the current class. The Class tool window is docked as a tab on the left side of the editor by default.

  • Current Context - Current Context displays the logical location of the cursor within your code. If it is within a class, it displays the class name. If it is within a function, it displays the function name. If the function is within a class, it displays the class and the function name. The tool window is docked in the top upper-right section of the editor by default.

  • Defs - The Defs (Definitions) tool window contains the defs (definitions) browser, which provides an outline view of symbols in the current workspace. It is docked as a tab on the left side of the editor by default.

  • Find Symbol - This tool window is used to locate symbols (tags) in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match. This window can be displayed by clicking Search → Find Symbol or by using the gui_search command.

  • Preview - The Preview tool window provides a portal for viewing information in other files without having to open them in the editor. It automatically shows this information when you are working with certain features. This window is docked as a tab on the bottom of the editor by default.

  • References - This window displays the list of symbol references (uses) found the last time that you used the Go to Reference feature (Ctrl+/ or push_ref command (see Symbol Navigation for more information).

  • Symbols - The Symbols tool window contains the symbol browser, which lists symbols from all of the tag files. It is docked as a tab on the left side of the editor by default.

  • Symbol Properties - This window displays detailed information about the symbol at the cursor location. It can be displayed by clicking View → Tool Windows → Symbol Properties or by using the activate_tag_properties_toolbar command.

For more detailed information about these tool windows and how SlickEdit can help you browse symbols, see Symbol Browsing. For information about how to navigate between symbols in files, see Symbol Navigation.

Statement Level Tagging

Statement Level Tagging is a feature of Context Tagging that provides a more detailed view of items in the Defs tool window for C/C++, Java, Python, and Visual Basic .NET. Along with definitions, view constructs like if, while, and for statements. It also displays every non-comment line of code. To see this feature in action, from the Defs Tool Window, right-click and select Show Statements.


Building and Managing Tag Files

Context Tagging® creates tag files to store information about symbols and, optionally, cross-reference information from your source code. Many of the most powerful features of SlickEdit® use this information to speed your coding.

Tag File Categories

SlickEdit creates 4 kinds of tag files. The "Context Tagging - Tag Files" dialog (Tools → Tag Files ) lists the tag files by category.

  • Workspace tag files contain the symbols in the files that are part of your workspace. This includes any file that has been added to a project that this workspace contains. Your workspace tag file is listed under "Workspace Tag File". This will change when you switch workspaces in SlickEdit.

  • Compiler-specific tag files are used only when the specified compiler is selected in Project Properties. The compiler tag files are listed with the name of the compiler in quotes followed by "Compiler Configuration Tag Files".

  • Language-specific tag files are used anytime you code in a particular language. This is useful for things like third-party libraries that you use a lot. These tag files are listed by language. For example, the C/C++ library tag files are listed under '"C/C++" Tag Files'.

  • Auto-Updated tag files are designed to be shared by multiple users of SlickEdit® on a network. You can use the vsmktags utility to rebuild these tag files as part of your nightly build process. When SlickEdit detects that a newer version of an auto-updated tag file is available, it will automatically copy in the newer version and begin using it. These files are listed under "Auto-Updated Tag Files".

Building Tag Files

Each kind of tag file is built differently. Refer to the following sections for how to build each kind.

Caution

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.

Creating Tag Files for Workspace Files

Tag files for your workspace files are automatically created and updated as you edit. If you edit a source file with a different editor, you will have to retag the file or workspace to make sure that the symbol information is up to date.

Creating Tag Files for Compiler-Specific Libraries

The Create Tag Files for Compiler Libraries dialog is used to tag libraries associated with the most commonly used languages in SlickEdit. This dialog appears as part of the Quick Start Configuration Wizard,when SlickEdit® is run for the first time. It allows you to build tag files for commonly used languages and their libraries, including C, C++, Java, and .NET. You can access this dialog at any time from the Context Tagging - Tag Files Dialog (select Tools → Tag Files , then click Auto Tag).

To create tag files for the languages listed, enter the base directory for your package (if it is not already filled in), as well as the destination of your tag file. Click Create tag file(s), and the Building Tag Files dialog box opens, showing the progress as the tag file is built.

Some languages are tagged in the background. In that case the progress dialog shows the progress of queuing files for background tagging. You can then continue to edit code while your files are being tagged. To inform you of the progress of this task, an icon id displayed in the Alert area. While background tagging is being performed, the icon is highlighted.

If the compiler you need to tag is not listed, click the Configure button next to the Compiler drop-down. This will open the Compiler Properties dialog for that language.

For languages not listed on the "Create Tag Files for Compiler Libraries" dialog, you can create language-specific tag files (see Configuring Other Languages).

In the Compiler Properties dialog, do the following:

  1. Click Add to enter the name of the compiler you are configuring.

  2. Click Set Default if this is the main compiler you use for this language.

  3. Click the ... button (ellipses) next to the "Built-in Compiler Include Directories" field to specify an include directory. SlickEdit will tag all files in that directory and any subdirectories.

  4. Click Build Tag File to build the tag file for this compiler.

  5. Click OK to finish.

Creating Language-Specific Tag Files

Language-specific tag files provide the same symbolic information for libraries that is provided for code in your projects. A library is a pre-built unit of code that is not edited as part of this development effort. These tag files are accessible from any project written in the same language.

Note

Language-specific tag files are used by all projects using that language. If you have a library that is used by one project and not another, the symbols in that library will show up as completions in both projects.

You should create a language-specific tag file for any library that is not a compiler-specific library or part of the codebase you are editting. For example, you may have local libraries that are reused from project to project.

To create a language-specific tag file, complete the following steps:

  1. From the main menu, select Tools → Tag Files . The Context Tagging - Tag Files Dialog is displayed.

  2. Click Add Tag File to open the Add Tag File dialog.

  3. Select the source type into which you want the tag file inserted. Select Generate References only if you want library functions to be shown when you list references.

    Note

    Generate References creates an inverted file index so that you can quickly find which files contain which symbols. Workspace tag files create this index by default. This information is used to build a list of references (using the push_ref command, bound to Ctrl +/ in the CUA emulation). In general, it's better to have the reference list contain functions that are part of this workspace and not in libraries. If Generate References is not checked, you will still be able to jump from a symbol to its definition in a library using Ctrl+Dot (push_tag).

    This option is off by default since most programmers do not want to see library functions shown in the reference list.

  4. Click OK. The Add Tags Database dialog opens.

  5. Select an existing tag file or enter the name for the new tag file. Most commonly, you will be creating a new tag file. So give it a name that is representative of the library being tagged. If you are tagging the Boost library, you would name the file "Boost". Tag files are required to have the extension .vtg.

  6. Click Open to display the Add Tree dialog. Navigate to the root of the library source code and click the OK button.

  7. The Building Tag File dialog opens showing the progress as the tag file is built. When finished, the contents are displayed in the Context Tagging® - Tag Files dialog.

See Managing Tag Files for more information.

Configuring Context Tagging for COBOL

All of the Context Tagging features for COBOL, except Parameter Information, are provided by scanning COBOL source file and the copy books that are included. This information is used by List Members, completions, tag-driven navigation, symbol preview, and in the Outline view. Parameter Information for COBOL commands and intrinsic functions are provided by the COBOL built-ins file created during product installation. To provide Parameter Information for subroutines, you must build a tag file that will hold linkage information from the subroutine's point of view.

Configuring Context Tagging for Other Languages

For languages other than C/C++, Java, or .Net, you can create language-specific tag files for the standard libraries that are part of those languages.

A tag file is automatically built for the run-time libraries of C#, InstallShield, JavaScript, Perl, PV-WAVE, Slick-C®, Tornado, TCL, and Visual Basic .NET, and usually it is not necessary to build tag files for the run-times of these languages. If you already built a tag file for run-times during installation, you can skip this section. If you are using Perl, Python, or TCL, and the compiler cannot be found in PATH (or registry for Windows), you need to build tag files for these run-time libraries.

Managing Tag Files

The Context Tagging - Tag Files Dialog (Tools → Tag Files ) is used to manage your tag files.

The left pane of the dialog lists all of your tag files, separated into categories (see Tag File Categories below). A tag file having a File bitmap with blue arrows indicates the tag file is built with support for cross-referencing. The right pane of the dialog lists all the source files indexed by the currently selected tag file.

For information about the buttons available, see Context Tagging - Tag Files Dialog.

Tag File Search Order

When doing tag lookups, the tag files are searched in a specific order, which affects the tags found. The following are examples of the order in which tag files are searched.

Example: C/C++ Tag File Search Order

If a C/C++ source file is open, when a tagging-related operation is performed, the tag files are searched in the following order:

  1. Workspace tag file, providing it contains other C/C++ source files.

  2. Auto-updated tag files containing other C/C++ source files.

  3. The "C" Compiler Configuration tag file corresponding to your default C compiler configuration as specified in your project (see C/C++ Compiler Settings), or global default.

  4. Language-specific C tag files, in the order that they are listed in the Context Tagging - Tag Files Dialog. Note that if you have a "C" Compiler Configuration tag file, cpp.vtg will be excluded from this list.

Example: Java Tag File Search Order

If a Java source file is open, when a tagging-related operation is performed, the tag files are searched in the following order:

  1. Workspace tag file, providing it contains other Java source files.

  2. Auto-updated tag files, containing other Java source files.

  3. Language-specific Java tag files, in the order that they are listed in the Context Tagging - Tag Files Dialog.

Rebuilding Tag Files

The Rebuild Tag File dialog box contains options for rebuilding the selected file. To display the Rebuild Tag File dialog, click select Tools → Tag Files . When the Context Tagging - Tag Files Dialog is displayed, select a file to rebuild, then click Rebuild Tag File.

The following settings are available:

  • Retag modified files only - If checked, SlickEdit® will incrementally rebuild the tag file, only retagging files that have been modified since the last time they were tagged. If not checked, SlickEdit will rebuild the entire tag file from scratch.

  • Generate References - If checked, the tag file will be built with support for cross-referencing. Tag files with support for references are slightly larger and take slightly more time to build. They will also be included in all symbol references searches, which may not be necessary, especially for third-party libraries.

  • Remove all deleted files without prompting - If checked and the tag file contains a source file which no longer exists on disk, the source file will be removed from the tag file without prompting for confirmation.

  • Keep all deleted files without prompting - If checked and the tag file contains a source file which no longer exists on disk, the source file will not be removed from the tag file without prompting for confirmation.

Note

The options Remove all deleted files without prompting and Keep all deleted files without prompting are mutually exclusive'selecting one will clear the other.

Context Tagging® Options

General Context Tagging® Options

Options are available for setting general parameters for the Context Tagging feature set. You can designate how tagging is done, how references function within the application, and tune the application to maximize performance. To display the options, from the main menu, select Tools → Options → Editing → Context Tagging® . See Context Tagging® Options for descriptions of the options.

Tip

To improve tagging performance, you may need to adjust the tag file cache size (Tools → Options → Application Options → Virtual Memory ). See Virtual Memory Options for more information.

Language-Specific Context Tagging® Options

You can activate and deactivate various Context Tagging features on a per-language basis. To access these options, from the main menu, select Tools → Options → Languages , expand your language category and language, then select Context Tagging®. See Language-Specific Context Tagging® Options for more information.


Chapter 7. Building, Running, and Debugging

This chapter contains the following topics:

  • Building and Compiling

  • Running and Debugging

  • Working with Google Web Toolkit Projects

Building and Compiling

Project Configurations in Builds

Each project may have a number of configurations defined. See Project Configurations for more information on creating and managing Project Configurations. The active configuration is used during the build process to determine the project settings to use. The manner in which the configuration affects a build depends on which build system you are using.

The build system is specified by selectingProject → Project Properties from the main menu and then selecting the Build tab. The first and third options, Build without a makefile and Build with an auto-generated, auto-maintained makefile, use the SlickEdit® build system. The second option, Build with a user-maintained makefile or custom build command, allows you to use a custom makefile or configure build commands on the Tools tab.

  • If you use the SlickEdit build system, SlickEdit will use the project properties associated with the currently active configuration. It will direct the build output to a directory with the same name as the project configuration. For example, if Debug is active, SlickEdit will direct the build output to a directory, named "Debug", inside the project directory. You can specify an output directory for a configuration by selecting Build → Configurations from the main menu, and then enter a directory in the Object directory field.

  • If you are using custom build commands on the Tools tab, you can use the %b (current configuration) or %bd (object directory) escape sequences to implement configuration-specific build behaviors.

  • If you are using a custom makefile, you can define a macro, such as CFG, which represents the configuration you want to build. Add code to the makefile to check for this macro and perform different statements, like choosing different compile options or 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. For example:

    make CFG=Debug

Note

SlickEdit uses the vsbuild utility for all 3 build methods. Even when you build using a custom build command or makefile, SlickEdit uses vsbuild as a wrapper to set up the environment and to determine when the build has completed.

Using Build and Compile Operations

SlickEdit® provides the capability to build a project or compile single files.

  • To build the active project, click Build → Build from the main menu, press Ctrl+M, or use the project_build command.

  • To build a different project, open the Projects view, right-click on a project and select Build.

  • To compile the file in the active editor window, click Build → Compile from the main menu, press Shift+F10, or use the project_compile command.

  • To compile a different file, display the Projects tool window, right-click on a file, and select Compile.

If your workspace contains multiple projects, sometimes one or more projects must be compiled before a particular project can be compiled. Click Project → Project Properties and then select the Dependencies Tab to view or set dependencies for the active project. Alternatively, you can right-click on a project in the Projects view and select Dependencies, allowing you to set dependencies for a project that is not active.

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 language-specific General options screen (see Defining Language-Specific Projects). You will probably want the 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. If the current project has a Compile command defined, the language-specific project Compile command will be ignored.

By default, the Build or Compile command is executed in the Build window. This allows you to continue editing while the compiler runs. You can process the error messages as they appear in the Build window instead of waiting until the compile process finishes. Use the stop_process command or click Build → Stop Build to stop the compiler running. To send the compile output to an editor window (named .process), right-click in the Build window and select Send Compile Output to Editor Window.

To customize the Build and Compile commands, click Project → Project Properties . Select the Tools Tab, then select an operation from the list: Build, Compile, or Rebuild. Depending on the language and your other project settings, either a command line or an Options button will be displayed allowing you to configure the operation.

Compiling a Project

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

Using VSBUILD to Compile

Use the utility program vsbuild to compile files in a project and process dependencies between projects. This tool is intended to help implement project support. It has a built-in make facility for Java and C++, performs project dependencies, and processes pre- and post-build commands. 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. Invoking vsbuild with no parameters displays invocation options.

Compiling a Visual C++ Project

For Visual C++ v5.x and v6.x, the default compile command uses the nmake program which requires a makefile (.mak extension). Visual C++ v5.x and v6.x do not automatically create a makefile for you. Use Project → Export Makefile in Visual C++ to create or update the makefile. For Visual C++ v5.x or higher, the default build and rebuild commands do not need a 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.

Specifying Build on Save

A build can be automatically launched upon saving the file or files within a project. To specify this option and to toggle it on/off, from the main menu click Build → Build Automatically on Save . By default this option is not selected.

Specifying Open Commands

The Open Tab of the Project Properties dialog (Project → Project Properties ) lets you enter commands that are executed when the project is activated. This information is stored per project, not per configuration. This tab is unavailable for extension-based projects.

To enter a new command to be opened for a project, simply type the command(s) in the editor control window. Each line should contain a command just as you would type it on the command line. You can set environment variables in the concurrent build window with the set command. For example, the command set xxx=yyy sets the environment variable xxx to the value yyy. This automatically supports different UNIX shells. Use concur_command to send a command string to the concurrent build window, for example: concur_command export name=value.

Escape Sequences for Build Commands

The following escape sequences may be used when creating build commands using the Tools Tab on the Project Properties Dialog.

Sequence | Expands to
%B | Configuration
%BD | Configuration build directory
%BN | Configuration name. Same as %B option except for Visual C++ configuration names where configuration names are of the form CFG="[ConfigName]" or [ConfigName]|[Platform]
%C | Current word
%CP | Java class path including -classpath
%DEFD | Configuration defines with dashes. Example: %DEFD, project def = 'test' produces '"-Dtest"
%DEFS | Configuration defines with slashes. Example: %DEFS, project def = 'test' produces '"/Dtest"
%DM | The file name only of the current buffer
%E | File extension with dot
%F | Absolute filename
%H | (Java only) Builds a temp HTML file to run the compiled applet, %H is replaced by the temp HTML file name
%I | Absolute include directories (individually listed) including '-i'. Example: '-ic:\folder1 -ic:\folder2'
%IR | Relative include directories (to the project) including '-I', seperated by semicolons. Example: '-Ic:\folder1;c:\folder2'
%IN | Absolute include directories (individually listed) including '-i '. Example: '-i c:\folder1 -i c:\folder2'
%JBD | Java build directory including -d
%LF | Current buffer name
%LIBS | Libraries space delimited
%M | Calls a macro function. Any return value is included in the build command. Must be terminated by a matching %. Example: %Mmy_function%, where my_function() is a macro function
%N | Filename without extension or path
%O | Output filename. Currently only GNU projects have an output filename on the Link Tab
%OBJS | Project objects (including libraries)
%OE | Output extension with dot
%ON | Output filename with no extension or path
%OP | Output path
%P | Path of current file
%Q# | The current file's path (no file name) starting with the folder item indicated by #. Example: %Q2, current file = 'c:\a\b\c\d\test.txt' produces '\b\c\d\'
%R | Absolute project name
%RE | Project extension
%RM | Project display name (for associated workspaces)
%RN | Project filename without extension or path
%RP | Project path
%RV | (Windows only) Project drive with :
%RW | Project working directory
%T | Project configuration target
%V | (Windows Only) Drive of current file with :
%W | Absolute workspace filename
%WE | Workspace extension with dot
%WN | Workspace filename with no extension or path
%WP | Workspace path
%WV or %WD | Workspace drive with :
%WX | The workspace folder name only. Example: %WX, workspace = 'c:\a\b\c\workspace.vpw' produces 'c'
%XUP | Translate all back slashes that follow to forward slashes (UNIX file separator)
%XWP | Translate all forward slashes to back slashes (Windows file separator)
%-# | Removes the previous # characters
%(envvar) | Value of environment variable envvar
%# | The # item in argline (items are seperated by spaces)
%{*.*} | A list of project files matching the pattern in braces
%[regkey] | Value of Windows registry entry. Example: %[HKLM:\Software\Microsoft\Communicator@InstallationDirectory]
%? | Prompts the user for a value. The user input is then included in the build command. Must be terminated by a matching %. Example: %?Prompt text%, would prompt the user with the text 'Prompt text'.
%% | Percent character

Language-Specific Build Methods

Build Methods for GNU C/C++

There are three build methods available for GNU C/C++. With these build options you will not need to convert the current build methods to use the GNU debugger. You can select one of these build methods when you create a new GNU C/C++ Wizard project:

  • Build without a makefile (dependencies automatically checked) - When you use the GNU C/C++ Wizard and select this build option, no makefile is ever generated. Instead, our vsbuild utility program determines what needs to be compiled dynamically. We recommend using this option when you are not worried about how the build gets done. Make sure the project include directories (Project → Project Properties , select the Directories Tab) are set up correctly so include files may be found.

  • Build with a user-maintained makefile or custom build command - When you use the GNU C/C++ Wizard and select this build option, no makefile is ever generated and by default the build command is set to make. You can change the build command to anything you want using the Project Properties dialog (Project → Project Properties , select the Tools Tab, select Build for the tool name). Choose this option when you already have your own method for building the source.

  • Build with an auto-generated, auto-maintained makefile - When you use the GNU C/C++ Wizard and select this build option, a makefile is automatically generated and updated when files are added to the project. We recommend using this option when you need a makefile and do not want to use the built-in vsbuild utility. Make sure the project include directories (Project → Project Properties , select the Directories Tab) are set up correctly so include files may be found. To start a build from outside the application, execute the following command where make is the name of the make program, Makefile is the name of the makefile, and ConfigName is the name of the configuration: make-fMakefileCFG=ConfigName.

Build Methods for Xcode

When SlickEdit® opens an Xcode project, it creates a view of the project that is consistent with other SlickEdit workspaces. This creates a few discrepancies between from the view of the project that Xcode provides. The most noticeable difference is that the files in the project cannot be viewed in a single tree, rather the files are always separated by the target that uses the file.

There are build methods available when using Xcode. To open an Xcode project, complete the following steps:

  1. From the user interface, click Project → Open Other Workspace → Xcode Project .

  2. In the Directory window, select the .Xcode directory. This directory appears as a file inside the Finder.

  3. From the File window, select the project.pbxproj file.

  4. From the main menu, click Project → Set Active Project .

  5. Select the project that you want to use.

  6. Click Build → Set Active Configuration .

  7. Select the style that you want.

  8. Click Build → Build .

  9. The project is then built, and you can work with your project.

Build Methods for Ant and NAnt

SlickEdit® supports Apache Ant XML build files and NAnt build files. Apache Ant is a popular make facility used to build Java components. NAnt is a .NET build tool that is similar to Ant.

Note

Ant build files must end with the .xml extension in order to be recognized as build files. NAnt build files must end with the .build extension.

You must use SlickEdit projects for your Ant/NAnt files in order to access the commands that invoke build file targets.

When you open an Ant XML or NAnt build file, SlickEdit automatically either opens the project if it already exists, or creates a new project and adds the file to it.

  • To open an Ant XML file - From the main menu, click Project → Open Other Workspace → Ant XML Build File , or use the workspace_open_ant command.

  • To open an NAnt build file - From the main menu, click Project → Open Other Workspace → NAnt .build file , or use the workspace_open_nant command.

Alternately, you can manually create a project and add the build files or add the files to an existing project.

When adding build files to a project, they are scanned for callable targets. If any targets are found in the file, the icon in the project tree is changed to the "bull's eye" icon.

See Creating Projects and Adding and Removing Files for more information about creating projects and adding files to them.

Invoking Ant or NAnt Targets

Once you have a project that contains Ant or NAnt files, you can execute Ant or NAnt targets. The SlickEdit commands that invoke the build file targets are only available from the Build menu and the right-click context menu of the tree in the Projects tool window.

To execute a single target, pick the target menu item. For example, for Ant, from the main menu, click Build → Execute Ant Target , then navigate to the target. To specify arguments or execute multiple targets, use the Select Multiple Targets menu item. For example, for Ant, from the main menu, click Build → Execute Ant Target → Select Multiple Targets . Alternately, you can right-click on an Ant or NAnt project in the Projects tool window and execute one target or multiple targets.

The Execute Single Ant Target menu and the Choose Ant Target(s) dialog will display targets which are imported into the selected build file from other Ant files. This behavior can be turned off at Tools → Options → Languages → XML/Text Languages → Ant → Options .

Setting Shortcuts for Build and Rebuild

To set up the Build → Build menu items or Build → Rebuild menu items or both to invoke a specific set of targets, first select one of the target menu items:

  • For Ant XML files, from the main menu, click Build → Execute Ant Target → Select Multiple Targets , and choose Ant XML File.

  • For NAnt build files, click Build → Execute NAnt target → Select Multiple Targets , and choose NAnt .build file.

Then, complete the following steps:

  1. Check one or more targets and provide any additional arguments.

  2. Check the Remember and use these settings for check box.

  3. Select Build or Rebuild in the adjacent combo box.

  4. Click OK.

Working with Build Errors

One key advantage of building within SlickEdit is the ability to jump from an error message to the location in the code associated with that error. This makes it much faster to find and fix problems after doing a build.

Viewing Errors

SlickEdit provides a variety of mechanisms to display errors from a build, including:

  • Error markers are placed in the margin of the editor window.

  • The Build tool window displays the output from the build process.

  • The Message List tool window displays a list of errors and warnings parsed from the build output.

  • list_errors will display the output from a build in a pop-up window. This is useful if you have configured a build command and configured it not to output to the Build window.

For information about how to jump from an error to the source code, see Navigating from Build Errors to Source Locations.

Viewing Errors in the Editor Window

Error markers are displayed as red X bitmaps in the left margin of the editor window after a build or compile is completed. To clear these markers, fix the errors and rebuild. You can also clear the markers by selecting Build → Clear All Error Markers , from the main menu, or by using the clear_all_error_markers command.

You can move from one error to the next using next-error and prev-error. These commands determine the next and previous error based on their position in the build output and the current error, marked with a green triangle. See Navigating from Build Errors to Source Locations for details on using these commands.

Viewing Build Results in the Build Tool Window

The output from a build (Build → Build ) or a compile (Build → Compile ) are sent to the Build tool window, docked at the bottom of the SlickEdit window by default. This is the same text you would see if you ran the build in an external command shell. See Navigating from Build Errors to Source Locations for details on jumping from an error message to the corresponding source location and for navigating to the next or previous error.

SlickEdit is already configured to parse many common error formats. If yours is not recognized, you need to configure a new error regular expression. See Parsing Errors with Regular Expressions for more information.

Viewing Build Errors in the Message List Tool Window

The Message List tool window parses the errors from the Build tool window and displays a list of errors and warnings in a tabular form. Messages can be sorted and filtered. You can also jump from a message to the corresponding location in the source code. For more information see Message List.

Listing Errors with list-errors

To see a list of errors that have occurred during the current editing session, use the list_errors command. The Error File dialog box will be displayed.

Move the cursor in the editor control to the error message you want to go to and click Go To Cursor Error to view the source code.

Navigating from Build Errors to Source Locations

SlickEdit provides the means to jump from an error in the Build window to the corresponding location in the source code. You can do this by any of the following:

  1. Double-clicking on an error in the Build window.

  2. Running the cursor-error command, bound to Alt +1 in CUA emulation.

  3. Selecting Build → Go to Error or Include .

In each case you must select or position the cursor within a line that contains the filename and, optionally, the line number and column number.

You can move from one error in the Build window to the next using the next-error command, bound to Ctrl +Shift +Down in the CUA emulation. The same operation is available on the main menu, by selecting Build → Next Error .

Use prev-error, bound to Ctrl +Shift +Up , to move to the previous error. Again, you can select this operation from the main menu at Build → Previous Error .

Note

The key bindings for next-error and prev-error can be used in both the Build tool window and the editor window. in both cases, the result is driven by the order of errors in the Build tool window and the current error, marked by a green triangle.

If the error is within the same file, SlickEdit will move the cursor to that line. Otherwise, SlickEdit will open the corresponding file and move to the indicated line.

Tip

Navigating to a source code location from the Build tool window is not limited to build output. You can execute commands, like sgrep, in that window and use the same methods to jump to the indicated locations.

Parsing Errors with Regular Expressions

SlickEdit uses regular expressions to parse the contents of the Build window and retrieve the file name or path, line number, column number, and error message. A set of default regular expressions are included that can parse error messages from supported compilers like Visual Studio, GCC, and Java. For other tools, you may have to write additional regular expressions.

Error parsing regular expressions are written using the SlickEdit regular expression syntax (see SlickEdit® Regular Expressions). They are stored in the ErrorRE.xml file located in your configuration directory. If the file is deleted, SlickEdit will create a new one with the default values. Rather than modifying the XML by hand, you can use the Options dialog to configure error parsing, creating new regular expressions or managing the list of existing ones. See the following sections for more information:

  • Configuring Error Parsing

  • Enabling Expressions

  • Setting Priority

  • Adding New Categories

  • Adding New Expressions

  • Editing Expressions

  • Error Expression Groups

  • Sample: Creating a New Error Parsing Expression

  • Testing Expressions

Configuring Error Parsing

To configure error parsing, use the Configure Error Parsing option screen. It can be accessed from the main menu by clicking Build → Configure Error Parsing , or by opening the Options dialog (Tools → Options ) and selecting Configure Error Parsing from the Tools category. You can also display the screen with the configure_error_regex command.

The Categories list displays all the expression categories that are defined in the ErrorRE.xml configuration file. Highlighting a category will show the individual expressions for that category.

Enabling Expressions

To enable or disable an expression, or a whole category of expressions, simply click the check box to the left of the expression or category. If a category is unchecked (disabled), then the expressions are not used to parse build output, regardless of their checked or unchecked status.

Setting Priority

To optimize performance for your development needs, you may re-prioritize either expressions or whole categories by using the blue Up and Down arrow buttons.

Resetting Configuration

To reset the configuration settings back to their installation defaults, click the Reset button.

Adding New Categories

Click the green Plus button next to the category listing. The following prompt is shown.

Enter the name for your new category and click OK. Category names must be unique and the dialog will prevent you from adding duplicate entries.

Adding New Expressions

You can add new expressions to any category. Highlight the category you want the new expression to be under, then click the green Plus button to the right of the Expressions listing. The following dialog is displayed.

Enter a name for your new expression. The regular expression must be authored using SlickEdit® Regular Expression syntax. The arrow to the right of the entry field will display a menu of common regular expression syntax constructs to assist you. A "starter" expression is provided for you, as well as some sample error output lines. See the following sections on how to author and test your expression.

Once you have created and tested your new expression, click OK to save the expression. You must also click OK when quitting the main configuration dialog to save your changes.

Exclusions

Some of the error parsing expressions may match lines that you do not want recognized as errors. To eliminate these "false positive" matches, define a new expression in the Exclusions category. The default configuration file contains an expression to match the "Total Time" build output line that is generated by SlickEdit®'s internal build system, vsbuild. Any new exclusion expressions you write should be very strict to prevent real error lines from being skipped. You do not have to define match groups in the exclusion expressions since they will not be used to extract file name and line number information.

Editing Expressions

To edit an existing expression, double-click the expression in the expression listing, or highlight the expression and click the small Edit button to the right of the listing. This launches the same dialog that is used to create a new expression.

Error Expression Groups

In order to navigate to the file that caused the build error or warning, the regular expression needs to be able to identify the file name, and optionally the line and column number, as well as the error message. This is accomplished by using four Tagged Expressions, also known as match groups. The following table documents the match groups used to identify specific portions of an error message.

Group Number | Group Syntax | Purpose
0 | {#0:p} | Retrieves the file name or file path.
1 | {#1:i} | Retrieves the error line number.
2 | {#2:i} | Retrieves the error column.
3 | {#3} | Retrieves the error message text.

The expression for Group #3 can match any portion of the error message you like. The sample expression {#3?+}$ is just matching all remaining characters up to the end of the line. The groups can occur in any order in your expression. For example, if the build tool output places the file name, line, and column after the error message, like the following hypothetical example:

 Error E509: Bad format: found in /usr/tmp/file.x, line 23, column 13

then your expression might look something like the following:

 ^Error {#3?+} found in {#0:p},:bline:b{#1:i},:bcolumn:b{#2:i}$
Sample: Creating a New Error Parsing Expression

The steps below demonstrate creating a new regular expression to support error output from a Lint tool. Below are some samples of the tool's output.

Sample 1:

 file.cpp (5) : Warning 200: Possible dereferencing of null pointer

Sample 2:

 includes\file.h (17) : Warning 003: Macro not parenthesized

  1. Create a new expression category, and name it "Lint".

  2. Highlight the newly created Lint category. The Expressions listing is empty.

  3. Create a new expression by clicking the New Expression (green Plus) button to the right of the expression listing. Copy and paste the sample output lines into the Test Case area.

  4. The first thing to match is the file name at the beginning of the line. The group number reserved for the file is {#0}. SlickEdit® syntax for matching a file path is :p, and ^ represents the beginning of a line. Therefore, enter the following in the Expression entry field: ^{#0:p}.

  5. There is now one space, :b, followed by an integer, :i, enclosed in parentheses, \(\). The group number reserved for the error line number is {#1}. Edit the expression to be: ^{#0:p}:b\({#1:i}\).

  6. After the line number, there is a space, :b, a colon, \:, another space, and then the informative message on the remainder of the line. To match any number of characters you can use ?+, and to match the end of the line is $. The group number reserved for the output message is {#3}. Edit the expression to be: ^{#0:p}:b\({#1:i}\):b\::b{#3?+}$

  7. Now test the expression. Click the Validate button. You should see a pop-up message for each line of sample output.

  8. Click OK to save the new expression, and click OK on the main dialog to save your changes to the configuration file.

Testing Expressions

Copy some sample error or warning output lines from your compiler or build tool, and enter them into the Test Case area. Click the Validate button to validate the regular expression against the Test Case text lines. If the regular expression syntax is invalid, then the expression text is colored red, and an error message is displayed on the status line. If any of the lines in the Test Case area match the expression, a message box displays the details of the match, like the following sample.

This pop-up displays the line of the matched test case and value for each of the four tagged expression groups.

You may also want to use the Regex Evaluator tool window to test your expressions. From the main menu click Tools → Regex Evaluator . Be sure to select the SlickEdit® syntax option when authoring expressions for error parsing. For more information on the Regex Evaluator tool window, see The Regex Evaluator.


Running and Debugging

SlickEdit® provides debugging capabilities when working in GNU C/C++, Java, and CLR programs, using GDB version 6.7.1. You can download this version from www.slickedit.com/gdb. Other programs will result in SlickEdit launching an external debugger.

Note

The GDB shipped with SlickEdit on Windows is based on Cygwin. If you don't want to use Cygwin for GDB, you can download and install the MinGW-based version of GDB from www.mingw.org/download.shtml. This version of GDB is known to work with SlickEdit and does not depend on cygwin1.dll. Use the Configurations tab on the Debugger Options dialog (Debug → Debugger Options or debug_props command) to make it the default native GDB debugger configuration.

Running a Program

To run a program, complete the following steps:

  1. From the main menu, click Build → Execute .

  2. If there is more than one main program you are prompted to select the one to run.

Debugging

Use one of the following methods for debugging your code:

  • Debug → Start executes the program and will stop when a breakpoint is reached.

  • Debug → Step Into places you on the first executable line of the program.

  • Debug → Restart stops the current debugger session if necessary and then places you on the first executable line of the program (like Debug → Step Into ).

  • Debug → Run to Cursor will execute the program and will stop when the line under the cursor is reached.

Additional debug operations can be accessed through the Debug toolbar (View → Toolbars → Debug ).

Mixed Mode View in Debugger

When debugging, you can view your source code with the disassembled code displayed between each line of source. In this mode you can step execution at the assembly language level for greater control over debugging. The buffer is changed to read-only so that the SlickEdit® product can maintain synchronization between source and disassembled code. To view mixed mode, use the Debug toolbar (View → Toolbars → Debug ) and click the button Toggle Display of Disassembly.

Debug Key Bindings

The table below shows the key bindings that are available for Debug functions.

Key | Function
F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+* (on the numeric keypad) | Show next statement
Ctrl+Alt+B or Alt+F9 | Activate breakpoints window
Alt+3 or Ctrl+Alt+W | Activate watch window
Alt+4 or Ctrl+Alt+V | Activate variables window
Alt+7 or Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

Multiple Session Debugging

Multiple session debugging provides the ability to start more than one debugging session within a single instance of SlickEdit®. For example, you can have one session debugging using GDB, and one using Java at the same time.

To create an additional debugger session, use any of the menu items under the Debug → Attach Debugger menu.

Named Sessions

The main debugging session always acquires the name of the current project. (Additional sessions can be created by typing debug_new_create_session.) This name is to be numeric or derived from the executable name. The setup information and invocation information for each named session are stored in the workspace history file (.vpwhist). When you create a new session, you can reuse a named session to save time setting up a remote session. You must also confirm the process ID with each session.

A named session can be associated with a project in such a way that it will always be started when the project is debugged. The named session can be debugged using the Create New dialog.

If you detach from the main session, all sessions are stopped and you exit the debugging mode. If you detach from any other session, it simply detaches and control is assumed by another session.

Attaching to a Running Process (GNU C++ only)

To attach to a running process, complete the following steps:

  1. Click Debug → Attach Debugger → Attach to Running Process , then select a process to debug.

  2. Enter the path to the executable (to pick up debug symbols).

  3. Click OK.

To detach from a running process, click Debug → Attach Debugger → Detach from Process .

Attaching to a Remote Process (GNU C++ only)

To attach to a remote GDB server or GDB stub process, complete the following steps:

  1. Click Debug → Attach Debugger → Attach to Remote Process .

  2. Enter the path to the executable (to pick up debug symbols).

  3. Choose the attach method (socket or device).

  4. Select the Remote Options tab to adjust remote debugging options.

  5. Click OK.

To detach from a remote debugging session, click Debug → Attach Debugger → Detach from Process .

Attaching to a Core File (GNU C++, UNIX only)

To attach to a core file, complete the following steps:

  1. Click Debug → Attach Debugger → Analyze Core File .

  2. Type the path to the core file.

  3. Type the path to the executable (to pick up debug symbols).

  4. Click OK.

Attaching to a Remote VM (Java only)

To attach to a remote VM, complete the following steps:

  1. Start the remote VM with command arguments similar to the following example:

    Java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,
suspend=y,address=8000 MainClass Arg1 Arg2

  2. From the main menu, click Debug → Choose Attach to Remote VM .

To detach from a remote debugging session, click Debug → Detach from VM .

Setting Breakpoints

A new breakpoint can be set using any of the following methods:

  • Pressing F9 - Toggles a breakpoint on the current line. This is the fastest way to set or clear a breakpoint. This runs the debug_toggle_breakpoint command. You can bind this command to another key if you like.

  • Double-clicking in the left margin. This sets or clears a breakpoint on the associated line. Once a breakpoint is set, click once to disable it or double-click to remove it.

  • Selecting Set Breakpoint from the context menu. This menu entry is only available when no selection has been made.

  • Clicking on Toggle Breakpoint button in the Debug Toolbar(View → Toolbars → Debug ).

  • Executing the debug_toggle_breakpoint command from the SlickEdit command line.

A Breakpoints toolbar (Debug → Windows → Breakpoints ) is also available that displays all of the breakpoints and lets you easily add, remove, and activate breakpoints.

Setting Conditional Breakpoints

To set a conditional breakpoint, complete the following steps:

  1. Set a breakpoint.

  2. Select the Breakpoints tab on the Breakpoints toolbar.

  3. Double-click on the breakpoint for which you want to set a conditional breakpoint.

  4. Set the Expression to be evaluated or the Number of times to skip before stopping.

  5. Click OK.

  6. Click Close.

Setting Java Exception Breakpoints

To set a breakpoint when an exception occurs, complete the following steps:

  1. Select the Exceptions tab on the Breakpoint toolbar.

  2. Click Add and select one or more exceptions from the list.

  3. Click OK.

Once an exception breakpoint is added, double-click on it to display the exception properties dialog. This dialog allows you to specify an expression, number of times to skip before stopping, and a specific thread.

Relocatable Code Markers

Breakpoints use relocatable code markers to store their location within the source code. This allows SlickEdit to find the new location if someone makes changes to the file externally, like modifying the file with a different editor. The next time you open the file, SlickEdit checks the location of each code marker and verifies that it is still correct. If necessary, SlickEdit uses stored information to locate the correct line of code for this breakpoint. If the code has changed too much, SlickEdit may not be able to find the new location. Instead, the breakpoint will be placed at the line number where it is was last known to be.

SlickEdit does not attempt to relocate breakpoints during debugging sessions while the external debugger is in control of placing and tracking breakpoints. Note that if multiple debug sessions each have breakpoints in a common file, this will cause the relocatable marker information for all sessions to be cleared when the debugger enters that file.

Generate Debug

This feature supports C#, C++, Java, and Slick-C®. Place the cursor on a function name, then click Tools → Generate Debug to generate a statement that dumps the name of the current function and the value of the parameter(s) passed in. Place the cursor on a variable name, then click Tools → Generate Debug to generate a statement that dumps the contents of that variable. The results are as follows:

  • In C#, this will generate a System.Diagnostics.Trace.WriteLine() statement.

  • In C++, this will generate a printf statement.

  • In Java, this will generate a System.out.println statement.

  • In Slick-C, this will generate a say statement.

Viewing Debugger Info and Setting Options

To view the properties of the underlying debugger system, including a general description retrieved from the debugger, version number, run-time version, and debugger name, make sure you're in debug mode, then from the main menu, click Debug → Debugger Information (or use the debug_props command).

Click the Options button to tune the run-time performance of the integrated debugger, examine the properties of the underlying debugger system, set class filters, and/or control the directories searched for source files. See Debugging Options for more information.

Debugger Tool Windows

The toolbars and tool windows that can be used during debugging are listed in the section Available Toolbars and Tool Windows. These can be accessed from the menu items View → Toolbars or Debug → Windows when the editor is in debug mode.

Using WinDbg

When debugging C++ projects in a Visual Studio solution, you have the option to use the integrated SlickEdit debugger with WinDbg or to use Visual Studio for debugging. By default, you are prompted to select the method for debugging (see image, below). There is an option to never show the prompt again, in which case it will always use the selected method for debugging. This option is specified in configuration variable def_vcproj_debug_prefs. Setting this configuration macro variable to blank (the default) will prompt always, a value of 1 prefers using the Visual Studio and a value of 2 prefers using the integrated debugger.

WinDbg is available from Microsoft as part of their Debugging Tools for Windows. To download WinDbg and read more about it, visit Microsoft's website.

SlickEdit requires x86 (32-bit) dbgeng.dll and dbghelp.dll for debugging. By default, it will search for the dlls in the default dynamic-link library search paths (SlickEdit directory, Windows directory, Windows system directory, directories under PATH environment variable). You can also specify a path with a configuration macro variable def_windbg_path. Set it using the SlickEdit command-line (set-var def_windbg_path) or Macro > Set Macro Variable.

Note

SlickEdit does not support debugging x64 (64-bit) executables.

To debug, WinDbg needs the path to the executable image and the path to the symbol information. The path to the executable image specifies the location of the .exe and .dll files that are being debugged. The path to the symbol information specifies the location of symbol files (.pdb), which contain debugging information. They are generated by the compiler and linker. SlickEdit may be able to determine these paths. If it can't you can specify these paths in the dialogs that launch the debugger. See the Debug executable dialog, below. You can enter multiple paths, separating each with semicolons.

WinDbg integration supports controlling target processes, stepping through source code, setting breakpoints, and accessing memory and registers. Locals and member variables are automatically generated based on the current thread and stack scope. Watches can be set for any symbol name or a C++ expression, evaluated by the current thread and stack scope. A symbol name can be qualified by its module name using an exclamation mark (!) separating the module name from the symbol name. Specifying the module name in the expression will usually result in faster evaluations and resolves any symbol ambiguity, such as if the symbol name could be interpreted as a hexadecimal number. To restrict to local scope only, prefix a dollar sign and exclamation point ($!) to the symbol name.

The WinDbg debugger by selecting any of the following from the main menu:

  • Debug → Start - You will be prompted which debugger to use.

  • Debug → Attach Debugger → WinDbg → Attach Process - Attaches the debugger to a running process by process ID.

  • Debug → Attach Debugger → WinDbg → Debug Executable - Debugs an executable outside the current project.

  • Debug → Attach Debugger → WinDbg → Open Dump File - Opens the debugger on a core dump file.

The following Debugging tool windows and operations are supported for WinDbg:

  • Call Stack

  • Threads

  • Registers

  • Breakpoints

  • Members

  • Locals

  • Watch

  • Memory

  • Show Disassembly

  • Step into, Step out, Step over, Continue, Break

The following commands are available on the SlickEdit command line:

  • windbg_write_dumpfile - Write current debugging session to a dump file.

  • windbg_list_modules - List the currently loaded exe and DLL’s. It also lists the base memory address of the loaded module, the image name (name and extension), and the symbol file type (if any).

  • windbg_update_symbols_path - List and update currently loaded Symbol paths for the current debug session. Use this command to update the symbols path during debugging in case you need to add a path to a PDB file after launching the debugger. Symbols are automatically reloaded when you update the symbols path.

  • windbg_update_image_path - List and update currently loaded Image paths for the current debug session. Use this command to update the image path during debugging in case you need to add a path after launching the debugger. Images are automatically reloaded when you update the image path.

  • vcproj_debug_options - Option to set executable name and path and Symbols paths for current Visual Studio project. By default, SlickEdit will try to determine the location of the output Executable file name and the location of the program database symbols file (PDB) directly from the Visual Studio C++ project file. If you need to specify a custom location for the output filename or SlickEdit cannot correctly evaluate the correct location from the Visual Studio project file, you can specify the path name here. Or if you need to specify multiple paths for symbol files, you can do that here. If left blank, then either field it will fall back to the Visual Studio project file settings. The WinDbg path is the global setting for def_windbg_path.

Running and Debugging PHP

To run a PHP script you need:

  • PHP 5.x or later.

  • A PHP project.

Additionally, to debug a PHP script you need:

  • The Xdebug plugin 2.0.2 or later for PHP installed on your PHP server. You can obtain the Xdebug plugin from http://xdebug.org.

After installing the Xdebug plugin and creating a PHP project you can debug local or remote scripts and web pages.

Installing Xdebug

PHP projects support debugging with the Xdebug plugin for PHP. You can download the plugin from http://xdebug.org.

  1. Extract the Xdebug dll/lib to your PHP extension directory. Windows users can use the Windows installer package provided on the xdebug.org site. Linux users may be able to install the Xdebug plugin from their package manager. Make sure you are using Xdebug 2.0.2 or later.

    Note

    Set up a test page that prints out results of phpinfo() to determine PHP settings, including where your extension directory and 'php.ini' config file resides. A test page looks like:

    <!-- phpinfo.php -->
<?php
echo phpinfo();
?>

  2. Add the following section to your 'php.ini' config file (see note above if you do not know the location of your 'php.ini' file):

    ; Xdebug debugger extension
[Xdebug]
; Xdebug plugin installed via Windows pre-built binaries: Use thread-safe zend_extension_ts="..."
; Xdebug plugin installed via PECL (typically UNIX): Use non-thread-safe zend_extension="..."
; Xdebug plugin built from source: Follow directions from xdebug.org site
zend_extension_ts="c:/php5/ext/php_xdebug-2.0.3-5.2.5.dll"
xdebug.remote_enable=1 xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=slickedit
xdebug.remote_host=127.0.0.1  ; for remote debugging
xdebug.remote_port=9000

    Warning

    Comment out any preexisting Zend optimizer and debugger extensions. Zend optimizer and debugger extensions are not compatible with Xdebug.

    Warning

    Windows users can install pre-compiled modules downloaded from xdebug.org. These modules are thread-safe and should therefore be installed using zend_extension_ts="..." as outlined in the example above.

    UNIX users that install from PECL or a package manager will typically be installing the non-thread-safe version of the Xdebug plugin and should therefore be using zend_extension="..." instead of zend_extension_ts="...".

    Note

    You must change the zend_extension[_ts] line to match the path you extracted the dll/lib to in step #1.

    For the xdebug.remote_host line: if your web server resides on your local machine, then no changes need to be made. If your web server is remote, then use the IP address that SlickEdit will be listening on for a connection from Xdebug.

  3. Restart your web server.

  4. Test that Xdebug is installed successfully by creating a test page that echoes 'phpinfo()' (see example in step #1).

    You should see a banner similar to the following indicating that the PHP server is using Xdebug:

    Alternatively, if you are debugging standalone scripts, you can issue the following command from a console and look for the Xdebug line:

    > php -v
PHP 5.2.6 (cli) (built: May  2 2008 18:02:07)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

  5. Once Xdebug is installed and working, verify that the remote_host and remote_port settings in your 'php.ini' config file match those set up for your PHP project (Build → PHP ).

Setting Up a PHP Project

A PHP project lets you run and debug your PHP web pages and scripts.

To create a PHP project, run the Create PHP Project wizard by selecting Project → New from the main menu. For PHP, you only have one choice: "PHP". Fill in the project name and location for the new project, and click OK. For more information on projects, project types, and creating projects, see Managing Projects.

SlickEdit will display the Create PHP Project wizard, which will walk you through steps to configure the PHP project, including:

  1. Where your PHP files reside on your local file system.

  2. How your local files map onto a web page URL (for the case of web projects).

  3. How a PHP file on a remote server maps to a local PHP file (for the case of debugging remote web projects).

    Note

    Your PHP project must contain local copies of all files being debugged.

Select Project → Project Properties to add local files to your project. After you have created your PHP project, select Build → PHP Options to make changes to file mappings and debugger settings.

Executing and Debugging a Web Page

For web-based projects, local files in your project map to web page URLs on your web server. To launch a web page in your web browser, open a PHP file from your project and execute it (Build → Execute ).

Debugging requires the Xdebug PHP plugin be installed on your web server. If you have not installed and verified your Xdebug installation, then please read Installing Xdebug. Verify that your project's Xdebug server settings (Build → PHP Options , Debug tab) match the Xdebug host:port you configured for your web server.

There are two ways to start a debug session:

  1. Debugging a local file - Open a local PHP file in your project and start the debugger (Debug → Start ). The File-to-URL mapping you set up when you created the project will be used to map the local file onto a web page URL and launch a browser to start debugging.

  2. Listening for Xdebug connection - You can start a debug session from your browser by appending an XDEBUG_SESSION_START argument to the URL:

    http://localhost/index.php?XDEBUG_SESSION_START=slickedit

    The web server will then attempt to connect back to your project and start a debug session. Make sure your project is listening for the connection by toggling Debug → Xdebug Listen in Background .

    You can stop a debug session started from your browser by appending the XDEBUG_SESSION_STOP argument to the URL:

    http://localhost/index.php?XDEBUG_SESSION_STOP

    Note

    If you use Firefox, then there is a great Firefox add-on called Xdebug Helper. You can get it from http://addons.mozilla.org. It allows you to toggle start/stop an Xdebug session from Firefox without messing with URL arguments. You toggle from Xdebug Helper icon in the Firefox tray (lower-right).

Executing and Debugging a Local Script

Local scripts are PHP scripts that you run from a console. If your project was set up to run as a local script (Build → PHP Options , Run tab, Run as), then execute your script by selecting Execute from the Build menu Build → Execute .

Debugging requires the Xdebug PHP plugin be installed. If you have not installed and verified your Xdebug installation yet, then please read Installing Xdebug.

Verify that your project's Xdebug server settings (Build → PHP Options , Debug tab) match the Xdebug host:port you configured in your php.ini configuration file.

Debug your script by selecting Start from the Debug menu (Debug → Start ).

PHP Options

You can set a number of options to control the execution and debugging of PHP scripts. You can access PHP options by selecting Build → PHP Options from the main menu. This menu entry is only available if the active project is a PHP project. Options are broken into two groups, each with its own tab:

  • Run Options

  • Debug Options

At the top of the PHP Options dialog, you can pick the configuration that these settings apply to. The default is All Configurations. However, you can define different settings for separate Run and Debug configurations if you choose.

At the bottom of the dialog you can set the PHP interpreter. This is the path to the PHP interpreter to use.

Note

The path entered for the PHP interpreter affects all projects and configurations. SlickEdit currently cannot use different interpreters for different projects.

Run Options

The Run options control the execution of PHP scripts both in and out of the debugger.

  • Run as - determines how this script will be run. Pick one of the following:

    • Local web server (launches in browser) - runs the script using a web server on this machine.

    • Local script (command line) - runs the script from the command line.

    • Remote web server (launches in browser) - runs the script on a remote web server.

  • Default file - identifies the file to use to start the execution.

  • Script arguments - arguments to be passed to the script.

  • Interpreter arguments - arguments to be passed to the PHP interpreter.

  • File mappings - File mappings are very important when debugging remote scripts (usually web pages). They are used to:

    • Map a local file to a web page URL in order to execute a web page

    • Map a remote file to a local file when debugging.

Debug Options

The debug options set values that are used to control the debugger.

  • Local host - the IP address on your local machine that Xdebug will connect to when initiating a debugger session. This value needs to be the same as set in the php.ini file for Xdebug. See Installing Xdebug for more information.

  • Local port - the port on your machine that Xdebug will connect to when initiating a debugger session. This goes with the Local host value, above.

  • Listen for debugger connection on startup - when checked, SlickEdit will begin listening for a connection when you start the debugger.

  • When a debugger connection is requested - describes how to handle a request for a debugger connection. Select one of the following:

    • Prompt me to accept - prompts each time a debugger connection is requested.

    • Always accept - silently accepts all debugger connections.

    • Never accept - silently refuses all debugger connections.

  • Break in a new debugger session - defines when to break for a new debugger session. Select one of the following:

    • Break on first line of script

    • Run to first breakpoint

  • Stay in debugger - Set this option when you do not want to exit the debugging session when a script has completed. This is especially useful when debugging a website and you will be jumping in and out of pages as you navigate the site.

Using an SSH Tunnel to Debug a Remote Web Page

If your web server resides on a host that supports ssh, then it is very convenient to set up an ssh tunnel to tunnel debugger connections from your remote server back to your local machine. As an example, if your remote web server is called 'myhost.com' and you are using the default debugger connection settings of 127.0.0.1 on port 9000 both locally and on the remote server, then start an ssh tunnel with the following command:

        ssh username@myhost.com -R 9000:127.0.0.1:9000

This saves you the hassle of having to ensure you have picked the correct interface on which to listen for debugger connections from the remote server.

Running and Debugging Python

To run or debug a Python script you need:

  • Python 2.5 or 2.6.

  • A Python project.

Executing and Debugging a Local Script

Execute your script by selecting Execute from the Build menu Build → Execute .

Debug your script by selecting Start from the Debug menu (Debug → Start ).

Debugging a Remote Script

If your script will run on a remote host, then you will need to copy the pydbgp debugger to the remote host in order to make the debugger connection back to your local host possible. The pydbgp debugger folder is located under the application folder in resource/tools/pydbgp-x.x.x/. Copy the entire folder to your remote host.

Before attempting to initiate a debug session from the remote host, you must make sure you are listening for a debugger connection on a local interface that can accept connections from the remote host (Build → Python Options , Debug tab). Verify that you are listening by setting Listen in Background (Debug → pydbgp Listen in Background ). Note the host:port that you are listening on by hovering over the listener icon in the lower, right-hand corner of the application window. You should see something like:

        Listening for pydbgp connection on 192.168.0.101:52030

Where the host is 192.168.0.101 and the port is 52030.

Note

If your remote host supports ssh, then see Using an SSH Tunnel to Debug a Remote Script for a convenient way to tunnel remote debugger connections back to your local host.

From the remote host, issue pydbgp.py command that will initiate a debugger connection back to your local machine:

        pydbgp-1.1.0/bin$ python -S ./pydbgp.py -d 192.168.0.101:52030 -k slickedit path/to/script-to-debug.py

If everything was set up correctly, then you should get a connection request on your local machine to start a debugging session.

Using an SSH Tunnel to Debug a Remote Script

If your script will run on a remote host that supports ssh, then it is very convenient to set up an ssh tunnel to tunnel debugger connections from your remote server back to your local machine. As an example, if your remote server is called 'myhost.com' and you are listening for a debugger connection at 127.0.0.1 on port 52030, then start an ssh tunnel with the following command:

        ssh username@myhost.com -R 52030:127.0.0.1:52030

This saves you the hassle of having to ensure you have picked the correct interface on which to listen for debugger connections from the remote server.

Follow directions for starting a debugger connection from the remote host as described in Debugging a Remote Script.

Python Options

You can set a number of options to control the execution and debugging of PYTHON scripts. access Python options by selecting Build → Python Options from the main menu. This menu entry is only available if the active project is a Python project. Options are broken into three groups, each with its own tab:

  • Run Options

  • Debug Options

  • Remote Mappings

At the top of the Python Options dialog, you can pick the configuration that these settings apply to. The default is All Configurations. However, you can define different settings for separate Run and Debug configurations if you choose.

At the bottom of the dialog you can set the Python interpreter. This is the path to the Python interpreter to use.

Note

The path entered for the Python interpreter affects all projects and configurations. SlickEdit currently cannot use different interpreters for different projects.

Run Options

  • Interpreter arguments - arguments to be passed to the Python interpreter.

  • Default script - identifies the file to use to start the execution.

  • Script arguments - arguments to be passed to the script.

Debug Options

The Debug tab contains options that pertain to debugging Python scripts.

  • Show private variable - Set this option if you want to show private Python variables (example: '__doc__') in the debugger.

  • Local host - Set the local host that pydbgp will connect to when initiating a debugger session. The default is 127.0.0.1.

  • Port provided by system - Use a port that is automatically assigned by the system. pydbgp will connect to this port when initiating a debugger session.

  • Specific port - Use this to specify a port for pydbgp to connect to when initiating a debugger session.

  • Listen for debugger connection on startup - Set this option if you want to listen for a debugger connection in the background when the project is opened.

Remote Mappings

Remote Mappings allow you to define remote-to-local directory mappings. This allows the debugger to automatically resolve the remote file being debugged to a local file.

Click Add or Remove to manage the list of mappings.

Running and Debugging Perl

To run or debug a Perl script you need:

  • Perl 5

  • A Perl project

Executing and Debugging a Local Script

Execute your script by selecting Execute from the Build menu Build → Execute .

Debug your script by selecting Start from the Debug menu (Debug → Start ).

Debugging a Remote Script

If your script will run on a remote host, then you will need to copy the perl5db debugger to the remote host in order to make the debugger connection back to your local host possible. The perl5db debugger folder is located under the application folder in resource/tools/perl5db-x.x/. Copy the entire folder to your remote host.

Before attempting to initiate a debug session from the remote host, you must make sure you are listening for a debugger connection on a local interface that can accept connections from the remote host (Build → Perl Options , Debug tab). Verify that you are listening by setting Listen in Background (Debug → perl5db Listen in Background ). Note the host:port that you are listening on by hovering over the listener icon in the lower, right-hand corner of the application window. You should see something like:

        Listening for perl5db connection on 192.168.0.101:52030

Where the host is 192.168.0.101 and the port is 52030.

Note

If your remote host supports ssh, then see Using an SSH Tunnel to Debug a Remote Script for a convenient way to tunnel remote debugger connections back to your local host.

From the remote host, set up the environment and issue the perl5db command in order to initiate a debugger connection back to your local machine:

        $ export PERL5DB=BEGIN { require 'perl5db.pl'; }
        $ export PERL5LIB=/path/to/perl5db-0.30
        $ export PERLDB_OPTS=RemotePort=192.168.0.101:52030
        $ perl -d  path/to/script-to-debug.pl

If everything was set up correctly, then you should get a connection request on your local machine to start a debugging session.

Using an SSH Tunnel to Debug a Remote Script

If your script will run on a remote host that supports ssh, then it is very convenient to set up an ssh tunnel to tunnel debugger connections from your remote server back to your local machine. As an example, if your remote server is called 'myhost.com' and you are listening for a debugger connection at 127.0.0.1 on port 52030, then start an ssh tunnel with the following command:

        ssh username@myhost.com -R 52030:127.0.0.1:52030

This saves you the hassle of having to ensure you have picked the correct interface on which to listen for debugger connections from the remote server.

Follow directions for starting a debugger connection from the remote host as described in Debugging a Remote Script.

Perl Options

You can set a number of options to control the execution and debugging of Perl scripts. Access Perl options by selecting Build → Perl Options from the main menu. This menu entry is only available if the active project is a Perl project. Options are broken into three groups, each with its own tab:

  • Run Options

  • Debug Options

  • Remote Mappings

At the top of the Perl Options dialog, you can pick the configuration that these settings apply to. The default is All Configurations. However, you can define different settings for separate Run and Debug configurations if you choose.

At the bottom of the dialog you can set the Perl interpreter. This is the path to the Perl interpreter to use.

Note

The path entered for the Perl interpreter affects all projects and configurations. SlickEdit currently cannot use different interpreters for different projects.

Run Options

  • Interpreter arguments - arguments to be passed to the Perl interpreter.

  • Default script - identifies the file to use to start the execution.

  • Script arguments - arguments to be passed to the script.

Debug Options

The Debug tab contains options that pertain to debugging Perl scripts.

  • Show private variable - Set this option if you want to show private variables in the debugger.

  • Local host - Set the local host and port that pydbgp will connect to when initiating a debugger session. The default is 127.0.0.1 on an automatically assigned port.

  • Port provided by system - Use a port that is automatically assigned by the system.

  • Specific port - use this to specify a port to connect to.

  • Listen for debugger connection on startup - Set this option if you want to listen for a debugger connection in the background when the project is opened.

Remote Mappings

Remote Mappings allow to define remote-to-local directory mappings. This allows the debugger to automatically resolve the remote file being debugged to a local file.

Click Add or Remove to manage the list of mappings.


Working With Google Web Toolkit Projects

Getting Started

Create a new Google™ Web Toolkit (GWT) Application project at Project → New → Java → Java - GWT Application or Project → New → Python → Python - GWT Application. This creates an empty workspace and project to which you can add files. The project contains commands to build, debug, and deploy a GWT application. To create a SlickEdit project and workspace from an existing Java GWT Application source tree, select Project → Open Other Workspace → Ant XML Build File , and browse to the main Ant build file for your application.

Debugging (Java Only)

By default, the Debug command for Java GWT projects uses the Java Debug Wire Protocol (JDWP) with a transport address of 8000. See the debug Ant target in the build.xml file for the project in order to customize this command.

Deploying to the Google App Engine

To deploy an application to the Google™ App Engine, use the Deploy Project command, found at Build → Deploy Project . After entering your e-mail address, a command prompt will be launched and your application will be uploaded. If this is the first time deploying this project, you will be prompted for your password in the command prompt.


Chapter 8. Editing Features

This chapter contains the following topics:

  • Files, Buffers, and Editor Windows

  • Navigation

  • Symbol Browsing

  • Viewing and Displaying

  • Basic Editing

  • Syntax Indent and SmartPaste®

  • Adaptive Formatting

  • Completions

  • Aliases

  • Syntax Expansion

  • Code Templates

  • Quick Brace/Unbrace

  • Surrounding and Unsurrounding

  • Bookmarks

  • Code Annotations

  • Message List

  • Commenting

  • Beautifying Code

  • Quick Refactoring

Notifications

To help you better understand what's going on in the editor, SlickEdit displays notification icons in the status area (see image, below). A pop-up message describing the activity is briefly displayed.

Icons are displayed for the following activities:

  • Feature Notifications - uses the document icon to inform you about automatic editing operations that were performed by the editor, including features like Syntax Expansion and Comment Wrapping.

  • Background Processes - uses the clock icon to notify you when SlickEdit is performing operations in the background. This helps you correlate high levels of system activity with otherwise invisible operations in the editor.

  • Debugger Listener - displays the satellite icon when a debugger is listening for a connection, another icon is displayed.

For information on configuring Notifications, including a description of the notification levels, see Notification Options.

Feature Notifications

SlickEdit offers five different levels of notifications. Some notification mechanisms are more disruptive than others and are useful for features that have more surprising results. Once you are used to the feature, you can select a different, less disruptive notification or turn off notifications completely.

Notification Tool Window

Regardless of the notification level selected, all feature notifications are added to the Notification tool window. To view this tool window, select View → Tool Windows → Notifications.

A list of all feature notifications for the current editing session in the current workspace is displayed. Each line includes additional information, such as when the feature was activated and the file and line number where changes were made. Selecting a notification in the list displays more information about the feature. You are also be provided with buttons to configure the feature or read more about it in the help documentation. There is also a button to configure notification settings for all features. If you wish to clear all notifications in the tool window, use the right-most button.


Files, Buffers, and Editor Windows

When you edit a file, it is loaded into a buffer. A buffer is the in-memory representation of the file. Your edits are made to the buffer, but the file is not updated until you save it. Buffers are displayed in editor windows in the editor pane. You can split windows, so that the same buffer is visible in multiple windows.

Note

When you split a window, both windows display the same buffer. Any changes made in one are visible in the other.

Each buffer has an associated tab in the File Tabs tool window, which displays the name of the file. If you open a file that is already open, the existing buffer is displayed. Therefore, the terms "file" and "buffer" are sometimes used interchangeably.

SlickEdit® provides two distinct approaches to managing buffers and editor windows, controlled through the Files per window option (Tools → Options → Editing → Editor Windows ). The value for this option affects the behavior of the window and buffer switching commands, described later in this section.

  1. One file per window - This maintains a one-to-one correspondence between a buffer and an editor window. Each buffer is displayed in its own editor window. Closing a window closes the associated file, and closing a file closes the associated window. This is the default behavior for SlickEdit, preferred by many for its simplicity. In this mode, switching buffers and switching windows does the very same thing, since each buffer has its own window (Switching Between Buffers or Windows for more information.)

  2. Multiple files share window - With this approach, you determine how many editor windows you want and you select the buffer to display in each. You have to manually create a new editor window (typically by splitting or duplicating an existing window). All buffers are available to all windows. You can use the file tabs to select the buffer to edit, which will place the buffer in the currently active editor window. You can also use Document → List Buffers (or the list_buffers command) to view a list of the buffers and select one.

    This approach appeals to users who like a particular arrangement of windows or use editor windows for specific tasks. For example, you may want to use one window for your application code and another window for database code or scripts. Since the commands to switch buffers and switch windows behave differently in this mode (since there isn't a one-to-one correspondence between windows and buffers), you can create a window for each location of interest in your code. Then you can switch between these locations using the next_window and prev_window commands (see Switching Between Buffers or Windows for more information.)

Tip

For a list of Slick-C® buffer and window functions and commands, see "Macro Functions by Category" in the Help system.

When a buffer is modified (changed and not yet saved), there are two visual indicators:

  • An asterisk will be displayed to the right of the file name in the title bar.

  • The file name on the file tab turns red.

Managing Windows

File Tabs

When you open a buffer or file in SlickEdit®, by default, an associated file tab is displayed at the bottom of the editor window to indicate the name of the file. You can click on a file tab to select the buffer you want to edit, placing the selected buffer into the currently active editor window.

The area where file tabs are displayed is called the File Tabs tool window. You can toggle display of this area, turning file tabs on and off, by selecting View → Tool Windows → File Tabs from the main menu, or by using the toggle_filetabs command. The maximum number of file tabs that can be displayed is 255.

By default, file tabs are sorted in alphabetical order by file name. You can configure the tabs to be sorted in the order the files were opened or the order the files were last viewed, or you can order them yourself by dragging and dropping tabs. You can change the sort order with the File tab sort order setting Tools → Options → Editing → Editor Windows ). This option is also configurable via the context menu that appears when you right-click in the File Tabs tool window. For more information, see File Tab Sort Order Options.

When the file tabs are sorted alphabetically, by default, the tabs do not show the complete name of the file when adjacent files differ only by file extension. This saves space and provides better visibility for associated files. For file names to be abbreviated in this style, their paths and base file name must match exactly. For example, C:\rectangles\BorderRectangle.cpp would not abbreviate with C:\src\include\BorderRectangle.h. You can turn this feature on and off for all file tabs by right-clicking in the File Tabs tool window and selecting Abbreviate similar files from the context menu.

When a buffer is modified (changed and not yet saved), the text of the file tab turns red by default. You can change the color of modified file tabs with the Modified file tab(s) screen element (Tools → Options → Appearance → Colors ).

Some file tabs, like those for search results buffers, build output, and File Manager operations, display a picture by default. You can further save space in the file tabs area by turning pictures off. To turn pictures on and off for all file tabs, right-click in the File Tabs tool window and select Show pictures from the context menu.

When you create a new, unnamed "scratchpad" buffer, it is indicated by the text "Untitled" in the file tab along with a number that indicates the internal ID. You can create a scratchpad buffer by using the menu item File → New and not naming the file.

If you prefer to keep your hands on the keyboard for buffer/file navigation, two commands are available: next_buff_tab and prev_buff_tab. Use these commands to navigate through the file tabs in the order they are displayed. Both circle around to the other end when you are on the last item. These commands are not bound to keys by default. To create key bindings for these commands, see Creating Bindings.

The File Tabs tool window also includes a down-arrow icon that displays a list of the open files when clicked. This is a convenient way to select a file when you have a lot of files open and some tabs aren't visible. You may also find that using the Files tool window provides a convenient way to view a list of open buffers and select one for editing (see Files Tool Window).

The right-click context menu in the File Tabs tool window provides more operations such as Save, Close, Close All, Close Others, etc., as well as window splitting options. These are described throughout the documentation where applicable.

Note

You get a different menu if you right-click on the background of the File Tabs tool window than if you right-click on a file tab. Right-clicking on the background lists the set of available tool windows and toolbars to display. Right-clicking on a file tab lists operations specific to that file or the tabs.

File Tab Sort Order

The default order for the file tabs is alphabetic. This makes it easy to predict where a file tab will be based on the file name. To change the sort order, select Tools → Options → Editing → Editor Windows and set the value for File tab sort order to one of the following: Alphabetical, Most recently opened, Most recently viewed, or Manual. For more information see File Tab Sort Order Options.

Changing the Window Left Margin Width

The left margin of an editor window is used to give visual indicators for certain operations (such as when diffing files). Increasing the size of the window left margin can make it easier to create line selections with the mouse. It also prevents window contents from jumping to the right when a bookmark, breakpoint, or error is first displayed.

To specify the space between the left edge of the window and the editor text, click Tools → Options → Appearance → General , then set the value of the option Window left margin to the amount of space desired in inches. This value has no effect when there are bitmaps displayed in the left margin, since more space is necessary.

Splitting Windows

To split the current editor window into two parts so you can view/edit different parts of the same buffer at the same time, click Window → Split Horizontally (Ctrl+H or hsplit_window command) or Window → Split Vertically (vsplit_window command). You can also right-click on the file tab of the current window to perform the same operations.

To view two different editor windows side-by-side, while the focus is on the current editor window, right-click on the file tab of the window you want to compare it with and choose one of the Split...with operations.

Duplicating Windows

To create a duplicate of the current editor window, use the duplicate_window command (Window → Duplicate ). This will create a new window linked to the current buffer.

Cascading and Tiling Windows

To resize and arrange the open editor windows in a cascading display, click Window → Cascade (cascade_windows command).

To resize and rearrange the open editor windows so they don't overlap, click Window → Tile (tile_windows command). If there are three or fewer open editor windows, they will be tiled vertically. To tile three or fewer windows horizontally, click Window → Tile Horizontal (tile_windows h).

Manipulating Tiled Windows

There are several SlickEdit® commands that can be used when the windows are tiled:

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

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

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

  • move_edge - Moves the adjoining edge of a tiled window. This command is bound to Alt+F2. Press Alt+F2, then use the arrow keys to move the cursor to point to the window edge and move it to the new edge position, then press Enter.

  • delete_tile - Deletes an adjacent tiled window. Use the arrow keys to point to the edge of the window you wish to delete.

Maximizing and Minimizing Windows

By default, the first editor window to be opened will take the state of the last editor window to be closed.

To maximize an editor window, click the Maximize button on the window's title bar, or use the maximize_window command. You can also toggle the existing state with a maximized state by using the zoom_window command (Window → Zoom Toggle or Ctrl+Shift+Z).

To minimize an editor window to an iconized state, click the Minimize button on the window's title bar, or use the iconize_window command. To iconize all open editor windows, use the iconize_all command.

When a window is iconized, you can click on the title bar for a menu of operations such as Restore, Move, Close, and Next. Use the mouse to drag the iconized windows around the editor pane. Use the arrange_icons command (Window → Arrange Icons ) to re-dock the iconized windows along the bottom edge of the editor pane.

To restore an iconized window to its previous state, click theRestore Up button on the window's title bar, or use the restore_window command. To restore all iconized windows, use the restore_all command.

Setting the New Window Size

You can specify a custom width and height for new floating editor windows through options on the Options dialog. To access them, from the main menu, click Tools → Options → Editing and click Editor Windows. Alternately, use the new_window_size command as a shortcut to open the Options dialog to the correct option screen.

To specify a custom width and height, complete the following steps:

  1. Set the value of both options New window width and New window height to be Custom value.

  2. In the Custom window width and Custom window height boxes, type the size, in pixels.

See Editor Window Options for more information about all of the available options.

Switching Between Buffers or Windows

The method for switching the buffer or window with which you are working depends on whether you are using a one-to-one relationship between buffers and files (see the introduction to Files, Buffers, and Editor Windows). If you have selected One file per window, switching buffers and switching windows is the same thing. If you have Multiple files share a window selected, then these are two very different operations and you manipulate windows and buffers separately.

There are many styles and commands for switching between buffers and windows within the editor, and we encourage you to try them out and pick the method that works best for you.

Using the mouse, you can switch between editor windows by clicking on the file tabs or by using the Window menu items. By default, the active window will change when you switch to a specific file or buffer, unless the active window is already displaying the buffer you select (see Linking to a Window below).

Tip

For information about navigating within files, see Cursor Navigation.

Next Window Style

The default next window style is Smart Next Window. This style allows you to press Ctrl+Tab (next_window command) to switch the focus between the two most frequently used open editor windows, rather than always going to the next window. Press Ctrl+Shift+Tab (prev_window command) to switch between all open editor windows. This style is similar to how Ctrl+Tab and Ctrl+Shift+Tab work in other Windows MDI applications, like Visual Studio.

Note

Under the Gnome desktop environment, Smart next window may not work correctly when the mouse option 'Highlight the pointer when you press Ctrl' is enabled.

Smart Next Window is on by default (Tools → Options → Editing → Editor Windows > Smart next window style). There are two alternatives to this behavior (note that all three options are mutually exclusive):

  • Reorder windows - If this option is selected, activating an existing window reinserts the window after the current window. Neither Ctrl+Tab nor Ctrl+Shift+Tab reorders the windows. This option is very good for switching between more than two files, but it is not the Windows standard (which means you're probably not used to it). It's similar to the way SlickEdit® reorders buffers.

  • No window reordering - If this option is selected, newly opened windows are inserted after the current window. Activating an existing window, pressing Ctrl+Tab, or pressing Ctrl+Shift+Tab does not reorder windows. This option is best if you like to memorize the hot key numbers on the Window menu (for example, Alt+W 1) because it attempts to keep the hot key numbers the same.

Buffer and Window Switching Commands

The following is a list of SlickEdit® commands that you can use to switch between buffers and windows:

  • next_buff_tab/prev_buff_tab - Navigates through the buffer tabs (also called file tabs) in the order they are displayed. next_buff_tab moves to the right and prev_buff_tab moves to the left. Both circle around to the other end when you are on the last item. These commands are not bound to keys by default.

  • next_buffer/prev_buffer - Navigates through the buffers using a circular list in the order they were last used. A new file is inserted after the current file. These commands are bound to the menu items Document → Next Buffer (Ctrl+N) and Document → Previous Buffer ( Ctrl+P). If you are using Multiple files share a window, then these operations will cycle through the buffers using the currently active window. If you are using One file per window, then these operations will cycle through the windows.

    Note

    While using push-tag (Ctrl+Dot) to navigate from one file to another does alter the order of the buffer list, using pop-bookmark (Ctrl+Comma) to navigate back does not. So, if you have a buffer list of A, B, C and you use Ctrl+Dot to open D the list will be A, B, C, D. When you press Ctrl+Comma to return to C, the buffer list will still be ordered: A, B, C, D. So you will need to use next_buffer to get to D.

  • forward/back - Navigates through previously visited locations in the code as a linear list of locations. A new location is created by any navigation action except for simple cursor navigation, like up, down, left, right, page up, page down, etc. These commands are bound to the green arrows on the Standard toolbar and the forward/back mouse buttons.

  • next_window/prev_window - Moves between editor windows. If you are using the option One file per window(on by default), then this is the same as next_buffer/prev_buffer. If you are using multiple files per window, you can use this to navigate between editor windows, but you will need to use next_buffer/prev_buffer to cycle through the buffers within a particular window.

    The next_window and prev_window commands are bound respectively to the menu items Window → Next (Ctrl+Tab or Ctrl+F6) and Window → Previous (Ctrl+Shift+Tab or Ctrl+Shift+F6).

Listing Open Files

To view and work with a list of open files in SlickEdit®, click Document → List Open Files (Ctrl+Shift+B), or use the list_buffers command. This will display the Files tool window, which contains an alphabetized list of the files and buffers currently open in the editor.

Note

For documentation purposes, the word "files" generally includes both files and buffers.

Tip

  • By docking this tool window, you have quick access for switching between files or opening other files. Right-click on the title bar and select Dockable, then drag and drop the window to your desired location.

  • When the Files tool window is not docked, it can be dismissed by opening a file for editing or by pressing Esc. To make this dialog behave like other tool windows, right-click inside the Files list area and uncheck Dismiss on select.

  • The Files tool window can also show a list of files in the active project or workspace. Use the View buttons or the view settings on the right-click menu to change the display.

Using the buttons on the Files tool window (or the right-click menu), you can perform the following operations:

  • Open - Opens and brings that file into focus, ready for editing. The active file is listed in the tool window in a bold font. You can also open files by double-clicking on them, or by pressing Enter or Alt+E.

  • Save - Saves the selected file(s). Modified files have a Disk bitmap in the left margin of the tool window, and are listed in a red font; when selected, they have a red highlight. You can also click the Disk bitmap to quickly save a modified file, or press Ctrl+S, Alt+S, or Alt+W.

  • Close - Closes the selected file(s) in the editor. You can also press Delete, Alt+C, orAlt+D to close a selected file. Upon close, you are prompted to save modified buffers. If you are using the option One file per window (Tools → Options → Editing → Editor Windows → Files per window ), which is on by default, all windows displaying the buffer are closed as well.

Sort any column by clicking on the column header. When you click to sort, an arrow on the right side of the column header shows the ascending or descending order.

Use the Filter text box to display matching file names. Right-click inside the Files list area to enable Prefix match inside the Filter text box. When the focus is not in the Filter text box, you can incrementally search the list of file names by typing the first few characters of the name. See Files Tool Window for more details about filtering and searching the Files list.

Tip

You can collapse display of the buttons and the Filter text box by clicking the Minus button in the top-left corner of the tool window. The collapsed area is replaced with a message that states your current view and filter settings. To view the buttons and Filter text box again, click the Plus button. Collapsing the buttons and filter gives your window a cleaner look and more room for file listings.

For more detailed information about using the Files tool window, see Files Tool Window.

Linking to a Window

You can change the buffer that is displayed in the current window by using the Link Window dialog(Window → Link Window or link_window command), pictured below. This is especially useful if you like to work with split windows, for quickly bringing the buffers you want to view into focus.

Select the buffer that you want, then click Link to Window. To start a process buffer in the current editor window, click Start Process. If a process buffer has already been started, it is linked to in the current window. See also Link Window Dialog for more descriptions of the available options.

Closing Buffers and Windows

If you have set Files per window to One file per window, closing a file is the same as closing a window. If you have set it to Multiple files share window, then windows and files are closed separately. When you close a modified buffer, you will be prompted to save the contents.

  • To close an editor window, click Window → Close or use the close_window command.

  • To close a single file, select File → Close or use the close-buffer command.

  • To close all files, select File → Close All or use the close_all command.

You can also access these items from the right-click context menu on the File Tabs tool window, as well as an additional operation, Close Others, which closes all open files except for the one selected.

See Closing Files for more information about closing buffers and files.


Basic Editing

Overview

SlickEdit® provides familiar operations for selecting, copying, moving, and operating on text, with enhanced capabilities to meet the needs of developers.

The available editing features depend on the current emulation. Different editors provide different capabilities, and SlickEdit attempts to match these features in each emulation. For example, the Brief emulation provides a brief_iselect_char command that will start an inclusive character selection. This is an operation familiar to Brief users that the other emulations don't necessarily provide. However, CUA is the default emulation mode for SlickEdit, so the operations described in this section are based on that mode. See Emulations for more information about emulation modes.

In addition to the basic and advanced editing features described in this section, SlickEdit provides many more text editing-related features that can be managed on a per-language basis. See topics in the Editing Features chapter for information.

SlickEdit and Selections

Many editing operations are performed on selected text, so you need to know how selections work in SlickEdit in order to gain the power of its editing features. There are several types of selections, and some are handled differently than others regarding operations and features. In particular, SlickEdit handles line selections differently than most other editors. See Selections for more information.

SlickEdit® Clipboards

Most text editing operations involve clipboards. Clipboards in SlickEdit are internal to the editor and separate from the system clipboard provided by the operating system. While most operating systems only allow one clipboard at a time, SlickEdit, by default, keeps a stack of the 50 most recently used clipboards. You can see a list of your clipboards by using the Clipboards tool window (Ctrl+Shift+V, Edit → List Clipboards or list_clipboards command). See Clipboards for more information.

Insert/Replace Editing Mode

By default, SlickEdit® starts in Insert mode, which means text that you type is inserted at the cursor. When the editor is in Replace mode, text is typed over the subsequent characters, essentially replacing text as you type. The Insert or Replace editing mode is indicated in the status line of the editor (Ins or Rep). To toggle the editing mode between Insert and Replace, click on the indicator, press the Insert key, or use the insert_toggle command. To change the default start mode, from the main menu, click Tools → Options , expand Editing and click General, then change the value of the Start mode option.

Improve Your Editing Efficiency

The subsequent sections describe many editing commands. If a command you like to use isn't bound to a key or key sequence already, it's a good practice to give it a key binding for quicker keyboard access. See Creating Bindings for more information.

If you frequently use multiple text editing operations in succession, record the steps as a macro and bind it to a key to save time in the future. See Recording a Macro for more information.

All editing features are not necessarily documented here, nor are all commands documented for each feature. For example, in a subsequent section, common Cut operations are described, but more commands are also available. Usually these are emulation-specific. A good way to discover related commands is to type a portion of the command into the Search by command box on the Key Bindings option screen (Tools → Options → Keyboard and Mouse → Key Bindings ). For example, type "cut" in this box, and the list of Commands is filtered to show only those with that contain the text "cut". Now you can see that some additional Cut commands are append_next_cut and cut_level, two features of the GNU Emacs emulation.

Undoing Edit Operations

To undo an edit operation, use the undo command (Edit → Undo or Ctrl+Z). To redo the operation after using Undo, use the redo command (Edit → Redo or Ctrl+Y). To cancel a text selection, use the deselect command or press Ctrl+U.

Selections

Most applications let you select text and perform operations on the selected text, such as Cut, Copy, and Move. SlickEdit® offers three types of selections: character, line, and block. Each selection type provides different capabilities for different editing situations - and easy access.

Selected text is rendered with a shaded background. You can change the color of the shading by modifying the Background color of the Selection screen element (Tools → Options → Appearance → Colors ). See Setting Colors for Screen Elements for more information.

Selection Types

There are three selection types in SlickEdit®: character, line, and block. The following table shows a summary of each type and some methods for creating the selection. Each type is explained in more detail below.

Selection Type | Description | Creation Methods
Character selection | This is created when one or more individual characters are selected. This is also known as a "char" selection. | Use the mouse to drag or use the select_char command (F8 or Edit → Select → Char ). See also Character Selections.
Line selection | This is created when one or more whole lines are selected as lines. You can select all of the characters on a line and still have a character selection. The selection type depends on how the selection was created. | Triple-click within a line or use the select_line command (Ctrl+L or Edit → Select → Line ). For multiple lines, drag in the left margin area of the edit window (when the mouse pointer changes to point right). See also Line Selections.
Block selection | This is created when columns of text are selected, also known as a "column selection". | Right-click and drag or use the select_block command (Ctrl+B or Edit → Select → Block ). See also Block Selections.

Character Selections

Character selections (also called "char" selections) are used to select words, parts of a line, or a range of text between a starting location and an ending location. To create a character selection, use any of the following methods:

  • Use the mouse to click and drag.

  • Use the select_char command (F8 or Edit → Select → Char ), then use the arrow keys to extend the selection, or use the mouse to click at the end of the selection.

  • Press and hold the Shift key with any navigation key. See Starting/Extending a Character Selection below for examples.

You can also create character selections on words:

  • To select the whole word under the cursor, double-click on the word or use the select_whole_word command (Edit → Select → Word ).

  • To select from the cursor to the end of the current word or the next word, use the select_word command.

When viewing a list of clipboards, character selection types are indicated with the text "CHAR" (see Viewing and Inserting Clipboards for more information).

Starting/Extending a Character Selection

You can start or extend a character selection with Shift key shortcuts, described in the table below. For example, press Shift+Home to create a character selection from the cursor to the beginning of the line. Press Shift+End to create a selection from the cursor to the end of the line. You can also use Ctrl+Shift+Home to create a character selection from the cursor to the top of the file, or Ctrl+Shift+End to create a selection from the cursor to the end of the file.

Note that these shortcuts are based on the default CUA emulation.

Shortcut for Extending a Char Selection | Description
Shift+Right | Start or extend selection to right.
Shift+Left | Start or extend selection to left.
Shift+Up | Start or extend selection up one line.
Shift+Down | Start or extend selection down one line.
Shift+PgUp | Start or extend selection up one page.
Shift+PgDn | Start or extend selection down one page.
Ctrl+Shift+Home | Start or extend selection to top of buffer.
Ctrl+Shift+End | Start or extend selection to bottom of buffer.
Line Selections

A line selection is created when one or more complete lines are selected (partially selected lines are treated as character selections).

SlickEdit® treats line selections very differently from character selections. A line selection can only be inserted before or after another line of code. That's because a line of code is a meaningful unit of functionality in most languages, and it would never be inserted inside another line of code. Handling line selections in this manner makes it faster to copy and paste lines of code.

Line selections are pasted before or after the current line, depending on your Line insert style setting (Tools → Options → Editing → General ). Furthermore, line selections work with SmartPaste®, which reindents inserted lines according to the surrounding code. See Inserting Lines for more information.

To select a line, use one of the following methods:

  • Use the mouse to triple-click within a line, or to select multiple lines, drag in the left margin area of the edit window (when the mouse pointer changes to point right).

  • Use the select_line command (Ctrl+L or Edit → Select → Line ). This selects the current line, or, you can use the arrow keys to extend the selection to include more lines (or click with the mouse on the last line of the selection).

The following operations are also treated as line selections:

  • To select the current code block (an entire block statement such as if, loop, switch, etc.), use the select_code_block command (Edit → Select → Code Block ).

  • To select the current procedure/function, including the function heading, use the select_proc command (Edit → Select → Procedure ).

  • To select the entire buffer, use the select_all command (Ctrl+A or Edit → Select → All ).

When viewing a list of clipboards, line selection types are indicated with the text "LINE" (see Viewing and Inserting Clipboards for more information).

Block Selections

Block selections, also known as column selections, are used to process columns of text. To create a block selection, use any of the following methods:

  • Use the mouse to right-click and drag.

  • Use the select_block command (Ctrl+B or Edit → Select → Block ), then use the arrow keys to extend the selection, or use the mouse to click at the end of the selection.

When viewing a list of clipboards, block selection types are indicated with the text "BLOCK" (see Viewing and Inserting Clipboards for more information).

Selection Styles

Selections styles determine key behaviors for selections, like whether to extend the selection as the cursor moves or to deselect after a copy or paste operation. Selection features in SlickEdit® depend on the current selection style, which is set to match your emulation mode by default. However, note that the key bindings described in this section are based on the default emulation mode, CUA. If you are using a different emulation, see the emulation charts (located in the docs subdirectory of your installation directory) for a listing of selection keys.

To change the selection style, use the Selections option screen (Tools → Options → Editing → Selections ). See Selection Options for more information.

Selection Indicator

SlickEdit® provides a selection indicator, located in the status area of the editor, to indicate the type of selection and the number of characters or lines in a selection. This is useful to quickly determine the selection type you have made, and to measure the length of a word or string, or the number of lines in a function.

The selection indicator displays the following information based on your current selection:

  • When nothing is selected, the indicator is dimmed and displays the text "No Selection".

  • When the current selection is a character selection:

    • If the character selection is contained on one line, the indicator displays the number of columns selected. For example, if three characters are selected, the indicator displays "3 Cols".

      Note

      Because columns are "virtual", the number of columns displayed by the indicator is not necessarily the actual number of characters or bytes in the selection, if the selection includes tab characters, Unicode characters, or extends beyond the end of the line.

    • If the character selection spans more than one line, the indicator shows the number of lines, with a plus sign (+) to indicate if there are "extra" characters selected, or a minus sign (-) to indicate if there are fewer characters selected, depending on the start and end columns of the selection. For example, if the selection spans one entire line and part of the subsequent line, the indicator displays "1 Line+".

  • When the current selection is a line selection, the indicator displays the number of lines. For example, if two lines are selected, the indicator displays "2 Lines".

  • When the current selection is a block selection, the indicator displays the size of the block in the format Lines x Columns. For example, if the selected block is two lines long and three columns wide, the indicator displays "2x3 Block".

Tip

The selection indicator can be used to count the number of characters in any text block. This can be useful for database work or any type of task that involves checking the number of characters. Simply paste the text into SlickEdit and select it with one of the character selection methods, then look at the selection indicator to see the number of characters.

Cycling Through Selections

You can quickly cycle through the three selection types (character, line, and block) with the mouse. To do this, press and hold the left button while clicking with the right button to change the selection type. For example, if you have a character selection, click once to start a block selection, or twice to make a line selection.

You can also cycle through successively larger selections by using the select_toggle command or by clicking on the Selection Indicator in the editor's status area. For example, if you have a character selection, you can use select_toggle to extend the selection to include the entire word. Selections are cycled in the following order, starting with no selection:

  1. Create empty character selection

  2. Select current word

  3. Select current line

  4. Select current code block

  5. Select larger code block

  6. Select current function

  7. Select entire file

  8. Deselect

Except for empty character selections and line selections, the selections are locked so that the cursor remains stationary.

Operating on Selected Text

SlickEdit® provides many methods for manipulating selected text. The table below describes some of the most common selection operations. See Cut, Copy, Paste, and Move for more.

Selection Operation | Description | Usage
Add Numbers in Selection | Adds selected numbers 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. Works with character, line, and block selections. | Use the add command.
Add Numbers to Selection (Enumeration) | Automatically adds incrementing numbers to a selection of code. | Use the enumerate command to auto-add numbers or use the gui_enumerate command (Edit → Other → Enumerate ) to display the Enumerate Dialog, where you can specify options.
Align Block Selection Center | Centers text in a block selection within the selected area. | Use the align_selection_center command.
Align Block Selection Left | Aligns text in a block selection so that the first non-blank character of each line is flush against the left edge of the selection. | Use the align_selection_left command.
Align Block Selection Right | Aligns text in a block selection so that the last non-blank character of each line is flush against the right edge of the selection. | Use the align_selection_right command.
Append Selection to Clipboard | Appends selected text to the clipboard. | Use the append_to_clipboard command ( Ctrl+Shift+C or Edit → Append to Clipboard )
Beautify Selection | Beautifies the selected text according to the beautification settings for the current language. See Beautifying Code for more information. | Use the beautify_selection command, or check the Restrict to selection box on the Beautifier dialog (Tools → Beautify ).
Cancel Selection | Cancels the selection. | Use the deselect command or press Ctrl+U.
Casing: Lowercase Selection | Translates characters within a selection to lowercase letters. See Case and Capitalization of Text for more casing options. | Use the lowcase_selection command (Ctrl+Shift+L or Edit → Other → Lowcase ).
Casing: Toggle Selection Casing | Toggles the characters within a selection between lowercase and uppercase. | Use the togglecase_selection command.
Casing: Uppercase Selection | Translates characters within a selection to lowercase letters. See Case and Capitalization of Text for more casing options. | Use the upcase_selection command (Ctrl+Shift+U or Edit → Other → Upcase ).
Copy Selection by Dragging | Drag/copies selected text. | Press and hold Ctrl while clicking inside a selection and then dragging with the mouse to the desired location ( Ctrl+LButtonDn ).
Copy Selection to Clipboard | Copies selected text (or the entire line, if no selection) to the clipboard. You can also create a named clipboard with this operation (see Named Clipboards). | Use the copy_to_clipboard command (Ctrl+C or Edit → Copy ).
Copy Selection to Cursor | Copies selected text to the cursor location. Char and block selections are inserted before the character at the cursor, while lines are inserted at the location specified by the Line insert style setting (Tools → Options → Editing → General ). | Use the copy_to_cursor command or press Ctrl+Shift while holding the right mouse button (Ctrl+Shift+RbuttonDn).
Cut Selection | Deletes a selection and copies it to the clipboard. | Use the cut command (Ctrl+X or Edit → Cut ).
Delete and Append to Clipboard | Deletes a selection and appends it to the clipboard. | Use the append_cut command (Ctrl+Shift+X or Edit → Append Cut ).
Execute Selection | Executes each line or sub-line of a selection as if entered on the command line. | Use the execute_selection command or press Alt+=.
Files: Append Selection to File | Appends selected text to the specified file. | Specify a file name with the append command, or use the gui_append_selection command to display a dialog where you can browse to pick the file.
Files: Write Selection to File | Writes selected text to the specified file. | Specify a file name with the put command, or use the gui_write_selection command (File → Write Selection ) to display a dialog where you can browse to pick the file.
Fill Selection | Fills a selection with the specified key character. | Use the fill_selection command to be prompted on the command line for the key, or use the gui_fill_selection command (Edit → Fill ) to display a dialog prompt.
Hide Selection | Hides all lines in a selection by collapsing as a Selective Display unit. | Use the hide_selection command (View → Hide Selection ). Use the show_all command (View → Show All ) to redisplay lines.
Indenting: Indent Selection | Indents the selected text according to the Syntax Indent settings or by one tab stop, depending on the Indent with tabs setting on the Language-Specific Indent Options screen. One indent level is added for char and line selections, while one indent level starting from the left edge of the selection is used for block selections. | Use the indent_selection command (Tab or Edit → Indent ).
Indenting: Unindent Selection | Unindents the selected text according to the Syntax Indent settings or by one tab stop, depending on the Indent with tabs setting on the Language-Specific Indent Options screen. One indent level is removed from each line of char and line selections, while one indent level starting from the left edge of the selection is removed for block selections. | Use the unindent_selection command (Shift+Tab or Edit → Unindent ).
List Clipboards | Allows you to view and insert a clipboard. See Clipboards for more information. | Use the list_clipboards command (Ctrl+Shift+V or Edit → List Clipboards .
Move Selection by Dragging | Drag/moves selected text. | Press and hold the left mouse button while clicking on a selection and then dragging with the mouse to the new location.
Overlay Block Selection | Overlays a block selection at the current cursor location. | Use the overlay_block_selection command (Edit → Other → Overlay Block ).
Overlay/Adjust Block Selection | Overlays a block selection at the current cursor location, and fills the source selection with blanks. | Use the adjust_block_selection command (Edit → Other → Adjust Block ).
Paste | Inserts the most recent clipboard at the current cursor location. To insert another clipboard, see the List Clipboards operation or Clipboards. | Use the paste command (Ctrl+V or Edit → Paste ).
Reflow Selection | Reflows text within a selection according to the margin settings specified on the Word Wrap option screen (see Language-Specific Word Wrap Options). Block selections are wrapped within the columns of the block. Char selections are not supported for this operation. | Use the reflow_selection command (Document → Format Selection ).
Reverse Selection | Reverses the characters in a selection. | Use the reverse_selection command.
Shift Text in Selection Left | Shifts text within a selection to the left by one column, maintaining relative indentation. This operation supports line and block selections. If a character selection is used, it is converted to a line selection. | Use the shift_selection_left command (Shift+F7 or Edit → Other → Shift Left ).
Shift Text in Selection Right | Shifts text within a selection to the right by one column, maintaining relative indentation. This operation supports line and block selections. If a character selection is used, it is converted to a line selection. | Use the shift_selection_right command (Shift+F8 or Edit → Other → Shift Right ).
Sort Lines Within Selection | Sorts lines in a selected area in ascending order. | Use the sort_within_selection command or select the Sort within selection option on the Sort dialog (Tools → Sort ).
Sort Selected Lines | Sorts lines in a selected area in ascending order, by comparing only the first columns. | Use the sort_on_selection command or select the Sort on selection option on the Sort dialog (Tools → Sort ).
Spell Check Selection | Checks the spelling of selected text according to the Spell Option settings. See Spell Checking for more information. | Use the spell_check_selection command (Tools → Spell Check → Check Selection ).

Cut, Copy, Paste, and Move

The main menu item Edit provides access to commonly used editing features. Each menu item and its associated command are described in the Edit Menu section. Keyboard shortcuts for each menu item (if available) are displayed by default on the menu itself, based on the current emulation.

Tip

Several editing operations affect words. You can change the characters that SlickEdit® uses to recognize words, on a per-language basis. To do this, use the Word chars option on the Language-Specific General Options screen (Tools → Options → Languages → [Language Category] → [Language] → General ).

Cutting and Deleting

You can cut or delete any selected text, or individual words, lines, or entire code blocks. Cut operations copy the text to the clipboard before deleting. To remove selected text without copying it to the clipboard, press the Delete key.

The table below shows some common Cut operations.

Cut Operation | Description | Usage
Cut | Deletes the selection and copies it to the clipboard. | Use the cut command (Ctrl+X or Edit → Cut ).
Append Cut | Deletes the selection and appends it to the clipboard. | Use the append_cut command (Ctrl+Shift+X or Edit → Append Cut ).
Cut Word | Deletes text starting from the cursor to the end of the current word or next word, and copies it to the clipboard. Invoking this operation from the keyboard multiple times in succession creates one clipboard. See the Tip at the beginning of this section to change word recognition characters. | Use the cut_word command (Ctrl +Shift +k or Edit → Delete → Word ).
Cut Line | Deletes the current line and copies it to the clipboard. Invoking this operation from the keyboard multiple times in succession creates one clipboard. | Use the cut_line command (Ctrl+Backspace or Edit → Delete → Line ).
Cut to End of Line | Deletes text starting from the cursor to the end of the line, and copies it to the clipboard. Invoking this operation from the keyboard multiple times in succession creates one clipboard. | Use the cut_end_line command (Ctrl+E or Edit → Delete → To End of Line ).
Cut Code Block | Prompts to delete the current code block statement and copies the lines to the clipboard. | Use the cut_code_block command or press Ctrl+Del.

Copying Text

The table below shows some common Copy operations.

Copy Operation | Description | Usage
Copy to Clipboard | Copies the selected text (or the entire line, if no selection) to the clipboard. You can also create a named clipboard with this operation (see Named Clipboards). | Use the copy_to_clipboard command (Ctrl+C or Edit → Copy ).
Copy Word | Copies the word at the cursor to the clipboard. Invoking this operation from the keyboard multiple times in succession creates one clipboard. See the Tip at the beginning of this section to change word recognition characters. | Use the copy_word command (Ctrl+K or Edit → Copy Word ).
Copy to Cursor | Copies the selected text to the cursor location. Char and block selections are inserted before the character at the cursor, while lines are inserted at the location specified by the Line insert style setting (Tools → Options → Editing → General ). | Use the copy_to_cursor command or press Ctrl+Shift while holding the right mouse button (Ctrl+Shift+RbuttonDn).
Copy to System Clipboard | Passes the selected text to the operating systems clipboard. | Use the copy command.
Copy Visible | Copies the currently visible lines to the clipboard. Ignores lines hidden by Selective Display. | Use the copy_selective_display command (View → Copy Visible ).

Pasting Text

When pasting text created from a character or block selection, the text is inserted before the character at the cursor. Line selections are inserted at the location specified by the Line insert style setting (Tools → Options → Editing → General ), and by default, indented according to your indent level settings. See Inserting Lines for more information.

The most recent clipboard item can be inserted at the cursor location with the paste command (Ctrl+V or Edit → Paste ).

To insert another clipboard, use the Clipboards tool window (Edit → List Clipboards ), or use the list_clipboards command to display the Select Text to Paste dialog. Both the tool window and dialog show a list of your clipboards and let you select the clipboard to insert. The only difference is that the tool window can be docked and contains a Preview area that shows the entire color-coded contents of the clipboard. See Clipboards for more information about these features.

You can also cycle through and paste clipboards with the paste_next_clipboard and paste_prev_clipboard commands. These commands cycle through the clipboard ring and paste the top item, while leaving the pasted text selected, so you can use the command again to see the next (or previous) clipboard text, if that wasn't the clipboard you wanted. For example, if you have three clipboards named 1, 2, and 3, invoking the paste_next_clipboard command inserts (yet leaves selected) clipboard 2 and moves it to the top of the ring. Invoke the command again to see/paste the next clipboard instead, and so on.

Moving Text

To move a text selection from one location to another, use the mouse to drag and drop it where you want. SlickEdit® allows this capability by default. To disable it, from the main menu, click Tools → Options , expand Editing and click General, then set the Allow drag drop text option to False.

Clipboards

Use SlickEdit® clipboards to copy and move text in files, the SlickEdit command line, dialog text boxes, or any other application that supports text clipboards, such as a word processor. Clipboards in SlickEdit are internal to the editor and separate from the system clipboard provided by the operating system.

Common clipboard-related operations (cut, copy, paste, etc.) are available on the main Edit drop-down menu. The corresponding key binding for each item is also shown by default. See Cut, Copy, Paste, and Move for more information about basic editing operations.

When using a cut or copy operation, a clipboard is created. Pressing the same cut key multiple times in succession creates one clipboard. For example, the shortcut Ctrl+Shift+K is used to cut words (the binding for the cut_word command). If you press Ctrl+Shift+K three times to cut three words, one clipboard is created that you can insert with Ctrl+V (the paste command). This is true for Ctrl+Backspace (cut_line command) and Ctrl+E (cut_end_line command) as well.

Tip

If you are using the Brief emulation and want to place cut text on a clipboard, bind the commands cut_word, cut_end_line, and cut_line to the appropriate keys.

Viewing and Inserting Clipboards

To insert the current clipboard into the buffer, from the main menu, select Edit → Paste , press Ctrl+V, or use the paste command.

In the case of multiple clipboards, there are two ways to view and insert: by using the Clipboards tool window, or by using the modal Select Text to Paste dialog. Both provide the same information, except the Clipboards tool window is dockable and contains a color-coded Preview area for previewing clipboard contents.

  • To display the Clipboards tool window, from the main menu, select Edit → List Clipboards , press Ctrl+Shift+V, or use the list_clipboards command.

  • To display the Select Text to Paste dialog, you can use either the old_list_clipboards command or the list_clipboards_modal command. These commands are identical.

With either method, double-click on a clipboard to insert it at the cursor location, or, select the clipboard to insert and press Enter or click OK.

Both the dialog and the tool window provide the same information:

  • Clipboard name/number - This is the number of the clipboard or the name, if using Named Clipboards. Clipboards are numbered with the most recent clipboard first, which always appears at the top of the list. You can use this value with the paste command to insert the specified clipboard. For example, type paste 2 on the command line to insert clipboard 2 at the cursor location.

  • Clipboard type - The clipboard type can be CHAR, LINE, or BLOCK. A CHAR type clipboard is inserted before the current character. 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 → Options → Editing → General ). A BLOCK type clipboard is inserted before the current character and pushes over all text intersecting with the block. No lines are inserted.

  • Line count - The number following the clipboard type indicates the number of complete or partial lines of text in the clipboard.

  • Clipboard contents/summary - This area shows all or a portion of the clipboard contents. If the contents exceed the viewing area, they are condensed.

The Clipboards tool window contains a Preview area that shows the selected clipboard's color-coded contents. You can copy text in the Preview to create a new clipboard. To see the entire contents of a condensed clipboard using the Select Text to Paste dialog, click the View button. The View Clipboard dialog opens showing the color-coded contents in an edit window. From here, you can copy all or part of the contents to the operating system clipboard.

The Clipboards tool window contains additional functionality:

  • To delete the selected clipboard item in the tool window, press Delete, or, right-click and select Delete from the context-menu. To delete all clipboards, select Clear All from the right-click context menu.

  • To make the selected clipboard active, select Set as Current Clipboard from the right-click context menu.

  • To save the clipboard to a file, select Save clipboard to file from the right-click context menu.

  • To change the view of the tool window, the View menu item on the right-click context menu:

    • Auto - When this is selected, the Clipboards tool window switches between Horizontal and Vertical views automatically as you resize it.

    • Horizontal - When this is selected, the clipboard list is displayed above the Preview area.

    • Vertical - When this is selected, the clipboard list and Preview area are displayed side-by-side.

Named Clipboards

You can create a named clipboard by simply typing the name after the copy_to_clipboard command. For example, create a selection, then, on the SlickEdit® command line, type: copy_to_clipboard a. A clipboard named "a" is created. Now, you can use the name with the paste command to insert the named clipboard without using the Select Text to Paste dialog or Clipboards tool window (for example, paste a). Note that named clipboards are limited to two characters, and that the cut command is not supported for this feature.

Clipboards in the Command Line and Text Boxes

Only clipboards of one line can be inserted into the SlickEdit® command line or a text box. Both Ctrl+V and Ctrl+Shift+V key sequences can be used to insert clipboard text into these fields. The result of inserting a clipboard into a text box varies depending on the clipboard type.

Setting the Max Number of Clipboards

By default, a stack of the 50 most recently used clipboards is kept. To change the maximum number of clipboards saved, from the main menu, click Tools → Options , expand Editing and click General, then enter a value in the Maximum clipboards box.

Other Operations

Inserting Lines

SlickEdit® provides several ways to start a new line or split a line, as described in the table below.

Line Operation | Description | Usage
Split Line at Cursor | Splits the line at the cursor and appends enough blanks at the beginning of the new line to align it with the first non-blank character of the original line. | Use the split_insert_line command or press Enter.
No Split Insert Line (After) | Inserts a blank line after the current line, aligning the cursor with the first non-blank character of the current line. The current line is not split. | Use the nosplit_insert_line command or press Ctrl+Enter.
No Split Insert Line (Before) | Inserts a blank line before the current line, aligning the cursor with the first non-blank character of the current line. The current line is not split. | Use the nosplit_insert_line_above command or press Ctrl+Shift+Enter.

Case and Capitalization of Text

The table below shows some of the operations you can use to change the case and capitalization of characters and words.

Casing Operation | Description | Usage
Lowercase Selection | Translates characters within a selection to lowercase letters. | Use the lowcase_selection command (Ctrl+Shift+L or Edit → Other → Lowcase ).
Lowercase Word | Translates the current word to lowercase letters and places the cursor after it. See the Tip at the beginning of this section to change word recognition characters. | Use the lowcase_word command.
Uppercase Selection | Translates characters within a selection to lowercase letters. | Use the upcase_selection command (Ctrl+Shift+U or Edit → Other → Upcase ).
Uppercase Word | Translates the current word to uppercase letters and places the cursor after it. See the Tip at the beginning of this section to change word recognition characters. | Use the upcase_word command.
Toggle Casing | Toggles the case of letters within a selection. | Use the togglecase_selection command.
Uppercase Mode | Toggles Uppercase mode on and off. Uppercase mode means that letters you type are automatically uppercased, so you don't need to press and hold Shift. Note that you can enable auto-caps on a language-specific basis with the Auto CAPS option (see Language-Specific General Options). | Use the caps command.
Capitalize Selection | Capitalizes the first letter of each word in a selection. | Use the cap_selection command (Ctrl+Shift+A or Edit → Other → Capitalize ).
Capitalize Word | Capitalizes the first letter of the current word and places the cursor after the word. See the Tip at the beginning of this section to change word recognition characters. | Use the cap_word command.

Inserting Literal Characters

Characters can be inserted at the cursor location in the current buffer. This is useful if you wish to insert non-ASCII characters (keys not on the keyboard). To insert a literal character, from the main menu, click Edit → Insert Literal , or use the insert_literal command. The Insert Literal dialog is displayed.

The text box to the right of the Character Code label displays the character. The spin box displays the decimal character code, hex character code, or ASCII character depending on which of those options is selected.

Block Insert Mode

Block insert mode is useful when you need to edit a block of text instead of just copying or deleting it. Additionally, when in this mode, characters you type, as well as other edits (such as backspacing and deleting), apply to the entire block/column selection.

After a block selection is created, you can enter block insert mode by simply typing some characters to insert, or by entering the block_insert_mode command (Edit → Other → Block Insert Mode ). If the block selection is more than one column wide, then the initial block selection will be deleted when you type the first character. This mode also supports use of the keys Tab, Shift+Tab, and Backspace.

To cancel out of block insert mode, press the Esc key.

The figure below shows an example of a block selection created by right-clicking and dragging to select a block. Notice the cursor position.

The figure below shows how the above example changes when you type "i" at the cursor while the block is selected.

The figure below shows how the original example changes when you type "int" at the cursor while the block is selected.

Hex Mode Editing

You can enable Hex view/edit mode on a per-document or language-specific basis:

  • To view the current binary or text file in a Hex mode, click View → Hex or View → Line Hex (or use the commands hex or linehex, respectively).

  • To enable Hex or Line Hex view on a language-specific basis, so that each file opened in that language is displayed in Hex mode, use the Language-Specific View Options.

If you close a file in Hex mode, the file will be displayed in Hex mode the next time it is opened. When the cursor is in hex data, the data can be overwritten or hex nibbles (characters 0 through F) can be inserted. When the cursor is in the text data, overwrite it if you want, or insert text characters the same as if editing a text file. All of the search and replace commands work while SlickEdit® is in Hex mode. Only character selections are displayed when in Hex mode.

See also Hex/Line Hex View for more information.

Hex/Text View Key Bindings

Hex mode key bindings override normal key bindings for the emulation. Most of the other emulation keys will perform the same operation. However, keys that are bound to the following commands perform hex cursor motion: top_of_buffer, bottom_of_buffer, page_up, page_down, begin_line, end_line, begin_line_text_toggle, cursor_left, and cursor_right.

Hex/Text View Operation | Key Shortcut
Delete Byte to Left of Cursor and Move Cursor Left | Backspace
Delete Byte Under Cursor | Delete
Move Cursor to Beginning of Hex Line | Home
Move Cursor to Last Character of Hex Line | End
Toggle Cursor Between Hex Data on Left, Text Data on Right | Tab and Shift+Tab


Navigation

There are two types of navigation in SlickEdit®: Code Navigation, which provides in-depth symbol navigation and structure matching, and Cursor Navigation, which pertains to more simple movements within text and files.

Code Navigation

Some of the most powerful features in SlickEdit are its code navigation methods, particularly Symbol Navigation. These features allow you to navigate your code the way you think about it, rather than just as a set of files. If you aren't using SlickEdit's code navigation features, you aren't getting the most out of the editor.

Symbol Navigation

Symbol Navigation allows you to jump from a symbol to its definition or to a reference with a single keystroke. A pushed bookmark is set, allowing you to return to the symbol with another keystroke. You can chain a series of these navigation operations together, creating a stack of locations. Then pop your way back to the starting location.

To navigate between symbols use the following operations:

  • Go to Definition - To quickly move the cursor from a symbol to its definition, pushing a bookmark in the process, press Ctrl+Dot. Alternatively, click Search → Go to Definition or use the push_tag command.

  • Go to Reference - To create a list of references and optionally jump to the first one, pushing a bookmark in the process, press Ctrl+/. Alternatively, click Search → Go to Reference or use the push_ref command.

  • Pop Bookmark - To pop the bookmark and return to the previous location, press Ctrl+Comma. Alternatively, click Search → Bookmarks → Pop Bookmark or use the pop_bookmark command. See Pushed Bookmarks for more information about working with bookmarks.

When you first call these operations, if a tag file does not exist for the current file, it will be built (see Building Tag Files).

Tip

Procs and prototypes - In C and C++, navigating from a symbol to its definition will prompt you to select whether you want to go to the prototype or the function. You can tell SlickEdit® to always go to one or the other by setting one of the options Prioritize navigation to symbol definition (proc) or Prioritize navigation to symbol declaration (proto). To set these options, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Context Tagging®. When the cursor is in the prototype, pressing Ctrl+Dot will navigate to the function and vice versa. If you do not set one of these options, you will be prompted with the Select Symbol Dialog the first time you navigate from a symbol to its definition.

Automatically Closing Visited Files

Some features and operations in SlickEdit® automatically open files for "visiting", such as Go to Definition and Pop Bookmark (see Symbol Navigation). A file is considered visited if it is opened as a result of a symbol navigation or search operation, not modified, and subsequently navigated away from. An option is available to automatically close these visited files. To access the Automatically close visited files option, from the main menu, click Tools → Options , then expand Editing and select Bookmarks. You can enable the option or you can choose to be prompted to close each time you navigate away from a visited file.

Navigating Between Multiple Instances

If more than one instance of the definition or reference is found, the Select Symbol Dialog is displayed, from which you can select the instance to navigate to. To go to the next occurrence, press Ctrl+G (Search → Next Occurrence or find_next command). To go to the previous occurrence, press Ctrl+Shift+G (Search → Previous Occurrence or find_prev command).

Alternatively, press Ctrl+Down (next_tag command) or Ctrl+Up (prev_tag command) to place the cursor on the next or previous symbol definition.

Using the Find Symbol Tool Window

The Find Symbol Tool Window (Search → Find Symbol or gui_push_tag command) is used to locate symbols (tags) which are declared or defined in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match. See Find Symbol Tool Window for descriptions of the options that are available.

More Symbol Navigation Methods

There are several other methods for navigating to symbols:

  • The Symbols Tool Window shows the symbols for all tag files. Right-click in the tool window and select Find Tag to search for a specific symbol. You can also use the cb_find command to find the symbol under the cursor and display it in the Symbols tool window.

  • At the SlickEdit® command line, use the f command and completion keys (Space and ?) to enter a tag name. For example, if tagging the C run-time library, type f str? on the command line for a list of tag names starting with "str" (such as strcpy, strcmp, etc.).

  • To navigate to a Slick-C® symbol, you can use the fp command (a shortcut for find_proc). If editing a Slick-C macro, then enter 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.

Navigating Between Words

To navigate between words, use the next_word (Ctrl+Right) and prev_word (Ctrl+Left) commands. The next_word command moves the cursor to the beginning of the next word. The prev_word command moves the cursor to the beginning of the previous word.

A word is determined by the Word chars value you set for the programming language (Tools → Options → Languages → [Language Category] → [Language] → General ). For C, C++, and Java this is set to A-Za-z0-9_$ by default. The next_word command, for example, will skip over any contiguous characters from that set.

You can specify whether the cursor moves to the beginning or the end of the next/previous word. Click Tools → Options → Editing → General , then set the Next word style to Begin or End. This affects both next_word and prev_word commands.

If you have enabled subword navigation (see Subword Navigation), the word navigation commands will behave like their subword navigation counterparts. You can still perform regular word navigation using the "full" word commands: next_full_word, prev_full_word, select_full_word, copy_full_word, cut_full_word, delete_full_word, and delete_prev_full_word.

Subword Navigation

Subword navigation provides the capability to navigate within a word, stopping at capitalized letters or letters following common dividers like underscore or dash. If the target word does not contain any subwords, then the subword commands behave like their word navigation counterparts.

You can configure SlickEdit to use subword navigation instead of the regular word navigation by selecting Tools → Options → Editing → Cursor Movement and setting Subword Navigation to True. When this option is on, you can still perform "full" word navigation using the _full_word commands. See Navigating Between Words for more information.

The following subword navigation commands are provided. For convenience, you can bind them to a key sequence using Tools → Options → Key Bindings You can also use the Key Bindings screen to search for subword commands by entering "subword" in the Search by command field. Then you can view further documentation on each command.

  • next_subword - Moves the cursor to the next subword.

  • prev_subword - Moves the cursor to the previous subword.

  • select_subword - Selects the next subword.

  • copy_subword - Copies the next subword to the clipboard.

  • cut_subword - Cuts the next subword, putting it in the clipboard.

  • delete_subword - Deletes the next subword without putting it in the clipboard.

  • delete_prev_subword - Deletes the previous subword without putting it in the clipboard.

Begin/End Structure Matching

Begin/End Structure Matching moves the cursor from the beginning of a code structure to the end, or vice versa. This works for languages using curly braces "{ }", "begin" and "end", or any other defined begin/end pairs.

To place the cursor on the opposite end of the structure when the cursor is on a begin or end keyword pair, press Ctrl+] (find_matching_paren command or from the menu click Search → Go to Matching Parenthesis ). The find_matching_paren command supports matching parenthesis pairs { },[ ] and ( ).

Tip

For Python, SlickEdit® supports the matching of the colon (:) token and the end of context. See Begin/End Structure Matching for Python for more information.

Viewing and Defining Begin/End Pairs

Use the language-specific General options screen to view or define the begin/end pairs for any language. To access this dialog, from the main menu, click Tools → Options → Languages , expand your language category and language, then select General.

In the Begin/end pairs text field, specify the pairs in a format similar to a regular expression.

Note

This text box is unavailable (dimmed) for languages that have special begin/end matching built-in.

The examples below illustrate the syntax for defining the begin/end pairs. The begin and end pair matching option is case-sensitive by default. Append ";I" (a semicolon followed by an upper-case i) to ignore case.

Example 1
(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 , (comma) is used to specify multiple begins or multiple ends. The | operator is used to separate begins from ends.

Example 2
(#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.

More settings for begin/end pairs can be found on the [Language] Formatting Options screen (Tools → Options → Languages → [Language Category] → [Language] ). See Language-Specific Formatting Options for more information.

Setting the Paren Match Style

As you type a closing parenthesis, highlight and matching options are available. To specify these options, from the main menu, click Tools → Options , expand Editing, then click General and set the value of the Parenthesis matching style option.

The Highlight style option temporarily block-selects the text within the parenthesis pair. The Cursor to Begin Pair style option temporarily places the cursor on the matching begin parenthesis.

Select Highlight matching blocks to automatically highlight the corresponding parenthesis, brace, bracket, or begin/end word pairs under the cursor. To customize the highlighting color, from the main menu, click Tools → Options → Appearance → Colors , and select the Block Matching screen element. To adjust the delay in milliseconds before the highlighting is updated, go to Macro → Set Macro Variable and modify the variable def_match_paren_idle. See Setting Colors for Screen Elements and Setting/Changing Configuration Variables for more information.

Navigating in Statements and Tags

The following navigation commands are available for languages that support statement tagging:

  • next_tag / prev_tag - Places the cursor on the next/previous tag definition, skipping any tags filtered out by the Defs tool window.

  • next_proc / prev_proc - Places the cursor on the next/previous function heading.

  • find_tag - Displays a list of tags in the Select Symbol Dialog, allowing you to pick the tag to which you want to navigate.

  • goto_tag - Prompts for a procedure tag name and places the cursor on the definition of the procedure name specified. This command is available in GNU Emacs emulation mode only.

  • end_tag - Places the cursor at the end of the current symbol definition. This is useful if you are in the middle of a large function or class definition and you want to jump to the end of it. In a class definition in C++, the end is where inline function definitions are usually stored.

  • end_proc - Moves the cursor to the end of the current procedure.

  • next_statement / prev_statement - Moves the cursor to the beginning of the next/previous statement.

  • begin_statement / end_statement - Places the cursor at the beginning/end of the current statement.

  • next_sibling / prev_sibling - Moves the cursor to the beginning of the next/previous sibling. These are similar to the next_statement/prev_statement commands except they stay at one level of nesting.

  • goto_parent - Moves the cursor to the beginning of the enclosing statement or symbol scope relative to the current cursor position.

  • begin_statement_block / end_statement_block - Moves the cursor to the beginning/end of the current statement block.

Navigating with S-expressions

S-expressions are symbolic expressions. They can be a single symbol or a set of symbols contained in a structure. First popularized in Lisp and Emacs, SlickEdit provides several navigation commands using S-expressions.

These commands are particularly useful in XML and HTML, where the structures created by begin and end tags are treated as S-expressions. These commands allow you to skip over or drill down into text bounded by tags.

The following commands are available, with their default keybindings in CUA emulation:

  • prev_sexp - Moves to the previous S-expression (Ctrl +Alt +Left).

  • next_sexp - Moves to the next S-expression (Ctrl +Alt +Right).

  • backward_up_sexp - Navigates to the start of the immediately enclosing block (Ctrl +Alt +Up).

  • forward_down_sexp - Drills down into the next block (Ctrl +Alt +Down).

  • select_prev_sexp - Extends a character selection from the cursor to the start of the previous S-expression (Ctrl +Alt +Shift +Left).

  • select_next_sexp - Extends a character selection from the cursor to the start of the next S-expression (Ctrl +Alt +Shift +Right).

  • cut_prev_sexp - Deletes the S-expression to the left of the cursor and copies it to the clipboard (Ctrl +Alt +Backspace).

Cursor Navigation

These cursor navigation methods pertain to simple cursor movement within files. We recommend creating key bindings for commands that you use frequently (if a key binding doesn't already exist by default). See also Switching Between Buffers or Windows for information about navigating between buffers and editor windows.

Navigating in Pages and Files

The following commands control cursor navigation in pages and files:

  • cursor_right (Right Arrow) - Moves the cursor one column to the right. If the cursor is at the end of the line, this command will move the cursor to the next line depending on the value for Cursor right/left wraps to next/previous line (Tools → Options → Editing → Cursor Movement ).

  • cursor_left (Left Arrow) - Moves the cursor one column to the left. If the cursor is at the beginning of the line, this command will move the cursor to the previous line depending on the value for Cursor right/left wraps to next/previous line (Tools → Options → Editing → Cursor Movement ).

  • cursor_up (Up Arrow) - Moves the cursor to the previous line. If the cursor is located in a column that is beyond the last column of the previous line, the cursor position is controlled by Cursor up/down places cursor in virtual space (Tools → Options → Editing → Cursor Movement ).

  • cursor_down (Down Arrow) - Moves the cursor to the next line. If the cursor is located in a column that is beyond the last column of the next line, the cursor position is controlled by Cursor up/down places cursor in virtual space (Tools → Options → Editing → Cursor Movement ).

  • page_up / page_down (PgUp/PgDn) - Moves the cursor to the previous/next page of text.

  • page_left / page_right - Changes the left edge scroll position by half the window width to the left/right. The cursor is moved half the window width to the left/right as well.

  • top_of_window / bottom_of_window (Ctrl+PgUp/Ctrl+PgDn) - Places the cursor at the top/bottom of the current editor window.

  • top_of_buffer / bottom_of_buffer (Ctrl+Home/Ctrl+End) - The top_of_buffer command places the cursor at the first line and first column of the current buffer. The bottom_of_buffer command places the cursor at the end of the last line of the current buffer. If the option Preserve column on top/bottom is enabled (Tools → Options → Editing → General ), the cursor is placed at the first line/last line of the buffer and the column position is unchanged.

Tip

There is an option to make top_of_buffer/bottom_of_buffer push a bookmark, providing quick navigation between the top/bottom of the buffer and the previous location. See Pushed Bookmark Options for more information.

  • top_left_of_window / bottom_left_of_window - Places the cursor at the top left/bottom right of the current editor window.

Navigating to a Specific Line

To view and place the cursor on a specific line number, from the main menu, click Search → Go to Line . Enter the line number and click OK. Alternatively, you can use the goto_line command in the syntax goto_line linenumber.

Navigating to an Offset

To seek to a byte offset in the current buffer, from the main menu click Search → Go to Offset , or use the gui_seek command. 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.

When the Seek dialog appears, enter the position to seek for. You may specify a C syntax expression. In addition, you may prefix the expression with a plus or minus sign (+ or -) to specify a relative seek position.

Some examples are:

  • 0x10+10 - Seek to offset 26

  • +8+4 - Seek to current offset + 12

  • -8+4 - Seek to current offset - 12

Select the Decimal option to enter the seek position in decimal number format. Select the Hex option to enter the seek position in hexadecimal number format. You can type an "x" as the first character in the Position to seek for text box and this option will automatically be selected.

Navigating to URLs

SlickEdit® treats URLs in editor windows as hyperlinks, making them easy to identify and open in a Web browser from within your code. By default, a string is interpreted as a URL if it begins with one of the following URI schemes, or, URL types (including the colon and slashes):

  • file://

  • ftp://

  • http://

  • https://

URLs are underlined. You can navigate to a link by hovering over it with the mouse and using Ctrl+Click (or Command+Click on the Mac). The link opens in a new Web browser window, or the current browser window if one is already open. The file:// URI scheme is handled differently (see Handling File URLS below).

When using the mouse to hover over an http:// link, click the green arrow to open the source code in SlickEdit.

The URI Schemes node of the Options dialog lets you specify the recognized URI schemes, and makes it easy to extend this feature. For example, you may want to add a mailto URI scheme so that e-mail URLs are recognized. To access these options, from the main menu, click Tools → Options , expand Network & Internet Options, then select URI Schemes. See URI Scheme Options for more information.

Handling File URLS

Files can be designated using the file:// URI scheme. Depending on the file type, a file can be opened in a browser, passed to an application for opening, or executed. How the file is handled depends on the operating system and the settings in Tools → Options → Languages → File Extension Manager .

The File Extension Manager provides two settings to control this behavior:

  • Open Application - Specifies an application to open files with the selected extension.

  • Use file association - Overrides the application specified in Open Application and uses the operating system to determine what application to use. This is only applicable to Microsoft Windows operating systems.

If an application is specified in the Open Application field, the file will be passed to that application for opening.

If Use file association is checked, the operating system is used to determine what application to use. This is only applicable on Windows.

If both fields are left blank, SlickEdit® will use the operating system to determine what application to use. This is the same as if you checked Use file association and is only applicable on Windows.

Runnable Files

A file:// URI scheme can be used to specify a runnable file, like a batch file, script file, or executable. On Windows, the operating system is used to automatically identify runnable files and run them, unless you have specified a value for Open Application.

On Linux, UNIX, or Mac you have to specify how to run a runnable file by specifying an application or system command in the Open Application field. For example, on Linux you can run a Perl file by specifying the path to the Perl interpreter in Open Application. You also need to include the escape sequence denoting the file name, for example, /usr/bin/perl %f. The %f inserts the full path for the file portion of the URL. If you want to run a binary file you would just specify put %f in the Open Application field.

Other URI Schemes

You can add additional URI schemes to be treated as links (see URI Scheme Options). On Windows, the operating system will determine how to handle the URL. For example, using ms-help:// will open the associated link in MSDN Help. On all other platforms, the link will be sent to the browser.


Symbol Browsing

SlickEdit® gives you the ability to browse and view symbols in your files or workspaces. Symbol browsing relies on Context Tagging®, so symbols are updated immediately or in the background as you edit. There are several tool windows that display information as you work to help you find what you need at exactly the time you need it:

  • Class Tool Window

  • Current Context Toolbar

  • Defs Tool Window

  • Find Symbol Tool Window

  • Preview Tool Window

  • References Tool Window

  • Symbols Tool Window

  • Symbol Properties Tool Window

See also Symbol Navigation for information about how to navigate between symbols in files.

Class Tool Window

The Class tool window, docked as a tab on the left side of the editor by default, provides an outline view of both the members of the current class as well as any visible inherited members. This tool window also shows the inheritance hierarchy of the current class. This is useful for object-oriented programming languages such as Java.

Display of the Class tool window can be toggled on/off by clicking View → Tool Windows → Class or by using the toggle_tbclass command. To display the tool window on demand, use the activate_tbclass command.

If you are coding within a class, the top pane (hierarchy pane) of the tool window shows the base class hierarchy for the current class. The bottom pane (members pane) shows all members of the current class, as well as all members visible from inherited superclass(es) and implemented interface(s). The name of the current class is displayed at the top of the tool window.

If you are not currently in a class (or enum or interface), the hierarchy pane is blank and the members pane shows the symbols in the current file. The name of the current file is displayed at the top of the tool window.

Hover the mouse over the bitmap of any item in the hierarchy or members panes to see a tool tip that shows the symbol's signature and scope.

To show or hide the hierarchy pane, use the two buttons located at the top-right of the tool window. If the hierarchy pane is hidden, the members pane is resized to take up the entire space of the window. Use the size bar to resize either pane.

Use the Up/Down buttons located to the left of the pane buttons to navigate up or down the class hierarchy. The Up arrow button will allow you to navigate to a child class (derived class or subclass) of the current class. The Down arrow allows you to navigate to a parent class (superclass or interface) of the current class. When using these buttons to navigate through code, the active buffer will switch to the destination class, and the hierarchy and members panes will update.

To jump to the definition of a class in the code, pushing a bookmark in the process, double-click on any member or class. Left-click or press Ctrl+Comma to go back.

Filtering in the Hierarchy Pane

Right-click on a class in the hierarchy pane to display a list of filtering options. You can exclude entire namespaces or packages, anything above a certain level in the hierarchy, and anything outside of the current workspace. You can always include any class(es) you have excluded via the "Include" options.

By excluding a class or interface in the hierarchy view, the members of this class or interface are no longer displayed in the members pane, but they are still visible in the hierarchy as gray text.

Select Show in Symbol Browser to jump to the class in the symbol browser.

Class Exclusion Manager

The Class Exclusion Manager, accessed by right-clicking on a class in the hierarchy pane, displays a list of any currently excluded classes, interfaces, namespaces, and packages. Exclusions are kept on a per-workspace basis.

To add an item to the list, type the name in the Add Item To List text box, then press Enter. Click the buttons to remove selected items or to clear the list.

Filtering and Sorting in the Members Pane

Right-click on a member in the members pane to access a list of filtering and sorting options as well as options for code navigation and modification. The following options are available:

  • Quick Refactoring - Offers two Quick Refactorings: Rename and Modify Parameter List. See Quick Refactoring for more information.

  • Add Member Function, Add Member Variable, and Add Virtual Function - (C/C++ only) When these options are selected for a class, you are prompted with a dialog to type a member function, member variable, or virtual function to be added into the source code at the top of the current class.

  • Organize imports - (Java only) Organizes import statements in Java files. See Organize Imports for more information.

  • Go to Tag - Moves the cursor to the selected tag. See Symbol Navigation for more information.

  • References - Brings the References tool window into focus, displaying the references for the symbol. See References Tool Window for more information.

  • Set Breakpoint - Sets a debugging breakpoint. See Setting Breakpoints for more information.

  • Show in Symbol Browser - Jumps to the member in the symbol browser. See Symbols Tool Window for more information.

  • Increase/Decrease Listed Members Limit - Controls the number of members displayed in the members pane. When this option is selected, the command line will prompt you for a variable value. The default is 400.

  • Sort Classes By Hierarchy and Sort Classes By Name - These options toggle the display of classes sorted either by hierarchy or alphabetically by name.

  • Sort Members By Line Number and Sort Members By Name - These options toggle the display of members sorted either by line number or alphabetically by name.

  • Organize Members By Class - Groups the members in the members pane by their class (or interface). When this option is selected, all "Sort" options are available. When this option is not selected, visible members in this pane will not be grouped at all. They will instead be displayed in one list, sorted by name.

  • Auto Expand All Top Level Classes - Expands all top level class nodes in the members pane whenever the current class changes. The default behavior is to only auto-expand the node of the current class.

  • Auto Expand All Structs/Enums/Inner Classes - Expands all struct, enum, and inner class nodes displayed in the members pane whenever the content is refreshed. By default this option is turned off, and these nodes are collapsed.

  • Quick Filters and Scope Filters - Quick filters allow you to display only certain items in the members pane, such as functions, prototypes, etc. Scope filters allow you to display members only in certain scopes, such as public or global, private, protected, etc.

Current Context Toolbar

Current Context displays the logical location of the cursor within your code. If it is within a class, it displays the class name. If it is within a function, it displays the function name. If the function is within a class, it displays the class and the function name.

By default, the toolbar is docked in the top upper-right section of the editor. Display can be toggled on/off by clicking View → Toolbars → Current Context or by using the toggle_context command. To display the tool window on demand, use the activate_context command.

Defs Tool Window

The Defs Tool Window contains the defs (definitions) browser, which provides an outline view of symbols in the current file.

By default, the Defs Tool Window is docked as a tab on the left side of the editor. Display can be toggled on/off by clicking View → Tool Windows → Defs or by using the toggle_defs command. To display the tool window on demand, use the activate_defs command.

The name of the file is displayed at the top of the tool window. Hover the mouse over the bitmap of any symbol in the window to see a tool tip that shows the symbol's signature and scope.

To jump to the definition of the symbol in the code, pushing a bookmark in the process, double-click on any symbol. Press Ctrl+Commato go back.

Defs Tool Window Options

Right-click on any symbol in the Defs Tool Window to access the following options:

  • Quick Refactoring - Offers two Quick Refactorings: Rename and Modify Parameter List. See Quick Refactoring for more information.

  • Set Breakpoint - Sets a debugging breakpoint. See Setting Breakpoints for more information.

  • Sort by Function Name and Sort by Line Number - These options toggle the display of symbols sorted either alphabetically by function name or by line number.

  • Show Nesting - Organizes symbols by their scope within the current file. Clear this option to display all of the symbols in one flat list.

  • Show Statements - (C/C++, Java, Visual Basic only) This option controls the Statement Level Tagging feature. When selected, the tool window shows an outline of all statements in each function within the current file. This allows you to see a primitive function flowchart or to navigate to a specific statement within a function.

  • Display Files - Displays the names of the files that are open in the editor. Clear this option to only show symbols in the current file, allowing you to use the window as a true outline view.

  • Auto Expand - Automatically expands all levels within the current file. If this option is cleared, you will need to click to expand items manually.

  • Expand All - Expands all symbols or levels in the current file.

  • Expand 1 Level - Expands everything one level below the current symbol.

  • Expand 2 Levels - Expands everything two levels below the current symbol.

  • Display Non-taggable Files - Displays files that are open in the editor that are not taggable, such as text files.

  • Properties - Displays the Symbol Properties Tool Window, showing the properties of the selected item, such as visibility, whether it's static or final, etc. Note that you cannot use this window to change the properties.

  • Arguments - Displays the return type and arguments for functions/methods in the Symbol Properties Tool Window.

  • References - Displays the list of references for the selected symbol, just as if you pressed Ctrl+/ in the editor window. See Symbol Navigation for more information.

  • Show Call Tree - Displays a tree of symbols used by the selected symbol, for example, other functions called by the current function. See Viewing Symbol Uses with the Calling Tree for more information.

  • Contents - Displays the following menu of save and print operations for the defs browser tree:

    • Save - Writes the items displayed in the defs browser to a text file, prompting you for a file name and directory location. The text file will then be displayed in the editor.

    • Print - Displays the Print dialog, where you can configure options for printing the tree.

    • Save Subtree and Print Subtree - These options function similarly to the above except they apply to the selected subtree.

  • Quick filters, Scope, Functions, Variables, Data Types, Statements, and Others - All of these items are for filtering the data displayed in the Defs tool window.

Note

For XML, the Defs tool window can be customized to control how different elements are displayed. For more information see Outline View for XML.

Find Symbol Tool Window

The Find Symbol tool window (Search → Find Symbol or gui_push_tag command) is used to locate symbols in your code. It allows you to search for symbols by name using either a regular expression, Substring, or fast prefix match.

Searching for a symbol is faster than a normal text search because it is executed against the Context Tagging® database, rather than searching through your source files. Find Symbol also avoids false hits in comments or string literals. Though Syntax-Driven Searching in the regular Search Dialogs and Tool Windows provides this same capability, it cannot match the speed of Find Symbol.

See Find Symbol Tool Window for information about the options that are available on the tool window.

Preview Tool Window

The Preview tool window provides a portal for viewing information in other files without having to open them in the editor. It automatically shows this information when you are working with certain features. See Information Displayed in the Preview Window for more information.

By default, the Preview window is docked as a tab at the bottom of the editor. Display can be toggled on/off by clicking View → Tool Windows → Preview or by using the toggle_preview command. To display the tool window on demand, use the activate_preview command.

The Preview tool window contains the following components:

  • Symbol list - This is the list of all symbols which are currently being previewed. In most cases, this is a single symbol. In some cases, such as for the symbol under the cursor, multiple matches are shown, such as the definition and declaration of a symbol. You can do a few things with the symbol list:

    • Hover the mouse over the bitmap of any item to see a tool tip that shows the symbol's signature and scope.

    • Click on any symbol to preview that specific symbol or it's comments.

    • Right-click to adjust symbol search filtering options.

    • Double-click to jump to a symbol. Press Ctrl+Comma to go back.

    • You can create key bindings for the preview_next and/or preview_prev commands in order to scroll through the items in the symbol list without using your mouse. See Creating Bindings for more information.

  • File and line label - Shows the file name and line number of the selected symbol.

  • Documentation comments pane - This pane displays any existing comments for the symbol that is selected in the symbol list. If the comments are in Javadoc or XMLdoc format, they will be formatted in HTML. You can single-click on hypertext links within the comments to follow the links, such as "See also" sections.

  • Editor preview window - Shows the contents of the actual source file at the line number of the selected symbol. Double-click to open the code in the editor. Right-click to adjust symbol search filtering options.

  • Size bars - Use the size bars to adjust the width of the symbol list and/or the height of the documentation comments area.

  • Buttons - The following buttons are found along the right edge of the Preview window:

    • Back and Forward - Allow you to navigate among the hypertext links that you have traversed in the documentation comments.

    • Go to definition - Opens the selected symbol in the editor.

    • Go to reference - Finds references to the selected symbol.

    • Show in symbol browser - Locates the selected symbol in the Symbols Tool Window.

    • Manage Tag Files - Opens the Context Tagging - Tag Files Dialog for building and maintaining tag files for indexing symbol information.

Information Displayed in the Preview Window

The table below describes what the Preview window displays under different circumstances.

Editor Element in Use | Preview Window Display
Any source file open in the editor | The Preview window shows the definition or declaration of the symbol under the cursor, along with the symbol's documentation comments, if any exist.
The Defs, Symbols, Class, Current Context, and Find Symbol tool windows | Single-click on a symbol and the Preview window displays the selected symbol and its documentation comments, if any exist. See Defs Tool Window, Symbols Tool Window, Class Tool Window, Current Context Toolbar, and Find Symbol Tool Window for more information.
Call Tree dialog and References tool window | The Preview window shows the location of the symbol references or use.
The Base Classes and Derived Classes symbol browser dialogs | Single-click on a symbol and the Preview window displays the selected symbol and its documentation comments, if any exist. See Symbols Tool Window for more information.
The Bookmarks tool window | Single-click on a bookmark and the Preview window displays the location of the bookmark. See Bookmarks Tool Window for more information.
The Breakpoints tool window | Single-click on a breakpoint and the Preview window displays the location of the breakpoint. See Setting Breakpoints for more information.
The Message List tool window | Single-click on a message and the Preview window displays the message type, and the location of the message in the source code. See Message List Tool Window for more information.
The Search Results tool window | Single-click on a line in the Search Results window and the Preview window displays the location of the selected search result. See Search Results Output for more information.
List Members and Auto-Complete results | Cursor up or down through the list of items in auto-complete or list-members results and the Preview window displays the location of the selected symbol and its documentation comments, if any exist. See List Members and Auto-Complete for more information.

References Tool Window

The References tool window displays the list of symbol references (uses) found the last time that you used the Go to Reference feature (Ctrl+/ or push_ref command (see Symbol Navigation for more information).

By default, the References window is docked as a tab at the bottom of the editor. Display can be toggled on/off by clicking View → Tool Windows → References or by using the toggle_refs command. To display the tool window on demand, use the activate_refs command.

The References tool window automatically comes into focus when you use the Go to Reference feature or when you select References from the right-click menu of the Class, Defs, or Symbols tool window.

Note

Typically, you only want to view references that occur in project files, and not run-time libraries, which can be very large. For this reason, references are not generated automatically for run-time library tag files. If you want to view references that occur in a run-time library tag file, you need to generate references for the tag file. To do this, display the Context Tagging - Tag Files Dialog (Tools → Tag Files or gui_make_tags command), choose the tag file, right-click to display the context menu, and select Generate References. See Configuring Other Languages for more information.

The left pane displays a tree view of the files and locations that contain the symbol references. Hover the mouse over the bitmap of a symbol to see a tool tip that shows the symbol's signature and scope. To jump to the location of a symbol reference in the code, pushing a bookmark in the process, double-click on it. Press Ctrl+Comma to go back.

The right pane displays a preview of that location in the source. The number of instances found and the file name and line number are displayed at the top. Use the size bar to resize either pane.

Use the buttons located at the top right corner of the tool window to toggle the preview pane on and off. Because source can also be previewed in the Preview Tool Window, you may find it more efficient to use the References window with the preview pane off.

References Tool Window Options

Right-click on a symbol or file in the left pane of the References window to display the following options:

  • Contents - Displays the following menu of save and print operations for the references browser tree:

    • Save - Writes the items displayed in the references browser to a text file, prompting you for a file name and directory location. The text file will then be displayed in the editor.

    • Print - Displays the Print dialog, where you can configure options for printing the tree.

    • Save Subtree and Print Subtree - These options function similarly to the above except they apply to the selected subtree.

  • Quick filters, Scope, Functions, Variables, Data Types, Statements, and Others - All of these items are for filtering the data displayed in the References tool window.

Symbols Tool Window

The Symbols tool window contains the symbol browser, which lists symbols from all of the tag files.

By default, the Symbols tool window is docked as a tab on the left side of the editor. Display can be toggled on/off by clicking View → Tool Windows → Symbols or by using the toggle_symbols command. To display the tool window on demand, use the activate_symbols command.

The top part of the window contains an option and combo boxes that are used for filtering. The bottom part of the window lists the symbols grouped by category. Symbols in your workspace are listed in the top group labeled "Workspace." The rest of the symbols are grouped by language or compiler.

Hover the mouse over the bitmap of a symbol to see a tool tip that shows the symbol's signature and scope. To jump to the definition of a symbol in the code, pushing a bookmark in the process, double-click on any symbol. Press Ctrl+Comma to go back.

Filtering Symbols in the Symbols Tool Window

The symbols listed in the symbol browser can be filtered using the Class and Member combo boxes. The Class combo box filters the items listed under the Classes folder. The Member combo box filters the items listed under any displayed classes or under any of the other folders, like Global Variables, Static Variables, Defines, etc. Enter multiple words in either combo box to search for items containing either word.

For example:

  • Enter person into the Class combo box to find all classes containing the word "person".

  • Enter person manager into the Member combo box to find all members, variables, etc. containing the word "person" or "manager".

Note

  • The filters are case-sensitive, so be sure to type the values in the same case.

  • The items listed under the Classes folder are global classes that are not part of a namespace or package.

To clear the filters and see all items again, select the Show all tags option.

For non-object-oriented languages, use the Member combo box to search, since there are no classes. You can hide the combo boxes to save space by right-clicking and selecting Filters, then unchecking the corresponding check box.

Symbols Tool Window Options

Right-click on a symbol in the Symbols tool window to access the following additional filtering options as well as code management options:

  • Go to Definition - Moves the cursor to the symbol's definition (proc). See Symbol Navigation for more information.

  • Go to Declaration - Moves the cursor to the symbol's declaration (proto). See Symbol Navigation for more information.

  • Quick Refactoring - Offers two Quick Refactorings: Rename and Modify Parameter List. See Quick Refactoring for more information.

  • Organize imports - (Java only) Organizes import statements in Java files. See Organize Imports for more information.

  • Set Breakpoint - Sets a debugging breakpoint. See Setting Breakpoints for more information.

  • Find Tag - Searches for symbols and displays them in the symbol browser. Note that the Find Symbol tool window also provides this functionality.

  • Manage Tag Files - Displays the Context Tagging - Tag Files Dialog for use in managing your tag files.

  • Expand and Collapse options - Expands/collapses symbols as specified.

  • Sort by - Sorts symbols displayed by tag name, line number, or containers to top, which puts classes, structs, etc. at the top of the list.

  • Filters - Filter by class or member, or select Filtering Options to display the Symbol Browser Filter Options dialog. See Symbol Browser Filter Options for information on the available options.

  • Contents - Displays the following menu of save and print operations for the symbol browser tree:

    • Save - Writes the items displayed in the symbol browser to a text file, prompting you for a file name and directory location. The text file will then be displayed in the editor.

    • Print - Displays the Print dialog, where you can configure options for printing the tree.

    • Save Subtree and Print Subtree - These options function similarly to the above except they apply to the selected subtree.

  • Base Classes - Displays the Base Classes dialog, which shows a list of base classes for the selected class on the left with the list of that class's members on the right. Base classes are displayed in a tree view, allowing you to explore up the inheritance hierarchy. See Viewing Base and Derived Classes for more information. Note that the Class Tool Window provides this same functionality.

  • Derived Classes - Displays the Derived Classes dialog, which works the same as above but for derived classes. See Viewing Base and Derived Classes for more information.

  • Properties - Displays the Symbol Properties Tool Window, showing the properties of the selected item, such as visibility, whether it's static or final, etc. Note that this window is read-only, so you can't use it to change the properties.

  • Arguments - Displays the return type and arguments for functions/methods in the Symbol Properties Tool Window.

  • References - Displays the list of references for the selected symbol in the References Tool Window, just as if you pressed Ctrl+/ in the editor window. See Symbol Navigation for more information.

  • Calls/Uses - Displays a tree of symbols that are used by this symbol or called by this function. See Viewing Symbol Uses with the Calling Tree for more information.

Viewing Symbol Uses with the Calling Tree

View symbol uses to see what symbols (variables, functions, methods, classes, etc.) are used by a specific function or method.

To view the symbols that a particular function or method uses, first create a project or open an existing project. Then from the Symbols tool window, right-click on the desired function or method and select Calls or uses. The Symbol Uses/Calling Tree dialog will be displayed.

Tip

You can also access the Symbol Uses/Calling Tree from within the Defs Tool Window by right-clicking on a symbol and selecting Show Call Tree.

Right-click in this tree to display/modify the symbol filters. Items in the tree can be expanded to view uses recursively. Double-click or press the spacebar on an item in the tree list to go to an item. Double-click and Space are the same except when the item is a prototype that has a corresponding code section. Double-clicking will then go to the prototype's corresponding code section.

If the focus is in the Symbol Uses/Calling Tree dialog, the selected item will be shown in the Preview Tool Window tool window, just as it is in the Symbols Tool Window.

Viewing Base and Derived Classes

To see what classes are inherited by a particular class, right-click on the class in the Symbols tool window and select Base Classes. To see what classes are derived from a particular class, right-click on the class in the Symbols tool window and select Derived Classes. Both dialogs have the same interface.

The left pane of each dialog contains a tree showing the class inheritance hierarchy (the class list). The right pane shows a list of the members of the selected class (the member list).

If the focus is in the class list, the selected class will be displayed in the member list, if it can be resolved. If the focus is in the member list, the selected item will be shown in the Preview window, and is the name as it appears within the class definition.

To jump to the symbol in the code, pushing a bookmark in the process, double-click on a symbol in either pane. Press Ctrl+Comma to go back. Right-click on a symbol for filtering options.

Symbol Browser Filter Options

To access symbol browser filter options, right-click in the Symbols tool window and click Filters → Filtering Options .

Each option has three states: If the option is selected, only the specified items will be displayed. If the option is cleared, the specified item will not be displayed. If the option is in a neutral state, the item will not be considered in the filter.

The following options are available:

  • Class Members

    • Public - When selected, public members are displayed.

    • Protected - When selected, protected members are displayed.

    • Private - When selected, private members are displayed.

    • Package - (Java only) When selected, package members are displayed. Java members have package scope if they do not specify public, protected, or private.

    • Inherited - When selected, only inherited members that this class can access are displayed. When cleared, only members of this class are displayed.

    • Preprocessed - When selected, only members expanded by pre-processing are displayed. This is specifically useful for MFC classes. When cleared, only non-preprocess members displayed.

  • Declarations

    • Template - (C++ only) When selected, only template classes are displayed. When cleared, only non-template classes are displayed.

    • Const - (C++ only) When selected, only methods which do not modify members (method1() const) are displayed. When cleared, only non-const methods are displayed.

      Use the Symbol Properties Tool Window (right-click in the Symbols tool window and choose Arguments,or from the main menu click View → Tool Windows → Symbol Properties ) to view other const information for declarations (for example, int const * const *pcpcvariable;).

    • Final - (Java only) When selected, only final members are displayed. When cleared, only non-final members are displayed.

    • Volatile - (C++ only) When selected, only volatile method members (method1() volatile) are displayed. When cleared, only non-volatile members are displayed.

    • Synchronized - (Java only) When selected, only synchronized members are displayed. When cleared, only non-synchronized members are displayed.

    • Extern - When selected, only identifiers defined explicitly using the extern keyword are displayed. When cleared, only identifiers defined which do not explicitly use the extern keyword are displayed.

    • Anonymous - When selected, only class names which are automatically generated by Context Tagging® are displayed. When cleared, only explicitly named classes are displayed.

  • Functions/Methods

    • Inline - When selected, inline functions or methods are displayed.

    • Constructors - When selected, constructors are displayed.

    • Operators - When selected, overloaded operators are displayed.

    • Abstract - When selected, only abstract methods are displayed. When cleared, only non-abstract methods are displayed.

    • Virtual - When selected, only virtual methods are displayed. When cleared, only non-virtual methods are displayed. All non-static Java methods are implicitly virtual.

    • Static (class methods) - When selected, only static methods are displayed. When cleared, only non-static methods are displayed.

    • Native - When selected, only methods explicitly defined with the native keyword are displayed. When cleared, only non-native methods are displayed.

  • Data Members

    • Show data only - When selected, only data members are displayed. When cleared, only methods are displayed.

    • Static (class data) - When selected, only static data members are displayed. When cleared, only non-static data members are displayed.

    • Transient - (Java only) When selected, only transient data members are displayed. When cleared, only non-transient data members are displayed.

  • Display or Hide

    • Class Filter - When selected, the class filter is displayed in the Symbols tool window.

    • Member Filter - When selected, the member filter is displayed in the Symbols tool window.

Symbol Properties Tool Window

The Symbol Properties tool window displays detailed information (properties and arguments) for the symbol at the cursor location. Note that this window is read-only, so you can't use it to change the properties.

Display can be toggled on/off by clicking View → Tool Windows → Symbol Properties . To display the tool window on demand, right-click on a symbol in the Symbols tool window and select Properties or Arguments, or use the activate_tag_properties_toolbar command.


Viewing and Displaying

SlickEdit® offers several features and options regarding viewing and displaying. See the following topics for more information:

  • Colors and Color Coding

  • Current Line

  • Modified Lines

  • Viewing Special Characters

  • Viewing Line Numbers

  • Soft Wrap

  • Selective Display

  • Hex/Line Hex View

  • Other Display Options

Colors and Color Coding

SlickEdit provides comprehensive capabilities to color the text in the editor window. For more information, see Colors, Color Coding, and Symbol Colors.

Current Line

SlickEdit provides two ways to highlight the current line:

  • Draw a box around the current line - You can enable the Current line highlight for all languages. This draws a box around the current line. You can specify what type of box to use: a plain box, a tabs ruler, a syntax indent ruler, or a decimal ruler. You can also control the color of the box and column markers when using a ruler. To enable the current line highlight and specify options, open the Options dialog (Tools → Options ), expand Appearance and select General, then modify the options under the Current line highlight category.

  • Change the background and foreground color - On a language-specific basis, you can enable a different background and foreground color for the current line. From the main menu, select Tools → Options → Languages , expand your language category and language, then select View. Put a check in Current line. To select the colors for the foreground and background, select Tools → Options → Appearance → Colors , then select Current Line under the Selections node. For more information on setting colors. see Colors.

    Note

    Depending on the background color you select, SlickEdit will still use the foreground colors you have selected for other color coding elements, like strings, comments, etc. If the color you select for the background would make those colors too hard to read, SlickEdit will apply the foreground color selected for the Current line element.

Modified Lines

You can mark lines that have been modified or inserted during the current editing session. This will display a color indicator in the left margin of editor windows for each changed line. To enable this feature, select Tools → Options → Languages then expand your language category and select the language you are configuring. Select the View options and put a check in Modified lines. To select the colors to use, select Tools → Options → Appearance → Colors , then select Modified Line or Inserted Line under the Modifications node. For more information about setting colors, see Colors.

SlickEdit can clear the modified and inserted line color when you save a file. To activate this feature, from the main menu, click Tools → Options , expand File Options and select the Save node. Then set the Reset modified lines option to True.

Tip

To show the modified lines on demand, bind the command color_modified_toggle to a key. It will toggle display of modified lines in a different color on/off. You can bind the color_toggle command to a key as well. This command toggles between current line, modified line, and language specific coloring individually.

Viewing Special Characters

By default, many important characters are not visible in the editor, like tabs, spaces, and newline characters. When you enable view of these special characters, SlickEdit® displays a visible character to represent the invisible characters.

You can enable view of special characters on a per-document or language-specific basis:

  • For the current document - From the main menu, click View → Special Chars , or use the view_specialchars_toggle command. This toggles the display of all special characters (tabs, spaces, and newline characters) on and off. The menu also provides options to toggle display of these characters individually. See View Menu for more information.

  • For a specific language - Using the Options dialog (Tools → Options ), expand the Languages node and your language, then select View. Select the option Special Characters. This enables the display of all special characters for the chosen language. Alternately, you can select to enable display of the characters individually.

To define the characters that are displayed to represent the special characters, see Defining Special Characters. To define the colors that are used for special characters, see Changing the Color of Special Characters.

Note

  • Viewing special characters is only available for ASCII files.

  • When the display of special characters is enabled along with View → Line Hex , the hex value for the actual character (like space) will be displayed, not the value for the character used to represent it (like a dot).

Defining Special Characters

To define the characters that are displayed to represent the special characters, from the main menu, click Tools → Options , expand Appearance and select Special Characters. Enter the character codes that you wish to use.

To view the differences between a DOS format text file and another format when View → New Line Chars is active, choose something other than a space for the End-Of-Line (2) character. Under Windows, the recommended choices are 13 for End-Of-Line (1) and 10 for End-Of-Line (2).

Changing the Color of Special Characters

To change the colors and styles of special characters, use the Color options screen (Tools → Options → Appearance → Colors ). Select Special Characters from the screen element drop-down list. For more information on color settings, see Colors, Color Coding, and Symbol Colors.

Viewing Line Numbers

The current line number is always displayed in the editor's status line (see The SlickEdit Interface). Click on the line number indicator to display the Go to Line dialog. This shows the total number of lines and allows you to navigate to a specific line.

Line numbers can be displayed in the left margin area. You can enable them for a single document, a single language,or for all languages:

  • For the current document - From the main menu, click View → Line Numbers , or use the view_line_numbers_toggle command. This toggles the display of line numbers on and off.

  • For a specific language - Using the Options dialog (Tools → Options ), expand the Languages node and your language, then select View. Select the option Line numbers.

  • For all languages - From the main menu, select Tools → Quick Start Configuration . The Coding screen allows you to turn on line numbers for all languages.

You can select options that control the width of the line numbers. For more information see Language-Specific View Options.

Tip

  • To control whether a colon is displayed with line numbers, use the line_numbers_show_colon command. At the command line prompt, type Y (for yes) or N (for no).

  • To change the amount of space used in the left margin of editor windows for line numbers, use the line_numbers_set_width command. At the command line prompt, enter the number of the desired width, in pixels.

  • To change the color of line numbers, open the Appearance → Colors node in the Options dialog, and select the Line Number screen element.

Soft Wrap

Soft Wrap makes it easy to view long lines of code without scrolling. When Soft Wrap is enabled, each line is wrapped as though a carriage return was inserted; however, unlike Word Wrap, the file itself is not modified.

You can enable Soft Wrap on a per-document or language-specific basis:

  • For the current document - From the main menu, click View → Soft Wrap , or use the softwrap_toggle command. This toggles Soft Wrap on and off.

  • For a specific language - Using the Options dialog (Tools → Options ), expand the Languages node and your language, then select Word Wrap. Select the option Wrap long lines to window width. Options are also available here to break the text at the end of a word so that words are kept whole (Break on word boundary), and to enable Soft Wrap for all languages so you don't have to configure each one (Enable soft wrap).

When Soft Wrap is on, arrows in the right margin indicate lines that are wrapped. The following screen shows Soft Wrap enabled in an XML document:

For related information, see Word Wrap, Comment Wrap, and Reflowing Text.

Selective Display

Selective Display (also known as code folding) is a convenient way to display or hide regions of your code, so that you can view those regions that are relevant to your current editing session.

Use the Selective Display dialog to activate this feature and to specify the type of regions to display or hide. This dialog is displayed by clicking View → Selective Display , or by using the selective_display command. For more information, see Selective Display Dialog. For a description of additional menu entries for Selective Dispaly, see View Menu.

When Selective Display is active, a Plus (+) or Minus (-) bitmap is placed before hidden or expanded lines in the editor window margin. The following screen shot shows a sample file with two function definitions expanded and the rest collapsed.

When Selective Display is active, you can perform the following operations:

  • Display or hide lines - Double-click on the Plus (+) or Minus (-) bitmaps. Alternatively, click View → Expand/Collapse Block , press Ctrl+\, or use the plusminus command. See Expanding/Collapsing Code Blocks for more details.

  • Copy visible text to the clipboard - Click View → Copy Visible or use the copy_selective_display command. Normally when you copy a selection that spans multiple lines, hidden lines are copied as well. This command ignores hidden lines and only copies visible text. This operation does not work with block selections.

  • Redisplay all lines and remove the bitmaps - From the main menu click View → Show All (show_all command).

To define the type of information to show/hide, see Selective Display Regions.

Expanding/Collapsing Code Blocks

SlickEdit® provides a more keyboard-centric way to expand and collapse code blocks. You can expand or collapse blocks of code by using the plusminus command, whether or not Selective Display Plus or Minus bitmaps are displayed.

The plusminus command expands or collapses code blocks under the following conditions:

  • If the cursor is on the first line of a code block, the block is collapsed, creating a new Selective Display region.

  • If the cursor is on a line that contains a Plus (+) bitmap, the block is expanded.

  • If the cursor is on a line that contains a Minus (-) bitmap, the expanded block is collapsed.

Note

  • The definition of a "code block" is based on your language.

  • Selective Display bitmaps can be expanded or collapsed with a single click, causing Selective Display to operate similar to Windows Explorer. Note, however, that you will not be able to select a line by clicking to the left of a text line which contains a Selective Display bitmap. To set this option, from the main menu, click Tools → Options → Appearance → Advanced , then set the value of Expand/collapse to Expand on single click.

  • The plusminus command is controlled by the def_plusminus_blocks configuration variable. The value is set to true (1) by default. For more information, see Configuration Variables.

  • The plusminus command uses the same logic to identify code blocks as the command cut_code_block. See Deleting Code Blocks for more information.

Selective Display Regions

Using the Selective Display dialog, you can choose the regions you want to display or hide. Specific settings are provided for each region.

  • Search Text - Displays lines that contain the specified search string or lines that do not contain the specified string.

  • Function Headers - Displays only function headings and optionally, function heading comments.

  • Preprocessor Directives - Displays a source file as if it were preprocessed according to the define values specified here. If you do not remember your defines, use the Scan for Defines button.

  • Multi-Level - Select this option to set multiple levels of Selective Display based on braces or indent.

  • Paragraphs - Displays the first line of each paragraph. A paragraph is defined by a group of lines followed by one or more blank lines.

  • Hide Selection - Select this option to hide the lines in the current selection.

The Selective Display dialog also contains static options for expanding/collapsing sub-levels. See Selective Display Dialog for more information and details about the available settings.

Hex/Line Hex View

SlickEdit® supports hex/line hex viewing and editing on a per-document or per-language basis.

Hex view displays your code using hexadecimal values to represent each character. The ASCII representation is also shown on the right side of the editor window. When you position the cursor in one representation, the corresponding location in the other is highlighted. You can edit by changing the hex values or by changing the ASCII characters.

Line hex preserves your code layout, formatting, and color coding. It shows the hexadecimal value for each character below the corresponding character. Since two hex digits are needed, the value is displayed in a column below the corresponding character with the most significant digit at the top. This makes it easier to read your code and still see the hex values for each character. As with regular hex view, you can edit either the ASCII representation or the hexadecimal values.

See also Hex Mode Editing for more information.

Other Display Options

This section describes other general display options that you might find useful.

Displaying a "Top of File" Line

You can specify that each buffer opened displays a line which contains the text "Top of File". This indicator for the location of the top of the file is displayed at line 0, which does not affect lines of code. This is useful when you need a line inserted before the first line of a buffer when in CUA or SlickEdit® text mode emulation. It is also useful when using Selective Display, because a Plus (+) bitmap can be displayed on line 0.

To enable this option, from the main menu, click Tools → Options , expand Appearance and select General, then set the Top of file line option to True.

Rather than using this option, you can use Ctrl+Shift+Enter (Ctrl+Enter in the Visual C++ and Visual Studio default emulations) to insert a new line above the line where the cursor is located.

Displaying a Vertical Line

You can choose to display a vertical line in all files that are open for editing. To access this setting, from the main menu, click Tools → Options , expand Appearance and select General, then in the Vertical line column spin box, specify the column number at which you want the vertical line displayed. A value of 0 (default) displays no vertical line. Click on the Vertical line color option to change the color of the vertical line.


Syntax Indent and SmartPaste®

Syntax Indent and SmartPaste® are two of the many SlickEdit® features designed to decrease typing, improving your coding efficiency. Syntax Indent automatically indents code to the correct levels. There are two ways that code can be indented: by using the automatic Syntax Indent feature, and/or by using tabs. SmartPaste reindents pasted text to the correct level based on surrounding code.

Syntax Indent

By default, if you press Enter while you are editing a source file, Syntax Indent automatically indents the cursor to the next level if it is moved inside a structure block. For example, if you edit a C file and the cursor is on a line containing the text for (:){ and you press Enter, a new line is inserted and the cursor is indented four spaces in from the letter "f" in the word "for".

To change the Syntax Indent spacing, complete the following steps:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Indent.

  2. Change the value in the Syntax indent text box.

Indenting with Tabs

By default, when you press the Tab key to indent, literal spaces are inserted. If you plan to indent your code using tab characters, or if you will be editing files that already contain tabs, you will need to specify these preferences.

To activate tab indenting, from the main menu, click Tools → Options → Languages , expand your language category and language, then click Indent. Select the Indent with tabs option.

Setting Tab Spacing

The default value of the Tab key is eight spaces. You can change this value in the Tabs text box. In general, the Tabs setting should match the Syntax indent value. For example, by default for the C language extension, the Syntax indent value is set to 4, and the Tabs setting is set to +4. The plus sign (+) indicates that the editor will automatically expand the stops by four. By default, the Tabs setting is "+4", which indicates that the default tab setting is eight spaces.

To work properly with the Sun Java API source code, the tab stops need to be in increments of eight, but the syntax indent must be set to four. The Syntax Indent affects not only the Tab key, but also the number of spaces to indent for each code block level.

Note

  • When you change the tab stops and indent for all languages except COBOL, change the Tabs text box to +value where value is the same value 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 pressing Tab, or the amount of indent for statements inside a code block.

  • For COBOL files, the Tabs text box also affects the Tab key. Syntax Indent still affects the indent for each code block level.

Setting Tab to Indent Selections

For the Tab key to indent the selection when text is selected, select the option Indent selection when text selected.

Setting Tabs for the Current File

To set tabs for the current buffer only, use the Tabs dialog box (Document → Tabs or gui_tabs command). You can set tabs in increments or at specific column positions. For example, to specify an increment of three, enter +3 in the text box. To specify columns, you could enter1 8 27 44 to specify tab stops that have absolute locations.

By default, the Tab key inserts enough spaces to move the text to the next tab stop. The Shift+Tab key combination deletes enough spaces to move the text to the previous tab stop. See Redefining Common Keys for information on other Tab and Shift+Tab key bindings. Regardless of the Tab key binding, if the language-specific setting Indent with tabs is on, a physical tab character is inserted (see Indenting with Tabs).

Setting the Backspace Unindent Style

By default, pressing the Backspace key when the previous character is a tab, causes the rest of the line to be moved to the previous tab stop. If you want your Backspace key to delete through tab characters one column at a time, from the main menu, click Tools → Options , expand Keyboard and select Redefine Common Keys, then set the Backspace over tab option. See Redefining Common Keys for more information.

SmartPaste®

When pasting lines of text into a source file, SmartPaste reindents the added lines according to the surrounding code. For example, if editing 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. Use the mouse to copy and move lines and still take advantage of SmartPaste.

SmartPaste is enabled by default, and can be turned on and off from the language-specific Indent option screen. To access these options, from the main menu, click Tools → Options . Expand Languages in the tree, select the language category and language, then click Indent. Select or clear the Use SmartPaste® option.

Note

SmartPaste only works with line selections. For information about creating a line selection, see Line Selections.


Adaptive Formatting

Many development teams set standards for code formatting styles. These standards often vary from project to project or between languages. In this environment, you can lose valuable time in having to change configurations, set/unset options, or run beautifiers from file to file just so you can meet the team's requirements.

Adaptive Formatting addresses these situations by scanning a file for the formatting styles in use, and automatically matching those settings for the current editing session. This provides seamless integration of new code with existing code, making it easier to read®not only for you, but for the next person who needs to edit the file.

Adaptive Formatting is enabled by default and recognizes indentation and tab style settings, parentheses padding, and begin/end style settings. It also recognizes case settings, such as keyword casing for case-insensitive languages, and tag, attribute, and value casing for HTML-based languages.

Enabling/Disabling Adaptive Formatting

Adaptive Formatting is enabled by default. You can toggle it on and off on a language-specific basis, and you can also enable/disable each of the individual formatting settings on a language-specific basis as well. To access these options, from the main menu, click Tools → Options , expand your language category and select the language, then select Adaptive Formatting. As an example, the C/C++ Adaptive Formatting options are shown below.

The specific Adaptive Formatting settings available for that language are shown on the options screen. Select or clear the Use Adaptive Formatting check box to enable or disable the feature. When Adaptive Formatting is enabled, use the subsequent check boxes to select the settings for which SlickEdit® should scan.

You can also toggle Adaptive Formatting on and off for a language by using the menu item Document → Adaptive Formatting (or the adaptive_format_toggle command). This turns the feature on and off for the current language without affecting the individual style settings.

The individual formatting style settings are located on various screens in the language-specific section of the Options dialog. A label, linked to the Adaptive Formatting options screen, appears next to each setting to indicate if Adaptive Formatting is on or off for that setting. Adaptive Formatting does not change the value set in these options; rather, it overrides the value on a document-by-document basis. For example, notice how Adaptive Formatting is enabled for settings on the C/C++ Indent options screen:

The values specified by Adaptive Formatting will be used instead of the values shown on the options screen. Click on the Adaptive Formatting hyperlinks to jump to the Adaptive Formatting options screen for that language.

Recognized Settings

The table below shows each option recognized by Adaptive Formatting, the path to the option in SlickEdit®, and a description, along with a link for more information. Because these options are language-specific, the option paths are relative to the language-specific portion of the Options dialog: click Tools → Options → Languages , expand your language category and then select your language.

Formatting Option | Path to Option in SlickEdit | Description
Syntax indent | Indent (Language-Specific Indent Options) | When enabled, the Enter key indents according to the language syntax, and you can specify the amount to indent for each level. See Syntax Indent for information.
Tabs | Indent (Language-Specific Indent Options) | Specifies tab stops, which can be in increments of a specific value or at specific column positions. See Indenting with Tabs for information.
Indent with tabs | Indent (Language-Specific Indent Options) | Determines whether the Tab key, Enter key, and paragraph reformat commands indent with spaces or tabs. See Indenting with Tabs for information.
Begin/End style | Formatting Options (Language-Specific Formatting Options) | The is the brace style used for Syntax Expansion and smart indenting. See the section for your language in the Language-Specific Editing chapter. For example, C/C++ Formatting Options.
Indent CASE from SWITCH and Indent constant from case | Formatting Options (Language-Specific Formatting Options) | Specifies Syntax Expansion indentation. See the section for your language in the Language-Specific Editing chapter. For example, C/C++ Formatting Options.
No space before parenthesis | Formatting Options (Language-Specific Formatting Options) | When enabled, no space is placed between keywords (such as if, for, or while) and the open paren when Syntax Expansion occurs. See the section for your language in the Language-Specific Editing chapter. For example, C/C++ Formatting Options.
Insert padding between parenthesis | Formatting Options (Language-Specific Formatting Options) | When enabled, a space is placed after the open parenthesis and before the close parenthesis, providing padding for the enclosed text. See the section for your language in the Language-Specific Editing chapter. For example, C/C++ Formatting Options.
Keyword case | Formatting Options (Language-Specific Formatting Options) | Specifies the case of keywords used by Syntax Expansion. See the section for your language in the Language-Specific Editing chapter. For example, Ada Formatting Options.
Case for inserted tags | Formatting Options (Language-Specific Formatting Options) | Specifies the case for tags that are automatically inserted. See HTML Formatting Options for more information.
Case for inserted attributes | Formatting Options (Language-Specific Formatting Options) | Specifies the case for tag attributes that are automatically inserted. See HTML Formatting Options for more information.
Case for inserted single word values | Formatting Options (Language-Specific Formatting Options) | Specifies the case of word values that are automatically inserted inside a tag. See HTML Formatting Options for more information.
Case for hex values | Formatting Options (Language-Specific Formatting Options) | Specifies the case for hex values that are automatically inserted inside a tag. See HTML Formatting Options for more information.

Scanning for Styles in Use

Adaptive Formatting has two modes of scanning: automatic, which is the default behavior, and manual, which lets you run a scan at any time to determine a file's formatting styles in order to quickly save them as the default settings.

By default, when you open a file for editing, Adaptive Formatting initially scans for the indent-related settings that are in effect (Syntax indent, Indent with tabs, and Tabs), starting at the beginning of the file. Thereafter, Adaptive Formatting scans as you type to determine brace settings, parentheses padding, and other formatting styles. If Adaptive Formatting determines that the file is using a different formatting style than the current language-specific setting, a dialog is displayed that shows the settings in effect. You can then choose to use the settings or use the settings set for the language. Once the formatting style is determined, the options for those styles are used as long as the buffer is open for editing.

For example, when you type a keyword such as if in a C/C++ file that uses formatting styles different from the current settings, the C/C++ Adaptive Formatting Results dialog is displayed.

On this dialog, the selected settings are used only for the current buffer. You can access the Adaptive Formatting options screen to enable/disable Adaptive Formatting for that language by clicking the hyperlink to Configure or disable Adaptive Formatting.

If you always want to accept the Adaptive Formatting results, select Don't show me this again to suppress the dialog from appearing in the future.

A similar dialog is shown when you run Adaptive Formatting manually. This mode lets you run Adaptive Formatting on the entire file at once, in order to quickly save the settings as the defaults for that language. To run a manual scan, use the adaptive_format_stats command. The Adaptive Formatting Results dialog for that language is displayed, showing all of the recognized style settings that are in use in the current file.

This dialog lets you enable/disable the settings just for the current buffer, or select Use these settings for all files of this language to quickly set these values as the default.

Confidence Level and Statistics

Both Adaptive Formatting Results dialogs show a confidence level and provide a link to a statistics screen. The Confidence Level is a statistical percentage, based on the frequency of use of that style in the file, that indicates the editor's confidence in this being a "correct" setting. To be considered the "correct" setting, the option must meet a confidence level of 66%. SlickEdit® ignores setting results with a confidence level of less than 66% and they do not appear on the results dialogs. For these options, the current language settings are used.

For example, if the dialog shows Indent with tabs enabled and a Confidence Level of 85%, this means that out of all of the examined instances of this style in the file, 85% of them were indented with tabs, and 15% were indented with spaces.

Click the Statistics button, and the Adaptive Formatting Statistics dialog shows each style that was found and the total number of times it occurred in the examined instances. Each individual setting is categorized in the tree according to type. Click on the plus/minus bitmaps to expand/collapse the tree categories.

Rescanning

Certain events require the file to be rescanned in case any formatting changes have occurred. These events include beautification, auto-reload, and version control update. After one of these processes, Adaptive Formatting is placed again in automatic mode, just as when you first opened the file, scanning the entire file once for indent-type settings, then as you type for all of the other settings.

You can also rescan a file manually with the adaptive_format_update command. This clears the Adaptive Formatting results from memory, then scans the entire file for all Adaptive Formatting settings available for that language. This is useful if you want to create a new file and use different settings for it than what you currently have configured.


Completions

Completions save keystrokes as you are typing code by providing a way to automatically complete partially-typed text. There are four types of completions in SlickEdit®:

  • Auto-Complete - A feature set that includes syntax, keyword, and symbol completions.

  • Auto-Close - Automatically insert closing characters for bracketed and quotation punctuation pairs.

  • Word Completion - Completions that work for any text in an editor window.

  • Completion in Dialogs - Completions that work in dialog text box fields.

  • Command Line Completion - Completions for command line entries.

Auto-Complete

Auto-Complete offers suggestions for how syntax, keywords, symbols, and lines of code may be completed by the editor. It works by looking at the word prefix under the cursor and using several different queries to find and suggest completion options. Each of these types of suggestions can be individually turned on or off, allowing you to customize auto-completion to your liking.

Using Auto-Complete

Auto-Complete is activated when the editor is idle for a short period of time and there is a partially-typed word under the cursor. When Auto-Complete is active, the available completions are indicated in several ways:

  • A light bulb appears on the left edge of the editor.

  • A list of completions appears under the word being typed.

  • The rest of the completed word or statement appears to the right of the cursor.

These visual hints can also be individually turned on or off through the Auto-Complete options. See Language-Specific Auto-Complete Options.

Tip

Auto-Complete can be activated manually by using the autocomplete command. Bind this command to a key sequence if you use it frequently. See Creating Bindings for more information.

To cancel out of Auto-Complete mode, use the Escape key.

To scroll through the items in the completion list, use the Up, Down, PgUp, and PgDn keys. Optionally, you can use Tab and Shift+Tab to cycle through the choices.

If a completion is selected, you can press Space, Enter, or any non-identifier key to cause the selected completion to be inserted along with the character typed (except for Enter).

Use Shift+Space to insert a real space rather than the completion. Use Ctrl+Shift+Space to insert the next character of the currently selected completion. This can be useful if you only want part of the word being completed and you do not want to type it yourself. Optionally, pressing Tab will cause auto-completion to attempt to insert the longest unique prefix match of all its completions.

If the completion has comments, you can use Shift+PageDown, Shift+PageUp, Shift+Home, or Shift+End to page through the comments. Use Ctrl+C to copy the comments for the current item to the clipboard.

Auto-Complete options can be configured on a language-specific basis. See Language-Specific Auto-Complete Options for information.

Auto-Close

Auto-Close will automatically insert closing characters for bracketed and quotation punctuation pairs. The following list shows the available pairings.

  • Parenthesis ( )

  • Bracket [ ]

  • Angle Bracket < >

  • Double Quote " "

  • Single Quote ' '

This can be configured, as well as enabled/disabled, on a language specific basis. Specific pairs can also be enabled/disabled per language, as well as automatically inserting padding for Parenthesis, Brackets and Angle Brackets. To do this, select Tools → Options → Languages → Application Languages → [Language Category] → [Language] → Auto-Close.

When an opening character in a pair is typed, the closing character will automatically be inserted. The closing character is automatically overtyped if you key in the matching close character as you are typing, helping to avoid any syntax errors. There are also navigation helpers when the close character is inserted. A hotspot marker is inserted on the right edge of the closing character. When this marker is visible, TAB or ENTER key will jump to the next column past the close bracket, and ESC will dismiss the marker as well as dismiss overtyping of the close character. Editing outside of the punctuation pair will also automatically dismiss the marker. You can disable the TAB or ENTER navigation key (or both) in Tools → Options → Editing → Auto-Close. If both TAB and ENTER are both disabled, the hotspot marker is not inserted, though overtyping is still available.

When enabled, Auto-Close will only insert the matching closing character for the specific punctuation where appropriate for the current language. This is determined by scanning the current location and line. For example, it does not insert any closing characters in comments or strings. In the C++ language, the angle brackets are only auto-closed when following the template or cast keywords (ex: static_cast).

Word Completion

Word Completions search the current editor window for text matching the prefix at the current cursor position. Most completions are driven by Context Tagging®, matching symbols such as function names and variables. Word Completions can match any text in the current editor window, including comments.

Auto-Complete also lists word completions, but it is often faster to use key bindings to search for and insert Word Completions. The following is a list of commands for these operations and the key bindings in the CUA emulation. See Creating Bindings to change them.

  • complete_prev (Ctrl+Shift+Comma) ® Searches backwards through the current editor window to find a match.

  • complete_next (Ctrl+Shift+Dot) ® Searches forwards through the current editor window to find a match.

  • complete_more (Ctrl+Shift+Space) ® Adds subsequently more text from the matched line to the cursor position, allowing you to extend the amount of text inserted.

The following example of code shows how word completion is used:

if (pWindowView->pBuffer->LineNum>100) {
pW<Cursor is Here>
}

Press Ctrl+Shift+Comma,Ctrl+Shift+Space,Ctrl+Shift+Space to obtain the following result:

if (pWindowView->pBuffer->LineNum >100) {
pWindowView->pBuffer->LineNum <Cursor is Here>
}

Pressing Ctrl+Shift+Comma matched "pWindowView" in the previous line. If you wanted to match an earlier occurrence beginning with "pW", press Ctrl+Shift+Comma to find the next previous match. This also changed "pW" on the second line to the matching text, "pWindowView". Pressing Ctrl+Shift+Space extends that selection, matching "pWindow->pBuffer". Pressing Ctrl+Shift+Space, again, extends the selection to include "pWindow->pBuffer->LineNum".

You can easily see how this would save time typing in multiple lines that access structs, class members, arrays, etc.

Completion in Dialogs

Many SlickEdit® dialogs contain fields that offer completions. Dialogs such as the Open dialog box (File → Open ) and the New Project dialog box (Project → New ) contain text fields for file names or directory paths. SlickEdit uses completions to help you enter values for these fields. When you type a character, SlickEdit pops up a list of matching values.

When this list is displayed, the following keys have different behaviors:

Key | Behavior
Esc | Closes the list.
Enter | Uses the current value selected.
Tab, Down, or Ctrl+K | Moves to the next item in the list.
Shift+Tab, Up, or Ctrl+I | Moves up one item in the list.
Home or End | If an item is selected in the list, the cursor moves to the top or bottom of the list, otherwise the cursor moves to the beginning or end of the text box, respectively.
PgUp or PgDn | Moves up or down a page of items in the list.
Space | If an item is selected in the list, that item is used and you are advanced to the next argument.

For a demonstration of how completions in dialogs work, complete the following steps:

  1. From the main menu, click Project → New .

  2. Press Tab to jump to the Location field.

  3. Start typing a directory path. Notice the completion options.

  4. Press Esc to cancel.

Argument Completion

For a larger list of possible matches, type "?" to list the matches. For a demonstration of how this works, complete the following steps:

  1. From the main menu, click Macro → Open Form .

  2. Type _open and the _open_form command is highlighted.

  3. Press the question mark key (?) to display the Select a Command Parameter dialog. A selection list of possible matches to an argument that is partially-typed is displayed.

Configuring Completion Settings

To configure Auto-Complete settings, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Auto-Complete. See Language-Specific Auto-Complete Options for more information.


Aliases

Aliases are identifiers that you can quickly type which are then expanded into snippets of text. You can use aliases for any text that you frequently type, including directory paths, function names, statements, and comment headers.

There are two types of aliases in SlickEdit®:

  • Global Aliases - These aliases can be used across multiple languages. They are also very useful as directory aliases, because they save you from having to type long paths in file name or directory fields within the editor.

  • Language-Specific Aliases - These aliases are set up on a per-language basis. For example, if you work in multiple languages, you could have one alias identifier for the same function but with different expansions applicable to each language.

Expanding Aliases

After typing the alias identifier, aliases can be expanded using any of these methods:

  • Pressing Ctrl+Shift+O for the expand_alias command. This command always expands the alias, regardless of available completions.

  • Pressing Ctrl+Space for the codehelp_complete command. This command will expand the alias only if there are no matching completions. Otherwise, it will show a list of completions.

  • If Syntax Expansion is enabled (Tools → Options → Languages → [Language Category] → [Language] → Indent ), aliases will automatically be expanded by typing a space.

  • Pause while typing and the alias will be displayed in the Auto-Complete list.

Tip

An option is available to show a tool tip of the matching alias for the word under the cursor. Click Tools → Options → Languages → [Language Category] → [Language] → Auto-Complete and check the option Alias expansion. See Completions for more information.

Global Aliases

Global aliases work across all languages. One way to use global aliases is to save time in entering long directory paths. See Directory Aliases below.

Directory Aliases

Directory aliases take advantage of the fact that most users are constantly opening files from a small number of directories throughout the day. By using a directory alias when opening a file or changing directories, you do not have to type in long paths or click the mouse repeatedly in directory and file name fields within the editor.

After typing the alias identifier, directory aliases can be expanded by pressing Ctrl+Space. Global aliases are stored in the file alias.slk, located in the SlickEdit® root installation directory.

Note

SlickEdit Core doesn't modify Eclipse's file management-related dialogs such as File → Open or File → Save As . Therefore, directory aliases are not available in these dialogs.

Defining a New Directory Alias

Directory aliases typically consist of a short abbreviation of the last name in a long directory path. For example, if you had a directory called c:\version20\src\project2\, a good alias name might be p2. For compiler include files, define an alias called inc (vinc in Microsoft Visual C++, binc in C++ Builder®, or ginc for GCC) if you have multiple compilers.

To define a new directory alias, complete the following steps:

  1. From the main menu, click Tools → Options , then in the Options dialog tree, click Editing → Global Aliases .

  2. Click New, then type the characters you wish to use for an identifier in the Alias Name text box.

  3. Click OK. The identifier you entered is now displayed in the alias list box on the options page.

  4. Make sure your new identifier is selected, then in the large text box to the right, enter the alias value by typing in the directory path that you want the identifier substituted with.

  5. Click OK.

Using Directory Aliases

After the directory aliases are defined, you can use them in any text box or buffer, including the Build tool window and the Open and Change Directory dialogs. For example, to use a directory alias in the Open dialog, complete the following steps:

  1. On the SlickEdit command line, type e (for "edit").

  2. Type the alias name (identifier) for the directory where the file resides.

  3. Press Ctrl+Space to expand the alias.

  4. Type the name of the file to open.

  5. Press Enter.

Embedding Environment Variables in Directory Aliases

If you keep source code in a version directory tree, you might want to set an environment variable and embed the environment variable in the alias value. For example, if you have a directory named c:\version20\src\project2\, define a p2 alias and give it a value such as %VERSION%\src\project2\. Type the following command on the command line to set or create the VERSION environment variable:

          set VERSION=c:\version20

For more information about setting environment variables, see Environment Variables.

Language-Specific Aliases

You can set up language-specific aliases for any frequently used text, such as comment headers. Each language can have one alias file, allowing aliases to be defined that do not affect other languages. Language-specific aliases are stored in files with the extension .als located in the user configuration directory.

The aliases that you create in a language are made available each time you open or create a file in that language. To manage language-specific aliases, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Aliases. As an example, the Java Aliases screen is shown below.

Alias names are displayed in the list box on the left. The value for the selected alias name is displayed in the large text box to the right. Click Delete to remove a selected alias and its value.

Creating a Language-Specific Alias

To create a new alias, complete the following steps:

  1. Click New, then type the characters you wish to use for an identifier in the Alias Name text box.

  2. Click OK. The identifier you entered is now displayed in the list box in the Alias options page.

  3. Make sure your new identifier is selected, then in the large text box to the right, enter the alias value by typing in the text that you want the identifier substituted with.

  4. Click OK.

Tip

  • You can use special escape sequences in your aliases, which will be substituted upon expansion with certain values. See Alias Escape Sequences for more information.

  • You can also specify parameters in alias values. When the alias is expanded, you are prompted with a dialog to input the values. See Parameter Prompting for more information.

Alias Escape Sequences

Alias escape sequences can be used in alias values. When the aliases are expanded, the sequences are replaced with their values. The following table contains a list of the escape sequences that can be used for aliases. For examples, see Escape Sequence Examples below.

Note

If you leave a blank line in an alias, SlickEdit will automatically insert the sequence to preserve leading spaces, %\l, when you save the alias. This ensures that the blank line is preserved.

Escape Sequence | Description
%\c | Places the cursor. This sequence can be used multiple times in the same alias value in order to create a series of "hot spots" within the alias. After the alias is expanded, press Ctrl+[ (next_hotspot command) to jump to the next cursor stop.
%\d | Inserts the date (locale-dependent).
%\e | Inserts the date in MMDDYY format.
%\t | Inserts the time (locale-dependent).
%% | Inserts a percent character.
%\f | Inserts the current file name.
%\g | Inserts a file separator character. This is the backslash on Windows (\) platforms and slash (/) on UNIX/Mac.
%\n | Inserts the current function name.
%\o | Inserts the current function name with signature.
%\i | Indents.
%\b | Unindents.
%\s | Preserves trailing spaces. This should be placed at the end of a line.
%\l | Preserves leading spaces.
%\x ColumnNumber | Moves the cursor to the specified column number.
%\x+ ddd | Increments column by ddd.
%\x- ddd | Decrements column by ddd.
%\m MacroName ArgumentList % | Calls the specified Slick-C® macro with a specified optional argument.
% EnvironmentVariable % | Inserts the value of the environment variable specified.
%( ParameterName ) | Parameter Prompting replacement. See Parameter Prompting for more information.
%\m sur_text% | Indicates where the text to be surrounded is placed. See Surrounding and Unsurrounding for more information.
%\p | Inserts parameters from the function that is located beneath it. See Doc Comments for more information.
%\q | Insert the type for the parameters (double, integer, string, etc.) from the function that is located beneath it. Typically used in conjunction with the %\p escape sequence. See Doc Comments for more information.
%\r | Inserts the return type from the function that is located beneath it. See Doc Comments for more information.
%\u | Includes this line in the expansion, if there are any function parameters that are expanded. If there are no function parameters expanded, this line is not included in the full expansion. See Doc Comments for more information.
%\v | Includes this line in the expansion, if there are any return types that are expanded. If there are no return types expanded, this line is not included in the full expansion. See Doc Comments for more information.
%\un | If there are any function parameters that are expanded, this line is not included in the full expansion. If there are no function parameters expanded, this line is included in the full expansion. See Doc Comments for more information.
%\vn | If there are any return types that are expanded, this line is not included in the full expansion. If there are no return types expanded, this line is included in the full expansion. See Doc Comments for more information.
%() | Used to separate identifier characters. For example, %\u%()n has the effect of the %\u option followed by a literal "n". It is recommended that %() be used to separate alias escape sequences ending with a letter from other identifier characters so that new aliases escape sequences won't break existing aliases you have. Don't write %\dx. Write %\d%()x instead.
Escape Sequence Examples

The following table contains some examples of using escape sequences in alias values:

Alias Name and Description

Value

comment - A header comment to have the date and time inserted.

************************************************/
/* Date: %\d Time: %\t */
/***********************************************/

if - A simple if statement, with indenting, support for surround, and a cursor position.

if(%\c){
%\i// Comment goes here
%\i%\m sur_text%
}

ifelse - An if/else statement with indenting and several cursor hot spots.

if(%\c){
%\i%\c
} else {
%\i%\c
}

wm - A WinMain function template with indenting and a cursor position.

int APIENTRY WinMain(HANDLE hInstance,
                     HANDLE hPrevInstance,
                     LPSTR lpszCmdParam,
                     int nCmdShow)
{
%\i%\c
}

/** - A Javadoc comment.

/**
 *
 * %\c
 *
 * @author %\a (%\d)
 * %\u
 * @param %\p %\c
 * %\v
 * @return %\c%\v
 */

Parameter Prompting

Parameters can be set up for aliases, so that when the alias is expanded, you are prompted with a dialog to input the values. This is useful for reducing even more key strokes for repetitive tasks when using aliases that may require different values each time they are used.

To use parameter prompting, first define the parameters, then use them in your alias values by typing %(ParamName) where ParamName is the name of the parameter that you have defined (see Creating an Alias for Parameter Prompting below). When the alias is used and expanded, the Parameter Entry dialog will appear, prompting you for the parameter values, which will then be inserted into your text.

Creating an Alias for Parameter Prompting

To create an alias for parameter prompting, complete the following steps:

  1. Click New, then enter the new alias name. In the aliases list box (on the left side of the Alias page), make sure the new alias is selected.

  2. Click the Add button below the Parameters group box. The Enter Alias Parameter dialog is displayed.

  3. Enter the following values:

    • Parameter Name - Enter the name that you wish to use in the alias value.

    • Prompt - Enter the text that you wish to be prompted with. This is the label that will appear on the Parameter Entry dialog that prompts for values after the alias is expanded.

    • Initial Value - (Optional) Enter the initial value of the parameter. This text will appear in the text field of the Parameter Entry dialog that prompts for values after the alias is expanded.

  4. Click OK.

  5. If you wish to add more parameters, repeat Steps 2 through 4.

  6. On the Alias options page, the Parameters group box will now display a list of the parameters that you have added.

  7. In the large text field on the right side of the Alias options page, you can now type the alias value. In the places where you want parameter prompting to occur, type %(ParamName), where ParamName is the parameter name that you entered in Step 3.

  8. Click OK when you are finished.

Example: Instantiating a Variable in Java with Parameter Prompting

In Java, instantiating variables can be a repetitive task. The following code shows a common Java code snippet:

public class  {
    public static void main (String args[]) {
        String x = new String( arg[0] );
    }
}

You could define an alias for entering new class names with variables and arguments. That way, when you press Enter after the third line and type and expand the alias, you will be prompted for the values.

For this alias, use the Parameters section of the Alias options page to first define three parameters: class_name, var_name, and arg_list. Then, enter the following text for the alias value:

%(class_name) %(var_name) = new %(class_name)( %(arg_list) );

Creating a Language-Specific Alias from a Selection

You can create a language-specific alias from a selection by following the steps below.

  1. Select some code.

  2. Right-click and select Create Alias.

  3. Give the alias a name and click OK.

  4. The language-specific Alias options page appears, from which you can edit the code to fine-tune or add parameters.


Syntax Expansion

Syntax Expansion is a feature designed to minimize keystrokes, increasing your code editing efficiency. When you type certain keywords and then press the spacebar, Syntax Expansion inserts a default template that is specifically designed for this statement. For example, if you are using the C language and type "for", press Space and the following text expansion is inserted, with the cursor location between the parentheses:

for() {
}

Additionally, for C, C#, C++, J#, Java, and Slick-C®, after the statement is expanded, you can use the next_hotspot command (Ctrl+[) to jump the cursor to the next part of the statement. In the case of the for loop above, Ctrl+[ would move the cursor from the group in parentheses to the code block.

The structures loop, if, and switch or case are also expanded. 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 type, a list of possible keyword matches is displayed. To get the C template displayed above, type "f" followed by pressing Space.

To override the insertion of braces immediately for one line if, for, or while statements, type a semicolon immediately after the keyword. For example:

if;    =>   if ( <cursor here> ) <next hotspot>;

To override non-insertion of braces immediately for if, for, while, foreach, with, lock, fixed, and switch statements, type an open brace immediately after the keyword. For example:

if{    =>   if ( <cursor here> ) { <next hotspot> }

If the default behavior of Syntax Expansion does not match your coding style, for most languages, it can be customized. From the main menu, click Tools → Options → Languages , expand your language category and language, then select [Language] Formatting Options. See Language-Specific Formatting Options for more information.

For further customization, for most languages, you can override the default keyword expansion by defining an alias for that keyword. See Language-Specific Aliases for more information.

Syntax Expansion Settings

To access Syntax Expansion settings, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Indent.

To turn Syntax Expansion on or off, select or clear the option Syntax expansion. To change the minimum expandable keyword length, enter the value by using the Minimum expandable keyword length spin box.

To set options such as brace style, from the main menu, use the [Language] Formatting Options screen.

Tip

SlickEdit® can display Syntax Expansion choices for the word prefix under the cursor. To turn this option on/off, select the Auto-Complete language-specific options screen and select/clear the Syntax expansion option. See Completions for more information.

Modifying Syntax Expansion Templates

Syntax Expansion templates are essentially language-specific aliases that have been pre-defined. You can modify these templates by replacing them with your own.

For example, to add a comment to the end of C for, while, if, and switch statements:

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select Aliases.

  2. Click New and then type for as the alias name.

  3. Type the following lines in the text box to the right of the alias name:

    for (%\c;;) {
} /* for */

    The %\c escape sequence above specifies the cursor placement after expansion is performed.

  4. Repeat Steps 2 and 3 for the while, if, and switch keywords.

  5. Click OK to save new aliases.

The above steps replace the default Syntax Expansion templates for these keywords. The C brace style options will not affect defined aliases.

For more information on working with aliases, using the Alias options page, or using alias escape sequences, see Language-Specific Aliases.

Adding Syntax Expansion for Other Languages

To add syntax expansion and indenting for other languages, complete the following steps:

  1. Use the prg.e macro as a template. This file is located in the macros subdirectory of your installation directory. 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. Do not use any spaces in these constants.

  3. Change the name of the first five characters of the _command functions dbase_mode, dbase_enter, and dbase_space to use the value given to the MODE_NAME constant in Step 2.

  4. Modify the prg_expand_enter function to provide the Enter key the desired support.

  5. Modify the prg_expand_space function to provide the spacebar key the desired support. If you can rely on language-specific aliases, follow the comment in this function.

  6. Use the load command Macro → Load Module to load new macro modules.

Steps 4 and 5 require a good understanding of the Slick-C® language and what this specific macro is doing. See the Slick-C® Macro Programming Guide for more information.


Code Templates

Code templates are pre-defined units of code that you can use to automate the creation of common code elements, like a standard class implementation or design patterns. You can create templates for a whole file or multiple files. Templates can contain substitution parameters that are replaced when the template is instantiated®when a new element is created from that template. Some parameters are replaced with calculated or pre-defined values, like date or author. If a value is not known, you will be prompted for a value when the template is instantiated.

Code templates are composed of one or more template source files and a metadata file providing additional information, like the name of the template, a description of the template, prompts for substitution parameters, and default values for substitution parameters. The following is an example of a single file source template. The items surrounded by dollar signs, "$", are the substitution parameters.

/*
 * $copyright$
 */
package $package$;
/**
 * @author $author$
 * @version $version$
 */
public class $safeitemname$ {
     /**
     * Default constructor.
     */
    public $safeitemname$(){
    }
}

Templates can be organized into Categories to make them easier to manage. The templates shipped with SlickEdit® are organized into categories by language and then by purpose. Use the Template Manager dialog to add, edit, and delete user templates. The Template Manager dialog is accessed by clicking File → Template Manager .

Instantiating a Template

You can add an item to your current project by clicking Project → Add New Item from Template . If you want to create a new item from a template without adding it to your current project, then click File → New Item from Template . The Add New Item dialog box is shown below.

We call the process of creating new files from a template "instantiating a template". When a template is instantiated, you are prompted for the name of the new item. This name is often used heavily in the template. For a class template, the name will likely be the class name or a part of the class name. In the sample template, $safeitemname$ is a form of this name that strips out any spaces, making it safe to use as part of an identifier. This value can even be used as part of the file name when the template is instantiated.

If any of the values in the template are not known at instantiation time, the Parameter Entry dialog box, shown below, will prompt you for values.

Creating Templates

Creating templates is very much like writing code. To create a new code template, complete the following steps:

  1. Create the template source files.

  2. Insert substitution parameters into the template files.

  3. Use the Template Manager to create a new template.

  4. Add the template files to the newly-defined template.

Create the Template Source Files

This is the same process as writing any source file. Use SlickEdit® to write a file from scratch or to modify an existing file. Make sure your file is syntactically correct to minimize compile errors after it is instantiated.

In many languages, the $name$ syntax used by SlickEdit Code Templates is legal for identifiers, so you will be able to compile and run your template source files prior to instantiating them. In other languages, you will have to use temporary identifier names while writing the templates, and then put in the substitution parameters once you are sure the source is correct.

You can store these source files in any directory and copy them to the templates directory during Step 4.

Insert Substitution Parameters into the Template Files

Use substitution parameters for any part of the source code that can differ from instantiation to instantiation. This includes class names, author names (if several people are sharing the same template files), or creation dates.

In our sample, we put in a substitution for copyright statement. See Substitution Parameters for more details.

Use the Template Manager to Create a New Template

Click File → Template Manager to bring up the Template Manager. Select the User Template folder in the tree, and right-click in either the Categories pane or the Templates pane to create a new template.

There are different operations based on whether you want to create a new category or not. You will be prompted for the name of the new template. Fill in a name and click OK. Now you can use the Template Manager to enter a description, add files, or set values for Custom Parameters.

Add the Template Files to the Newly-Defined Template

Select the Files tab on the Code Template Manager dialog and click the Plus (+) button to add the files you created in Step 1 to this template. You will have the option to link to the source in its current location or copy it to the template directory. You will also be prompted for a target file name. If you want the name of the instantiated template to appear in the file name, you should use a substitution variable in the name, like "My$safeitemname$Class.java".

Substitution Parameters

Substitution parameters provide the real power in Code Templates. Without them, you would simply be making copies of static files. You can use substitution parameters to replace any text in the template's source code. You can also use substitution parameters in file names, which is useful in Java where a class must be defined in a file by the same name.

Substitution parameters are written as identifiers surrounded by a delimiter. The default delimiter is $. Use a double delimiter to represent the delimiter character in a template source file, $$. You can specify a different character to use as the delimiter. Click File → Template Manager and click on the Custom Parameters tab to change the value for the Delimiter field.

We provide a set of predefined substitution parameters for items related to item name, project name, directories, date, and time. We can determine the value for these items rather than having to prompt for them. See the list at the end of this section for all the predefined substitution parameters.

You can define substitution parameters that are common to all templates. For example, you might want to define an "author" parameter where the parameter value is your name. You could then create code templates that fill in a header comment with the author's (your) name. You would only have to define the substitution parameter once. To define these parameters, open the Template Manager and select the Custom Parameters tab.

If no value is provided for a substitution parameter, you will be prompted for one when the template is instantiated. This is useful for things like class name or other values that are different each time the template is instantiated.

Predefined Substitution Parameters

The following substitution parameter names and values are pre-defined for use in an item template. The default delimiter "$" is used:

Parameter Name | Description
$itemname$ | Name of item entered, as on the Add New Item dialog.
$fileinputname$ | Name of item entered, as on the Add New Item dialog, without file extension.
$safeitemname$ | Name of item entered, as on the Add New Item dialog, with all unsafe characters replaced with safe characters. For example, if the item name was My Custom Class, then the $safeitemname$ would evaluate to My_Custom_Class for a C++ source code file.
$upcasesafeitemname$ | Same as $safeitemname$ with all characters uppercased.
$lowcasesafeitemname$ | Same as $safeitemname$ with all characters lowercased.
$tempdir$ | Location of operating system temp directory. No trailing file separator.
$rootnamespace$ | Root namespace or package for the current project. This is typically used for C# and Java projects to find the namespace containing Main() (or main() in the case of Java).
$ampmtime$ | Time of day in the form hh:mm[am|pm]. Example: 11:34pm
$localtime$ | Time of day in locale-specific format.
$time$ | Time of day in the form hh:mm:ss.
$localdate$ | Current date in locale-specific format.
$date$ | Current date in the form mm/dd/yyyy.
$projectname$ | Current project name (no path, no extension).
$safeprojectname$ | Current project name (no path, no extension), with all unsafe characters replaced with safe characters. For example, if the project name was: My Project.vpj, then $safeprojectname$ would evaluate to My_Project for a C++ source code file.
$workspacename$ | Current workspace name (no path, no extension).
$safeworkspacename$ | Current workspace name (no path, no extension), with all unsafe characters replaced with safe characters. For example, if the workspace name was: My Workspace.vpw, then $safeworkspacename$ would evaluate to My_Workspace for a C++ source code file.
$projectworkingdir$ | Current project working directory. No trailing file separator.
$projectbuilddir$ | Current project build (output) directory. No trailing file separator.
$projectconfigname$ | Current project configuration name.
$workspaceconfigname$ | Current workspace configuration name. This will be the same as $projectconfigname$ except for MS Visual Studio workspace which will have a separate workspace/solution configuration name.
$projectdir$ | Location of current project file. No trailing file separator.
$workspacedir$ | Location of current workspace file. No trailing file separator.
$username$ | Operating system login name.

Organizing Templates

Templates are organized into category hierarchies as shown on the Add New Item dialog. These category hierarchies map exactly to the directory structure under the locations for installed and user templates.

To create a new template item category:

  1. Create a new folder under the user templates directory. For example, if you wanted to create a Dialogs category for Java project items, you would create the following directory:

    [ConfigDir]/templates/ItemTemplates/Java/Dialogs/

  2. Place all templates for the category under this directory.

  3. Create a new project or open an existing one.

  4. From the main menu click Project → Add New Item .

  5. Verify that your new category appears in the Categories list on the Add New Item dialog box.

Caution

We do not recommend creating new categories or re-organizing categories under installed templates since the next patch or upgrade would overwrite any customizations you have made. If you want to customize an installed template, then we suggest you copy it to the user templates directory and perform your customization on the copy.

Template Manager Operations

Use the Template Manager dialog to add, edit, and delete templates. You can show this dialog by clicking File → Template Manager . Use the Categories list to select a category. Selecting a category populates the Templates list with templates for that category.

Creating a New Category

To create a new category under the selected category, right-click in the Categories tree and select New Category. You will be prompted for a category name. After clicking OK, you can add templates in the new category.

Creating a New Template

To create a new template, select the category in which to create the template, then right-click in the Templates list and select New Template. You will be prompted for a template name which is used to create the new template file. After clicking OK, you can edit the new template the lower half of the dialog.

Editing an Existing Template

To edit an existing template, select a template from the Templates list, and edit its properties in the lower half of the dialog.

Deleting a Template

To delete a template, select the template you want to delete from the Templates list, right-click and select Delete Template from the context menu.

Template Manager Dialog

The Template Manager dialog is made up of the following elements:

  • Categories - Lists a hierarchy of item categories for installed and user template items.

Note

Installed templates can be viewed but not modified.

  • Templates - Lists the templates for the currently selected category. When you select a template, you are able to edit its properties in the lower half of the dialog.

  • Template file - File name of the currently selected template.

Details Tab

The Details tab of the Template Manager dialog contains the following:

  • Name - Specifies the name for the template item. The name is used in the Templates list of the Add New Item dialog.

  • Description - Specifies the description for the template item. The description is displayed on the Add New Item dialog when the template is selected.

  • Default name - Specifies the default item name when using the Add New Item dialog box.

  • Sort order - Specifies an order number that is used to sort the template item in relation to other template items in a list. Used to sort template items in a category on the Add New Item dialog box. Lower sort orders are placed ahead of higher sort order values in a sorted list.

Files Tab

Use the Files tab of the Template Manager dialog to add, edit, order, and delete files in a template. Files are created from a template when using the Add New Item dialog, as when adding an item template to a project.

Add, Edit, Order, and Delete operations are accessible from the buttons on the right side or from the context menu inside the list of files.

Custom Parameters Tab

Use the Custom Parameters tab of the Template Manager dialog to add, edit, and delete substitution parameters in a template. Substitution parameters are used to replace parameter names in the content of files created from a template with a pre-defined value. Substitution parameters can also be used to form target file names (Files tab).

Add, Edit, and Delete operations are accessible from the buttons on the right side or from the context menu inside the list of parameters.

Template Options Dialog

Use this dialog to edit options that are common to all templates. You can launch this dialog from the Template Manager dialog by clicking the Options button.

Global Substitution Parameters

The Global substitution parameters area on the Template Options dialog lists the substitution parameters that are common to all templates. A common substitution parameter, for example, could be "author" where the parameter value is your name. You could then create code templates that automatically fill in a header comment with the author's (your) name.

Add, Edit, and Delete operations are accessible from the buttons on the right side or from the context menu inside the list of parameters.

Add File Dialog

Used to add a file to a template. To launch this dialog, right-click on a file in the Files tab of the Template Manager dialog, and select Add File, or use the Add File button. The dialog contains the following:

  • Source file name - When a file is created from a template, as when adding an item template from the Add New Item dialog, it is created from the source file with this file name.

  • Copy source file to template directory - Check this option to place a copy of the file in the current template's directory and change the source file name to point to the new file in the template. The file is not copied until you click OK.

  • Target file name - When a file is created from a template, as when adding an item template from the Add New Item dialog, the file name of the file that is created on disk is formed from the target file name in the location you specify. Use the menu button to the right of this field to insert common pre-defined substitution parameters. For example, $fileinputname$ is the item name provided on the Add New Item dialog when adding an item template to your project.

  • Replace parameters in target file content - Check this option if you want substitution parameters embedded in the content of the target file to be replaced when the file is created from the template, as when adding an item template to your project from the Add New Item dialog.

  • Preview - Previews how the file would be copied when creating the file from a template as if the source file name and target file name were fully resolved.

Add Parameter Dialog

Used to add a custom substitution parameter to a template. This dialog is launched when performing an Add operation from the Custom Parameters tab of the Template Manager Dialog. When files are created from a template, as when adding an item template to your project from the Add New Item dialog box, you can configure your template to replace all substitution parameters with values. For a list of pre-defined substitution parameters, see Predefined Substitution Parameters.

The Add Parameter dialog contains the following:

  • Name - This is the name of the substitution parameter WITHOUT delimiters. For example, if the delimiter is "$" (the default), then a substitution parameter that inserts a copyright string would have a name of "copyright" and NOT "$copyright$". Do not use quotes in the name. Valid characters for a parameter name are: A-Za-z0-9_

  • Value - This is the value that the substitution parameter evaluates to when a string or file is created from the template and has its substitution parameters replaced with values.

  • Prompt for value - Check this option if you always want to be prompted for the value of a substitution parameter. When set, the Value field becomes a default value field and is used to pre-populate the value when you are prompted.

  • Prompt string - Specifies the prompt string to display when being prompted for a substitution parameter value.

Add New Item Dialog

Used to add an item to your current project, the Add New Item dialog is displayed when you click Project → Add New Item or File → New Item from Template .

Use the Categories list to select a category. Selecting a category populates the Templates list with template items for that category. You can then select an item from the Templates list, enter a unique Name for the item, and enter a Location. Click Add to instantiate the template with the name and location you provided.

You can manage your templates from the Template Manager dialog box by choosing File > Template Manager.

The Add New Item dialog contains the following:

  • Categories - Lists a hierarchy of item categories for installed and user template items.

  • Templates - Lists the template items for the currently selected category. When you select a template item, a brief description for that item is displayed just above the Name field.

  • Name - Enter the name of the file you want to create.

Note

For single file templates (templates that create a single file) this is the name of the file. Multi-file templates use the name of the item entered to form names of files in the template. For more information about creating multi-file templates, see Creating a Multi-file Template.

  • Location - Enter the location to which to save the item.

  • Add to current project - When selected, the new item is added to the current project.

  • Add - After you have selected a template item, provided a name and a location, click Add to instantiate the template item.

Locating Templates

Installed Templates

Templates that are installed with the product are located at:

[SlickEditInstallDir]/sysconfig/templates/ItemTemplates/

For example, the following directory under Windows contains item templates for the C++ language:

[My Documents]\My SlickEdit Core Config\[VERSION]\templates\ItemTemplates\C++

User Templates

User templates are templates that the user creates and are located at:

[ConfigDir]/templates/ItemTemplates/

Tip

You can locate your Configuration Directory from the main menu by clicking Help → About SlickEdit .

Manually Creating a Template

SlickEdit® Code Templates are represented as files stored in specific directories. A template is composed of the source file or files for the template and a metadata template file that provides additional information. Since these are just files, you can write them using SlickEdit.

To manually create an item template:

  1. Choose a category folder under the user templates directory. Your user templates directory is at:

    [ConfigDir]/templates/ItemTemplates/

    Tip

    You can locate your Configuration Directory from the main menu by clicking Help → About SlickEdit .

    All files will be created relative to the folder you choose. For more information about how templates are organized, see Organizing Templates.

  2. Create or edit a code file (e.g. *.cpp, *.java, etc.). Replace occurrences of substitutable text with substitution parameter names. For example, you might want to make the name of a C++ or Java class into a substitution parameter, in which case you could use the $safeitemname$ substitution parameter. For more information on substitution parameters, see Substitution Parameters.

  3. Create an XML file and give it an extension of .setemplate.

  4. Insert template metadata into the .setemplate file. See the example below. For more information on template metadata elements, see Code Template Metadata File Reference .

  5. Create a new project or open an existing one.

  6. From the main menu, click Project → Add New Item .

  7. Verify that your new template item appears in the Templates list on the Add New Item dialog box.

Example

The following example illustrates the metadata for an item template for a custom Java class, along with the content of the Java source code file.

From the Add New Item dialog box, if the user entered Foo.java for the item name, then $fileinputname$ would be replaced with "Foo" in the file name of the file created, and $safeitemname$ would be replaced with "Foo" in the Java source code file.

MyClass.setemplate:

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File TargetFilename="$fileinputname$.java">MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>

MyClass.java:

class $safeitemname$ {
};
Creating a Multi-file Template

A multi-file template is a template item that creates more than one file.

Multi-file templates require the use of substitution parameters to ensure that file name and extension parts are used when creating each file of the template item. For example, a C++ class typically consists of:

  • A .h file that contains the class definition.

  • A .cpp file that contains the class implementation.

Since you can only enter one name into the Name field on the Add New Item dialog box, you need a way to specify the target file name for each file created by the multi-file template. In the C++ class example below, the .h and .cpp files are created with the name you provide, while their extensions are preserved.

To create a multi-file item template from the Template Manager dialog, click File → Template Manager .

To manually create a multi-file item template:

  1. Create the item template the same way a single file template would be created. For more information on manually creating a template item, see Manually Creating a Template.

  2. Add TargetFilename attributes to each of the File elements in your template metadata file (.setemplate). Set the value of each TargetFilename attribute to $fileinputname$.[extension], where [extension] is the file extension of the target file name being created. When the files are created, their names will be based on the name you entered in the Name field of the Add New Item dialog box. See the example below.

Example

The following example demonstrates a multi-file item template .setemplate file. The item creates C++ class header (.h) and implementation (.cpp) files.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My C++ Class</Name>
    <Description>My complete C++ class header and implementation</Description>
    <DefaultName>MyClass.cpp</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File>
      <File TargetFilename="$fileinputname$.h">MyClass.h</File>
    </Files>
  </TemplateContent>

</SETemplate>

Code Template Metadata File Reference

Template metadata describes the template item, its files, and how to create the template. Template metadata files have a .setemplate extension.

The SETemplate element is the root element of a template file.

Summary of metadata elements:

Element | Child Elements | Attributes
DefaultName | - | -
Description | - | -
File | - | ReplaceParameters,TargetFilename
Files | File | -
Name | - | -
Parameter | - | Name,Value
Parameters | Parameter | -
SETemplate | TemplateContent,TemplateDetails | Type,Version
SortOrder | - | -
TemplateContent | Files,Parameters | Delimiter
TemplateDetails | DefaultName,Description,Name,SortOrder | -

Elements

DefaultName

DefaultName is an optional child element of TemplateDetails. Specifies the default item name when using the Add New Item dialog box. This element becomes more important in multi-file templates where you need to specify a DefaultName element in order to create file names from parts of the input item name. See the example below.

  • Attributes - None.

  • Child elements - None.

  • Parent elements - TemplateDetails.

  • Value - Text value is required. The text value specifies the default name of the template item. Used to populate the name field with an initial value on the Add New Item dialog box.

Example

The following example illustrates the metadata for an item template for a C++ class that creates a header file (.h) and implementation file (.cpp).

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My C++ Class</Name>
    <Description>My complete C++ class header and implementation</Description>
    <DefaultName>MyClass.cpp</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File>
      <File TargetFilename="$fileinputname$.h">MyClass.h</File>
    </Files>
  </TemplateContent>

</SETemplate>
Description

Description is a required child element of TemplateDetails. Specifies the description for the template item. See the example below.

  • Attributes - None.

  • Child elements - None.

  • Parent elements - TemplateDetails.

  • Value - Text value is required. The text value specifies the description of the template item. The description is shown on the Add New Item dialog box.

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
File

File is an optional child element of Files. Specifies a file for the template item. See the example below.

  • Attributes

    Attribute

    Description

    ReplaceParameters

    Optional.

    Specifies whether parameter substitution takes place on the file contents when the file is created from the template. Note that parameter substitution always takes place on the TargetFilename attribute value (example:

    TargetFilename="$fileinputname$.cpp").

    Possible values are "1" (true) or "0" (false).

    Defaults to "1" (true).

    TargetFilename

    Optional.

    Specifies the actual name of the item that is created from the template.

    This attribute is especially useful when creating a multi-file template where file names of files created from the template are assembled by parameter substitution.

  • Child elements - None.

  • Parent elements - TemplateContent.

  • Value - Text value is required. Value is the path of a file in the template item.

Example

The following example illustrates the metadata for an item template for a C++ class that creates a header file (.h) and implementation file (.cpp).

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My C++ Class</Name>
    <Description>My complete C++ class header and implementation</Description>
    <DefaultName>MyClass.cpp</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File>
      <File TargetFilename="$fileinputname$.h">MyClass.h</File>
    </Files>
  </TemplateContent>

</SETemplate>
Files

Files is a required child element of TemplateContent. Specifies files for the template item. See the example below.

  • Attributes - None.

  • Child elements - File.

  • Parent elements - TemplateContent.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a C++ class that creates a header file (.h) and implementation file (.cpp).

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My C++ Class</Name>
    <Description>My complete C++ class header and implementation</Description>
    <DefaultName>MyClass.cpp</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File>
      <File TargetFilename="$fileinputname$.h">MyClass.h</File>
    </Files>
  </TemplateContent>

</SETemplate>
Name

Name is a required child element of TemplateDetails. Specifies the name for the template item. See the example below.

  • Attributes - None.

  • Child elements - None.

  • Parent elements - TemplateDetails.

  • Value - Text value is required. The text value specifies the name of the template item. The name is shown in the Templates list on the Add New Item dialog box.

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
Parameter

Parameter is an optional child element of Parameters. Specifies a custom substitution parameter for the template item. For a list of pre-defined substitution parameters, see Predefined Substitution Parameters.

See the example below.

  • Attributes

    Attribute

    Description

    Name

    Parameter name. This is the name of the substitution parameter WITHOUT delimiters. For example, if the delimiter is "$" (the default), then a substitution parameter that inserts a copyright string would be defined as "copyright" and NOT as

    "$copyright$".

    Value

    Parameter value. This is the value that the substitution parameter evaluates to when a string or File is created from the template.

  • Child elements - None.

  • Parent elements - Parameters.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a custom Java class.

When MyClass.java is used to create the file from the template, all occurrences of $copyright$ in the created file will be replaced with "(c)2005-2006".

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Parameters>
      <Parameter Name="copyright" Value="(c)2005-2006" />
    <Parameters>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
Parameters

Parameters is a required child element of TemplateContent. Specifies custom substitution parameters for the template item. For a list of pre-defined substitution parameters, see Predefined Substitution Parameters.

See the example below.

  • Attributes - None.

  • Child elements - Parameter.

  • Parent elements - TemplateContent.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a custom Java class.

When MyClass.java is used to create the file from the template, all occurrences of $copyright$ in the created file will be replaced with "(c)2005-2006".

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Parameters>
      <Parameter Name="copyright" Value="(c)2005-2006" />
    <Parameters>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
SETemplate

Root element. Contains all metadata about template item.

  • Attributes

    Attribute

    Description

    Version

    Template version number. The current version is "1.0".

    Type

    Template type. Valid types are: "Item".

  • Child elements - TemplateDetails, TemplateContent.

  • Parent elements - None.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
SortOrder

SortOrder is an optional child element of TemplateDetails. Specifies an order number that is used to sort the template item in relation to other template items in a list. Used to sort template items in a category on the Add New Item dialog box.

If no SortOrder is specified for a template item, then the SortOrder value defaults to "0".

  • Attributes - None.

  • Child elements - None.

  • Parent elements - TemplateDetails.

  • Value - Text value is required. An integer that is greater than or equal to "0". When sorting in relation to other template items, low SortOrder values are placed ahead of higher values in a sorted list.

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
    <SortOrder>100</SortOrder>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
TemplateContent

TemplateContent is a required child element of SETemplate. Specifies the contents of a template item.

  • Attributes

    Attribute

    Description

    Delimiter

    Optional.

    Delimiter used when replacing substitution parameters in content.

    Defaults to "$".

  • Child elements - Files, Parameters.

  • Parent elements - SETemplate.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>
TemplateDetails

TemplateDetails is a required child element of SETemplate. Describes the template item. Details are used to display the template item on the Add New Item dialog box.

  • Attributes - None.

  • Child elements - DefaultName, Description, Name, SortOrder.

  • Parent elements - SETemplate.

  • Value - N/A

Example

The following example illustrates the metadata for an item template for a custom Java class.

<?xml version="1.0" ?>
<!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd">
<SETemplate Version="1.0" Type="Item">

  <TemplateDetails>
    <Name>My Java Class</Name>
    <Description>My custom Java class</Description>
    <DefaultName>MyClass.java</DefaultName>
  </TemplateDetails>
  <TemplateContent>
    <Files>
      <File>MyClass.java</File>
    </Files>
  </TemplateContent>

</SETemplate>


Quick Brace/Unbrace

Quick Brace makes it easy to convert single line statements into a brace-enclosed blocks, so you can add new lines without having to manually position the cursor and type extra keystrokes. Unbrace removes the braces from a block that contains a single line statement.

Tip

  • As you write new code, SlickEdit® automatically expands statement templates for common block structures (such as if, for, or while) when you type the initial keyword. See Syntax Expansion for more information.

  • Quick Brace and Unbrace do not support code blocks containing multiple statements, but you can use Dynamic Surround and Unsurround instead.

A single line statement is defined as a single line child statement that is not enclosed in braces, for example:

if ( cond ) doSomething();

Hanging single line statements are often broken across two lines in the editor:

if ( cond )
     doSomething();

Using Quick Brace/Unbrace

When you use Quick Brace, SlickEdit attempts to honor your brace style and indent settings. To use Quick Brace, position the cursor where you would normally type the open brace, and type it. Using the preceding code samples, you could position the cursor as follows:

if ( cond ) <cursor here> doSomething();

or

if ( cond )
<cursor here> doSomething();

After typing the opening brace, the child statement is moved to the next line if necessary, indented according to your indent settings, and the closing brace is inserted automatically. The result on the preceding code sample is:

if ( cond ) {
     doSomething();
}

Tip

TIP Indentation and brace style settings are specified on the Formatting Options screen specific to your language (Tools → Options → Languages → [Language Category] → [Language] → Formatting Options ). For C-like languages, use the C/C++ Formatting Options screen.

Unbrace does the opposite of Quick Brace, removing the braces from a brace-enclosed block that contains a single line statement and moving the statement to the preceding line that contains the parent statement (unless it is just too long). To use Unbrace, simply delete the opening brace. Using the preceding code example, the result is as follows:

if ( cond ) doSomething();

You can use Unbrace on any brace-enclosed block that contains a single line statement, not just a block that was created with Quick Brace. Unbrace works on any brace style.

Depending on the original brace style and the column location of the open brace, Unbrace either pulls the statement up to the same line or leaves it hanging. The default column threshold is 40, which can be modified by setting the configuration variable def_hanging_statements_after_col (Macro → Set Macro Variable ). Set the value to 1 for statements to always remain on the second line. Set the value to a very large number to always pull up statements to the original line. See Setting/Changing Configuration Variables for more information on setting variables.

Quick Brace and Unbrace work for C/C++ and similar languages that support brace blocks. Statements such as if, while, and for are supported, as well as the handling of else clauses for if statements and the splicing of the close brace with a trailing else.

Disabling Quick Brace/Unbrace

Quick Brace/Unbrace is on by default, and can be enabled/disabled on an language-specific basis. To access this option, from the main menu, click Tools → Options → Languages , expand your language category and language, then click [Language] Formatting Options and select or clear the option Quick brace/unbrace one line statements.


Surrounding and Unsurrounding

SlickEdit® provides two features that allow you to surround existing text with new text. Dynamic Surround lets you selectively include more or fewer lines in a block structure, like an if statement. Surround With lets you surround any selected text with text predefined in one of the Surround With Aliases. In addition, Unsurround can be used to remove code block structures.

Dynamic Surround

Dynamic Surround provides a convenient way to surround a group of statements with a block statement, indented to the correct levels according to your preferences. This feature works in conjunction with the syntax expansion and alias expansion features (see Syntax Expansion and Language-Specific Aliases). It is designed to help you keep your hands on the keyboard, thereby improving your speed and efficiency.

Dynamic Surround is supported for any language that uses block statements. By default, Dynamic Surround is turned on for all supported langauges. To turn it off, select Tools → Options → Languages , expand your language category and language, then click Indent and uncheck Use Dynamic Surround.

SlickEdit® enters Dynamic Surround mode automatically immediately after you expand a block statement (for instance, by typing if then pressing Space). After expanding the statement, a box is drawn around it as a visual guide, and you can pull the subsequent lines of code or whole statements into the block by using the Up, Down, PgUp, or PgDn keys.

Dynamic Surround stays active until you press ESC. During that time auto-completions and symbol preview are unavailable.

You can also invoke Dynamic Surround on an existing block structure using the dynamic-surround command. Put the cursor on the line containing the block structure keyword, like an "if" or a "for", press ESC to open the SlickEdit command line, then type dynamic-surround. If SlickEdit recognizes the block structure, the box will be drawn and you will be able to expand or contract the structure using the Up, Down, PgUp, or PgDn keys. By default, this command is not associated with a key binding. See Creating Bindings for information on creating your own.

The following screen shot shows the Syntax Expansion menu that appears after typing "if" in a C++ file:

After pressing Space to expand the statement, Dynamic Surround is activated, with a blue rectangle drawn around the expanded statement, as shown below:

Pressing the Down arrow key pulls the code block into the statement, indented to the correct levels, as shown below:

The finished code is shown below:

Statements that are pulled into the block are indented according to your indent settings (see Syntax Indent). The color of the rectangle box guide is controlled by the Block Matching screen element (see Colors).

Syntax Expansion must be on for Dynamic Surround to work. Both options are on by default. To turn off either of these options, from the main menu, select Tools → Options → Languages , expand your language category and language, then select Indent. Clear the option(s) Use Dynamic Surround and/or Syntax expansion.

Surround With

Surround With makes it fast and easy to wrap existing lines of code in a new block structure. Surround With is supported for the languages C, C++, C#, HTML, Java, JavaScript, and XML. Highlight the lines to surround, right-click, and select Surround Selection With, or use the surround_with command. The Surround With dialog appears, with a pre-defined list of structures based on the current file extension.

Select the structure you wish to surround with, then click OK.

If there is no selection and you activate Surround With, the current line or code block will be automatically highlighted for surrounding (the same function performed by the select_code_block command).

Tip

The surround_with command has a button available for toolbar customization. See Customizing Toolbars for more information about creating your own custom toolbars.

Surround With Aliases

Surround With aliases are created and modified the same way as other aliases, with the addition of the %\m sur_text% escape sequence. This sequence indicates where the selected text should be placed, and can be used multiple times within a single Surround With alias. See Surround With Commands for more information on sur_text.

To view or modify the Surround With aliases, use the surround_with command to display the Surround With dialog, then click the Customize button. This will display the language-specific Alias options page with the Surround With option selected. As an example, the C Alias options page is shown below.

The list of Surround With structures for the chosen language is shown in the list box on the left. To modify one of the Surround With structures, complete the following steps:

  1. Select the structure that you wish to modify. Notice the alias for the structure appears in the text box on the right.

  2. Modify the alias to suit your needs. For a list of escape sequences and examples, see Alias Escape Sequences. For more information about using the Alias options page, see Creating a Language-Specific Alias.

  3. When you are finished, click OK on the Alias options page.

  4. Click OK on the Surround With dialog.

Surround With Commands

There are three commands available for working with Surround With:

  • surround_with - This command is used to display the Surround With dialog, allowing you to pick a structure to surround selected text with. This command can be bound to a key, see Creating Bindings for more information.

  • sur_text - This is a Slick-C® function that can only be used inside of a Surround With alias. It is used to indicate where the selected text should be placed and can be used multiple times within a single Surround With alias. sur_text can take several parameters, which can appear in any order. The available parameters are:

    • -beautify - This is the default for C, Java, and others. It beautifies the results of the alias expansion.

    • -begin text - Prefixes each line of the selection with text.

    • -deselect - This is the default parameter. It specifies to leave the text deselected.

    • -end text - Suffixes each line of the selection with text.

    • -ignore chars - The -begin, -indent, and -stripbegin options will ignore any chars when finding the beginning of the selected line.

    • -indent - Indents each line of the selection.

    • -nobeautify - This is the default for HTML, XML, and others. It specifies that the editor should not attempt to beautify the results of the alias expansion.

    • -notext - Specifies that no text should be pasted.

    • -select - Leaves the text selected.

    • -stripbegin text - If any line begins with text, text is removed from the line. This option is applied before -begin.

    • -stripend text - If any line ends with text, text is removed from the line. This option is applied before -end.

  • surround_with_if - This is a wrapper command that expands the if alias for the selected text. This command can be bound to a key, see Creating Bindings for more information.

The use of Surround With can be streamlined by using wrapper commands and key bindings. You can create your own wrapper commands. The following example is the definition of surround_with_if _command void surround_with_if() name_info(',':

VSARG2_REQUIRES_EDITORCTL | VSARG2_MARK | VSARG2_REQUIRES_AB_SELECTION)
{
   surround_with('if');
}

You must change the name of the command and the argument passed to surround_with. The argument does not have to be an exact match with the alias name. For instance, calling surround_with('i') will prompt you to select the if, if...else, or include once alias. If there is an exact match, that alias will be used. In the case of surround_with_if, "if" matches the beginning of both the if and if...else aliases, but the if alias is used because it is an exact match.

After you create your wrapper command, you can bind it a key or invoke it from the command line.

For more information on working with commands, see the Slick-C® Macro Programming Guide.

Unsurround

Unsurround is a feature that lets you remove the surrounding text from a code block. This is particularly effective when used with Dynamic Surround. Unsurround is supported for the following languages: ActionScript, AWK, C#, C++, CFML, HTML, Java, JavaScript, Perl, PHP, Slick-C®, Tcl, and XML.

To use Unsurround, right-click on a selected code block and select Unsurround, or use the unsurround command. By default, the unsurround command is bound to Ctrl +Shift +Del.

For example, to remove the if statement structure from a code block, select the code block or part of the code block, then right-click and select Unsurround (or use the unsurround command). The entire code block under the cursor is automatically highlighted and a dialog prompt appears to confirm the unsurround operation. Click OK, and the if line of the code block as well as the line containing the closing brace are removed. The remaining code is unindented to the correct level.

Tip

The unsurround command has a button available for toolbar customization. See Customizing Toolbars for more information about creating your own custom toolbars.

Deleting Code Blocks

Unsurround is also associated with the cut_line (Ctrl+Backspace) and delete_line (Ctrl+Del) commands. When one of these commands is invoked while the cursor is on the first line of a block statement, the Delete Code Block dialog appears, from which you can choose to delete the line, delete the entire block, or unsurround the block.

Each of these operations copies the removed text to the clipboard. This is useful if you want to paste the structure into a different location, because as soon as the text is pasted, SlickEdit® enters Dynamic Surround mode, allowing you to pull statements into the pasted block.

The Delete Code Block dialog also contains an option to Always just delete line when cut_line or delete_line operations are invoked. Selecting this option will prevent the dialog from appearing when these operations are used. To see the dialog again, use the cut_code_block command.


Bookmarks

Bookmarks are used to save the current edit location, so you can quickly return to it later. There are two types of bookmarks:

  • Named Bookmarks - Uses a green flag to mark long-term, meaningful locations in the code, or to quickly set a temporary, named bookmark on the current line.

  • Pushed Bookmarks - Uses a blue flag to set temporary "breadcrumbs" as you explore the code. Pushed bookmarks are manipulated separately from named bookmarks.

Bookmark options for named and pushed bookmarks can be found on the Bookmark Options screen of the Options dialog (Tools → Options → Editing → Bookmarks ).

A set of bookmark controls for named and pushed bookmarks is available for adding to your custom toolbars. See Customizing Toolbars for more information.

Named Bookmarks

Named bookmarks are great for marking long-term, meaningful locations in your code. For example, if you have a project with a lot of include files, you might want to bookmark the top of the main header file. Or you could bookmark a file with instructional comments about a particular project you're working on.

In addition to menu items and command line operations, the Bookmarks tool window (View → Tool Windows → Bookmarks ) is available for creating and managing named bookmarks. See Bookmarks Tool Window for more information.

See the following sections for more information about working with named bookmarks:

  • Setting Named Bookmarks

  • Navigating Named Bookmarks

  • Deleting Named Bookmarks

  • Using Workspace Bookmarks

Setting Named Bookmarks

There are various ways to use named bookmarks, and the way you set them depends on which way you want to use them:

  • Give them a specific name - Creating a bookmark and naming it yourself is one of the best ways to mark a location in your code. For example, you could set a bookmark named "main" to save the location of the main function. See Setting a Bookmark With a Specific Name.

  • Allow automatic naming - This is a quicker way to set named bookmarks. This method could be useful to mark locations that you temporarily need to reference, perhaps only in the current editing session. See Setting a Bookmark With an Automatic Name.

  • Use a key binding shortcut for the name - The quickest way to set and navigate named bookmarks is to name according to a specific key binding. This method lets you create a bookmark with one key binding, and navigate back to the bookmark with a similar key binding. See Setting a Bookmark With a Key Binding.

After setting a named bookmark, a green bitmap is displayed in the left margin of the editor window, indicating the location of the bookmark. Use the Show set bookmarks option to enable or disable the display of the indicator (Tools → Options → Editing → Bookmarks ).

Setting a Bookmark With a Specific Name

There are several different ways to set a bookmark on the current line and give it a name:

  • Using the Bookmarks Tool Window, click the Create a New Bookmark button.

  • From the main menu, click Search → Bookmarks → Set Bookmark . The Bookmarks Dialog is displayed. Type the name of the bookmark in the combo box, then click Add.

  • On the SlickEdit® command line, use the set_bookmark or sb command. The sb command is a shortcut for set_bookmark, so you can use whichever you prefer. If you use the command without arguments, the Bookmarks Dialog is displayed. Or, you can append sb or set_bookmark with any character or text string, and a bookmark will be instantly set using that value for the name. This works best in conjuction with the goto_bookmark (or gb) command, because you can use sb 1 on the command line to create an instant bookmark named "1", and then navigate back to that bookmark at any time by using gb 1. See Navigating Named Bookmarks for more information.

Setting a Bookmark With an Automatic Name

Most of the methods described in the section for Setting a Bookmark With a Specific Name display a dialog that prompts for the name of the new bookmark. In each case, SlickEdit® prepopulates the name field with an automatic name that you can use if you don't want to specify your own name.

The automatic name will be in one of two formats: SymbolName:LineNumber, or FileName:LineNumber. The symbol name is used if the bookmark is inside of a symbol. The file name is used if there is no symbol on the line or if the file does not support Context Tagging®.

While you can use the methods described in Setting a Bookmark With a Specific Name, the quickest method of setting a named bookmark with an automatic name is to use the Toggle Bookmark feature, which instantly sets an automatically named bookmark and lets you toggle it on and off. To use this feature, from the main menu, click Search → Bookmarks → Toggle Bookmark , press Ctrl+Shift+J, or use the toggle_bookmark command.

Setting a Bookmark With a Key Binding

You can set a bookmark that takes its name from the key used to set it. There are two commands that can be used: alt_bookmark, for setting a bookmark, and alt_gtbookmark, for navigating to the bookmark.The purpose of these commands is so that you can bind them to keys, providing a way for you to have one type of keyboard shortcut for setting the bookmarks, naming them in the process, and another for navigating to the bookmarks.

These commands can be bound to any of the following keys/ranges:

  • Ctrl+[ 0-9 ], Ctrl+[A-Z], Ctrl+[F1-F12]

  • Alt+[ 0-9 ], Alt+[A-Z], Alt+[F1-F12]

  • Ctrl+Alt [ 0-9 ], Ctrl+Alt[A-Z], Ctrl+Alt[F1-F12]

  • Shift+[ F1-F12 ]

For example, you could bind alt_bookmark to Ctrl+[0-9] and alt_gtbookmark to Alt+[0-9], for a more efficient means of setting bookmarks named "0" through "9", and navigating back to them. See Working with Key Binding Ranges for more information.

Note

Different emulations have different default assignments for alt_bookmark and alt_gtbookmark. Use the menu item Help → Where Is Command to see what keys are set up by default in your emulation. See Using the Command Line to View Key Binding Associations for more information.

Navigating Named Bookmarks

To jump to and navigate between your named bookmarks, use one of the following methods:

  • From the main menu, click Search → Bookmarks → Previous Bookmark or Search → Bookmarks → Next Bookmark (or use the prev_bookmark and next_bookmark commands, respectively). The order of navigation matches the order in which the bookmarks were created.These operations are also available on the Bookmarks Tool Window.

  • Use the Go to Bookmark feature: From the main menu, click Search → Bookmarks → Go to Bookmark , or, use the goto_bookmark command or the gb command. The gb command is a shortcut for goto_bookmark, so you can use whichever command you prefer. This displays the Bookmarks Tool Window, from which you can select a bookmark to navigate to.

Tip

When you use the Go to Bookmark dialog to jump to a named bookmark, SlickEdit® pushes a bookmark in the process. To get back to where you were, press Ctrl+Comma. See Pushing and Popping Bookmarks.

  • You can also append goto_bookmark or gb with the name of the bookmark to go directly to that bookmark's location in the code. This works best in conjuction with the set_bookmark (or sb) command. For example, you can set a bookmark named "1" by using sb 1 on the SlickEdit command line, then use gb 1 to navigate back to that location. Command Line Completion is supported to assist you with typing the name of the bookmark. See also Setting a Bookmark With a Specific Name.

Deleting Named Bookmarks

To remove a named bookmark, use one of the following methods:

  • Using the Bookmarks Tool Window, select the bookmark to delete and click the Delete Selected Bookmark button or press the Delete key.

  • When the cursor is on the bookmark line, use the Toggle Bookmark feature to toggle that bookmark off (in effect, deleting it): From the main menu, click Search → Bookmarks → Toggle Bookmark , or, press Ctrl+Shift+J or use the toggle_bookmark command. Use the feature again to toggle the bookmark back on.

  • On the SlickEdit® command line, use the delete_bookmark command with the name of the bookmark to delete. For example, if the bookmark to delete is named "1", type delete_bookmark 1 on the command line. Command Line Completion is supported to assist you with typing the name of the bookmark.

  • On the Bookmarks Dialog or Go to Bookmark Dialog, select the bookmark to remove and click Delete.

To remove all named bookmarks at once:

  • Using the Bookmarks Tool Window, click the Delete All Bookmarks button.

  • On the SlickEdit® command line, use the clear_bookmarks command.

Using Workspace Bookmarks

By default, named bookmarks are global and are not associated with a specific workspace (see Managing Workspaces). However, you can choose to associate your bookmarks with a workspace instead. When you use workspace bookmarks, the Bookmarks Tool Window (and other dialogs that show bookmarks) only displays bookmarks that are associated with the current workspace. You can set bookmarks for files that are not in the current workspace. To enable workspace bookmarks, set the Use workspace bookmarks option to True (Tools → Options → Editing → Bookmarks ).

Relocatable Code Markers

Named bookmarks use relocatable code markers to store their location within the source code. This allows SlickEdit to find the new location if someone makes changes to the file externally, like modifying the file with a different editor. The next time you open the file, SlickEdit checks the location of each code marker and verifies that it is still correct. If necessary, SlickEdit uses stored information to locate the correct line of code for this bookmark. If the code has changed too much, SlickEdit may not be able to find the new location. Instead, the bookmark will be placed at the line number where it is was last known to be.

Pushed Bookmarks

Pushed bookmarks are used to set temporary "breadcrumbs" as you move throughout your code. For example, you may have multiple spots in your code that you want to examine. You can push a bookmark (drop a breadcrumb) at each location, one right after the other. When you're done examining the code and pushing bookmarks, you can backtrack to where you first started by popping the bookmarks (picking up the breadcrumbs).

Pushed bookmarks are stored on the bookmark stack, which is simply an internal list of pushed bookmarks. When you push a bookmark, the current line is placed on top of the bookmark stack. Popping a bookmark removes the top bookmark from the stack, and navigates the cursor to the location of the previous bookmark.

Pushed bookmarks are deleted when you close SlickEdit®.

See the following sections for more information:

  • Pushing and Popping Bookmarks

  • Viewing Pushed Bookmarks

  • Pushed Bookmark Options

Pushing and Popping Bookmarks

To push a bookmark for the current line, placing it on top of the bookmark stack, use one of the following methods:

  • From the main menu, click Search → Bookmarks → Push Bookmark (or use the push_bookmark command).

  • Use the Go to Definition or Go to Reference feature: Press Ctrl+Dot (bound to the push_tag command) to move the cursor from a symbol to its definition, or Ctrl+/ (bound to the push_ref command) to navigate from a symbol to its reference, pushing a bookmark in the process. See Symbol Navigation for more information.

  • To pop a bookmark, from the main menu, click Search → Bookmarks → Pop Bookmark , press Ctrl+Comma, or use the pop_bookmark command. The top bookmark on the stack is removed and the cursor jumps to the location of the previous bookmark.

To pop all pushed bookmarks at once, use the pop_all_bookmarks command.

Tip

When you use the Go to Bookmark dialog to jump to a named bookmark (see Navigating Named Bookmarks), SlickEdit pushes a bookmark in the process. This way you can quickly go back to your previous location.

Viewing Pushed Bookmarks

In most use cases, you will never need to see pushed bookmark locations or a list of pushed bookmarks, because they are intended to act as temporary "breadcrumbs" as you explore your way through code.

However, there are two ways to see visual representations of pushed bookmarks:

  • Enable the visual indicator - SlickEdit® can display a blue bitmap in the left margin of editor windows at the location of each pushed bookmark. To enable display of the indicator, set the Show pushed bookmarks option to True (Tools → Options → Editing → Bookmarks ).

  • Use the Bookmark Stack dialog - SlickEdit provides a Bookmark Stack dialog that shows a list of all pushed bookmarks that are currently set. To display it, from the main menu, click Search → Bookmarks → Bookmark Stack , or use the bookmark_stack command. The Bookmark Stack dialog can also be used to navigate between and delete pushed bookmarks. See Bookmark Stack Dialog for more information.

Pushed Bookmark Options

There are several options for pushed bookmarks:

  • When using Symbol Navigation (Go to Definition or Go to Reference), if SlickEdit® opens a file that was not previously open and you navigate away from it, SlickEdit prompts to close the visited, unmodified file. To remove the prompt and specify the default action, set the option Automatically close visited files (Tools → Options → Editing → Bookmarks ). See Automatically Closing Visited Files for more information.

  • To delete pushed bookmarks automatically when a file is closed, set the Close deletes pushed bookmarks option to True (Tools → Options → Editing → Bookmarks ). SlickEdit automatically deletes pushed bookmarks when the editor is closed.

  • SlickEdit can automatically push a bookmark whenever you jump to the top or bottom of the buffer (Ctrl+Home/Ctrl+End, or top_of_buffer/bottom_of_buffer commands, respectively). This is convenient, for example, in C++: if you jump to the top of the buffer to add a #include statement, a bookmark is pushed, so you can use Ctrl+Comma (pop_bookmark command) to get back to your previous position. To enable this behavior, set the Top/bottom buffer pushes bookmark option to True (Tools → Options → Editing → Bookmarks ). Note that this option corresponds to the def_top_bottom_push_bookmark configuration variable.


Commenting

SlickEdit® makes commenting your code easy. You can comment out selected text, or type the start characters for a new doc comment and have the doc comment skeleton automatically expanded. SlickEdit also makes your comments easier to read by automatically wrapping them as you type. Existing comments can be "reflowed" to match current comment wrap settings.

Commenting Blocks and Lines

Existing text in your code can be commented out (or uncommented) as follows:

  • To comment out a selected code block, from the main menu, click Document → Comment Block (or use the box command). This comments out the entire selection as a single block comment by surrounding the block with comment characters you have specified in your comment settings.

  • To comment out selected lines, from the main menu, click Document → Comment Lines (or use the comment command). Each line in the selection is commented out as a single line comment. If there is no selection, the current line is commented out. If using a block selection where there are partially selected lines, comment characters are placed at the beginning and end of the selection. If using a character selection where there are partially selected lines, comment characters are placed based on your settings. The comment characters that are placed to the left and right of the text are also specified in your comment settings.

  • To uncomment lines in a selection, from the main menu, click Document → Uncomment Line (or use the comment_erase command). Surrounding line comment characters are removed from the line. If there is no active selection, the current line will be uncommented. Uncomment Line only works for well-formed comments, which means that every line in the selection is commented and that the comment characters occur in the same column.

Whether you are creating a comment block or a comment line, if the selected text already contains comments, another set of comment characters is added. SlickEdit® attempts to preserve the indentation level of the code and any existing comments when adding or removing comment characters.

Comment Block and Line Settings

To specify the characters and other settings used for comment blocks and lines, from the main menu, click Document → Comment Setup (or use the comment_setup command). The Options dialog opens to the language-specific Comments screen for the current language. You can also open this screen by clicking Tools → Options → Languages → [Language Category] → [Language] → Comments .

The Comment block group box provides eight fields to specify the characters used in your commenting style. If you want to apply a comment with no additional decoration, fill in the upper-left and lower-right fields with the characters to begin and end a block comment. To draw a box around the comment, fill in additional characters in the other fields. For example, you might put an asterisk in each of the other fields to draw a box of asterisks around the block comment.

The Comment line group box contains fields for you to specify the characters to be inserted at left and right sides of a line comment.

For code examples and descriptions of the other available options, see Language-Specific Comment Options.

Doc Comments

Doc comments are specially formatted comments that are processed by tools that extract and present the information in a formatted manner. Doc comments follow a predefined structure, based on the programming language and the tool processing the comments.

SlickEdit® supports the most common doc comment formats (Javadoc, XMLdoc, and Doxygen). When you type the start characters for one of these comment formats and press Enter on a line directly above a function, class, or variable, SlickEdit can automatically insert a skeleton doc comment for that style.

Note

In C#, you do not need to press Enter, as the skeleton comment is inserted after you type the third slash.

To activate and configure automatic completion of doc comment skeletons, complete the following steps:

  1. From the main menu, click Document → Comment Setup (or use the comment_setup command). The Options dialog is displayed, open to the Comments option screen for the current language. You can also open this screen by clicking Tools → Options → Languages → [Language Category] → [Language] → Comments .

  2. In the Doc comments box, check the option Automatically expand doc comments.

  3. Click the Edit expansion button to configure the start characters and comment templates for the doc comment style you plan to use for the selected language. For comments formatted in Javadoc, select /**. For XMLdoc, select ///. For Doxygen, select /*! or //!.

  4. Optionally, click the Edit expansion button to view or edit the doc comment template that is inserted when you type the selected start characters. See Modifying Doc Comment Templates for more information.

  5. Click OK on the Options dialog.

Tip

If you modify a function signature, you can update the associated doc comment by running the update_doc_comment command from the SlickEdit command line.

Doc Comment Examples

Javadoc Format

To use the Javadoc commenting format for the selected language, select the start characters /** and use style @param. Check Insert leading *. Using the following code sample:

/**[CURSOR_HERE]*/
int setDimensions(int length, int width, int height) {
  ...
}

Pressing Enter at the "cursor here" location results in the following automatic completion:

/**
 * [CURSOR_HERE]
 *
 * @param length
 * @param width
 * @param height
 *
 * @return int
*/
int setDimensions(int length, int width, int height) {
  ...
}
XMLdoc Format

To use the XMLdoc comment format, select the start characters /// and the <param> style. Using the following code sample:

///[CURSOR_HERE]
int setDimensions(int length, int width, int height) {
  ...
}

Pressing Enter at the "cursor here" location results in the following automatic completion:

/// <summary>
/// [CURSOR_HERE]
/// </summary>
/// <param name="length"></param>
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns>int</returns>
int setDimensions(int length, int width, int height) {
  ...
}
Doxygen Format

To use a Doxygen comment format, select the start characters /*! or //! (based on your preference) and the \param style. Using the following code sample:

/*![CURSOR_HERE]*/
int setDimensions(int length, int width, int height) {
  ...
}

Pressing Enter at the "cursor here" location results in the following automatic completion:

/*!
 * [CURSOR_HERE]
 *
 * \param length
 * \param width
 * \param height
 *
 * \return int
 */
int setDimensions(int length, int width, int height) {
  ...
}

Modifying Doc Comment Templates

To modify a doc comment template, from the main menu, click Tools → Options → Languages , expand your language category and language, and click the Edit expansion button. The Doc Comment Editor dialog for the selected language opens. Click on the start characters for style of comments you want to use to view and edit the associated comment template.

The box on the left contains a list of doc comment start characters. The edit window on the right contains the expansion for the selected start characters. See Alias Escape Sequences for a list of special escape characters you can use inside doc comment templates, for example, to insert local function param names, types, and return types. See Doc Comment Examples for an example of each comment style.

Tip

You cannot add or delete doc comment templates using the Doc Comment Editor. You can, however, add a new doc comment expansion as a regular language-specific alias. See Creating a Language-Specific Alias for more information. All of the doc comment escape sequences will work as long as you expand the alias on a blank line above a function or class declaration.

String Editing

When the cursor is inside of a string, if you press Enter to split the line, SlickEdit® can automatically align the string with the original string as well as insert the closing and opening quotes and, if necessary, operators. To set this option, click Document → Comment Setup (comment_setup command). The Options dialog is displayed open to the Comments screen. Select the option Split strings on Enter.

Comment Wrapping

Comments can be set to automatically wrap to the next line as you type. This feature is available for C, C++, C#, Java, and Slick-C® files.

To activate comment wrapping, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Comment Wrap. Select the option Enable comment wrap, then select the type of comments you want wrapped (block comments, line comments, and/or doc comments).

The Comment Wrap screen also provides options to control how comments are wrapped. There are three types of width settings:

  • Fixed - Comments will be formatted to a specified width.

  • Automatic - Comments will be formatted according to the width of existing comments.

  • Fixed right margin - Lines will break before a specified number of columns has been reached.

For more details on comment wrapping configuration, see Language-Specific Comment Wrap Options.

Reflowing Comments

After configuring comment wrap settings, you can use the Reflow Comment dialog to reflow block comments, paragraphs, or a selection of the current file. To display this dialog, click Document → Reflow Comment . For more information on the available options, see Reflow Comment Dialog.


Code Annotations

Code Annotations Overview

Code Annotations provide a mechanism to store information about the code without actually modifying the code. Unlike code comments, code annotations are not stored in the source file but in an external file. The information you record is associated with a specific location in the code and can be viewed while you work on a source file.

You can use Code Annotations for recording various information, like comments about something that needs to be changed, tasks that need to be performed (see Using Code Annotations to Record Tasks), or comments in preparation for a code review (see Using Code Annotations for Code Reviews). Anything you can record in a code comment can be stored in a Code Annotation.

Because code annotations are not stored in the source code, you can use them to record private information you don't want to share with the rest of the team. Or you can use code annotations to record information that is shared with the team but should never be visible in the source code.

Annotation Types

Each annotation contains a set of data fields specific to that type of annotation. All annotations contain a set of default fields, including the author who created or last edited this annotation, and the date this annotation was last changed. Code annotations used for different purposes also include specific fields related to that purpose. For example, a task annotation will also have a due date and a field to record the person who has been assigned this task. A code review annotation will include a text field for the proposed resolution and a status field indicating whether this change was accepted or rejected.

SlickEdit® provides some predefined annotation types, but you can create your own by specifying the set of fields contained. For each field, you specify the name of the field, the type of the field, and the default value. When an annotation of that type is created, you are prompted for these values. See Managing Annotation Types for more information.

Purpose-Based Locations

When you create a code annotation, you specify where it is to be stored. You select the location based on the purpose of the annotation. The location can be one of these values:

  • Personal - These annotations are for your own use and not intended to be shared with others. Personal annotations are stored in your configuration directory. They are not specific to any workspace.

  • Workspace - Used to record information about files in the current workspace. The annotation file is stored in the same directory as your workspace file (.vpw) and uses the same base file name but with a different extension. These are intended to be shared with anyone else working in this workspace, so the annotation file should be checked into source control.

  • Project - Used to record information about files in a specific project. The annotation file is stored in the same directory as your project file (.vpj) and uses the same base file name but with a different extension These are intended to be shared with anyone else working on this project.

  • User-Defined - These annotations are stored in a file of your choice. These annotations cannot be readily shared since they store a full path to the referenced file. Unless two users have the same directory structure on their machines, the annotations will not be able to locate the referenced source files.

Workspace and Project annotations are very similar. If you don't create too many annotations, you could save all of your annotations as Workspace annotations. However, if you have projects that are shared between workspaces, you should use Project annotations so that the information is available regardless of which workspace you are using. If you create a lot of annotations, you may wish to use Project instead of Workspace so that you can view the list of annotations for a single project, providing a way to view a more manageable subset of annotations.

See Managing Annotation Files for more information.

Private and Shared Annotations

Code annotations can be private or shared. Annotations are shared by sharing the annotation file with other users. Like source files, annotation files are most easily shared using a version control system.

Only Workspace and Project annotations can be shared effectively. Because they refer to files in the workspace or project, the path to those files is stored relative to the workspace or project. Even if users have the same workspace in different directories, SlickEdit® will be able to locate the source files referenced by annotations. Personal annotations and User-Defined annotations are not sharable. They store a fully qualified path to the referenced file. Unless two people have the same directory hierarchy on their machines, SlickEdit will not be able to located the referenced source files.

Relocatable Code Marker

Code Annotations use a relocatable code marker to store the location within the source code. This allows SlickEdit® to find the new location if someone makes edits to the file externally, like editing the file with a different editor. The next time you open the file, SlickEdit checks the location of each code marker and verifies that it is still correct. If necessary, SlickEdit uses stored information to locate the correct line of code for this annotation. If the code has changed too much, SlickEdit may not be able to find the new location, and you will be prompted to find the new location yourself. This will only happen when the code near the code marker has been heavily edited.

Annotations Tool Window and File Manager

SlickEdit provides a Code Annotations tool window that lists all of the currently visible annotations. This tool window allows you to filter the set of visible annotations. The primary filter is by type. If annotations of more than one type are displayed, only the default fields common to all annotations are displayed in the annotation list. You can use the tool window to create, edit, and delete code annotations as well. See Managing Annotations for more information.

Code Annotations are stored in files, and they become visible when the annotation file is opened. SlickEdit automatically opens the annotations from your personal annotations file along with those from the workspace and project annotation files. You can use the Annotation File Manager to open any other annotation files you like. See Managing Annotation Files for more information.

Managing Annotations

The Code Annotations tool window provides a detailed view of annotations that you have created as well as operations for adding, modifying, copying, moving, and removing annotations. From this window, you can also manage annotation files and create your own annotation types.

To display the tool window, from the main menu click View → Tool Windows → Code Annotations , or use the annotations_browser command on the SlickEdit command line.

Creating Annotations

Creating a code annotation is similar to setting a bookmark or breakpoint. To create a new annotation:

  1. From within the editor window, position the cursor on the desired line of code.

  2. There are three methods for initiating a new annotation, after which the New Annotation dialog is displayed:

    • Right-click and select Create Code Annotation.

    • Click the Add [image] button on the Code Annotations tool window.

    • Use the new_annotation command on the SlickEdit® command line.

  3. On the New Annotation dialog, select an Annotation Type from the drop-down list.

  4. Select where the annotation is to be stored from the Annotation File drop-down list (see Managing Annotation Files), then click OK.

  5. SlickEdit displays a dialog with fields matching the selected annotation type. Some of the fields are common to all annotation types, while others are specific to the chosen annotation type. Some of the values, like author, creation date and time, and source file where the annotation marker is located, are presented read-only, since they cannot be changed. Each dialog also contains specific fields applicable to the annotation type:

    • Comment - The Comment Annotation dialog provides a box for typing a text comment.

    • Task - The Task Annotation dialog provides boxes for typing the name of the person this task is assigned to, the due date, and a description. Note that the Due Date field allows any text input.

    • Review Comment - The Review Comment Annotation dialog provides boxes for typing an issue, a resolution, and a status.

  6. After entering the annotation details, click OK.

Viewing Code Annotations

Annotations in your source code are indicated with a yellow Annotation bitmap [image] in the left margin of the editor window. Hover the mouse over a bitmap to see a preview of the annotations on that line.

The Code Annotations tool window is used to view and work with a list of your annotations and displays them in a table format, by default, in the order of last operation. Click on any column header to sort by that column. When you sort, an arrow on the column header shows the ascending or descending order. Drag the column size bars to resize columns to your desired width.

The Show Types area lets you choose what types of annotations to display in the tool window. Click and drag the separator bar to resize this area.

A preview pane, located on the right side of the tool window, shows the details of the selected annotation. This pane can also be resized by clicking and dragging the separator bar.

By default, the tool window view is set to show all annotations. To view only annotations of a specific type, select it in the Show Types list. Click (Show All) to display all annotations again. When (Show All) is selected, only the default fields common to all annotations are displayed in the annotation list.

Double-click on an annotation in the tool window to go to the location of the annotation in the source code. You can also select Go to Annotation from the right-click context menu, or use the show_annotation_source command on the SlickEdit® command line. Note that this command only works from within the tool window.

Filtering Code Annotations

To filter the list of visible annotations, use the filter boxes at the top of the tool window. Use the Filter on Column drop-down list to select a column to filter by. When you select a column, the Filter Key drop-down list is populated with all of the entries for that column, and you can select the item that you want displayed. For example, to see all annotations that share the same author, select Author in the Filter on Column drop-down, then select the author's name from the Filter Key drop-down list.

Note

The columns listed in the Filter on Column drop-down list depend on the annotation types selected. If you have selected (Show All), then only the columns shared by all annotation types will be listed. If you don't see the column you want to filter by, then you may need to select a different annotation type.

Date Filters

Many Code Annotation types contain date information. For example, the Task type has a due date. It's useful to filter these annotations, say, to see which tasks are due this week.

To apply a date filter:

  1. Select a column with date information in the Filter on Column drop-down list.

  2. Select a filter to apply in the Filter Key drop-down list.

  3. If you don't see the filter you want, click on the filter [image] icon.

  4. SlickEdit displays the Active Date Filters for Code Annotations dialog. On this dialog you can select a filter to apply or create a new filter. You can select multiple filters to match annotations that match any of the matching conditions.

    Tip

    You can use the Import and Export buttons to share date filters with other SlickEdit users. SlickEdit will read/write the filter in XML format from/to the file you specify.

  5. To create a new date filter, click the Add button. SlickEdit Displays the Date Filter dialog.

    Select the Date Range tab to create a filter with a specified begin and end date, or use the Date Comparison tab to create a filter that matches a single date.

Copying and Moving Annotations

Copying

You can create a new annotation by copying an existing one. This is useful if you have similar lines of code that need to have similar annotations. From within the Code Annotations tool window, select the code annotation to copy, then click the Copybutton [image] . Alternatively, right-click on a selected annotation and select Copy. When you copy an annotation, your name is assigned as the author.

Moving

Click the Relocate button [image] on the tool window to move the selected annotation to the current line in the current file.

Alternatively, you can click and drag the yellow Annotation bitmap [image] in the editor window margin to the desired location. If the line contains multiple annotations, the first annotation is moved.

Note

You cannot move annotations between files. If the selected annotation is not located in the current file, the Relocate button on the tool window is unavailable.

Editing Annotations

SlickEdit® allows you to edit the data that was entered for existing annotations. You cannot change the original source file, author, date, or annotation file, but the data entry fields can be edited.

To edit an existing annotation, from within the Code Annotations tool window, select the annotation to edit then click the Editbutton [image] . You can also right-click in the tool window and select Edit or use the edit_annotation command on the SlickEdit command line. Note that this command will only work for an item selected in the tool window.

Deleting Annotations

To delete an annotation, from within the Code Annotations tool window, select the annotation to delete then click the Delete [image] button. You can also right-click and select Delete or use the delete_annotation command on the SlickEdit® command line. Note that this command will only work for an item selected in the tool window.

Managing Annotation Types

SlickEdit® provides several predefined annotation types: Comment, Task, and Review Comment. To define your own annotation types, from the Code Annotations tool window click the Annotation Types button [image] , or use the annotation_definitions command on the SlickEdit command line. The Annotation Types dialog is displayed.

Creating a new annotation type is similar to creating a form. First you define a name, then you define the fields. The name that you give the new type will be the title of the dialog that appears when you create a new annotation of that type. The fields that you define will be the fields that are available on the dialog.

To create a new annotation type:

  1. In the Types area, click the green Plusbutton.

  2. Type a name for your new annotation type.

  3. In the Fields area, click the green Plusbutton.

  4. From the Field Type drop-down list, choose the type of control you want to use, then click OK.

  5. The third area on the Annotation Types dialog is now populated with the Field Type that you just added. Click the green Plusbutton in this area to define values for the control.

  6. Repeat Steps 3 through 5 to add more fields to your new type. Use the Up/Down arrows to control the order in which the fields should appear on the form.

  7. Repeat these steps to define additional types.

  8. Click OK on the Annotation Types dialog when finished.

Now, when you create a new code annotation, you can use the newly defined type(s) that will be displayed in the Annotation Type drop-down list on the New Annotation dialog.

To delete the selected type or a field, click the red X button next to the Types or Fields area.

Handling Annotation Type Conflicts

Every annotation file contains the annotation type definitions for the annotations it contains. If a user modifies the type definition for an annotation, it will conflict with the type definition for annotations in other files. All annotation types by the same name must have the same definition. SlickEdit® detects any discrepancies between types and tries to rectify them.

When two conflicting types are found, SlickEdit prompts you for which definition to use. Once you have selected the master type, SlickEdit attempts to correct annotations that matched the other type. The resolution depends on the category of the change:

  1. Field added - The new master type contains a field not present in the other version of this annotation type. SlickEdit will add the new field to all annotations of that type the next time they are saved.

  2. Field deleted - The new master type is missing a field that is present in the other version of this annotation type. SlickEdit will delete that field from all annotations of that type the next time they are saved. This will result in the data in that field being lost.

  3. Field modified - The new master type contains a field by the same name as a field in the other annotation type but the definition of the two fields differ. SlickEdit will attempt to coerce the data from the one type to the other. Since all data is stored as text, this will work in many cases. In some cases this will result in data loss. For example, if data is coerced from a text type to a discrete type (like Dropdown, List, or Checkbox), data will be lost if the text value doesn't match one of the predefined values for this control.

This system for resolving conflicts in Annotation Types does not allow you to merge two sets of changes to the same type. For example, if two users both add a field to the same type, one of them will be lost. Because of this, changes to annotation types should be made in a deliberate, planned manner and rolled out to the team in a way that avoids this issue. When a shared annotation type needs to be changed, have one person make that change and distribute a document with that type. The rest of the team can update their annotation files by opening that document while other documents are open. Remember, there is no centralized repository for annotation types, so conflict resolution is only performed on the set of open documents. To update multiple workspaces, you will have to open each workspace and then open the document containing the changed type.

To avoid conflicts in your personal annotation types, you may want to create your own types. Conflict resolution is performed using the name of the annotation type to uniquely identify a type. If the types you use in your personal annotations have their own, unique names then you can avoid conflicts with annotation types in other documents.

Managing Annotation Files

Code annotations are stored in files with a .sca extension. There are four types of locations for these files, based on the purpose of the annotation: Personal, Workspace, Project, and User-Defined. Each of these are "aliases" that correspond to a path on your computer where the annotation file is stored. You specify the location when you create new code annotations by selecting from the Annotation File drop-down list on the New Annotation dialog.

Personal Annotations

Personal annotations are for your own private use and are not specific to any workspace or project. They are stored in the personal.sca file located in your configuration directory.

Workspace Annotations

Workspace annotations are used to record information about files in the current workspace. They are intended to be shared with others using the same workspace, so you can check the annotation file into source control. These annotations are stored in a .sca file located in the same directory as your workspace file (.vpw). The base file name is the same as your workspace base file name, except it is appended with "_workspace". For example, if your workspace is named Diff.vpw, your Workspace annotations are stored in Diff_workspace.sca in the same directory.

Project Annotations

Project annotations are used to record information about files in projects. They are also intended to be shared with others using the same project, and can be checked into source control. Project annotations are stored in a .sca file located in the same directory as your project file (.vpj). The base file name is the same as your project base file name, except it is appended with "_project". For example, if your project is named Diff.vpj, your Project annotations are stored in Diff_project.sca.

User-Defined Annotations

User-defined annotations are stored in a file of your choice, and can be kept private or you can share them if you want. You will need to specify a location path for user-defined annotations prior to creating new annotations for this location type. This is done through the Annotation File Manager.

Annotation File Manager

You can view annotation file information and add, open, or close user-defined annotation files by using the Annotation File Manager. It can be accessed from the Code Annotations tool window by clicking the Annotation Files [image] button.

The top of the dialog contains a list of all annotation files that are currently open, showing the alias, the name of the file, and the location path. Click on any column header to sort by that column. An arrow in the header indicates the ascending or descending sort order. Click and drag to resize any column. You can also click and drag the horizontal separator bar to resize the entire Annotation Files area.

Personal, Workspace, and Project annotation files are always open and displayed. User-defined annotation files are also displayed if you have created them and they are open.

Use the buttons on the Annotation File Manager to perform the following operations on User-defined annotations:

  • Click the New Annotation File button [image] to create a new User-Defined annotation file. The New dialog is displayed where you can specify the name and path of the new file.

  • Click the Open Annotation File button [image] to open the selected User-Defined annotation file. The Open dialog is displayed where you can specify an annotation file to open (note that annotation files have the extension .sca).

  • Click the Close Annotation File button [image] to close the selected User-Defined annotation file. Closing an annotation file removes its associated types from the list when creating new annotations, and also removes the margin indicators for the associated annotations. This is useful to prevent cluttering, should the annotation file have many types or many annotations.

The bottom of the Annotation File Manager contains details about the selected file. The Annotation File Comments area shows a tree view of the annotation types and the specific annotations that are contained in the file. Click and drag the separator bar to resize this area. When you select a task or annotation in this list, details are shown on the right. If a task type is selected, the dialog displays the fields and details for that type. If an annotation is selected, the dialog displays the contents of that annotation.

The Version Info area displays the version information for the selected type or annotation, include the original author, date of creation, version number, and the author and date of the last edit, if applicable.

Using Code Annotations to Record Tasks

Code annotations provide a convenient mechanism to record tasks associated with specific locations in the code. You can use Personal annotations to record your own tasks, or use shared annotations to assign tasks to another team member.

SlickEdit® includes an Annotation Type for tasks, called Task. Along with the standard fields, it adds three additional fields: Assigned To, Due Date, and Description. Follow the instructions in Creating Annotations to create a new task annotation, and select the Task annotation type.

If this is a personal task, select (Personal Annotations) for the location value. If this task is for another team member or you want others to see this task, select (Workspace Annotations) or (Project Annotations) for the location. See Managing Annotation Files for more information about annotation file locations.

Using Code Annotations for Code Reviews

Code Reviews provide an excellent use for Code Annotations. In a typical code review process, code is reviewed by a number of team members, who record issues and forward their comments to a review coordinator. During the review, the comments are discussed and a resolution is recorded.

SlickEdit® includes an Annotation Type for code reviews, called Review Comment. Along with the standard fields, it also includes Issue, Resolution, and Status. If your review process requires a different set of fields, refer to Managing Annotation Types for information on how to create your own.

There are many ways to implement a code review using SlickEdit and Code Annotations. We will describe one approach that should be the easiest. You may find other methods that work best with your processes.

Prior to the review, the review coordinator creates a Workspace in SlickEdit for the files to be reviewed. Copy those files to the Workspace directory and then add the files to the Workspace. If you have modified the stock definition of the Review Comment, you can make sure that everyone is using the same definition by creating a Workspace Annotation using that definition. You might put one on the first line of code with instructions for how to perform the review.

Send a copy of this workspace to each of the reviewers. This can be done by compressing the directory into a ZIP, TAR, or other archive file. Each reviewer then reviews the code and records their comments using the Review Comment annotation type as a Workspace annotation. When they are finished, they send the Workspace's .sca file back to the review coordinator.

The review coordinator will merge the .sca files together to produce a single workspace annotation file. Since these are XML files, they are easy to read and merge using many different tools. The consolidated annotation file is used for the review walkthrough. You can also accomplish the sharing and merging with most source control tools. Many provide automatic merging capabilities that will add the inserted lines into the master file. You'll have to test your system to make sure that the merges it performs are safe. If not, you can use SlickEdit's DIFFzilla® to compare and merge the files.

During the review meeting, the review coordinator opens the single, merged document and then walks through the issues by double-clicking on each in the Code Annotation tool window. The review team discusses the recorded comment, and appropriate resolution remarks and status are recorded for each.


Message List

Message List is a feature that shows output messages from processes running in SlickEdit®, such as build warnings and errors.

Messages are automatically displayed in the Message List tool window, docked in the bottom tab group of the editor by default. The tool window shows messages in tabular format, with columns for the message type (warning, error, etc.), source file and line number associated with the message, a description, the message origin (Build, Java Live Errors, XML validation, etc.), and the date. Messages can be filtered and sorted. You can clear the tool window of all messages, or clear only messages with a certain creator or type.

Messages are associated with a location in the code. When the cursor is on a line with an error or warning in the source code, the corresponding message in the Message List is highlighted. You can also navigate to the message in the source code from within the Message List by double-clicking on it (or right-click on a selected message and click Go to code location).

Processes That Use Message List

The following processes originate messages that are automatically displayed in the Message List:

  • Build operations (such as Build → Compile or Build → Build ) show Warning and Error messages. See Working with Build Errors for more information.

  • Java Live Errors, when it is enabled, shows Caution and Error messages. See Java Live Errors for more information.

  • XML validation shows Error messages. SlickEdit® automatically validates XML files that you open in the editor. You can force a validation check at any time with the xml_validate command.

Message List Tool Window

The Message List tool window is docked to the bottom tab group of the editor by default. Display of the tool window can be toggled on/off by clicking View → Tool Windows → Message List or by using the toggle_messages command. To display the tool window on demand, use the activate_messages command.

Messages are shown in tabular format with the information divided into columns. Click on a column header to sort by that column in ascending order, or click again to sort in descending order. An arrow in the column header indicates the ascending or descending sort order. Drag the column separators to resize columns.

The columns are:

  • Indicator - The first column in the Message List window shows the icon that corresponds to the message in the code. The same icon is used in editor window margins to indicate lines that contain messages. This column can also be used as a type of "To Do" checklist. Click inside a cell in this column to place a checkmark next to the message, and click again to clear it. This could be useful if you just want to change the state of a message, rather than removing the message.

  • Type - This column shows the type of message, such as Error, Warning, etc.

  • Source File - Messages are associated with a location in the code. This column shows the complete path to the source file containing the message. As you resize this column, the path is elided to keep the file name visible.

  • Line Number - Shows the line number containing the message.

  • Description - The text of the message.

  • Creator - The Creator is the process that originated the message, such as Build, Java Live Errors, XML validation, etc.

  • Date - This column contains the date and timestamp showing exactly when the message was generated. This could be useful if a process is lengthy, to see the order in which messages were generated.

As you move the mouse over messages the Message List window, a tool tip shows the message detail. You can also see a preview of the location of the message in the source code in the Preview Tool Window, assuming it is docked so that both are visible, by single-clicking on a message in the Message List.

When the cursor is on an error or warning in the source code, the corresponding message in the Message List is highlighted. Double-click on a message in the Message List and the cursor moves to that message in the source code (or select the message and choose Go to Message from the right-click context menu).

For messages originating from Build processes, the Build tool window shows Build output for a selected message when you choose Go to Build Output from the right-click context menu.

Filtering and Removing Messages

Use the Creator and Type drop-down boxes at the top of the tool window to filter the Message List to only show messages with the selected Creator and/or Type. The default value for both is (show all).

The Clear button is used to remove all visible messages from the Message List. Clicking Clear also resets the filters to (show all), displaying all messages except for the ones you just cleared. The messages do not appear again until/unless the originating operation regenerates them.

Remove selected messages in the Message List by choosing Delete from the right-click context menu.


Beautifying Code

Code Beautifiers

Code beautifiers, available for many languages, reformat the layout of existing text based on settings that you specify, such as begin/end styles and indenting.

To beautify selected lines of code, or to beautify the entire buffer, from the main menu, click Tools → Beautify (or use the gui_beautify command). A dialog box is displayed with functions specific to the type of project that is active. If an HTML project is active, then the HTML Beautifier dialog appears with options. If a GNU C/C++ project is active, then the C/C++ Beautifier dialog opens, and so on. Beautifying is supported for the languages listed below. Follow the cross-reference links to learn more about working with each beautifier.

  • Ada - See Ada Beautifier.

  • C/C++, C#, Java, JavaScript, Slick-C® - These beautifiers contain the same options and settings. See C/C++ Beautifier.

  • CFML, HTML - These beautifiers contain the same options and settings. See HTML Beautifier.

  • Javadoc - See Javadoc Beautifier Options Dialog.

  • XML, XSD - These beautifiers contain the same options and settings. See XML Beautifier .

Reflowing Text

To reflow text in the current paragraph according to your margin settings, click Document → Format Paragraph or use the reflow_paragraph command. Margin settings are defined on the language-specific Word Wrap options screen (see Language-Specific Word Wrap Options).

When you reflow a paragraph, the cursor will be kept at the same location within the current paragraph after reflow has occurred, unless the Reflow next option is changed (Tools → Options → Editing → General ). If Reflow next is set to Cursor on next paragraph, the reflow_paragraph command places the cursor on the next paragraph after it has reformatted the current paragraph.

Comments can also be reflowed according to the comment wrap settings. See Reflowing Comments for more information.


Quick Refactoring

Refactoring is a code editing technique used to "clean up" and improve the understandability of source code without affecting the code's external behavior. Quick Refactoring is a feature set that provides several fast and easy-to-use refactoring methods:

  • Quick Rename ® Rename a symbol under the cursor or any symbol selected in the Defs or Symbols tool windows.

  • Quick Extract Method ® Create a new method using currently selected lines as the body and any undeclared variables as parameters.

  • Quick Modify Parameter List ® Use to add, delete, and re-order parameters for a selected function.

  • Quick Replace Literal with Constant ® Replace a selected literal with a constant.

Quick Refactoring performs refactorings using Context Tagging rather than a formal language parser. Quick Refactorings are supported for C++, C#, Java, and Slick-C®.

Available Refactorings

To access Quick Refactoring, from the main menu, click Tools → Quick Refactoring . Quick Refactoring menu can also be accessed from the right-click context menus in the Symbols and Defs tool windows.

Tip

Refactoring operations can modify more than one file. You can undo all of the refactoring modifications in one step by clicking Edit → Undo Refactoring .

Quick Rename

Quick Rename uses the Context Tagging® to rename a symbol under the cursor or any symbol selected in the Defs or Symbols tool windows. This operation works for all tagged languages. Quick Rename does not treat renaming classes, constructors, and destructors as a special case. Quick Rename will rename all of the overloads of a function. Quick Rename does not rename overridden methods (in parent and child classes).

Quick Extract Method

After selecting a set of lines, Quick Extract Method creates a new method with the selected lines as the body. It discovers any undeclared variables and creates them as parameters to the new method. The extracted method is created in the same scope as the original method.

Quick Modify Parameter List

This refactoring allows you to add, delete, and re-order parameters for a selected function. The refactoring will modify the parameter list for the selected function and all of its counterparts within the class hierarchy.

Quick Replace Literal with Constant

Replaces the selected literal with a constant, replacing use of the literal with the new constant.

Reviewing Refactoring Changes

When a refactoring finishes, the Refactoring results dialog box is displayed, allowing you to review the changes.

There are three panes in this window:

  • The left pane is read-only and shows the original file(s).

  • The right pane shows the refactored file(s). For convenience, this pane can be edited.

  • The bottom pane lists all files that have been modified by the refactoring. Clicking on any file in this list brings that file into view, where it can be reviewed and edited.

Click Save All at the bottom of this window to save all the refactoring and editing changes that were made on all files. Click Cancel to discard changes and have all files remain the way they were before the refactoring process.

Click Next Diffor Prev Diffto advance to the next or previous change made by the refactoring. Click File>> to restore the contents of the current selected file to its original contents.

Click Block>> to restore an entire block of changes to the original contents. Click Del Block to remove a block of code inserted by the refactoring. Click Line>> to restore the current line to its original contents.

Some refactorings, in particular Quick Modify Parameter List, may require further user input. In this case each input will be displayed under the file it is in, and there will be two additional buttons: Next Input and Prev Input. You will not be able to save the refactoring results until you have resolved all of the input requests.


Chapter 9. Language-Specific Editing

This chapter contains the following topics:

  • Introduction to Language-Specific Editing

  • Ada

  • Ant

  • C and C++

  • COBOL

  • Java

  • Pascal

  • PL/I

  • Python

  • XML and HTML

Introduction to Language-Specific Editing

Many features in SlickEdit® are language-specific and based on the language editing mode. You can also configure different settings for different languages. See Language-Specific Options and Language Editing Mode below for more information.

Language-Specific Options

Options for language-specific features can be set through the Options dialog (Tools → Options or config command) by using the Languages → [Language Category] → [Language] categories. A shortcut method to access language options for the current buffer is to use the Document → [Language] → Options menu item, or the setupext command. This will open the Options dialog to the General language-specific option screen for that language. See Language Options for more information.

Language Editing Mode

SlickEdit® uses the extension of the current file to determine what language you are using, thereby only making available the options and features that are possible in that language.

Manually Setting the Language Mode

If you have a file with a non-standard extension or no extension at all, you will need to manually specify the language editing mode. To specify a mode, from the main menu click Document → Select Mode (or use the select_mode command). The Select Mode dialog is displayed with a list of modes from which to select.

Managing Languages

Supported languages are listed in the Language Manager (Tools → Options → Languages → Language Manager ). You can use this tool to add languages and delete languages you have added.

Installed languages are denoted in the list with a SlickEdit bitmap. Use the filter box at the top of the language list to search the list incrementally as you type. Use the Add Language and Delete Language buttons to add and remove languages (see Adding and Removing Languages below). Click Settings to jump to the Language-Specific General Options screen for the selected language.

Adding and Removing Languages

To add a language, complete the following steps:

  1. Click Add Language on the Language Manager screen. The Add New Language dialog is displayed.

  2. In the Mode name field, type a name for the new language (for example, C/C++, Java, etc.).

  3. In the Associated extensions field, type the file extension(s) associated with this language. Separate each extension with a space, and do not include the dot character (for example: chcccp). The extensions you list here, if not already defined, are added to the File Extensions list on the File Extension Manager. If you specify an extension that already exists and is associated with another language, a confirmation prompt is displayed.

    Tip

    To see a list of file extensions that are associated with a language, see the language-specific General options page (Tools → Options → Languages → [Language Category] → [Language] → General ).

  4. In the Color coding lexer name field, specify the language identifier so that SlickEdit® knows what elements to color. Use the drop-down list to select the lexer.

  5. If you wish to copy settings from an existing language, check the Copy settings from checkbox and select the language from the combo box. Then check any boxes that correspond to settings you wish to copy from the selected language to your new language. These options are organized by their respective nodes in the options dialog. For more information, see Language Options.

  6. Click Add Language. The new language will be displayed in the Languages list as well as the list of document language modes on the Select Mode dialog (Document → Select Mode ).

To delete a language you have added, select it in the Language list and click Delete Language. Installed languages cannot be deleted.

Managing File Extensions

The File Extension Manager (Tools → Options → Languages → File Extension Manager ) is used to add and work with file extensions in SlickEdit®.

Recognized file extensions are listed in the File Extensions list. See Adding and Removing File Extensions for more information.

The settings on the File Extension Manager screen are described as follows:

  • Associate with language - This drop-down shows the language that is associated with the selected file extension. Associations are created when you add a new language using the Language Manager. You can use this field to change the language association.

  • Language Setup - Click this button to jump to the language-specific General options screen, which shows a list of file extensions associated with the selected language and provides general language-specific options.

  • Encoding - Each extension can have its own encoding specification. Both the language-specific and global option settings are overridden if an encoding is previously specified in the Open dialog box. The encoding used to override default encoding settings is recorded and this setting is used the next time the same file is opened. This provides per-file encoding support. If the extension-specific encoding is set to Default, then the global setting defined on the Load File Options screen (Tools → Options → File Options → Load ) is used. Note that Unicode support is required to work with encodings. For more information about working with encodings and Unicode, see Encoding.

  • Open Application and Use file association - These options are mutually exclusive. Open Application is used to specify the application in which to open files when you use the Projects tool window to open them. Use the arrow to the right of this field to insert escape sequences that are used as arguments. On Windows, if the option Use file association is selected, the association specified in your operating system is used instead, overriding Open Application. When Use file association is selected, SlickEdit checks the Windows registry for the application associated with the selected file extension and invokes that application to display the file, rather than the one specified by Open Application. Note that Use file association is a Windows-only option. To open a selected file from the Projects tool window, double-click on it or right-click and select Open from the context menu.

Adding and Removing File Extensions

If SlickEdit® does not provide a file extension that you need to use, you can add it. If you have added a new language to SlickEdit with a file extension that was not already defined, the new extension is added to the File Extension list automatically. Or you can just add a new extension by clicking New, and the New Extension dialog is displayed.

Enter the new file extension in the Extension box (without the dot character), then select the associated language from the Language drop-down list and click OK. If the language does not exist, cancel this dialog and add it using the Language Manager first (see Adding and Removing Languages).

To delete the selected extension from the File Extensions list, click Delete.

Managing Extensionless Files

When you open a file within the application, the extension is used to determine which language mode should be associated with the file. You can also use the Extensionless File Manager to associate languages to files that do not have extensions. There are two mechanisms used to map files to languages: file mapping and pattern mapping. Each type has its own list of mappings in the Extensionless File Manager, which can be accessed by going to Tools → Options → Languages → Extensionless File Manager and is seen below.

File Mapping

If you wish to select a specific file and map it to a language, add it to the Files list. Use the Add button next to the Files list to add a file mapping. Select your file and language and click OK.

Now that file is treated as a file of the language you specify. You can edit or delete a file mapping using the appropriate buttons.

Pattern Mapping

You can also specify mappings for files that match a certain pattern. For instance, if you want all files that are named "foo" or all files located in “C:\bar\” to be mapped to a specific language, you can set up a pattern mapping.

To create a pattern map that matches a filename, click the Add filename button. You can select a file using the ... button or you can simply type in a filename. You can use * as a wildcard in the filename. Select the language you want. When you click OK, the filename pattern will be added to the list. Notice that the filename will be translated into an Ant pattern that will match any file in any directory with that name.

To create a pattern map that matches a directory, click the Add path button. Select a path using the ... button or type one in. Use the Recursive checkbox to specify if you want all files below that directory or only files directly under it. Select the language you want and click OK. When the item is added to the list, it will be translated into an Ant pattern that matches files under that directory.

If you wish to create a more complex pattern than a simple filename or path match, use the Add pattern button. You can enter your own Ant pattern and map it to a language.

The mappings in the Patterns list can be re-ordered. When an extensionless file is encountered, the top mapping is checked first. If the file matches the pattern, then the associated language is used. If not, then the second pattern is checked. Each pattern is tested against the file until a match is found. Use the Move up and Move down buttons to reorder the patterns in order of desired precedence. Use the Edit and Delete buttons to do the respective actions.


Ada

This section describes some of the features and options that are available for Ada, including language-specific options and the Ada Beautifier.

Ada Formatting Options

An option to set keyword casing is available for Ada. To access it, from the main menu, click Tools → Options → Languages , expand Application Languages > Ada, then click Ada Formatting Options.

Note

Languages similar to Ada may have similar Formatting Options screens that are not specifically documented.

The Keyword case option specifies the case of keywords used by Syntax Expansion. For example, when you type the word "procedure" and the Keyword case is set to Upper case, the editor changes "procedure" to "PROCEDURE". The hyperlink indicates if Adaptive Formatting is on or off for this setting.

Ada Beautifier

You can beautify Ada files and change the beautify settings by using the Ada Beautifier dialog box. This dialog box can be accessed from the main menu by clicking Tools → Beautify , or by using the gui_beautify command.

To instantly beautify Ada code according to the settings that are selected on the Ada Beautifier dialog box, use the ada_beautify or ada_beautify_selection commands.

The following settings and operations are available on the Ada Beautifier:

  • Restrict to selection - When checked, only lines in the selection are beautified.

  • Sync extension options - When checked, the language 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 the uformat.ini file. These settings are used by the ada_beautify command.

The tabs on the Ada Beautifier are described in the sections below.

Indent Tab

The following settings are available:

  • Indent with tabs - When checked, tab characters are used for leading indent of lines. This value defaults to the Tabs text box on the language-specific Indent options screen (see Language-Specific Indent Options).

  • Indent for each level (Syntax indent) - The amount to indent for each new nesting level. The words "Syntax indent" are in parenthesis to help indicate that this field has the same meaning as the Syntax indent text box on the language-specific Indent options screen (see Language-Specific Indent Options). By default, this text box is initialized with the current language setup setting.

  • Tab size - Specifies output tab size. The output tab size is only used if the Indent with tabs check box is enabled on the language-specific Indent options screen (see Language-Specific Indent Options). This value defaults to the Syntax indent text box on the options screen.

  • Original tab size - Specifies what the original file's tab expansion size was. It is necessary 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 file's indenting for comments. This option has no effect if the original file has no tab characters.

  • Continued Lines

    • Max line length - Specifies the maximum length a statement line can be before it is wrapped to a new line. Set this value to 0 to preserve line breaks.

    • Continuation indent - Specifies how much to indent lines of statements which continue to the next line. This has no affect 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.

  • Operator position - Specify where the operator should be positioned when breaking a statement across multiple lines. For example, given the statement:

    Seconds := Days * Hours_Per_Day * Minutes_Per_Hour * Seconds_Per_Minute ;

    An operator position setting of End of same line would result in:

    Seconds := Days *
Hours_Per_Day *
Minutes_Per_Hour *
Seconds_Per_Minute ;

    An operator position setting of Beginning of next line would result in:

    Seconds := Days
* Hours_Per_Day
* Minutes_Per_Hour
* Seconds_Per_Minute ;

Statements/Declarations Tab

The following options are available on the Statements/Declarations tab:

  • Reserved word case - Specifies the case for reserved words. For example, if you choose UPPER, then the Ada reserved word "procedure" would be beautified to "PROCEDURE".

  • One statement per line - When checked, only one statement is allowed per line of code.

  • One declaration per line - When checked, only one declaration is allowed per line of code.

  • One parameter per line - When checked, only one parameter is allowed per line of code in a formal parameter list of a subprogram specification.

  • One enumeration per line - When checked, only one enumeration is allowed per line of code in an enumerated type definition.

Horizontal Spacing Tab

This tab allows you to specify how certain operators and separators are padded. The following options are available:

  • Item - Syntactic item to which padding settings get applied.

Note

The "Binary operators" item includes: + - * / ** := = /= => <= >= < >

  • Padding Before - When checked, one space is placed before the item.

  • Padding After - When checked, one space is placed after the item.

  • Padding Preserve - When checked, the original padding (or lack of padding) around the item is preserved.

Vertical Alignment Tab

The following options are available on the Vertical Alignment tab:

  • Align on declaration colon - When checked, adjacent declaration lines (including parameter specifications) have their colons vertically aligned. For example, before beautify:

    procedure foo ( A_Var : Boolean ;
   Another_Var : Boolean) ;

    After beautify:

    procedure foo ( A_Var       : Boolean ;
                Another_Var : Boolean ) ;

  • Align on declaration in-out - When checked, the modes of parameter specifications in the formal part of a subprogram declaration are vertically aligned. For example, before beautify:

    procedure foo ( A_Var : in Boolean ;
   Another_Var : in out Boolean);

    After beautify:

    procedure foo ( A_Var       : in     Boolean ;
                Another_Var : in out Boolean ) ;

Blank Lines Tab

The following options are available on the Blank Lines tab:

  • Item - Syntactic item to which blank lines settings get applied.

    • Subprogram declaration - Procedure or Function declaration.

    • Subprogram body - Procedure or Function body.

    • Type declaration - Any declaration that begins with the reserved word "TYPE".

    • for-use - Aspect clause. For example:

      for Medium Size use 2*Byte;

    • Subunit comment header - The comment block that appears just before a subunit (e.g. Procedure body, etc.).

    • begin/end - Any line that starts with the reserved words "begin" or "end."

    • if/elsif/else - The if, elsif, and else parts of an if statement.

    • return - Any line that starts with the reserved word "return."

    • Loops - Loop statements (e.g. loop, while, for).

    • Nested paren list item - A parenthesized item that is itself enclosed in a larger parenthesized list. For example, before beautify:

      Default_Data : constant Data_Type :=
   ( A_Set => ( others => ( Item1 => false , Item2 => false , Item3 => false ) ) , -- Paren-d item enclosed in larger paren-d list
     B_Set => ( others => ( Item1 => false , Item2 => false , Item3 => false ) ) ) ;

      After beautify:

      Default_Data : constant Data_Type :=
   ( A_Set => ( others => ( Item1 => false ,
                            Item2 => false ,
                            Item3 => false ) ) , -- Paren-d item enclosed in larger paren-d list
     B_Set => ( others => ( Item1 => false ,
                            Item2 => false ,
                            Item3 => false ) ) ) ;

  • Before - Specify how many blank lines are inserted before item.

  • After - Specify how many blank lines are inserted after item.

  • Between - Specify how many blank lines are inserted between like items.

Comments Tab

The following options are available on the Comments tab:

  • Comment lines immediately below a type declaration indented by - The amount to indent a comment appearing immediately below a TYPE declaration.

  • Trailing comments - Trailing comments appear at the end of lines which contain statements or declarations. For example:

    A := B + C ;  -- This is a trailing comment
-- This is not a trailing comment
procedure foo ( A_Var : Boolean ) ;

    • Specific column - When selected, trailing comments are placed at the specified column.

    • Indent by - When selected, trailing comments are indented by the specified number of columns after the last character of the end of the statement or declaration.

    • Original relative indent - When selected, 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.

    • Force type declaration comments to next line - When selected, trailing comments appearing at the end of a TYPE declaration line are forced onto the next line.

Advanced Tab

The following options are available on the Advanced tab:

  • if-then-else continued lines - Use these advanced options to customize how multi-line conditional expressions of an if-then-else statement are indented.

    • Force a linebreak on logical operators - A line break is forced before/after (depending on your Operator position setting) every logical operator in the condition of an if/elseif. For example, before beautify:

      -- Indent per level = 3
-- Operator position = Beginning of next line

if A = B and C = D then
   null ;
end if ;

      After beautify:

      if A = B
   and C = D then
   null ;
end if ;

    • Additional indent for logical operator - Additional indent amount for a line broken on a logical operator. This amount is in addition to the current indent level. For example, before beautify (Indent per level = 3; Operator position = Beginning of next line; Additional indent for logical operator = 3):

      -- Indent per level = 3
-- Operator position = Beginning of next line
-- Additional indent for logical operator = 3

if A = B and C = D then
   null ;
end if ;

      After beautify:

      if A = B
      and C = D then
   null ;
end if ;

    • Additional indent for logical operator when followed by another line that begins with logical operator - Additional indent amount for a line broken on a logical operator that is followed by another line that also is broken on a logical operator that is different. This amount is in addition to the current indent level, and in addition to the Additional indent for logical operator setting.

      For example, before beautify (Indent per level = 3; Additional indent for logical operator = 3; Additional indent for logical operator when followed by another line that begins with different logical operator = 3):

      -- Indent per level = 3
-- Operator position = Beginning of next line
-- Additional indent for logical operator = 3
-- Additional indent for logical operator when
--   followed by another line that begins with different logical operator = 3

if A = B and then C = D or else E = F then
   null ;
end if ;

      After beautify:

      if A = B
         and then C = D
      or else E = F then
   null ;
end if ;

Schemes Tab

To define a new scheme, set the various beautify options then click the Save Scheme button. User-defined schemes are stored in uformat.ini.


Ant

This section describes some of the features and options that are available for Ant.

Ant Options

There are several settings which are specific to editing Ant files. These options can be configured by going to Tools → Options → Languages → XML/Text Languages → Ant → Options and are pictured below.

The following options are available:

  • Find targets imported from external build files - When set to True, SlickEdit will find targets imported into the selected file from other Ant files.

  • Use visibility to filter goto-definition matches - When set to True, Ant goto-definition match results will be filtered based on visibility.

  • Identify Ant files on open - When set to True, all XML files are parsed when opened to identify Ant build files.


C and C++

This section describes some of the advanced features and options that are available in SlickEdit® for C and C++, including language-specific formatting options, the C/C++ Beautifier, compiler settings, and preprocessing.

SlickEdit's default editing mode for C and C++ allows for programming in either language. If you are coding to strict ANSI C standards, you should configure the value of the macro variable def_ansic_exts to contain a space-delimited list of extensions for files you want interpreted as ANSI C. To set the macro variable, press Esc to bring up the SlickEdit command line, then type set-var def_ansic_exts "<extensions>", where <extensions> is the space-delimited list of extensions.

For example:

set-var def_ansic_exts "c h"

Please note that if you also code in C++ and any of these extensions are used for C++, they will be interpreted as ANSI C.

C/C++ Formatting Options

Options are available for C and C++ for changing Syntax Indent and Syntax Expansion styles. To access these options, from the main menu, click Tools → Options → Languages , expand Application Languages → C/C++ , then click C/C++ Formatting Options.

Note

Languages similar to C/C++ have similar Formatting Options screens that are not specifically documented.

The tabs on the C/C++ Formatting Options screen are described below.

Begin-End Style Tab

Use this tab to specify the brace style used by Syntax Indent and Syntax Expansion.

The top of the tab lets you choose the style you want to use (Style 1, Style 2, or Style 3). The hyperlink indicates if Adaptive Formatting is on or off for this setting. The remaining options are:

  • Insert braces immediately - When this option is selected, the template is inserted with braces.

  • Insert blank line between braces - When this option is selected, a blank line is inserted between the braces when a template expands with braces.

  • Insert function start brace on new line - When this option is selected, a function start brace is inserted after you press Enter to start a new line.

  • Apply to function braces - When this option is selected, your begin/end style is applied to braces for function definitions.

  • Quick brace/unbrace one line statements - Enables Quick Brace/Unbrace, features that allow you to convert a single line statement to a brace-enclosed block, and vice versa. See Quick Brace/Unbrace for more information.

  • Place "else" on same line as "}" - When this option is selected, SlickEdit® places the else keyword on the same line as }. This is typical when using brace Style 1. The following is an example of using Style 1 with an else clause:

    if (i<j) {
} else {
}

Indentation Tab

The Indentation tab is used to specify indenting options.

The following options are available:

  • Indent first level of code - When this option is selected, Syntax Indent indents the cursor after declarations such as functions.

  • Use continuation indent on function parameters - When this option is selected, function parameters always use the continuation indent.

    By default, we format multi-line function parameters as follows:

    myLongMethodName(firstarg,
                 secondarg,
                 thirdarg
                );
myLongMethodName(
    firstarg,
    secondarg,
    thirdarg
    );

    When this option is enabled, the format changes as follows:

    myLongMethodName(firstarg,
    secondarg,
    thirdarg
    );
myLongMethodName(
    firstarg,
    secondarg,
    thirdarg,
    );

  • Indent member access specifier - (C++ only) This option controls Syntax Indent for member access specifiers (public:, private:, and protected: keywords) in C++ classes/structs. The value of this option is controlled by the def_indent_member_access_specifier configuration variable (Macro → Set Macro Variable ). When the option is enabled, access specifiers are indented as follows:

    class Foo
{
public:
private:
protected:
    int value;
};

    When the option is disabled, access specifiers are aligned along the class, for example:

    class Foo
{
    public:
    private:
    protected:
          int value;
};

  • Indent CASE from SWITCH - When this option is selected, Syntax Expansion places the CASE statement indented from the SWITCH statement column. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • No space before parenthesis - When this option is selected, no space is placed between keywords (such as if, for, or while) and the open paren when Syntax Expansion occurs. For example, (if( or if (). The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Insert padding between parentheses - When this option is selected, a space is placed after the open paren and before the close paren, providing padding for the enclosed text. For example, if () becomes if ( ). The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Pointer style - Specify the pointer style you want to use.

Other Tab

The Other tab contains miscellaneous options.

The following options are available:

  • Main style - This option specifies the main function declaration template that is inserted. Select ANSI C/C++ if you want an old ANSI C main declaration inserted. You can define a template by using aliases, or you can write a replacement function for c_insert_main. The command find-proc c_insert_main will locate the macro source for this function.

  • List quoted include files after typeing #include - If this option is enabled, after you type "#include" followed by a space, the editor will insert a pair of matching quotes and list the header files in the current workspace for quick completion of an include file name. This option is off by default because it has no support for entering include files using the angle bracket syntax.

  • C/C++ Preprocessing - Click this button to customize the global preprocessing that is used when Context Tagging® creates tag files for C or C++. See C/C++ Preprocessing.

C/C++ Beautifier

To beautify a C or C++ document, open the file you want to beautify, then from the main menu, click Tools → Beautify (or use the gui_beautify command). The C/C++ Beautifier will be displayed, which allows you to make settings for how the code will be beautified.

You can use the commands c_beautify or c_beautify_selection to instantly beautify the file or the selection according to the settings on the Beautifier dialog.

Currently, this beautifier supports beautifying Slick-C® source if the statements are terminated with semicolons like C.

Note

The C#, Java, JavaScript, and Slick-C Beautifiers contain the same options and settings as the C/C++ Beautifier.

The following buttons and settings are available on the Beautifier:

  • 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.

  • Restrict to selection - When this option is selected, only lines in the selection are beautified.

  • Sync extension options - When this option is selected, the language 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.

The tabs on the C/C++ Beautifier are described in the sections below.

Begin-End Style Tab

The Begin-End Style tab of the C/C++ Beautifier is pictured below.

The following options and settings are available:

  • Do not change brace style - Select this option if you do not want your brace style changed. This is useful if you are using a brace style that is not supported by SlickEdit®.

  • No space before paren - Determines whether a space is placed between a keyword such asif, for, or while and the open paren.

  • else on same line as } - When this option is selected, the beautifier will place } else on the same line. This is typical when using brace Style 1. The following is an example of using Style 1 with an else clause:

    if (i<j) {
} else {
}

  • Apply to function braces - When this option is selected, the beautifier will apply your begin/end style to braces for function definition.

Indenting Tab

The Indenting tab of the C/C++ Beautifier, pictured below, provides indenting parameters that you can use when working with C/C++ files in SlickEdit®.

The following options and settings are available:

  • Indent with tabs - When this option is selected, tab characters are used for the leading indent of lines. This value defaults to the Tabs text box setting on the language-specific Indent options screen (see Language-Specific Indent Options).

  • Indent first level of code - Do not clear this check box. When this check box is selected, the first level of code inside a function or method definition is not indented.

  • Indent CASE from SWITCH - When this option is selected, the case and default statements found inside switch statements are indented from the switch.

  • Indent access specifier - When this option is selected, specifiers are indented under the class. When not selected, specifiers are aligned directly underneath the class.

  • 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 value as the Syntax indent text box on the language-specific Indent options screen (see Language-Specific Indent Options). By default, we initialize this text box with your current language setup setting.

  • Tab size - The value in this field specifies the output tab size. The output tab size is only used if the option Indent with tabs is enabled on the language-specific Indent options screen (see Language-Specific Indent Options). This value defaults to the Syntax indent text box on the Indent options screen.

  • Original tab size - The value in this field specifies the size of the original expansion tab. SlickEdit uses the 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 - The value in this field specifies how much to indent lines of statements that continue to the next line. This has no effect on assignment statements or parenthesized expressions. Lines that are a continuation of an assignment statement are indented after the first equal sign. Lines that are a continuation of a parenthesized expression are indented after the open paren. Given the following example:

    unsigned
int i;

    The result would be:

    unsigned
<Continuation Indent>int i;

  • Align on parens - When this option is selected, the text for parenthesized expressions that spans multiple lines is aligned on the first non-blank after the parenthesis or on the parenthesis itself.

  • Align on equal - When this option is selected, 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

The Comments tab on the C/C++ Beautifier, pictured below, contains options for setting the parameters that you want for the trailing comments.

The following options are available:

  • Indent stand alone comments - Indicates whether comments that appear on lines by themselves with no statement text to the left are indented to the current statement indent level. For example:

    /* 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. Select this option if you want the indent for these comments to be adjusted.

  • Specific column - This text box specifies the column in which trailing comments should be placed. Trailing comments are comments that appear at the end of lines that contain statements or declarations. For example:

    // another stand alone comment
/* stand alone
   comment
*/
i=1;   // trailing comment
if (x) {    /*  trailing
                comment.
            */
}

  • Original absolute column - When this option is selected, trailing comments are placed at the same column as the original source file. Trailing comments are comments that appear at the end of lines that contain statements or declarations.

  • Original relative column - When this option is selected, 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. Trailing comments are comments that are displayed at the end of lines that contain statements or declarations. For example, if the original code is as follows:

    if () {
i=1;<four characters>//trailing comment
i=4;<four characters>/* trailing
                        comment.
                     */
}

    The resulting code would be:

    if () {
   i=1;<four characters>//trailing comment
   i=4;<four characters>/* trailing
       <four characters>   comment.
       <four characters>*/
}

Other Tab

The Other tab on the C/C++ Beautifier, pictured below, contains the preprocessing and pad condition options.

The following options are available:

  • Indent preprocessing - When this option is selected, the indent before the # character of preprocessing is set to indicate the preprocessing nesting level.

  • Indent inside block - When this option is selected, 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 starts with the following lines of code:

    #ifndef myheader_h
#define myheader_h

#endif

    When this option is selected, preprocessing inside this special #ifndef case is indented.

  • Eat spaces after # - When this option is selected, 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 this option is selected, parentheses are added to return statements which do not have parentheses.

  • Pad condition - These options indicate if parenthesized conditional expressions should have their spacing adjusted.

Schemes Tab

The Schemes tab of the C/C++ Beautifier is pictured below.

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++ Compiler Settings

In order to correctly perform full preprocessing, parsing, symbol analysis, and cross-referencing, SlickEdit® needs to emulate the implementation-specific parsing behavior of your compiler, including built-in functions, preset #defines, and include directories.

These properties can be specified using the C/C++ Compiler Properties option screen or the C/C++ Compiler Properties dialog. The interfaces contain the same fields and options so you can make changes using the one you prefer:

  • From the main menu, click Tools → Options . In the tree, expand Languages → Application Languages → C/C++ , then select Compiler Properties.

  • With a C/C++ project open, from the main menu, click Project → Project Properties . Select the Compile/Link tab, then click the Ellipsis button to the right of the Compiler combo box. The C/C++ Properties dialog is displayed.

The interface shows the default compiler and its associated header file and include directories, known collectively as a "configuration". Configurations can be created and modified as needed.

In the Compiler Name drop-down list, select the compiler you wish to use. If this is to be the global default compiler for all projects, click the Set Default button.

Note

It is possible to select other compilers for individual projects. In those cases, the project-specific compiler is used and overrides the global default.

SlickEdit ships with header files for each compiler, and the correct header file will appear in the Header File field. The header file configures the parser to emulate the compiler that is chosen in the Compiler Name field.

Creating New Configurations

There are two ways to begin a new configuration. In both cases, a dialog box will be invoked, prompting for the name of the new configuration.

  • Click Copyto copy the selected compiler configuration. This can be used as a template for creating a new configuration and makes the process of creating similar configurations more convenient.

  • Or, click Add to create a configuration from scratch or to add a newly installed compiler.

If you wish to remove the selected compiler and associated configuration from the list, click Delete. This does not delete any files from disk.

Building the Tag File

The Build tag file button on the C/C++ Compiler Properties dialog is used to build tag files from the header file found in the include directories for the selected compiler configuration. This is especially useful when new configurations are created. If you do not build the tag file here manually, it will be built on demand.

C/C++ Preprocessing

Typically your source code base will include preprocessor macros that you use in your code for portability or convenience. For performance considerations, Context Tagging® does not do full preprocessing, so macros that interfere with normal C++ syntax can cause the parser to miss symbols. For example:

   MYNAMESPACEDECL(my)
   struct MYPACKEDMACRO BinaryTree {
      MYTYPELESS data;
      MYPOINTER(BinaryTree) next;
      MYPOINTER(BinaryTree) prev;
   };
   MYPOINTER(BinaryTree) proot = MYNULL;
   MYENDNAMESPACE

This example uses the following preprocessor macros:

   #define MYNAMESPACEDECL(name)  namespace name {
   #define MYPACKEDMACRO          __packed
   #define MTYPELESS              void*
   #define MYPOINTER(t)           t*
   #define MYNULL                 ((void*)0)
   #define MYENDNAMESPACE         }

Among them, the only two that are harmless are MYTYPELESS and MYNULL, because they just create name aliases for types or constants. However, the other four are troublesome and cause the entire code snippet to be unparsable unless you configure SlickEdit® to be aware of these preprocessor macros. To do so, complete the following steps:

  1. From the main menu, click Tools → Options → Languages and expand the Application Languages node in the tree.

  2. Depending on your language, select ANSI-C or C/C++ in the tree, then click C/C++ Preprocessing.

  3. Click New to add new preprocessing macros. Arguments are allowed; for example, mymacro(a,b,c)

  4. When finished, click OK.

  5. A prompt appears asking whether to rebuild your workspace tag file. Click Yes.

Preprocessor macros are stored in usercpp.h, located in your configuration directory. Rather than using the dialog, you can add large numbers of #defines directly to this file. You may want to make sure that your entire development team has an up-to-date copy of this configuration file once you have added all of your local preprocessor macros.

Note

The usercpp.h file should only be used for #defines and #undefs® not #includes.


COBOL

This section describes some of the advanced options that are available for COBOL.

COBOL Formatting Options

Options are available for COBOL for changing Syntax Indent and Syntax Expansion styles. To access these options, from the main menu, click Tools → Options → Languages , expand Mainframe Languages > Cobol, then click Cobol Formatting Options.

Note

Languages similar to COBOL may have similar Formatting Options screens that are not specifically documented.

The following options are available:

  • Keyword case - Specifies the case of keywords used by Syntax Expansion. If Auto case keywords is selected, the case of keywords are changed to the keyword case specified when you type them. For example, when you type the word "procedure" and the Keyword case is set to Upper case, the editor changes "procedure" to "PROCEDURE". The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Syntax - Select the type of syntax to use. COBOL 74 and COBOL 2000 syntax are mutually exclusive options.

  • Embedded SQL Dialect - Specifies the specific type of SQL that is embedded in your COBOL source. This affects embedded SQL-language color coding.

  • Line Numbering - Choose the line numbering style from the following options:

    • COBOL style line numbering - When selected, expect line numbers in columns one through six when renumbering lines.

    • SPF style line numbering - When selected, expect line numbers in columns 73 through 80 when renumbering lines.


Java

SlickEdit® provides a full-featured Java development environment, allowing you to edit, build, and debug Java programs. Topics in this section:

  • Initial Setup - Read this to configure SlickEdit for your JDK and other settings needed for compiling and debugging.

  • Java-Specific Features - Information about features designed specifically for Java programmers.

  • Java-Specific Interfaces - Detailed descriptions of dialogs, tool windows, and option screens specific to Java programming.

Initial Setup

SlickEdit® relies on an installed Java Development Kit (JDK) for compiling and debugging. After you have installed the JDK on your computer, the following steps will configure SlickEdit to use it. The steps are divided into three categories:

  • Context Tagging® for Java

  • Setting Up a Java Workspace and Project

  • Configuring Java Build and Runtime Options

Context Tagging® for Java

SlickEdit® needs to tag the Java libraries to provide symbol completions and other Context Tagging features for those classes (see Context Tagging). When you first run SlickEdit after an installation, you are prompted with a dialog to create these tag files. Complete the steps below if you did not create tag files at that time or to configure additional JDKs.

  1. Open the Context Tagging - Tag Files Dialog by selecting Tools → Tag Files .

  2. Click the Auto Tag button to open the Create Tag Files for Compiler Libraries dialog. This dialog is displayed automatically when you first run SlickEdit.

  3. SlickEdit may detect that you have installed the JDK. If so, the section for Java will be filled out. If not, you will have to configure this manually.

  4. Click the Configure button to open the Java Compiler Properties Dialog. You can have multiple JDKs installed on your computer at the same time and configure SlickEdit to use different JDKs for each project. This dialog provides the name and location for each JDK so that you can select it for tagging or building.

  5. Click the Add button to browse to the root of the desired JDK (or JRE). If SlickEdit recognizes the Java vendor and version, it will automatically set the appropriate properties. If not, you will be prompted for the configuration name. Give it a name that represents the associated JDK, like "JDK 1.6".

  6. If a default JDK has not been specified, click the Set Default button to set this JDK as the default.

  7. When finished, click the OK button to return to the auto tag dialog.

  8. Make sure there is a check in the Create tag file for Java compiler libraries check box. Depending on your environment, there may be checks in the check boxes for C++ and .NET. Leave those checked if you have not already tagged those libraries. If you just want to tag the Java libraries, uncheck the other check boxes.

  9. Click the Create tag file(s) button.

  10. SlickEdit will display a progress bar while your libraries are being tagged. When finished, SlickEdit will display the Context Tagging - Tag Files dialog. You can close this if you have no other libraries to tag.

Setting Up a Java Workspace and Project

In SlickEdit®, files are contained in projects, and projects are contained in workspaces. Except for the most basic editing, you should always work within a workspace and project in SlickEdit. Context Tagging® relies on having your source files contained in a project. See Workspaces and Projects for more information.

Editing options are determined by the file extension and accessed by selecting Tools → Options from the main menu, then selecting the corresponding language in the options hierarchy. Editing options control how your code is formatted and key editing behaviors as you type.

The project type determines your build environment and provides options specific to that project type. For Java, this includes specifying which JDK to use, setting up the debugger, and configuring Java Live Errors. To create a new Java project or to see a list of the available Java project types, select Project → New from the main menu, then expand the Java node in the tree under Project type.

After you have created a Java project, you can set the build options by selecting Project → Project Properties from the main menu, selecting Build in the Tool name list, then clicking the Options button. The options displayed are specific to the project type of the active project. If you are in a Java project, you will see Java options. If you are in a C++ project, you will see options for the C++ compiler.

Note

The Options button is only available if you have selected Build without a makefile (dependencies automatically checked) on the Build tab of Project Properties Dialog. If you select either of the other two options, SlickEdit uses an external command to launch the build.

You can also change the build options for Java by selecting Build → Java Options from the main menu (or the corresponding item for other languages).

Configuring Java Build and Runtime Options

The Java Options dialog contains settings used when you build or execute a Java project. Most of the settings are stored for the particular Java project and configuration selected. You can set different values for different projects and for different configurations of the same project. For example, you might have different settings for the Debug configuration than from the Release configuration, allowing you to turn on optimizations used for release that are incompatible with debugging. See Java Options Dialog for more information.

Java-Specific Features

SlickEdit® provides many features that work across several languages including Java, and Java-specific information is described throughout the documentation where applicable. The following are additional features designed specifically for Java developers:

  • Javadoc Comments

  • Organize Imports

  • Java Live Errors

  • JUnit Testing

Javadoc Comments

Several features are available to help you enter and format Javadoc comments (as well as other doc comment formats). See Doc Comments for more information.

Organize Imports

Organize Imports automates the management of import statements in Java files. This feature minimizes the amount of time that it takes to compile code by only importing the classes that are used. Existing import statements are also sorted in a readable format and are more consistent between different Java packages in the same project. Organizing of imports is applied to an entire file.

To organize imports, from the main menu, click Tools → Imports → Organize Imports , or from the right-click context menu, select Imports → Organize Imports . Alternately, use the jrefactor_organize_imports command.

Adding Imports

To add an import statement for the class name under the cursor in Java code, move the cursor to the class name you want to import, then from the main menu, click Tools → Imports → Add Import , or from the right-click context menu, select Imports → Add Import . Alternately, use the jrefactor_add_import command.

Import Options

Several options are available on the Options dialog to control the behavior of Organize Imports. See Organize Java Imports Options Interface for details.

Java Live Errors

Java Live Errors is a feature that flags syntax and compilation errors as you edit your code. This feature also provides coding "best practice" warnings, and can be configured to accommodate any source compliance level.

To activate Live Errors, open a Java project then complete the following steps:

  1. Open the Java Options dialog by selecting Build → Java Options from the main menu.

  2. Select the Compiler tab and enter the Source Compliance level.

  3. Select the Live Errors tab and check Enable Live Errors.

  4. In the Path to JDK 6 or later field, specify the root of the JDK 6 (or compatible JDK) installation. There is no requirement that you build your code with JDK 6, only that it is available to Live Errors.

Note

If you have Live Errors running and wish to specify a different JDK 6 (or other compatible JDK) root, after changing the path on the Java Options dialog, you must restart SlickEdit®.

After activating Live Errors, you can use the rte_next_error command to jump through the live errors in the current file. Bind this command to a key sequence for more efficiency (see Creating Bindings).

See Live Errors Tab for more information about the fields and options on this tab.

JUnit Testing

JUnit tests can be run from within SlickEdit®. The results can be viewed and code that fails the testing can be easily reconciled.

Note

JUnit support in SlickEdit® requires Java 5 or later, as well as JUnit 4.4. SlickEdit still supports JUnit 3 tests, however the JUnit library used for building, running, and debugging must be JUnit 4.4.

To run a JUnit test, in the Projects tool window, select the project, package or file that you want, then on the right-click context menu, select Unit Test → Run (junit command) or Unit Test → Debug (junit_debug command). The results are displayed in the Unit Testing tool window.

The Unit Testing tool window displays the number of tests that ran, failed, passed, had errors, and were not run. Double-click the items found on the Tests or Defects tab to be redirected to the code that needs to be debugged.

A tree control displays the defect trace(s) for the currently selected test item. Buttons are available above the tabs to rerun tests:

  • To rerun the last set of tests, click Run Current TestCases.

  • To rerun only the tests with defects from the last set of tests run, click Run Current TestCases with Defects.

Java-Specific Interfaces

This section provides detailed information about the following dialogs, tool windows, and option screens that are specific to Java programming:

  • Java Compiler Properties Dialog

  • Java Options Dialog

  • Java Formatting Options Interface

  • Organize Java Imports Options Interface

  • Java Beautifier Dialog

  • Javadoc Editor Dialog

  • Javadoc Beautifier Options Dialog

Java Compiler Properties Dialog

In order to correctly perform symbol analysis and cross-referencing, SlickEdit® needs to know which JDK you are using and where the system libraries are located.

These properties can be specified using the Java Compiler Properties option screen or the Java Compiler Properties dialog. The interfaces contain the same fields and options so you can make changes using the one you prefer:

  • From the main menu, click Tools → Options . In the tree, expand Languages → Application Languages → Java , then select Compiler Properties.

  • With a Java project open, from the main menu, click Project → Project Properties . Select the Compile/Link tab, then click the Ellipsis button to the right of the Compiler combo box. The Java Properties dialog is displayed.

For Java, you can have multiple JDKs installed on your computer at the same time and configure SlickEdit to use different JDKs for each project. The interface provides the name and location for each JDK so that you can select it for tagging or building. See Language-Specific Compiler Options for more information about these options.

Java Options Dialog

The Java Options dialog contains settings used when you build or execute a Java project. Most of the settings are stored for the particular Java project and configuration selected. You can set different values for different projects and for different configurations of the same project. For example, you might have different settings for the Debug configuration than from the Release configuration, allowing you to turn on optimizations used for release that are incompatible with debugging.

To access the Java Options dialog, first make sure you have a Java project or file open, then from the main menu, click Build → Java Options (or, use the javaoptions command).

There are three settings on the dialog that apply to all tabs:

  • Settings for - The Settings for drop-down list at the top of the dialog is used to specify the project configuration you want to affect with the option settings. This is the same field that is on the Project Properties dialog, where you can also create new configurations. See Project Configurations for more information.

  • JDK installation directory (affects all projects and configurations) - Specifies the full path to the root of the JDK used to build and execute Java programs. This value is shared by all Java projects and all configurations. Click the button to the right of the field to browse. Use the drop-down button to select a recently used entry.

  • Ant installation directory (affects all projects and configurations) - Specifies the full path to the root of the Ant installation directory. Ant is a commonly used build tool for Java. It is not shipped with SlickEdit, so you need to specify where it is installed. Click the button to the right of the field to browse. Use the drop-down button to select a recently used entry.

The other settings and options are divided into the following tabs:

  • Compiler Tab

  • Javadoc Tab

  • Jar Tab

  • Classpath Tab

  • JRE Tab

  • Debugger Tab

  • Live Errors Tab

Note

  • Options that are self-explanatory are not described in the documentation.

  • Prior to making changes on the tabs of the dialog, be sure that your desired project configuration is selected in the Settings for drop-down list at the top of the dialog.

Compiler Tab

The Compiler tab on the Java Options dialog (Build → Java Options ) is shown below.

This tab contains the following fields and options:

  • Compiler name - Specifies the name of the compiler executable without the file extension. Click the Ellipsis button to browse for the file.

  • Output directory (-d) - Specifies the full path to a directory to save the generated class files. Click the Ellipsis button to browse for the directory.

  • Optimize output (-O)

  • Generate no warnings (-nowarn)

  • Verbose compiler output (-verbose)

  • Notify about locations where deprecated APIs are used (-deprecation)

  • Generate debug information (-g)

  • Source Compliance level - Specifies the JDK version number to use when parsing the code. For example, JDK 1.6 can still parse the syntax for code written using JDK 1.4. Use this field to tell the compiler which Java syntax to use. This is the same as setting the -source option on the javac command line.

  • Target Compliance level - Setting this value will generate code that will run on the specified version of the Java VM. This is the same as setting the -target option on the javac command line.

  • Other options - Specify additional command line options in this text field. For example, you can use this field to enter a value like "-sourcepath c:\dev\src\BigProject".

Javadoc Tab

The Javadoc tab on the Java Options dialog (Build → Java Options ) contains options to configure the application that processes the Javadoc comments in your code to produce project documentation. By default, SlickEdit® uses the javah program. Many of the options are specific to that processor. If you choose to use a different program, uncheck the command line arguments and enter your options using the Other options field.

This tab contains the following fields and options:

  • Javadoc app name - Specifies the name of the executable used to process the Javadoc comments in your source code. By default, this is set to javadoc. The extension is not needed. Click the Ellipsis button to browse for the file.

  • Output directory (-d) - Specifies the directory in which to save the generated Javadoc. You can specify a full path or relative path. Relative paths are interpreted relative to the project location, specified when you created the project. For example, a value of docs will create a subdirectory in the project directory to store the output from the Javadoc processor.

  • Include @version paragraphs (-version)

  • Include @author paragraphs (-author)

  • Do not include @deprecated paragraphs (-nodeprecated)

  • Do not generate class hierarchy (-notree)

  • Do not generate index (-noindex)

  • Other options - Specify additional command line options in this text field to be passed to the Javadoc processor.

Jar Tab

The Jar tab on the Java Options dialog (Build → Java Options ) is used to configure the Jar application that is used to package compiled Java classes.

This tab contains the following fields and options:

  • Jar app name - Specifies the name of the Jar executable, without the extension. Click the Ellipsis button to browse for the file.

  • Archive filename - Specifies the name of the archive to create.

  • Manifest filename - If you want to create a manifest, specify the name of the manifest file here.

  • Store only - no compression (-0)

  • Verbose output (-v)

  • Other options - Specify additional command line options to pass to the Jar application.

  • Additional class files not included in this project (-C) - Used to specify additional classes you would like to include in the archive.

    • Add File - Click to add a new class file to the archive.

    • Add Path - Click to specify a directory. All of the classes in that directory will be added.

    • Remove - Click to remove the selected file or directory.

Classpath Tab

In Java, the classpath defines a search path for compiled Java classes. The elements are searched in the order specified and the first matching class is used. The Classpath tab on the Java Options dialog (Build → Java Options ) allows you to configure the Java classpath used in SlickEdit® for running and debugging programs. This does not affect the classpath set in the operating system.

Warning

If your classpath contains unnecessary files or directories, it could slow down the launching of the Java debugger using the step-into command. If you experience this problem, remove any elements not needed by this specific project and avoid using the system Classpath.

If you have different classpaths for different projects, configuring the classpath inside of SlickEdit is very useful. If you have a single classpath and use it with other external tools, it is best to configure it in the operating system and then put a reference to the external classpath in SlickEdit by using the Add Path button on this tab.

This tab contains the following fields and options:

  • Add Path - Click to browse for a directory. This directory is added to the classpath.

  • Add Jar File - Click to add a JAR file to the classpath.

  • Add Class Path - Click to insert the environment variable that contains the classpath defined in the operating system.

  • Edit - Click to edit the selected classpath element.

  • Delete - Click to delete the selected classpath element.

  • Up/Down - Use the Up and Down buttons to move the selected item up and down in the list.

  • Use Classpath settings for antmake commands - When this option is selected, the SlickEdit classpath is passed to Ant. See Build Methods for Ant and NAnt for more information about Ant support.

JRE Tab

The JRE tab on the Java Options dialog (Build → Java Options ) is used to configure options for the Java Runtime Environment. These are used when executing a Java program inside SlickEdit®.

This tab contains the following fields and options:

  • JRE app name - Specifies the name of the executable for the Java interpreter, java by default. The extension is not needed. Click the Ellipsis button to browse for the executable.

  • Main class - Specifies the name of the class to begin execution. In Java, each class can contain a main function. This value determines where execution begins when you select Build → Execute for this project.

  • Arguments - Specifies parameter values passed to the main function contained in the main class.

The remaining options are common configuration parameters to pass to the Java interpreter. Each displays the command line switch used. For more information, look up the corresponding switch in the JRE documentation. If these values are not supported by the JRE you are using, uncheck them and use Other options to pass arguments to the JRE.

Debugger Tab

The Debugger tab on the Java Options dialog (Build → Java Options ) configures the debugger to be used when you select Debug → Start . You have two choices for debugging:

  • Use the SlickEdit® debugger, which provides a graphical front-end for debugging.

  • Use the JDB debugger, which provides a command line interface.

The first two options are used to select which debugger to use:

  • Use SlickEdit debugger (-Xdebug -Xrunjdwp: ...) - This option provides a graphical front-end for debugging that displays your code and provides windows for local variables and other information (see Debugging).]

    • Port - Specifies which port to use to communicate with the Java debugger.

  • Use JDB debugger - With this option, SlickEdit uses a command line interface to interact directly with JDB. The options below let you specify command line arguments passed to the debugger. For more information, look up the corresponding switch in the JDB documentation.

    • Verbose output (-verbose)

    • Run application in the Hotspot(TM) performance engine (-thotspot)

    • Launch at startup (-launch)

    • Debugger - Specifies the executable for the debugger. The extension is not needed. Click the ellipsis button to browse for the file.

  • Run the application in the Classic VM (-classic / -tclassic) - When this option is selected, the application is run using the Java 2 Classic VM.

  • Other options - Specifies additional command line arguments to be passed to the debugger.

Live Errors Tab

The Live Errors tab on the Java Options dialog (Build → Java Options ) is used to configure the Live Errors feature. Live Errors identifies syntax errors as you type. SlickEdit compiles your code in the background and highlights errors directly in the editor.

This tab provides the following fields and options:

  • Enable Live Errors - When selected, the Live Errors feature is activated. This setting is checked by default if SlickEdit has detected a valid JDK 6, or compatible, installation on your system, the first time a Java project is opened. For some coding, you may want to disable Live Errors since it will point out all syntax errors, which are common in incomplete code.

    After activating Live Errors, you can use the rte_next_error command to jump through the live errors in the current file. Bind this command to a key sequence for more efficiency.

Note

  • For Java Live Errors to work, you must have the full JDK downloaded and installed from Sun, and you must specify the root of the JDK installation in the JDK installation directory field of the Java Options dialog (Build → Java Options ), unless it is automatically detected upon startup. There is no requirement that you build your code with JDK 6, only that it is available to Live Errors.

  • If you have Java Live Errors running and wish to specify a different JDK 6 (or compatible JDK) root, after changing the JDK path on the Java Options dialog, you must restart SlickEdit.

  • In order to boost performance, Java Live Errors generates .class files as you code. These files are stored in the java_rte_classes subdirectory of your config. You can remove these files, but they will be rebuilt the next time Java Live Errors is invoked.

  • To specify the source compliance level, use the Source Compliance level setting on the Compiler Tab.

  • Deprecation warnings - When this option is selected, a Warning bitmap appears when Live Errors encounters a keyword that has been deprecated. This is useful for programmers coding to strict Java standards.

  • No Warnings - When this option is selected, warning notices from Live Errors are not displayed.

  • Use "Other Options" from Compiler Tab - When this option is selected, any options specified in the "Other Options" field on the Java Options → Compiler tab will be used for Live Errors. Live Errors will automatically parse out those javac options which are not supported by the Java Compiler API.

  • Sleep Interval(ms) - Specifies the amount of time, in milliseconds, in which a Live Errors thread sleeps before checking for errors (during times when an error check is not forced). Use this to tune performance. A larger value will give the editor more time between builds and should reduce any performance issues.

  • JVM Tuning - These options control how how much memory is allocated to the JVM used for Live Errors. SlickEdit will require a restart in order for new values to take effect.

    • Initial Heap Size: -Xms (M) - Initial heap size, in megabytes. Must be greater than or equal to 2.

    • Max Heap Size: -Xmx (M) - Maximum heap size, in megabytes.

    • Stack Size: -Xss (K) - Stack size for each thread, in kilobytes.

  • Path to JDK 6 or later - Specifies the root directory of a valid JDK 6 or compatible JDK installation. Live Errors requires JDK 6 or a compatible JDK to run, and will not activate if this path is not correct. SlickEdit attempts to populate this field for you the first time a Java project is opened. Click the Ellipsis button to browse for the directory.

Java Formatting Options Interface

Options are available for Java for changing the Syntax Indent and Syntax Expansion style settings. To access these options, from the main menu, click Tools → Options → Languages , expand Application Languages > Java, then click Java Formatting Options.

Note

Languages similar to Java have similar Formatting Options screens that are not specifically documented.

The following settings are available:

  • Begin/end style - Specify the brace style to be used for Syntax Indent and Syntax Expansion. The hyperlink indicates if Adaptive Formatting is on or off for this setting. After specifying the brace style, choose from the following options:

    • 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.

    • Quick brace/unbrace one line statements - Enables Quick Brace/Unbrace, features that allow you to convert a single line statement to a brace-enclosed block, and vice versa. See Quick Brace/Unbrace for more information.

    • Place "else" on same line as "}" - When this option is selected, SlickEdit® places the else keyword on the same line as }. This is common when using brace Style 1.

  • Indent first level of code - Specifies whether Syntax Indent should indent the cursor after declarations such as functions.

  • Use continuation indent on function parameters - Determines whether function parameters should always use the continuation indent.

    By default, SlickEdit formats 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
    );

    If Use continuation indent on function parameters is selected, the format will change 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
    );

  • Indent CASE from SWITCH - When checked, Syntax Expansion places the case statement indented from the switch statement column. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • No space before parenthesis - Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs. Example: (if( or if () The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Insert padding between parentheses - When checked, a space is placed after the open paren, and before the close paren, providing padding for the enclosed text. For example, if () becomes if ( ). The hyperlink indicates if Adaptive Formatting is on or off for this setting.

Java Beautifier Dialog

To beautify Java source code, from the main menu click Tools → Beautify (or use the gui_beautify command). The Java Beautifier dialog appears, where you can specify preferences for how the code is beautified. The Java Beautifier contains the same options and settings as the C/C++ Beautifier. See C/C++ Beautifier for more information.

Organize Java Imports Options Interface

Options are available on the Options dialog to configure the Organize Imports feature (Tools → Options → Languages → Application Languages → Java → Organize Imports ). A more direct route to the options is to use one of the following methods:

  • From the main menu, click Tools → Imports → Options

  • Select Tools → Imports → Options from the right-click context menu in the editor window.

  • Use the jrefactor_organize_imports_options command.

The following settings are available:

  • Package explicit import limit before using wildcard(.*) - If more than this number of classes are explicitly imported from the same package in one file, the imports will be replaced with a single wildcard import.

  • Add blank line between groups of imports - Organize Imports will group imports by package name or top-level package name. Select this option to force Organize Imports to add a blank line between these groups instead of having just one flat list of imports.

    • Number of package nesting levels to group imports by - If this is set to 1, import statements will be grouped by top-level package name only. For example, all your imports from java. packages would be in a separate group from your imports from com. packages. If set to 2, import statements will be grouped by second level package names. For example, all your imports from java.util would be in a separate group from your imports from java.awt.

  • Automatically add import during code help for Java - If selected, SlickEdit® will attempt to automatically add imports as you edit Java code.

  • Automatically add import during code help for JSP - If selected, SlickEdit will attempt to automatically add imports as you edit Java code embedded in HTML. JSP imports are added using the following notation: <%@ page import="java.util.Vector"%>.

  • Package sort order - This list specifies the order in which package groups are sorted. Use the Ellipses (...) button to add a new package. Use the Up and Down arrow buttons to move items. Use the X button to delete the currently selected package from the list.

Javadoc Editor Dialog

Use the Javadoc Editor to generate Javadoc syntax comments for Java, C, C++, JavaScript, and Slick-C®. To access the Javadoc Editor, right-click within the edit window and select Edit Javadoc Comments. Or, with the cursor inside a comment, click Document → Edit Javadoc Comment .

To add a custom or unsupported tag, append the tag (with an @ prefix) and its description into the Description text box. You can add @serial, @serialField, and @serialData fields this way.

For more information, see Sun's Javadoc documentation at http://java.sun.com.

Note

NOTE SlickEdit® provides powerful capabilities to create and edit Javadoc comments within the editor. See Commenting for more information.

Javadoc Beautifier Options Dialog

To beautify Javadoc comments or set up Javadoc Beautifier options, first invoke the Javadoc Editor by right-clicking within the edit window and selecting Edit Javadoc Comments. Then click the Options button. The Javadoc Beautifier Options dialog is displayed. The following settings are available:

  • Align parameter comments to longest parameter name - If 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 exception comments to longest exception name - If 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 description 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 - If checked, a blank line is added if a tag follows an @param tag.

  • Add blank line after parameter comment group - If checked, a blank line is added if a tag follows an @param group.

  • Add blank line after return comment - If checked, a blank line is added if a tag follows the @return tag.

  • Add blank line after description - If checked, a blank line is added between the description and the first @ tag. This option is ignored if the description contains a custom or unsupported @ tag.

  • Add blank line after example - If checked, a blank line is added if a tag follows the @example tag.


Pascal

This section describes some of the advanced options that are available for Pascal.

Pascal Formatting Options

Options are available for Pascal for changing Syntax Indent and Syntax Expansion styles. To access these options, from the main menu, click Tools → Options → Languages , expand Application Languages > Pascal, then click Pascal Formatting Options.

Note

Languages similar to Pascal may have similar Formatting Options screens that are not specifically documented.

The following options are available:

  • Begin-end style - Specify the begin/end style used by Syntax Indent and Syntax Expansion. The hyperlink indicates if Adaptive Formatting is on or off for this setting. For each style, select from the following options:

    • Insert begin/end pairs - 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 the begin/end pair of an if statement.

  • Keyword case - Specifies the case of keywords used by Syntax Expansion. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Indent constant from case - Specifies whether constants of a case statement are indented or aligned to the case keyword. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Use Delphi expansions - Specify whether Delphi®-style expansions should be used.


PL/I

This section describes some of the advanced options that are available for the PL/I language.

PL/I Formatting Options

Options are available for PL/I for changing Syntax Indent and Syntax Expansion styles. To access these options, from the main menu, click Tools → Options → Languages , expand Mainframe Languages > PL/I, then click PL/I Formatting Options..

Note

Languages similar to PL/I may have similar Formatting Options screens that are not specifically documented.

The following options are available:

  • DO/END style - Select the syntax expansion style that indicates whether syntax expansion should place the DO on a separate line. Then select from the following options:

    • 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.

  • Keyword case - Specifies the case of keywords used by Syntax Expansion. For example, when you type the word "procedure" and the Keyword case is set to Upper case, the editor changes "procedure" to "PROCEDURE".

  • Indent WHEN from SELECT - Indicates whether the WHEN clause inside a SELECT statement should be indented.

  • SPF style line numbering (columns 73-80) - When selected, expect line numbers in columns 73 through 80 when renumbering lines.


Python

This section describes some of the advanced features that are available for the Python language.

Begin/End Structure Matching for Python

Begin/End Structure Matching moves the cursor from the beginning of a code structure to the end, or vice versa.

To place the cursor on the opposite end of the structure when the cursor is on a begin or end keyword pair, press Ctrl+] (find_matching_paren command or from the menu click Search → Go to Matching Parenthesis ). The find_matching_paren command supports matching parenthesis pairs {},[] and ().

For Python, SlickEdit® supports the matching of the colon (:) token and the end of context.

Note the cursor location in the code block below:

def function_foo(arg):| <- cursor

    ....
    return 0| <- destination

Executing find_matching_paren will move the cursor to the end of line containing the return 0 statement. Executing it while the cursor is at the end of the return 0 statement will bring the cursor back to the colon (:) position of the function signature line (def function_foo(arg):).

This works on function, class, for, while, if, and try statements.

There is one limitation of this feature. Note the following code block:

for i in xrange(0, 10):| <- A
    for j in xrange(0, 10):| <- B
        for k in xrange(0, 10):| <- C
            print i, j, k| <- D

Invoking find_matching_paren at position A, B, or C will move the cursor to D, but doing so while the cursor is at D will only move the cursor back to C (not A nor B). This is because the Python language doesn't have the notion of end-of-scope token (such as } in C/C++, Java, etc.), so it's impossible to determine the correct destination when jumping from D. Therefore we pick the nearest possible destination in this scenario.

See Begin/End Structure Matching for more information about this feature.


XML and HTML

Features for XML and HTML are described below. See also XML/HTML Formatting.

XML

XML features in SlickEdit® include Context Tagging®, validation, well-formedness checking, a beautifier, Color Coding, URL Mapping, Syntax Expansion, and Syntax Indenting for XML, XSLT, and schemas (DTD or XSD).

For information about working with Ant XML files for Java, see Build Methods for Ant and NAnt.

XML Toolbar

The XML toolbar is available for quickly accessing common XML operations. To display the XML toolbar, from the main menu, click View → Toolbars → XML . By default, three buttons are available:

  • Beautify selection or entire buffer - Use this button to instantly beautify the current file according to the Beautifier settings. See XML Beautifier for more information.

  • Validate XML document - Use this button to validate an XML file against a DTD or schema. The results of the validation are displayed in the Output tool window. If there are errors during validation, you can double-click on the error line and the appropriate file will be opened and moved to the specified line.

  • Check for Well-Formedness - Use this button to check if the document is well-formed according to XML syntax rules.

XML Formatting Options

Content in XML and HTML files may be set to automatically wrap and format as you edit, through the XML/HTML Formatting feature. See XML/HTML Formatting for complete information.

Other miscellaneous tag and attribute options are provided through the XML Formatting Options screen. To access these options, from the main menu, click Tools → Options → Languages , expand XML/Text Languages > XML, then click XML Formatting Options.

Tip

You can also display the XML Formatting Options screen by clicking the XML Options button on the XML/HTML Formatting Scheme Configuration dialog (see XML/HTML Formatting Scheme Configuration Dialog ).

The following settings are available:

  • Auto validate on open - When this option is selected, XML files are automatically validated when they are opened. The result of the validation is displayed on the Output tool window.

  • Auto symbol translation - When selected, Auto Symbol Translation is enabled, a feature that automatically converts a character or sequence of characters to the appropriate entity reference. Click the Settings button to display the Symbol Translation Editor. See Auto Symbol Translation for more information.

  • Auto formatting options - These settings are used to configure XML/HTML Formatting.

    • Default formatting scheme - Specifies the default formatting scheme to use for the selected language. See Default Schemes for more information.

    • Enable content wrapping - When selected, content wrapping is enabled, based on the scheme configuration for the selected formatting scheme. See Content Wrap Settings for more information.

    • Enable tag layout - When selected, tag layout is enabled, based on the scheme configuration for the selected formatting scheme. See Tag Layout Settings for more information.

    • Configure Schemes - Use this button to open to the XML/HTML Formatting Schemes Configuration dialog to configure tags. See XML/HTML Formatting Scheme Configuration Dialog .

XMLdoc Editor

Use the XMLdoc Editor to generate Microsoft XML syntax comments for C#, C, C++, Java, JavaScript, and Slick-C®. Note that by default, when creating a new comment, the Javadoc Editor is displayed for all file types except C#. To work around this limitation, start an XML comment with "///" and then right-click in the edit window and select Edit XML Comments.

Unknown XML tags are left "as is" and not removed.

XML Beautifier

To beautify XML source code, from the main menu click Tools → Beautify (or use the gui_beautify command). The XML Beautifier dialog appears, where you can specify preferences for how the code is beautified.

Caution

The XML Beautifier is not affected by XML/HTML Formatting. If you run the beautifier on documents that have been automatically formatted through XML/HTML Formatting, you may find unexpected results.

You can use the commands xml_beautify or xml_beautify_selection to instantly beautify the file or the selection according to the settings on the Beautifier dialog.

Note

The XSD Beautifier contains the same options and settings as the XML Beautifier.

The following buttons and options are available on the Beautifier:

  • 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 xml_beautify command.

  • Restrict to selection - When on, only lines in the selection are beautified.

  • Sync extension options - When on, the language options are updated to reflect any changes that these dialogs have in common.

The tabs on the XML Beautifier are described in the sections below.

Indent Tab

The Indent tab on the XML Beautifier is pictured below.

The following settings are available:

  • 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 value as the Syntax indent text box setting on the language-specific Indent options screen (see Language-Specific Indent Options). By default, we initialize this text box with your current language setup setting.

  • Indent with tabs - When on, tab characters are used for leading indent of lines. This value defaults to the Tabs text box setting on the language-specific Indent options screen (see Language-Specific Indent Options).

  • 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 on the language-specific Indent options screen (see Language-Specific Indent Options).

  • 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 file's 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 an XHTML <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.

  • Broken tag lines - Specify how broken tag lines are treated from the following options:

    • Indent from tag column by - Specifies the amount to indent for broken tag lines from the starting column of the tag. Specify 0 to align broken tag lines with the starting column of the tag.

    • Use original relative indent - Reindent broken tag lines using the original relative indent amount from the starting column of the tag.

    • Preserve original indent - Preserve the original absolute indent amount on broken tag lines.

Tags Tab

The Tags tab on the XML Beautifier is pictured below.

The Tags tab contains the following options and settings:

  • Tag case - Specifies how you want your tag names cased. For example, if you choose UPPER, then <tag> would be beautified to <TAG>. Under normal circumstances you will want to preserve the case of your XML tags, but for certain special cases (e.g. XHTML) you may want to change this setting.

  • Tag settings - The settings in this group box apply to the tag that is selected in the list box. The <DEFAULT TAG> tag item in the list of tags specifies settings to use when no settings exist for a tag found during beautification.

    • 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.

  • Content - Specify how to beautify content from the following options:

    • Reformat - When off, all white space and line breaks are preserved. However, tags are formatted (tag case, attribute case, etc.).

    • Indent - When on, nested tags will be indented one syntax indent level. Furthermore, if Reformat is on, the selected tag's CDATA content (i.e. plain text), bounded by the opening and closing tag, will be indented one syntax indent level.

    • 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. This option is useful for XHTML.

    Tip

    Some examples of content settings for specific tags are:

    • style - Literal (content is indented to the same level as the <style> open tag)

    • style - Reformat, Literal (content is indented one syntax indent level from the <style> open tag)

    • pre - All Content check boxes off

    • blockquote - Reformat, Indent

  • End tag - When on, the selected tag has an end tag. For XML you will normally want this to remain on.

  • End tag required - When on, the selected tag's ending tag is required. For XML you will normally want this to remain on.

  • Preserve tag body - When on, all properties of the body of the tag selected will be preserved. This is especially useful for processing instructions like <?xml ... ?> where you do not want the embedded text 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 interrupt the flow of the script code.

  • Line breaks - Select the way lines are broken:

    • Before open tag - Specify the number of line breaks before the opening tag. For example, if you were to set the number of line breaks before the opening tag to 3 for the XHTML <td> tag, and the original content was:

      <tr>
<td>
</td>
</tr>

      The resulting content would be:

      <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 three blank lines, then you would set the number of line breaks to 4.

    • 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 XHTML <td> tag, and the original content was:

      <TR>
<TD>
</TD>
</TR>

      The resulting content would be:

      <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 three blank lines, then you would set the number of line breaks to 4.

    • Stand-alone - When on, the selected tag will always have at least one preceding and trailing line break on both its opening and ending tag when beautified. You can specify that there be more than one line break by setting Line breaks for the opening and closing tags.

Attributes/Values Tab

The Attributes/Values tab of the XML Beautifier is pictured below.

The Attributes/Values tab contains the following settings:

  • 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">. Under normal circumstances you will want to preserve the case of your XML attributes, but for certain special cases (e.g. XHTML) you may want to change this setting.

  • Word value case - Not available for XML.

  • Hex value case - Not available for XML.

  • Quote word values - Specifies whether you want word values 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">. Select Preserve if you want word values left alone. Under normal circumstances you will want to preserve your XML values, but for certain special cases (e.g. XHTML) you may want to change this setting.

  • Quote number values - Specifies whether you want number values 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">. Select Preserve if you want number values left alone. Under normal circumstances you will want to preserve your XML values, but for certain special cases (e.g. XHTML) you may want to change this setting.

  • Quote all values - When on, all values will be quoted after the = of an attribute inside the body of a tag. For example, <td align=right> would be beautified to <td align="right">.Under normal circumstances you will want to preserve your XML values, but for certain special cases (e.g. XHTML) you may want to change this setting.

Comments Tab

The Comments tab of the XML Beautifier is pictured below.

The Comments tab contains the following options and settings:

  • 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. The following is an example of a stand-alone comment:

    <!-- 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.

  • Define Comments - Displays the XML Comments dialog. This dialog allows you to define what the beautifier recognizes as a comment. The sequence <!-- --> is defined as the XML comment by default. If you delete all comment definitions then all comments will be parsed as content.

  • Trailing comments - Specify how trailing comments are treated from the following options:

    • 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. An example of a trailing comment is:

      <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.

    The following is an example of code before beautifying trailing comments:

    <Outer>
<Inner><four characters><!-- trailing comment -->
</Inner>
</Outer>

    The resulting code would be:

    <Outer>
  <Inner><four characters><!-- trailing comment -->
  </Inner>
</Outer>
Advanced Tab

The Advanced tab of the XML Beautifier is pictured below.

The following option is available on the Advanced tab:

  • Remove blank lines - When on, blank lines are deleted.

Schemes Tab

The Schemes tab of the XML Beautifier is pictured below.

To define a new scheme, use the Beautifier to set the various beautify options and then press the Save Scheme button on the Schemes tab. User defined schemes are stored in uformat.ini.

DTD Caching

When you open an XML document that has a document type definition of (!DOCTYPE) that refers to a remote external DTD, the DTD file is downloaded and cached locally. The DTD is processed to provide Context Tagging® and better color coding. Currently, only HTTP (and not FTP) remote files are supported. This automatic caching allows you to work offline and edit XML documents that reference remote DTDs when you do not have an Internet connection. If you want to force re-caching of the DTD for the current XML document, right-click to open the context menu and select Apply DTD changes. Applying DTD changes is necessary after you create a new XML document and complete the document type definition (!DOCTYPE).

Opening DTD Files from XML

To open the external DTD referenced by document type definition (!DOCTYPE), place the cursor anywhere on the !DOCTYPE tag and press Alt+1 (or right-click to display the context menu and select Go to Error/Include File).

URL Mapping

SlickEdit® provides a way to map URLs to different locations. Whenever opening a URL, the URL map is examined to see if this URL is mapped to a different location. If the URL is mapped elsewhere, then that mapped location is used.

This feature allows you to work offline or from a test location. For example, if you need to work with XML documents that contain external DTDs while offline you can map the URL to the DTD to a local file. Similarly, if you wanted to test changes to a DTD without modifying every XML document's DTD references, you can map the URL to the test DTD location.

Optionally, you can specify a default lookup directory that contains all of your DTDs and namespace schemas files. Every mapping doesn't need to be explicitly configured. You can also create mappings for namespace URIs as well as DTD files.

To map a URL, complete the following steps.

  1. From the main menu, click Tools → Options → Network & Internet Options → URL Mappings .

  2. Click the Add button, and a new line opens.

  3. In the From field, type in the URL that will be mapped to a different location.

  4. Press Tab or click in the To field and type in the location to use for this URL.

  5. Optionally, use the Search directory field to specify the default lookup directory for DTDs and namespaces. Files in this directory are searched prior to validation.

  6. Click OK to save the changes and close the Options dialog.

Toggling Between Begin and End XML Tags

Place the cursor anywhere on the begin or end tag and press Ctrl+]to find the corresponding end or begin tag respectively.

HTML

This section describes some of the features and options that are available for HTML, including language-specific options, the HTML Beautifier, and more.

HTML support includes Context Tagging®, a beautifier, Color Coding, Syntax Expansion, and Syntax Indenting for HTML, JSP, and ASP. Many of the language features in SlickEdit® are supported for languages embedded in HTML, including Context Tagging, Color Coding, SmartPaste®, Syntax Expansion, and Syntax Indenting.

Tip

When working with HTML files, you can toggle between the begin and end HTML tags by pressing Ctrl+].

HTML Toolbar

The HTML toolbar is available for many common operations you may want to perform. To display the HTML toolbar, from the main menu, click View → Toolbars → HTML .

To invoke a Web browser or to display the current file in a browser, use the Web Browser button on the HTML toolbar. To configure the browser that is used, see Configuring the Web Browser below.

Exporting to HTML

To save the current open buffer as HTML file with formatting and color coding, from the main menu, click File → Export to HTML (or use the export_html command).

Configuring the Web Browser

To specify the Web browser that is used for previewing, from the main menu click Tools → Options → Network & Internet Options → Web Browser Setup . See Web Browser Setup Options for more information.

HTML Formatting Options

Content in XML and HTML files may be set to automatically wrap and format as you edit, through the XML/HTML Formatting feature. See XML/HTML Formatting for complete information.

Other miscellaneous tag and attribute options are provided through the HTML Formatting Options screen. To access these options, from the main menu, click Tools → Options → Languages , expand Web Authoring Languages > HTML, then click HTML Formatting Options.

Tip

You can also display the HTML Formatting Options screen by clicking the HTML Options button on the XML/HTML Formatting Scheme Configuration dialog (see XML/HTML Formatting Scheme Configuration Dialog ).

Note

Languages similar to HTML have similar Formatting Options screens that are not specifically documented.

The following settings are available:

  • Case for inserted tags - This option is where you specify if you want the tag names to be lowercase or uppercase. For example, if you select Uppercase, then <td> becomes <TD>. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Case for inserted attributes - This option is where you specify if you want attributes to be lowercase or uppercase inside the body of a tag. For example, if you select Uppercase, then <td align=right> would become <td ALIGN=right>. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Case for inserted single word values - This option is where you specify if you want word values to be uppercase or lowercase when the = of an attribute is inside the body of a tag. For example, if you select Uppercase, then <td align=right> becomes <td align=RIGHT>. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Case for hex values - This option is where you specify if you want hex values to be uppercase or lowercase after the = of an attribute inside the body of a tag. For example, if you select Uppercase, then <body bgcolor=#ffffff> would become <body bgcolor=#FFFFFF>. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Embedded ASP dialect - The language that you select here determines the default embedded language mode for ASP files.

  • Use path for file entries - This option is used by the HTML toolbar. When this attribute is selected, path information is included when inserting file names into the value of an attribute. For example, creating a link with this option turned on might result in the following example.

    <A HREF=file://c:/dev/html/index.htm#>sample link</A>

    When this option is not selected, the result is the following example.

    <A HREF= index.htm#>sample link</A>

  • Use lower case file names when inserting links - This option is used by the HTML toolbar. When this option is selected, the lowercase file names are used when inserting links into the value of an attribute. See the example for Use paths for file entries.

  • Use quotes for numerical values - When this option is selected, word values are enclosed in double quotes after the = of an attribute inside the body of a tag.

  • Use quotes for single word values - When this option is selected, number values are enclosed in double quotes after the = of an attribute inside the body of a tag.

  • Insert colors using color names (if possible) - When this option is selected, colors are inserted by using the color names if possible. For example, instead of using #ff0000 to represent the color red, the color name red is used.

    <BODY bgcolor=#ff0000>
<!-- and -->
<BODY bgcolor=red>
<!-- are identical -->

  • Use <DIV> tags for alignment - This option is used by the HTML toolbar. When this option is selected, the <DIV> tag is used for aligning text. For example, rather than using a <CENTER> tag to designate alignment, use the following tagging:

    <DIV ALIGN=CENTER>
</DIV>

  • Automatically insert '>' when typing '<' - When this option is selected, you can type the open brace of a start tag (<), and SlickEdit automatically inserts the closing brace (>) while leaving the cursor positioned between the braces, ready for you to type the tag.

  • Auto symbol translation - When selected, Auto Symbol Translation is enabled, a feature that automatically converts a character or sequence of characters to the appropriate entity reference. Click the Settings button to display the Symbol Translation Editor. See Auto Symbol Translation for more information.

  • Auto formatting options - These settings are used to configure XML/HTML Formatting.

    • Default formatting scheme - Specifies the default formatting scheme to use for the selected language. See Default Schemes for more information.

    • Enable content wrapping - When selected, content wrapping is enabled, based on the scheme configuration for the selected formatting scheme. See Content Wrap Settings for more information.

    • Enable tag layout - When selected, tag layout is enabled, based on the scheme configuration for the selected formatting scheme. See Tag Layout Settings for more information.

    • Configure Schemes - Use this button to open to the XML/HTML Formatting Schemes Configuration dialog to configure tags. See XML/HTML Formatting Scheme Configuration Dialog .

HTML Beautifier

To beautify an HTML document, open the document you want to beautify, then from the main menu, click Tools → Beautify (or use the gui_beautify command). The HTML Beautifier dialog will be displayed, which allows you to make settings for how the code will be beautified.

Caution

The HTML Beautifier is not affected by XML/HTML Formatting. If you run the beautifier on documents that have been automatically formatted through XML/HTML Formatting, you may find unexpected results.

You can use the commands h_beautify or h_beautify_selection to instantly beautify the file or the selection according to the settings on the Beautifier dialog.

Note

The CFML Beautifier contains the same options and settings as the HTML Beautifier.

The following buttons and options are available on the Beautifier:

  • 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.

  • Restrict to selection - When on, only lines in the selection are beautified.

  • Sync extension options - When on, the language options are updated to reflect any changes that these dialogs have in common.

The tabs on the HTML Beautifier are described in the sections below.

Indent Tab

The Indent tab on the HTML Beautifier is pictured below.

The following settings are available:

  • Indent for each level (Syntax indent) - The amount to indent for each new nesting level. We have put the words "Syntax indent" in parenthesis to help indicate that this field has the same value as the Syntax indent text box on the language-specific Indent options screen (see Language-Specific Indent Options). By default, we initialize this text box with your current extension setup setting.

  • Indent with tabs - When on, tab characters are used for leading indent of lines. This value defaults to the Tabs text box on the language-specific Indent options screen (see Language-Specific Indent Options).

  • Tab size - Specifies output tab size. The output tab size is only used if Indent with tabs check box is on. This value defaults to the Syntax indent text box on the language-specific Indent options screen (see Language-Specific Indent Options).

  • 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 file's 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.

  • Broken tag lines - Specify how broken tag lines are treated from the following options:

    • Indent from tag column by - Specifies the amount to indent for broken tag lines from the starting column of the tag. Specify 0 to align broken tag lines with the starting column of the tag.

    • Use original relative indent - Reindent broken tag lines using the original relative indent amount from the starting column of the tag.

    • Preserve original indent - Preserve the original absolute indent amount on broken tag lines.

Tags Tab

The Tags tab on the HTML Beautifier is pictured below.

The Tags tab contains the following options and settings:

  • Tag case - Specifies how you want your tag names cased. For example, if you choose UPPER, then <td> would be beautified to <TD>.

  • Tag settings - The settings in this group box apply to the tag that is selected in the list box. The <DEFAULT TAG> tag item in the list of tags specifies settings to use when no settings exist for a tag found during beautification.

  • 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.

  • Content - Specify how to beautify content from the following options:

    • Reformat - When off, all white space and line breaks are preserved. However, tags are formatted (tag case, attribute case, etc.).

    • Indent - When on, the selected tag's content, bounded by the opening and closing tag, will be indented one syntax indent level.

    • 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.

    Tip

    Some examples of content settings for specific tags are:

    • 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 could be 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 interrupt the flow of the script code.

  • Line breaks - Select the way lines are broken:

    • Before open tag - Specify the number of line breaks before the opening tag. For example, if you were to set the number of line breaks before the opening tag to 3 for the <TD> tag, and the original content was:

      <TR>
<TD>
</TD>
</TR>

      The resulting content would be:

      <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 three blank lines, then you would set the number of line breaks to 4.

    • 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, and the original content was:

      <TR>
<TD>
</TD>
</TR>

      The resulting content would be:

      <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 three blank lines, then you would set the number of line breaks to 4.

    • Stand-alone - When on, the selected tag will always have at least one preceding and trailing line break on both its opening and ending tag when beautified. You can specify that there be more than one line break by setting Line breaks for the opening and closing tags.

Attributes/Values Tab

The Attributes/Values tab of the HTML Beautifier is pictured below.

The Attributes/Values tab contains the following settings:

  • 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 - Specifies whether you want word values 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">. Select Preserve if you want word values left alone.

  • Quote number values - Specifies whether you want number values 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">. Select Preserve if you want number values left alone.

  • Quote all values - When on, all values will be quoted after the = of an attribute inside the body of a tag. For example, <td align=right> would be beautified to <td align="right">.

Comments Tab

The Comments tab of the HTML Beautifier is pictured below.

The Comments tab contains the following options and settings:

  • 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. The following is an example of a stand-alone comment:

    <!-- 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.

  • Define Comments - Displays 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.

  • Trailing comments - Specify how trailing comments are treated from the following options:

    • 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. An example of a trailing comment is:

      <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.

    The following is an example of code before beautifying trailing comments:

    <TR>
<TD><four characters><!-- trailing comment -->
</TD>
</TR>

    The resulting code would be:

    <TR>
  <TD><four characters><!-- trailing comment -->
  </TD>
</TR>
Advanced Tab

The Advanced tab of the HTML Beautifier is pictured below.

The following options are available on the Advanced tab:

  • End previous <P> tag when - Select from the following options:

    • Hitting another <P> tag - When on, the beautifier will interpret a <P> tag as a signal of the end of any previous paragraphs.

    • 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. For example:

      <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 the JavaScript Beautifier settings. The JavaScript Beautifier is the same as the C/C++ Beautifier - see C/C++ Beautifier for more information.

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.

Auto Symbol Translation

Auto Symbol Translation automatically converts a character or sequence of characters to the appropriate entity reference, saving you from having to repeatedly guess at the correct entity or look up reference charts. This feature works automatically as you type, so you don't need to press a special key or key sequence to trigger the translation. For example, type >>, and SlickEdit® automatically converts the >> sequence to >, which is the entity reference for the right angle bracket (>). Typing && translates to &, the entity reference for the ampersand symbol (&).

Auto Symbol Translation uses the Alias mechanism in SlickEdit'the character or character sequence that you type to trigger translation is actually a special kind of alias, henceforth called a "symbol alias". SlickEdit comes with some predefined symbol aliases. You can view these, customize them, and create your own by using the Symbol Translation Editor dialog. The first time Auto Symbol Translation is triggered, a prompt appears that describes the feature and lets you open the Symbol Translation Editor.

Enabling/Disabling Auto Symbol Translation

Auto Symbol Translation is enabled by default. The first time you type a symbol alias and automatic translation occurs, a prompt is displayed that explains the feature and provides a button to access the Symbol Translation Editor. You can also choose to prevent the prompt from appearing again in the future.

To turn off Auto Symbol Translation, from the main menu, click Tools → Options . Expand Languages and your language category, then select your language and click [Language] Formatting Options. Clear the Auto symbol translation option.

Configuring Symbol Aliases

The Symbol Translation Editor dialog is used to configure symbol aliases. It can be displayed by clicking Yes on the prompt that appears the first time a symbol translation occurs, or by clicking the Settings button on the Formatting Options screen for your language (Tools → Options → Languages → [Language Category] → [Language] → Formatting Options ).

The box on the left shows a list of symbol aliases. The edit window on the right contains the translation for the selected alias. Click New to enter a new symbol alias, or click Delete to remove a selected alias. Working with symbol aliases is the same as working with language-specific aliases. You can even use escape sequences and Parameter Prompting for some interesting translation results. See Creating a Language-Specific Alias for more information.

XML/HTML Formatting

Content in XML and HTML files may be set to automatically wrap and format as you edit. XML/HTML Formatting is essentially comprised of two features: Content Wrap, which wraps the content between tags, and Tag Layout, which formats tags according to a specified layout. Both can be activated individually for all XML and HTML files that are opened in SlickEdit®, or just for the current document.

Formatting schemes form the basis for how tags and content are formatted. A formatting scheme contains any number of XML or HTML tags, each of which can be configured individually for indent levels, wrapping, and tag structure. Multiple schemes can be defined®for example, you may want one scheme for HTML files and another for XML files, or perhaps you are required to code certain files to various standards. Schemes can be saved and imported, so they can be shared with your team. Tags for each scheme can be entered manually or you can import tags from the current file.

Caution

XML/HTML Formatting does not currently affect XML or HTML Beautifier settings. If you run the beautifier on documents that have been automatically formatted through XML/HTML Formatting, you may find unexpected results.

Enabling/Disabling XML/HTML Formatting

XML/HTML Formatting is on by default for XML and HTML files that you open in SlickEdit®. You can activate and/or deactivate Tag Layout and/or Content Wrap for either file type on a global basis or on a per document basis. Options to turn these features on/off are located on the Document → XML/HTML Formatting menu.

Enabling/Disabling Globally

Automatic formatting can be enabled or disabled for every XML and/or HTML file that is created or opened in SlickEdit®. These XML- and HTML-specific global options are toggled on/off by placing a check next to Enable XML Formatting and/or Enable HTML Formatting. To toggle Tag Layout and/or Content Wrap on or off for either file type, check or uncheck those items. For example, if you want both Tag Layout and Content Wrap enabled for XML files, but you only want Content Wrap enabled for HTML files, place a check next to Enable XML Formatting and its sub-menu items Tag Layout and Content Wrap, then place a check next to Enable HTML Formatting and its sub-menu item Content Wrap.

The xml_formatting_toggle and html_formatting_toggle commands can also be used to toggle all respective formatting features on/off. For use in macros, two more commands are available: xml_formatting and html_formatting. When you use any of these commands, the command line prompts for yes (Y) or no (N). When these commands are used to enable/disable XML/HTML Formatting, both Tag Layout and Content Wrap are enabled/disabled for both XML and HTML files on a global basis.

You can also turn automatic formatting on and off through the language-specific Formatting Options screen: from the main menu, click Tools → Options , expand Languages and your language category, then select your language and click [Language] Formatting Options. In the Auto formatting options group box, select the default formatting scheme you want to use for this language, then enable/disable the content wrapping or tag layout options. Click the Configure Schemes button to open the XML/HTML Formatting Scheme Configuration dialog (see Working with Schemes).

Enabling/Disabling for the Current Document

Current document options are available so that you can turn off aspects of global formatting for just the current document. For example, if you have both aspects of HTML formatting enabled globally, but you need to edit an old HTML file and do not want automatic tag layout to occur, you can disable HTML Tag Layout for that specific file. The current document settings are remembered each time you open that file.

To change XML or HTML formatting for just the current document, click Document → XML/HTML Formatting → Current Document Options , or use the xml_html_document_options command. The Current Document Options dialog is displayed.

Select the Formatting scheme that you want applied, then check or uncheck the Auto formatting options that you want enabled or disabled. Click Configure Schemes if you want to modify or create a new scheme to apply to the current document.

Global formatting must be enabled for the current file type in order for these options to be available. For example, see the two screen shots shown previously. The menu screen shot shows that global HTML formatting is enabled for Content Wrap only. This means that tag content for every HTML file that you create or open in SlickEdit® will be wrapped, but no Tag Layout settings will be applied. The second screen shot (the Current Document Options dialog) reflects that the global setting for Tag Layout is disabled. Therefore it cannot be enabled for the current document. To enable it for the current document, you would first need to enable the global setting by placing a check next to Document → XML/HTML Formatting → Enable HTML Formatting → Tag Layout . Then you can use the Current Document Options dialog to enable it for the current document.

Working with Schemes

A formatting scheme is comprised of any number of individually configurable XML or HTML tags and controls the formatting of your text when XML/HTML Formatting is enabled. You can create different schemes for use with either XML or HTML, and/or different schemes for use with different individual files. For example, you may want one scheme for HTML and a different scheme for XML. Or, you may want one scheme for creating new files and another for editing existing files.

Schemes are stored as XML files in the format SchemeName.xml, and are located in the formatschemes/xwschemes subdirectory of your user configuration directory. Scheme files can be shared or checked into version control to ensure consistency in the formatting of your team's XML/HTML files.

Use the XML/HTML Formatting Scheme Configuration dialog to work with schemes. To access this dialog, from the main menu, click Document → XML/HTML Formatting → Current Document Options, then click the Configure Schemes button on the Current Document Options dialog. You can also display the dialog by using the xml_html_options command. Available schemes are listed in the Schemes column. The tags that make up each scheme are listed in the Tags column.

Default Schemes

XML/HTML Formatting comes with two default schemes. Each time that you open an HTML file for editing, by default, the html (default html) scheme is used. Each time an XML file is opened, the xml (default xml) scheme is used. You can configure the settings for each default scheme or specify your own default schemes (see Specifying a Different Default Scheme).

The html (default html) scheme is comprised of a (default) tag as well as a list of commonly used HTML tags, that are preconfigured with standard settings. The xml (default xml) scheme is comprised of one (default) tag preconfigured with standard settings.

For any tag that does not appear in the Tags list, the (default) tag settings are used.

Specifying the Scheme to Use

You can specify a scheme to use for just the current document, or a default scheme to use for all HTML and/or XML files that are created or opened in SlickEdit®.

To specify the scheme for the current document, click Document → XML/HTML Formatting → Current Document Options , and pick the scheme to use from the drop-down list. The scheme you choose is remembered the next time that the document is opened.

Specifying a Different Default Scheme

SlickEdit® has two predefined default schemes (see Default Schemes). You can specify your own default scheme for new XML or HTML files by selecting a scheme, then from the right-click context menu, choose Set as Default XML Scheme or Set as Default HTML Scheme. The name in the Scheme list will be appended with the text "(default xml)" or "(default html)". For example, if you have an HTML scheme named readmes and set it as the default, the name in the Schemes list will change to readmes (default html).

Creating Schemes

To create your own scheme, right-click in the Scheme column of the XML/HTML Formatting dialog, and select New Scheme.

Type a name for your scheme, then select an existing scheme on which it should be based. This will "copy" all of the tags and settings from the selected existing scheme to your new scheme. Click Create when finished.

Saving and Deleting Schemes

In the XML/HTML Formatting Scheme Configuration dialog, modified schemes are denoted by asterisks around the name (for example, *html*). To save a modified scheme, right-click on it and select Save Scheme Changes. Alternatively, when you close the XML/HTML Formatting dialog, you are prompted whether to save modified schemes.

To delete a selected scheme, right-click and choose Delete Scheme.

Working with Tags

As described previously, formatting schemes are comprised of individual tags with associated formatting settings. For example, in HTML, you may want start and end <div> tags to be on separate lines above/below the text, while start/end style tags (such as <b> and <i>) are formatted inline with the text.

In order to configure formatting for individual tags, you must first define a scheme (see Creating Schemes), or you can use one of the default schemes (see Default Schemes). The Tags column of the XML/HTML Formatting dialog shows a list of tags associated with the selected scheme.

Default Tags

For all schemes, a (default) tag is included. It defines the settings that are applied to tags that are not specifically listed in the Tags list. It can also be used as a basis for other tags when you use the Match tag style ofoption on the General tab.

The default settings for the (default) tag are based on a block-style tag, in that the start and end tags are on separate lines, content and nested tags are indented according to your extension indent style, and content is wrapped to a fixed right margin at column 80. Use the Preview area at the bottom of the dialog to see how tags based on the (default) tag will be formatted in your code.

Base Tags

Base tags are used to define groups of tags with similar behaviors. By creating a base tag and associating a set of actual tags with that tag, you can configure that set of tags by changing the settings for the base tag. The sample HTML schemes included with SlickEdit® include two base tags: (block) and (semi-block). When creating your own base tags, be sure to use unique tag names that are not used in formatting to make it easy to spot them.

The (block) tag is useful as a base tag for tags like <div>, where you want the start and end tags on separate lines from the content and aligned vertically. By default, this style indents nested tags and content according to your extension indent style, and content is wrapped to a fixed right margin at column 80. Because this is a common style in HTML, the (block) tag has the same settings as the (default) tag.

The (semi-block) tag is useful as a base tag for tags such as <h1>, where you want the start and end tags on the same line as the content. The default settings for (semi-block) are the same as for (block), except for the start and end tags.

Use the Preview area at the bottom of the dialog to see how tags based on these base tags will be formatted in your code. The following are examples:

<div>
    Sample text of a tag set to (block) style.
</div>

<h1>Sample text of a tag set to (semi-block) style. Notice how wrapping
occurs within this tag.</h1>
Adding and Deleting Tags

To add individual tags to a selected scheme, right-click in the Tags column and select New Tag. Type the name of the tag without angle brackets or attributes. Click OK and the new tag is now listed in the Tags column.

Note

Tag names cannot have spaces. If you create a new tag with spaces, SlickEdit converts the spaces to underscores in the dialog.

To add all of the tags from the current file to a selected scheme, right-click in the Tags column and select Add Tags from Current File.

To remove a tag from a selected scheme, right-click on the tag and select Delete Tag. Deleting SlickEdit®(default) tags, or any tag that is based on another, is not recommended. If you attempt to do this, you will be prompted whether to continue.

Formatting Settings

The tabs on the XML/HTML Formatting dialog contain settings that control how your text is formatted when XML/HTML Formatting is enabled. For descriptions of these options, see XML/HTML Formatting Scheme Configuration Dialog .

Caution

XML/HTML Formatting does not currently affect XML or HTML Beautifier settings. If you run the beautifier on documents that have been automatically formatted through XML/HTML Formatting, you may find unexpected results.

Outline View for XML

For XML documents, the Defs Tool Window also provides a more customizable way of representing any XML file. This allows you to set up rules for how you want to see any type of XML node that is presented in the tree. There are several ways that you can customize a particular element's appearance:

  • Determining whether or not we want the element to be shown.

  • Using static text, attribute values or the node's value itself to build a format string for each node type.

Formatting Rule Sets

Formatting rule sets define how each element in an XML file is displayed in the tree. Each rule in the set represents an XML element that may be found in the XML file, and each is assigned a formatting string. This formatting string works very similarly to formatting strings in programming; you may use static text, and you may also include replaceable text, or aliases, for values that come from each specific node. There are currently two aliases that are available in for a format string:

  • (%attribute): This alias retrieves the value of a specific attribute on an XML node. For example, (%src) would retrieve the "src" attribute value.

  • (%\v): This alias retrieves the actual value of the node between the tags.

For instance, if we have a sect1 node like the following:

<sect1 xreflabel="Introduction">Hello world!</sect1>

and a format string defined for sect1 like this:

Section 1 (%xreflabel) : "(%\v)"

then the XML Outline View representation for this sect1 node would look like this:

Section 1 (Introduction) : "Hello world"

By controlling the way each XML element is displayed in the tree, we can create a much more readable presentation of the XML file.

Activating the XML Outline View

To activate the XML Outline View, right click in the tool window and select Outline View → Use Outline View. This will only be enabled if the current document is an XML document. If you have not used the Outline View before, and you open an XML document, you will be prompted for whether or not you would like to use it, and whether you would like to configure a set of formatting rules for the current document. If you don't want to see the XML Outline View anymore, you may simply right click the tree and uncheck Outline View → Use Outline View to toggle it off.

Formatting Rule Set Configuration

The following dialog allows you to set up the formatting rule set you want to use for any specific XML document. You may be prompted to set up formatting rules the first time you view an XML document, or you may return to this dialog at any time by selecting Outline View → Edit Format Rules....

The current rule set is shown at the top of the dialog and represents the rule set you are currently editing. In the screen shot, which shows a rule set for docbook files, there is a rule for the para element, and a rule for the sect1 to sect5 elements.

To add a new element to the current rule set, click the New button underneath the XML element list. You will be prompted to select the name of the element from a combo box (which is populated with unique element names from the current document) or you can enter your own name if it's not in the list. Next, you will enter a formatting string for the element. You may also delete the current rule by clicking the Delete button underneath the XML element list. If an element is not in the list, it will not be represented in the XML Outline View.

If you would like to create a new formatting rule set, you may click the New button next to the rule set drop down. You will be prompted to enter the name of the new rule set, and then you may begin adding rules to it. If you no longer want a rule set, you may delete it by clicking the Delete button next to the rule set drop down.

Applying Formatting Rules to XML Files

Once you have a formatting rule set to apply to one or more of your XML files, you can make that assignment by right clicking the tree and selecting Outline View → Select Format Rules.... This will bring up the following dialog:

Here, you may select the formatting rule set that you wish to use with the current file. You may also select the scope to which it is applied. You may:

  • Use the scheme for the current document.

  • Use the scheme for all XML files with the same extesion as the current document.

From this dialog, you may also click the Configure button to go back to the Formatting Rule Set Configuration dialog.


Chapter 10. Tools and Utilities

This chapter contains the following topics:

  • Find and Replace

  • Comparing and Merging

  • Version Control

  • GUID Generator

  • Spell Checking

  • Sorting Text

  • FTP

  • Regular Expressions

  • Using the Calculator and Math Commands

  • OS File Browser

Find and Replace

SlickEdit® provides several different ways to search and replace:

  • For the fastest method of searching and replacing, use Quick Search and Quick Replace (see Quick Search and Replace below).

  • To find and replace text "on the fly," or, as you type, use incremental searching (see Incremental Searching below).

  • If you are more comfortable with keystrokes, you may prefer command line searching with the find and replace commands (see Find and Replace Commands).

  • Use the Find and Replace tool window if you prefer working within an interface (see Find and Replace Tool Window).

  • To search for symbols, use the Find Symbol tool window (see Find Symbol Tool Window).

Both the Find and Replace tool window and command line searching provide the same search and replace options for single or multiple files, and for searching and replacing text, wildcards and regular expressions, so you can choose which method works best for you.

This section also includes the topics Find and Replace with Regular Expressions, Undoing/Redoing Replacements, and Match Highlighting.

Default Search Options

The behavior for all of the search mechanisms in SlickEdit® is controlled by the Search Options located in the Options dialog (Tools → Options → Editing → Search ). The options specified here are used each time a search is performed, except for the Find and Replace Tool Window, which has controls to override these settings.

The value of the settings in the Options dialog are used to initialize the corresponding controls in the Find and Replace tool window. Once the value is changed in the tool window it is remembered and used the next time the Find and Replace tool window is launched. So changing a value in the Search Options may not have any effect on the Find and Replace tool window. Changing a setting in the Find and Replace tool window will not change the settings in the Search Options. See Search Options for more information.

Quick Search and Replace

Quick Search

The fastest way to search is by using Quick Search. Quick Search looks through the current buffer for the word or selection at the cursor. You can find the next occurrence of a search item by selecting a string in an existing buffer or Search Results window, then selecting Quick Search from the right-click menu (or by using the quick_search command). The commands find_next (Search → Next Occurrence or Ctrl+G) and find_prev (Search → Previous Occurrence or Ctrl+Shift+G) will find the next and previous instances of the item, respectively. Quick Search always uses the default search options (see Search Options.).

Quick Replace

Quick Replace gets the current word or selection at the cursor, prompts for replacement text on the command line, then highlights each occurrence of the word and prompts if you want to replace the text. Quick Replace always uses the default search options (see Search Options).

To use Quick Replace, right-click on any word or selection and select Quick Replace (or use the quick_replace command).

The quick_replace command has a command line alias, qr. The qr command takes the replace string as an argument. For example, if the cursor is on the word "cat," the command qr dog will prompt you to replace all the instances of "cat" with "dog" in the current buffer.

Incremental Searching

During incremental searching, a string is searched for as it is typed. To start a forward incremental search using the command line, use the i_search command (Ctrl+I). To start a reverse incremental search, use the reverse_i_search command (Ctrl+Shift+I). Incremental Search always uses the default search options (see Search Options).

The following key combinations (based on the default CUA emulation) take on a different definition during an incremental search:

Keys | Function
Ctrl+R | Search in reverse for the next occurrence of the search string.
Ctrl+S | Search forward for the next occurrence of the search string.
Ctrl+T | Toggle regular expression pattern matching on/off.
Ctrl+W | Toggle word searching on and off. To change the word characters for a specific language, use the Word chars field on the language-specific General options screen (see Language-Specific General Options).
Ctrl+Shift+W | Copy complete word at cursor to search string.
Ctrl+C | Toggle case sensitivity. The key bound to the Brief emulation command case_toggle will also toggle the case sensitivity.
Ctrl+M | Toggle searching within selection.
Ctrl+O | Toggle incremental search mode.
Ctrl+Q | Quote the next character typed.
Ctrl+S or F5 | (Brief emulation) Search forward for the next occurrence of the search string.
Ctrl+R or Alt+F5 | (Brief emulation) Search in reverse for the next occurrence of the search string.
Ctrl+W | (GNU Emacs emulation) Copy complete word at cursor to search string.
Ctrl+Shift+W | (GNU Emacs emulation) Toggle word searching on and off.

Incremental searching stops when you press a key that does not insert a character. You can press Esc to terminate an incremental search (only during prompting). Press and hold Ctrl+Alt+Shift to terminate a long search.

You can retrieve your previous search string by invoking the i_search or reverse_i_search command and pressing Ctrl+S or Ctrl+R, respectively, before entering a search string.

Find and Replace Commands

Find and Slash (/) Commands

The command line is available for performing searches. You can use the forward slash (/) or find commands which provide the same functionality as the Find and Replace tool window. Press Esc to toggle the cursor to the command line.

The syntax of the slash(/) command is:

/string[/OptionCharacters]

The syntax of the find command is:

find /string[/OptionCharacters]

OptionCharacters is one or more of the following option characters:

Option Character(s)

Description

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 SlickEdit® regular expression.

U

Interpret search string as UNIX regular expression.

B

Interpret string as a Brief regular expression.

N

Do not interpret search string as a regular expression.

P

Wrap to beginning/end when string not found.

W

Limit search to words. Used to search for variables.

W=SlickEdit-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 language, use the Word chars field on the language-specific General options screen (see Language-Specific General Options).

W:P

Limit search to word prefix. For example, a search for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS

Limit search to strict word prefix. For example, a search for "pre" matches "prefix" but not "pre," "supreme" or "supre".

W:S

Limit search to word suffix. For example, a search for "fix" matches "fix" and "suffix" but not "fixit".

W:SS

Limit search to strict word suffix. For example, a search for "fix" matches "suffix" 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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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)

Delimiter to separate ambiguous options.

X CCLetters

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

C CCLetters

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

*

Used with the "Search hidden text" (H) or "Highlight matches" (#) options to find all matches and un-hide or highlight them.

&

Use Wildcard regular expression syntax (*, ?).

#

Highlight matched patterns with highlight color.

V

(Replace commands only) Preserve case. When specified, each occurrence found is checked for all lowercase, all uppercase, first word 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.

$

(Replace commands only) Replaced occurrences are highlighted with modified color.

If you don't specify options when using the find and (/) commands, the default search options are applied. See Search Options for more information.

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.

Replace and c Commands

The replace commands, replace and c, can be used in the command line. The syntax of these commands is:

c /string1/string2[/options]

or:

replace /string1/string2[/options]

The available options are the same as for the find and slash(/)commands (see Find and Slash (/) Commands above).

You can perform one of the following actions with the replace command (c) by pressing the corresponding key:

Key | Action
Y or Space | Make change and continue searching.
N or Backspace | No change and continue searching.
L or Dot | Make change and stop searching.
G or ! | Make change and change the rest without prompting.
Q or Esc | Exit command. By default, the cursor is NOT restored to its original position. If you want the cursor restored to its original position, from the main menu click Tools → Options → Editing → Search and set the Restore cursor after replace option to True.
Ctrl+G | Exit command and restore cursor to its original position.
Ctrl+R | Search in reverse for next occurrence of search string.
Ctrl+S | Search forward for next occurrence of search string.
Ctrl+T | Toggle regular expression pattern matching on/off. The key bound to the Brief emulation command re_toggle will also toggle regular expression pattern matching.
Ctrl+W | Toggle word searching on/off. To change the word characters for a specific language, use the Word chars field on the language-specific General options screen (see Language-Specific General Options).
Ctrl+C | Toggle case-sensitivity. The key bound to the Brief emulation command case_toggle will also toggle the case-sensitivity.
Ctrl+M | Toggle searching within selection.
F1 or ? | Display Help on Find and Replace tool window.
Replace Command Search Examples

The table below provides examples of using command line replace.

Example

Description

c $/$\$

Replace occurrences of forward slashes with back slashes.

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 lowercase 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.

replace/Test/TEMP/v

Replace occurrences of the word "test" with the word "temp", with the case preserved. For example:

  • Occurrences of "Test" are replaced with "Temp".

  • Occurrences of "test" are replaced with "temp".

  • Occurrences of "tesT" are replaced with "TEMP" (because a mixed case will retain the actual replacement that you typed).

  • Occurrences of "TEST" are replaced with "TEMP".

Find and Replace Tool Window

You can use the Find and Replace tool window (Ctrl+F, Search → Find , or View → Tool Windows → Find and Replace ) to specify search and replace options and conduct search and replace operations on selections, single files, or multiple files.

Docking the Tool Window

Like other SlickEdit® tool windows, this tool window is dockable. Docking options can be accessed by right-clicking on the tool window's title bar. When the tool window is docked, invoking any find or replace command will bring the window to the front focus. When it is not docked, invoking these commands will cause the window to float display. Whether docked or floating, search and replace operations will not close the tool window by default.

Saving Search and Replace Values

When the Find and Replace tool window is invoked, the options that were used for your last search are displayed, providing a way to repeat the last search. Options also persist when switching between the tabs. Pressing F7 and F8 retrieves previous and next responses, respectively.

Search and replace values can be saved as named operations. Saving preserves the values of all of the fields in the Find and Replace tool window so that the search and/or replace operation can be repeated in the future with the same results. To save the search/replace, right-click in the Find and Replace tool window. Select Saved Search Expressions, then select Save Search Expression from the sub-menu. You will be prompted to name the operation. To access a saved operation, select Saved List from the sub-menu, then pick the saved operation to load.

Syntax-Driven Searching

To reduce the number of false positives in your searches, you can restrict the search based on program syntax. Click the Color button on the Find tab of the Find and Replace tool window to specify the syntactic elements for filtering. Each check box has three states:

  • Neutral (the default) - All check boxes start in the neutral state. These elements will be used in a search until cleared or until one or more other elements are selected. Putting a check in any check box essentially clears all non-checked boxes.

  • Selected - If the check box is selected, the search will be restricted to this element and any other selected elements. There is no need to clear any other elements if any elements are selected. If any elements are selected, only selected elements will be searched. For example, to search for the word "result" only in comments, put a check only in the Comment check box. All other syntactic elements will be ignored as part of this search.

  • Cleared - If the check box is clear, these elements will not be searched. For example, if you want to find the word "result" anywhere in your code except for in comments, clear the Comment check box.

Setting Options

Options for individual search and replace operations are located on the Find and Replace tool window. Alternatively, you can set default options that are always used instead. To set the default options, right-click on the background of the tool window and select Configure Options. The default search options will always be used when the Find and Replace tool window is invoked, unless settings are changed on the Find and Replace tool window. If you change settings on the tool window and want to use the default options instead, right-click in the tool window and select Use Default Options. See Search Options for more information. For information on the individual options on the Find and Replace tool window, see Search Dialogs and Tool Windows.

Search Results Output

You can specify that multi-file search results are displayed in a new editor window or in a new Search Results tool window.

To send the results to a new editor window, select the Find in Files tab, click the Result options button to expand the options, then select Output to editor window.

To send the results of a multi-file search to a specific Search Results tool window, select the Find in Files tab, click the Results optionsbutton to expand the options, then use the Search Results Window drop-down list to select the window to be used. These are labeled starting at Search<0>. A new results tool window can be added with the <New> option up to a pre-set limit of open Search Results windows.

If <Auto Increment> is selected from the Search Results Window drop-down list, the search results will cycle through all of the open Search Results tabs in the Search Results tool window with each new search. For example, if you have Search<0>, Search<1>, and Search<2> open, then for each search operation, the results will be displayed in this order: Search<0>, Search<1>, Search<2>, Search<0>, Search<1>, and so on. If you only have one Search Results tool window open, then all results will go into the only open search windows. You can open and close search results windows by right-clicking on the Search Results tab in the Search Results tool window.

Right-click in the Search Results window to access the following options:

  • Quick Search - Finds the next occurrence of the text selected.

  • Filter Search Results - Select this option to display the Filter Search Results dialog. From here, if a match is found, you can choose to keep or delete lines with additional searches, match case, limit to current default regular expression syntax and/or remove matches found on the same line number in the same file (this can also be accomplished by selecting List matching lines only from the Find in Files tab).

  • Open as Editor window - Opens current search results in a new editor window.

  • Go to Line - Goes to the file/line number of the current line in the Search Results window.

  • Bookmark Line - Places a bookmark at the line in the file where the result was found.

  • Clear Window - Clears all results in the current Search Results window.

  • Align Columns - Aligns the line numbers and column numbers for all search results.

  • Collapse All - Collapses all Selective Display levels. See Selective Display for more information.

  • Expand All - Expands all Selective Display levels. See Selective Display for more information.

See Find in Files Tab for more information.

Find Symbol Tool Window

The Find Symbol tool window (Search → Find Symbol or gui_push_tag command) is used to locate symbols in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match.

Searching for a symbol is faster than a normal text search because it is executed against the Context Tagging® database, rather than searching through your source files. Find Symbol also avoids false hits in comments or string literals. Though Syntax-Driven Searching in the regular Search Dialogs and Tool Windows provides this same capability, it cannot match the speed of Find Symbol.

See Find Symbol Tool Window for information about the options that are available.

Find and Replace with Regular Expressions

SlickEdit® supports five types of regular expression syntax that you can use for finding and replacing when regular search and replace operations are too limiting:

  • Brief

  • Perl

  • SlickEdit

  • UNIX

  • Wildcards

See Regular Expressions for more information.

Undoing/Redoing Replacements

To undo a replacement, click Edit → Undo , press Ctrl+Z, or use the undo command. To redo a replacement, click Edit → Redo , press Ctrl+Y, or use the redo command.

To undo replacements in multiple files, click Edit → Multi-File Undo or use the mfundo command. To redo replacements in multiple files, click Edit → Multi-File Redo or use the mfredo command.

Match Highlighting

Cursor on Symbol Shows All Uses in File

SlickEdit® can highlight all occurrences of the current symbol under the cursor. This makes it easy to see, at a glance, all uses of a symbol in a file. This option can be set on a language-specific basis. To enable it, from the main menu, click Tools → Options → Languages , expand your language category and language, then select Context Tagging®. On the options screen, select Highlight matching symbols under cursor.

The highlight color is controlled by the Symbol Highlight screen element (Tools → Options → Appearance → Colors ). To change the color, see Setting Colors for Screen Elements. See Language-Specific Context Tagging® Options for information about other options on the options screen.

This feature includes two advanced options that affect all languages that have Highlight matching symbols enabled. These can be set through configuration variables (Macro → Set Macro Variable ):

  • def_highlight_symbols_max_bufsize - This variable sets the maximum buffer size, in bytes, for symbol highlighting. If the buffer size is greater than the max size, highlighting is restricted to the visible lines.

  • def_highlight_symbols_max_matches - This variable sets the maximum number of matching occurrences for symbol highlighting.

See Setting/Changing Configuration Variables for more information.


Comparing and Merging

SlickEdit® provides several ways to compare and merge files:

  • DIFFzilla®

  • 3-Way Merge

  • The Compare Command

DIFFzilla

DIFFzilla® provides powerful differencing capabilities that let you compare files or directories and view the differences side-by-side. You can make edits, merge changes, and save modified files easily within the results windows. As edits are made, the diff view is updated as you type, so you don't have to re-run the comparison. And, switching from a directory comparison to an individual file difference is as simple as a mouse click.

Dynamic Difference Editing

Unlike most diff tools, DIFFzilla® allows you to edit your code while viewing differences. Undo, copy/paste, Syntax Expansion/indenting, SmartPaste®, Auto List Members, Auto Parameter Info and many emulation key mappings work when editing in DIFFzilla. When you type or make any edit, lines are re-diffed (compared again) so that you can view the new intra-line differences easily.

Source Diff

With Source Diff, DIFFzilla ignores whitespace and carriage returns when comparing two files. This allows you to see real differences in the code while ignoring differences in formatting. For example, look at the two code samples, below. They are identical, except for the brace style used. Most diff tools will tell you that they are different. Source Diff will tell you that these two are the same.

        Rectangle::Rectangle() {
        }

        Rectangle::Rectangle()
        {
        }

Using Source Diff, DIFFzilla presents the Path 2 file with it's formatting adjusted to match that of the Path 1 file. We insert stream markers to indicate whitespace that was added or removed.We make a copy of the file specified in Path 2, so no actual changes to the file are made.

In this screen shot, you can see a blue squiggle (highlighted in the red circle) that indicates where the formatting was adjusted. The file on the right is actually formatted with the braces on separate lines, but Source Diff adjusts them to match the formatting of the file on the left. These adjustments are skipped by Next Diff and Prev Diff, allowing you to focus on meaningful differences, like the extra definition in the file on the right.

Using DIFFzilla

The following sections describe how to use DIFFzilla and the differencing features in SlickEdit. For more details on the specific options available on the DIFFzilla dialog (Tools → File Difference or diff command), see DIFFzilla® Dialog.

  • Comparing Two Files

  • Comparing Two Folders

  • Comparing Symbols

  • Generating File Lists

  • Automatic Directory Mapping

  • Diffing File History

Launching DIFFzilla from the Operating System

DIFFzilla can be launched from the operating system using the vsdiff executable. This command actually launches SlickEdit but in a mode where just DIFFzilla is visible. This command includes an implicit +new option so that it will not interfere with existing instances of SlickEdit already running. For more information see Running Multiple Instances.

Comparing Two Files

To diff two source files, complete the following steps:

  1. From the main menu click Tools → File Difference , or use the diff command. The DIFFzilla® dialog appears, as pictured below.

  2. Under Diff Type, select the Compare Two Files option.

  3. Enter the name of the first file to compare in the Path 1 text box. Enter the name of the second file in the Path 2 text box. If the file names only differ by path, you only need to specify the path for Path 2.

  4. Click OK.

Comparing Two Directories

You can difference two source trees to determine what files have been added or removed and generate a list of file names. When the source tree difference is complete, click Save to generate a list file. To diff two source trees, complete the following steps.

  1. From the main menu, click Tools → File Difference , or use the diff command.

  2. Mark the Recurse into subdirectories check box to compare subdirectories.

  3. Enter the two directories in the Path 1 and Path 2 text boxes.

  4. Fill in the Filespecs text box with the files that you want processed.

  5. Click OK. The Multi-File Diff Output dialog is displayed.

If a file exists in one tree but not the other, a plus sign (+) is displayed in the one tree and a minus sign (-) in the other. You can customize the files to view with the context menu. To display the context menu, right-click in the left or right tree. If you move the mouse over the Plus or Minus bitmap next to the item in the tool tree, a tool tip is displayed indicating what the bitmap means.

For descriptions of the buttons on the Multi-File Diff Output dialog, see Multi-File Diff Output Dialog.

Comparing Symbols

DIFFzilla® provides the ability to diff (compare) a selected range of lines from two files or the same file. This is very useful for comparing a piece of code that has been moved into a different part of a different file.

Note

You can only use the interactive dialog output style when diffing a selected range of lines. Therefore, the option Instead of an interactive dialog, output one buffer with the differences labeled, on the DIFFzilla dialog Options tab, will have no effect.

To compare symbols, select the Symbols option under Diff Type on the DIFFzilla dialog, and all symbols from Path 1 will be diffed against all symbols from Path 2. If Multi-File is selected as the Diff Type, it always allows you to diff all symbols. Be sure to be careful when diffing all symbols. Some symbol blocks are not yet picked up correctly. For example, for C++, C#, and Java, variable initializations are not yet handled correctly, as shown in the code below:

struct MYSTRUCT {
          int x;
          int y;
      };
      MYSTRUCT VariableDefinition= { // symbol definition stops here
         0,1
      };     // really should end here
To diff a selected range of lines from two source files, complete the following steps:
  1. From the main menu, click Tools  → File Difference .
  2. Select the Compare Two Files diff type.
  3. Enter the first file in the Path 1
           text box.
  4. Select Compare symbols: all, in the second
           drop-down list.
  5. Enter the second file in the Path 2 text box.

        Comparing Parts of Files

To diff a selected range of lines from two source files or from a single
        source file, complete the following steps:
Tip
You can compare line ranges from within a single file. This can be
          useful when working with XML or data files.
  1. From the main menu, click Tools  → File Difference .
  2. Select the Compare Two Files diff type.
  3. Type the name of the first file in the Path 1 text box.
  4. Select Compare lines: range, in the second
           drop-down list. The Select line range dialog will be displayed. Specify
           the line range using a selection or by enter the start and end line numbers.

  5. Repeat the previous steps for the second file using Path 2.
  6. Click OK to begin the comparison.

        Generating File Lists
DIFFzilla® can be used to find only the files that have been changed, and can generate file lists. The Save button in the Multi-File Diff Output dialog can create a list of files that includes different files, matching files, and files that do not exist in the other tree. Use the DIFFzilla dialog box to compare the new source tree with the original source tree.
  1. From the main menu, click Tools  → File Difference , or use the diff command.
  2. On the Files tab, select Multi-File.
  3. Enter the first file in the Path 1 text box.
  4. Enter the second file in the Path 2 text box. If the file names only differ by path, you only need to specify the path for Path 2.
  5. Click OK. The Multi-File Diff Output Dialog box opens.

  6.
            Click Save. The Save Multi-File Output dialog box opens.

  7. Select Save Path 1 Filelist, Include different files, and Include files not in Path2. All other check boxes should be clear.
  8. Click OK and select an output file for the list. The file you save will have the .lst extension appended to the output file name.
  9. Zip the files if you want.

        Automatic Directory Mapping
The DIFFzilla® dialog box automatically updates the Path 2 text box with a directory, based on file paths that you previously typed in this field. For example, if you previously typed f:\slick12\bitmaps\ into the Path 1 text box and \\server\user\slick12\bitmaps\ into the Path 2 text box, then f:\slick12\ is mapped to \\server\user\slick12\. The next time that you type f:\slick12\macros\ in the Path 1 text box, \\server\user\slick12\macros\ is automatically entered into the Path 2 text box.
To turn this option off, complete the following steps.
  1. From the main menu, click Tools  → File Difference , or use the diff command.
  2. Select the Options tab.
  3. Click Dialog Setup.
  4. Clear the Automatic directory mapping check box.

        Diffing File History
The Backup History feature is available for viewing and comparing the
        differences between the current and previous versions of an open file. It utilizes the DIFFzilla®
        dialog for diffs. For more information about this working with Backup History, see File Backups.

      3-Way Merge
The 3-Way Merge editing feature can be used after two people make a local copy of the same source file, and each makes modifications to their local copy. The 3-Way Merge takes both sets of changes and creates a new source file. If there are any differences, a dialog box is displayed that lets you select the changes that you want in the output file. The output file can be viewed side-by-side or interleaved.
Performing a Three-Way Merge
To perform a three-way merge, complete the following steps:
  1. From the main menu, click Tools  → File Merge  (or use the merge command). The 3-Way Merge Setup dialog is displayed.

  2. In the Filename text box, enter the baseline (original) file name. Click the Ellipses button to the right of the text box to select files. Click the Bbutton to select from the open buffers.
  3. Enter the other names of the files to be merged in the Revision 1 and 2 text boxes.
  4. In the Output file Filename text box, enter the name of the output file, or click the Ellipses button to select from an existing file.
  5. Select any Merge style or Output style that you want.
  6. Click OK. The following dialog box is displayed with the results of the 3-Way Merge:

Launching 3-Way Merge from the Operating System
The 3-Way Merge can be launched from the operating system using the
        vsmerge executable. This command actually launches SlickEdit but in a
          mode where just 3-Way Merge is visible. This command includes an implicit
          +new option so that it will not interfere with existing instances of
          SlickEdit already running. For more information see Running Multiple Instances.
3-Way Merge Settings
For descriptions of the options on the 3-Way Merge Setup dialog, see Dialogs and Tool Windows.
The compare Command
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.
Tip
 The functionality of the compare command has been replaced with DIFFzilla®. See DIFFzilla® for more information.
You can perform the following steps to manually set up two tiled windows before invoking the compare command:
  1. Open (Ctrl+O) both files you wish to compare
  2. Make current one of the files you wish to compare.
  3. Zoom the current window by clicking on the Maximize button.
  4. Use the hsplit_window command (Ctrl+H or Window  → Hsplit ) to create two tiled windows.
  5. Use the link_window command (Window  → Link Window ) to display the other buffer in the newly created window.
After a compare mismatch, you can use the resync command 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.
In ISPF emulation, this command is not called when invoked from the command line. Instead, ispf_compare is called. Note that you cannot access the compare command when in ISPF emulation unless you bind it to a key.

        Setting Compare Options
The compare_options command displays the Compare Optionsdialog box to set various compare options. The following settings are available:
  •
            Binary compare - When selected, a stream compare (byte-by-byte) compare is performed. Typically a line-by-line compare is performed.
  •
            Expand tabs before compare - When selected, tabs are expanded to the appropriate number of spaces, before lines from each file are compared.
  •
            Ignore leading spaces - When selected, differences in leading spaces of lines are ignored.
  •
            Ignore trailing spaces - When selected, differences in trailing spaces at the end of lines are ignored.
  •
            Ignore all spaces - When selected, differences in spacing between characters in lines are ignored.
  •
            Ignore case - When selected, differences in character casing is ignored.


Version Control

Overview of Version Control

Version control is accessed from the Tools → Version Control menu, by right-clicking within a file or buffer, or by right-clicking on an item in the Files list of the Open tool window.

The History, Difference, Lock, and Properties commands operate on the current buffer. For SCC version control systems, the SCC provider's function is called. For command line version control systems, the specified command is run, and the output is displayed.

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. Note that CVS operations are different and designed to work especially well with CVS. Also, for SCC version control systems, you can select from files that are valid for that command. For example, when using the Check In command, you can click Available to view all files that can currently be checked in.

Use the Manager command 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 unavailable because the SCC interface does not make allowances for a lock command. It is possible to receive an Operation not supported message when running some commands if an SCC version control system does not implement an interface to that operation.

The following version control systems are supported:

  • CCC/Harvest

  • ClearCase

  • ComponentSoftware RCS

  • CVS

  • MKS Source Integrity

  • Perforce

  • PVCS

  • RCS

  • SCC

  • StarTeam

  • Subversion

  • TLIB

  • Visual SourceSafe

Using Version Control

Version control operations can be accessed from the main menu by clicking Tools → Version Control , and then choosing an operation. When you choose an operation, a dialog box for that operation is invoked. The left side of each dialog box contains a list of files determined by the options you have selected. You can click on individual files to select them, or you can select multiple files by using Ctrl+Click or Shift+Click. The following options are available for each operation:

  • Workspace - When checked, all files that are in the current workspace are listed.

  • Project - When checked, all files that are in the current project are listed.

  • Buffers - When checked, all files that are currently open in the editor are listed.

  • Available - When checked, all files that are available for the specified operation are listed. This option is only available for SCC version control systems.

  • Advanced button - Click this button to configure the specified operation's options. This button is only available for SCC version control systems that support these options.

  • Check In - To check files in to the version control system, from the main menu click Tools → Version Control → Check In , or use the vccheckin command. Select the files in the list that you wish to check in, then click the Checkin button.

    The Check In dialog provides an additional option to Save if modified. When this option is selected, any files that are modified are saved before check-in.

  • Get Files - To retrieve files from the version control system, from the main menu click Tools → Version Control → Get , or use the vcgetcommand. Select the files in the list that you wish to get, then click the Get button.

  • Check Out - To check files out of the version control system, from the main menu click Tools → Version Control → Check Out , or use the vccheckoutcommand. Select the files in the list that you wish to check out, then click the Checkout button.

  • Lock - To lock files in the version control system, from the main menu click Tools → Version Control → Lock , or use the vclockcommand. Select the files in the list that you wish to lock, then click the Lock button.

  • Unlock - To unlock files in the version control system, from the main menu click Tools → Version Control → Unlock , or use the vcunlockcommand. Select the files in the list that you wish to unlock, then click the Unlock button.

  • Add files - To add files to the version control system, from the main menu click Tools → Version Control → Add , or use the vcadd command. Select the files in the list that you wish to add, then click the Add button.

    The Add Files dialog provides two additional buttons:

    • The Browse button will invoke a dialog box that allows you to add other files to the list, so that you can select them to be added to the version control system.

    • The Remove button will remove files from the list.

  • Remove files - To remove files from the version control system, from the main menu click Tools → Version Control → Remove , or use the vcremovecommand. Select the files in the list that you wish to remove, then click the Remove button.

Version Control Status Icons

SlickEdit displays the version control status of a file on the document icon in the following tool windows:

  • Projects tool window

  • Files tool window

  • Open tool window

A red ball will appear on the upper left side of files that are locally modified. A blue ball will appear on the lower left side of files that need to be updated.

Note

This feature is supported only for Subversion, currently.

You can turn this feature on/off and configure the frequency of updates on the Subversion options screen. Select Tools → Options → Tools → Version Control → Version Control Providers → Subversion and set the values under Show file status..

Note

If the version control system returns more than 8 megabytes of data, this feature will be turned off for performance reasons. To change that threshold, set def_vc_max_status_output_size.

Configuring Version Control

Before using Version Control, you should configure your setup. To access these options, from the main menu, click Tools → Version Control → Setup , or use the vcsetup command. The Options dialog is displayed open to the Version Control Setup screen. You can also access this screen by clicking Tools → Options → Tools → Version Control → Version Control Setup .

Uses these options 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 projects which use the selected version control system.

For more information, see Version Control Setup Options.

Advanced Setup Options

Advanced setup options are available for each version control system that supports them. From the Version Control Setup options screen (Tools → Options → Tools → Version Control → Version Control Setup ), select the version control system you want to set up, then click on the Setup button. This will display the setup dialog box for the system you have selected. Click the Advanced button on this dialog to access the advanced options. The options are similar for each version control system. See Version Control Setup Options for a list and descriptions of the options.

Setting Up 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 configure a command line version control system for a system that is using a command line driven operating system, complete the following steps:

  1. From the main menu, click Tools → Options , expand Tools, then select Version Control Setup (or use the vcsetup command).

  2. Select theCommand line systems check box.

  3. Select a Version Control System. Be sure that the executable file for each version control command is in your file path, and that the executable files that are included with the version control system can be found in the PATH environment variable. Depending on the system you are using, you might need to complete information in the VCS Project text box.

  4. Click Setup and verify that each command matches the options that you want. (If you are not sure what any of the %<character> macros expand to, click on the arrow to the right of the text box to view a list.)

  5. Click OK.

Specific Version Control Support

Source Code Control (SCC)

SCC is a Source Code Control interface specification that was designed by Microsoft. This interface allows for direct communication between a version control system and another software application. When you are using SCC, keep in mind the following information:

  • If you are using a system that supports SCC, use the SCC support because it provides tighter integration.

  • If your system does not have an SCC interface installed, 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, contact SlickEdit Product Support.

Version control systems that have support for an SCC interface are supported. If you are using PVCS, install the SCC interface support because it does not install SCC support by default. SourceSafe automatically installs SCC support.

The following list of version control systems have SCC interfaces. If any of these systems are not displayed in the SCC Providers list (or the SCC Providers list does not appear) dialog box, you might need to install the support separately:

  • CCC/Harvest

  • ClearCase

  • ComponentSoftware RCS

  • MKS Source Integrity

  • Star Team

Configuring SCC

SCC version control is available for systems that are using a Windows operating system only. To configure an SCC version control system, complete the following steps.

  1. From the main menu, click Tools → Options , expand Tools, then select Version Control Setup (or use the vcsetup command).

  2. Select the system that you want.

  3. Click Initialize Provider.

  4. Click Open Project and complete the Open Project dialog box.

  5. Click OK. A project name is displayed in the list of SCC Version Control Systems. This version control system and project are now bound together.

Opening an SCC Project

The SCC version control system is used to help you manage your files when you are working with projects. SCC is available for systems that are using a Windows operating system only.

To open an SCC version control project, complete the following steps:

  1. From the main menu, click Tools → Options , expand Tools, then select Version Control Setup (or use the vcsetup command).

  2. Be sure that SCC providers check box is marked. If there are no SCC providers installed, the check box is unavailable. To activate this feature, install an SCC provider. For more information, see Specific Version Control Support above.

  3. Select the system that you want, and click Initialize Provider.

  4. Click Open Project. The Open Project dialog box is displayed.

The following list contains additional information to assist you when using SCC with certain applications:

  • Source Integrity - For the SI Project Filename, type the entire path for the project.vpj file. For Sandbox Path, type the path where the files are located on the local system.

  • Perforce - For Client Name, type the name of the Perforce depot (for example, "//depot"). For Local Path, type the name of 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, type the name of the path where the files are located on the local system. You are then prompted for additional information by StarTeam.

After you open an SCC version control project, it is bound to the currently active project. When you restart the project, or switch to this project from another project, this version control project is automatically activated.

PVCS

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 projects. To set these environment variables, complete the following steps:

  1. From the main menu, click Project → Project Properties .

  2. Click the Open Command tab, and type one or more set statements to set the environment variables.

  3. Close and then reopen the project for the project macro to be executed.

CVS

A graphical interface for CVS updates is provided. Before updating a directory, a dialog box is displayed that provides the status information for each file. You can then select the files that you want to update, commit, or add. Use DIFFzilla® to view differences between various versions of a file (see DIFFzilla®).

Move the mouse pointer over the bitmap to the left of the file to display a tool tip which indicates what the bitmap means. The File bitmap with a blue star means that the file is not up-to-date. A File bitmap with a red star means that you have modified the file.

A graphical history dialog for files checked out from CVS is also provided. This includes displaying the current state of the file, all tags for the file and a graphical display of the branches. You can also use DIFFzilla to view differences between the current version and any past version, or any two past versions with each other (see DIFFzilla®).

Commit sets are a way to group files checked out of CVS that need to be checked in at the same time. For example, when fixing a defect you may want to group all of the files that you modified. Commit sets allow you to do this, give a common comment for the group of files and then give an individual comment to each file. When you are done, you can review the commit set, which allows you to easily compare each file with the most up-to-date version using DIFFzilla (see DIFFzilla®). Then, you can commit all of the files at one time.

CVS Options

Options specific to CVS are provided under the Version Control Providers options (Tools → Options → Tools → Version Control → Version Control Providers → CVS ). These options are pictured below.

The following options are available:

  • CVS executable - Specifies the path to the CVS executable that you wish to use.

  • Always pass CVSRoot to CVS commands (use cvs -d option) - When set to True, the CVS -d is passed to all CVS commands.

  • Use CVS status for file bitmaps on project tool window - When set to True, then the current CVS status is used to show icons on the project tool window.

  • When updating, move to next file after diff - When set to True, after the diff of one file is complete, the next file will be shown.

  • When committing, restore last comment - Controls whether the last comment used to commit a file is restored for possible reuse.

  • When committing, restore last tag(s) - Controls whether the last tag used to commit a file is restored for possible reuse.

  • Show labels in version history tree - Specifies whether the version history tree will show labels.

  • In GUI update hide folders missing in repository - When this option is set to True, empty local directories will be hidden in the update tree.

Subversion

Subversion support provides convenient access to information about the files with which you are working, and also a GUI checkout dialog. To get started, from the main menu, click Tools → Options , expand Tools, then select Version Control Setup (or use the vcsetup command). Set the Command line system to Subversion. After you activate this setting, you can diff any file with the current version on its branch, view the history of the file, and update or commit the file. You can also click Tools → Version Control → Compare Workspace with Subversion to compare your local workspace with the files in the repository. The Subversion support mimics the existing SlickEdit® CVS support.

SVN History Dialog

A graphical history dialog for files checked out from SVN is also provided, similar to the CVS history dialog. This includes displaying the current state of the file, all tags for the file and a graphical display of the branches.

Because SVN cannot provide a full history for all branches for a file, SlickEdit uses a "version cache" to store this information. Details of each revision are stored in this cache and can be queried for a full history of a file, and not just that of the current branch. The first time you choose to view the history of a file in an SVN repository, this cache must be built. This can take some time to do, and you will be prompted with the following dialog:

If you select "Yes", an SVN history will come up right away with a flat revision history for the current branch back to the trunk. This can be seen in the following screenshot:

Once the version cache has been built, the following SVN history dialog will be shown:

This view includes a hierarchy of all revisions for a file, nested by the branches they exist on. All further requests for SVN history will happen very quickly. Only the initial construction of the version cache requires an extended period of time to create. You can use DIFFzilla from this dialog to view differences between the current and any past version, or any two past versions, with each other (see DIFFzilla®) from this dialog.

Subversion Options

Options specific to Subversion are provided under the Version Control Providers options (Tools → Options → Tools → Version Control → Version Control Providers → Subversion ). These options are pictured below.

The following options are available:

  • Subversion executable - Specifies the path to the Subversion executable that you wish to use.

  • When updating, move to next file after diff - When set to True, after the diff of one file is complete, the next file will be shown.

  • When committing, restore last comment - Controls whether the last comment used to commit a file is restored for possible reuse.

  • Show branches in version history tree - When set to True, the displayed history of the file will include activity in all branches. When set to False, then the history of branches other than the current one will not be displayed.

  • Show labels in version history tree - When set to True, then label names will be displayed in the history tree. Each label name will be included next to the revision to which it was applied. When set to False, then the labels are not included in the history tree.

  • Hide empty branches in version history tree - When set to True, only branches containing at least one revision for the current file will be displayed in the history tree.

  • Show file status - The following options relate to showing the Subversion status for a file in various tool windows and dialogs.

    • Show status on file icons - When set to True, dialogs that display file icons in the tree will show the file's Subversion status.

    • Get updates from Subversion every (m) - This option specifies, in minutes, how often the file status updates should be retrieved from Subversion.


GUID Generator

The GUID Generator creates a Globally Unique IDentifier for use in your programs. While they are not guaranteed to be unique, the likelihood of generating the same identifier twice is very small.

To run the GUID Generator, select Tools → Generate GUID from the main menu.

Select the format for the new GUID using the GUID Format list. Click the New button to generate a new GUID. Click the Copy button to copy the current GUID to the clipboard. Click the Insert button to insert the current GUID into the current file at the cursor location.


Spell Checking

Spell Check Operations

You can access spell checking operations from the main menu by clicking Tools → Spell Check . Select one of the following operations:

  • Check from Cursor - Check spelling on the open file starting at the cursor's location. You can also use the spell_check command to perform this operation.

  • Check Comments and Strings - Check spelling only on comments and strings within the open file. Spell Check will start at the cursor's location. You can also use the spell_check_source command to perform this operation.

  • Check Selection - Check spelling only on text that is currently selected. The spell_check command also works for this operation.

  • Check Word at Cursor - Check spelling only for the word currently under the cursor. You can also use the spell_check_wordcommand to perform this operation.

  • Check Files - Check spelling on multiple files. You can also use the spell_check_files command to perform this operation. This will invoke the Spell Check Files dialog, which allows you to specify the files for checking. See Spell Checking Multiple Files.

Running Spell Check

When Spell Check is running and a word is found that is not in the dictionary, the Spelling dialog appears, prompting you for action.

The dialog shows the word not found and gives suggestions for a word replacement. Use the buttons on the dialog to perform the following actions:

  • Ignore - Disregard this word and continue spell checking.

  • Ignore all - Disregard all instances of this word in the selected range and continue spell checking.

  • Change - Replace this word with the text in the Change to text box and continue spell checking. You can use the suggested word or type your own word.

  • Change All - Replace all instances of this word in the selected range with the text in the Change to text box, and continue spell checking.

  • Add User 1 and 2 - Add the word not found to one of two custom dictionaries, after which spell checking continues. The first time new words are added to these lists, SlickEdit® creates new files in your configuration directory named userdct1.lst and userdct2.lst. See Spell Check Options for more information on custom dictionary files.

  • Undo Last - Undo the last spell checking operation. The focus is placed on the last word not found.

  • Options - Displays the Options dialog open to the Spell Check Options node. Options include specifying the default dictionary, ignoring uppercase words, and detecting repeated words. You can also access these Spell Check Options from the menu item Tools → Spell Check → Spell Options or by using the spell_options command. See Spell Check Options for more information.

  • Skip File - When spell checking multiple files, use this button to skip checking in the current file.

Spell Checking Multiple Files

The Spell Check Files dialog is used to specify multiple files for checking, and 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 checked for spelling. To access the Spell Check dialog box, pictured below, from the main menu click Tools → Spell Check → Check Files (or use the spell_check_files command).

In the Files text box, enter one or more files separated by spaces. Wildcards may be used (for example, *.html or *.c). You can use the Browse button to the right of this text box to choose a directory. There are two file options available:

  • Recurse subdirectories - If checked, wildcard file specifications in the Files text box will process subdirectories recursively.

  • Include project files - If checked, all project files are checked for spelling.

The Buffers list box lists the open buffers that will be spell checked in addition to the directory specified.


Sorting Text

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. To sort text, from the main menu, click Tools → Sort . The Sort dialog box is displayed, as pictured below.

The following options are available:

  • Type of sort - Choose the type of sort that you prefer from the following options:

    • Sort buffer - When this option is selected, the entire contents of the buffer that you are working in are sorted.

    • Sort on selection - When this option is selected, 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 this option is selected, the selected text is sorted. Text outside a block or column selection is not moved. The Sort on selection and Sort within selection options have the same effect except when sorting a block or column selection.

  • Order - Choose Ascending or Descending. In an ascending sort, the lowest text item sorted is placed at the top.

  • Numeric sort - When this option is selected, a numeric comparison is performed.

  • Remove duplicate lines - When this option is selected, it removes adjacent lines that are identical. This option does not fully support column selection (it always compares complete lines).

  • Case sensitive - When this option is selected, the sort is case-sensitive.

Sort Commands

To use the command line for sorting, first activate the command line by pressing Esc. Sort command syntax is in the form SortCommand OptionLetter(s). The following sort commands are available:

  • sort_buffer - Sorts the current buffer.

  • sort_within_selection - Sorts text within a selected area. This command supports line and block selections only.

  • sort_on_selection - To sort on a column field, press Ctrl+B to select an area of text, then invoke the command sort_on_selection. This command supports line and block selections only.

The table below describes the OptionLetter(s) that you can use with each command.

Option | Meaning
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 | Numeric sort. C-style floating point numbers with up to 32-digit mantissa are supported.
-F | File name sort.


FTP

FTP support within SlickEdit® includes a complete FTP/SFTP client and the ability to easily open and edit FTP files.

Working with FTP

Before you can access FTP files, you must create an FTP profile, then start that connection. FTP operations can be accessed from FTP tool windows or by right-clicking on FTP files after a connection is active.

FTP Tool Window

There are two tool windows available for working with FTP: FTP and FTP Client.

  • The FTP tool window can be used to connect to FTP servers and open files. To access this tool window, from the main menu, click View → Tool Windows → FTP . Right-click on files to display a menu of FTP operations.

  • The FTP Client tool window can also be used to connect to FTP servers and transfer files. As with most FTP clients, local directories and files are displayed in the left section of the tool window, and the FTP server directories and files are on the right. To access this tool window, from the main menu, click View → Tool Windows → FTP Client . Right-click on files to display a menu of FTP operations.

FTP Profile Manager

To create a new FTP connection profile, complete the following steps:

  1. From the main menu, click File → FTP → Profile Manager (ftpprofilemanager command). Alternatively, you can display the FTP tool window (View → Tool Windows → FTP ) and click the button labeled Start a New Session [image] . The FTP Profile Manager dialog box is displayed, as pictured below.

  2. Click Add to create a new profile. The Add FTP Profile dialog box is displayed.

  3. Click Edit to Edit a profile. The Edit FTP Profile dialog box is displayed.

See Setting FTP Options for information about the options on the Add or Edit FTP Profile dialogs.

Starting a Connection

To start a new connection, use the FTP or FTP Client tool windows described above, and complete the following steps:

  1. Click the FTP button [image] to start a new session.

  2. The FTP Profile Manager dialog box appears. From the Profiles list, select the profile name to connect to.

  3. Click Connect. The FTP tool window displays the content of the remote directory.

  4. Toggle the ASCII Transfer mode button to transfer text files. When in ASCII transfer mode, line ending characters may be translated.

  5. Toggle the Binary Transfer mode button

    to transfer images and executables.

  6. To stop the current operation, click the Stoplight button [image] .

Stopping a Connection

To stop a connection, use the FTP or FTP Client tool windows, and complete the following steps:

  1. Select the connection that you want from the drop-down list at the top of the tool window.

  2. Click the Disconnect Current Session button [image] .

Opening FTP Files

Before you can open FTP files, you need to start a connection. See Starting a Connection above for more information. After your connection starts, from the FTP or FTP Client tool window, right-click on selected files to open them, to change the directory, or to access more options.

Setting FTP Options

There are two types of settings available for working with FTP:

  • FTP connection profile options - These options are used to add or edit new FTP connection profiles. The Add/Edit FTP Profile dialog box is used. To access this dialog, open the FTP Profile Manager, then select New or Edit to edit an existing selected profile. See Add/Edit FTP Profile Dialog for a complete list of available options.

  • Default FTP options - These are the general default FTP settings. To access these options, from the main menu, click Tools → Options , expand Network & Internet Options and select FTP Default Options. See FTP Default Options for more information.


Regular Expressions

Overview

Regular expressions are patterns of text used to match and manipulate strings in your code. These patterns are expressed with combinations of characters defined by the regular expression syntax being used. A regular expression is sometimes referred to as a "regex".

Use regular expressions in your search and replace operations when you find normal search/replace too limiting. For example, with regular expressions, you can:

  • Find quoted strings.

  • Find blank lines.

  • Find words starting at the beginning of lines.

  • Find two words separated by any number of spaces or other text.

SlickEdit® supports five types of regular expression syntax:

  • Brief

  • Perl

  • SlickEdit

  • UNIX

  • Wildcards

SlickEdit also provides a Regex Evaluator that you can use to interactively create, save, and re-use tests of regular expressions. See The Regex Evaluator for more information.

See Regular Expression Syntax for charts of the expressions in syntax. Unicode regular expression categories and character blocks are also supported. See Unicode Categories and Character Blocks for more information.

Note

  • This documentation is not meant to be an exhaustive resource on regular expressions. Rather, we will present basic information, syntax charts, and examples. For novice users, there are many books and Web sites that go into more detail about this topic.

  • While regular expressions in SlickEdit primarily match the syntax for that language, there are some differences between our implementation and those elsewhere.

Using Regular Expressions in SlickEdit®

Specifying the Syntax to Use

All search and replace commands, the Find and Replace tool window, and incremental search support regular expressions. For search and replace commands and the tool window, you can specify the regular expression syntax to use through specific options. A global option is available to specify the default syntax to use when you invoke these features or when you use incremental search.

For example:

  • Search and replace commands - When using the search commands / (slash) and find, or the replace commands c and replace, you can use the following options to specify regular expression syntax:

    • Use B to interpret the search string as Brief regular expression.

    • Use the L option to interpret the string as a Perl regular expression.

    • Use R to interpret the string as a SlickEdit regular expression.

    • Use the U option to interpret the string as a UNIX regular expression.

  • Find and Replace tool window - When using the tool window, select Use in the Search options box, and then pick the syntax to use from the drop-down list.

  • Incremental search - When using incremental search, press Ctrl+T to toggle regular expression searching on and off. The syntax that will be used is based on the global syntax setting.

To set the global option, from the main menu, click Tools → Options , expand Editing and select Search. Set the Regular expression option to True and select the syntax you want to use from the Expression type drop-down list.

Minimal versus Maximal Matching

If you are using tagged expressions or regular expressions to perform a search and replace, it is important to understand the difference between the minimal and maximal operators.

Take, for example, a line of text which contains a DOS file name: \path1\path2\path3\name.ext.

Based on the syntax, the following regular expressions match the string \path1\:

Syntax | Expression
Brief | <\\*\\
Perl and UNIX | ^\\.*?\\
SlickEdit | ^\\?*\\

The following regular expressions, which use the maximal operator, match the string \path\path2\path3\:

Syntax | Expression
Brief | <\\\:*\\
Perl and UNIX | ^\\.*\\
SlickEdit | ^\\?@\\

As a rule of thumb, the following minimal matching operators are generally used after a less-specific regular expression such as ? in Brief/SlickEdit or .in UNIX:

Syntax | Operators
Brief | @ and +
Perl and UNIX | *? and +?
SlickEdit | * and +

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 matched string with the character $, specify the following expressions:

Syntax | Expression
Brief | Search for: {[0-9]\:+} Replace with:$\0
Perl and UNIX | Search for:([0-9]+) Replace with:$\1
SlickEdit | Search for: {[0-9]#} Replace with: $#0

If the minimal matching operator (+ in Brief/SlickEdit syntax, +? in Perl/UNIX) was used in the search string instead of the maximal matching operator (\:@ in Brief, + in Perl/UNIX, # in SlickEdit), the above search and replace would prefix each digit in the entire file with a $ character.

Using Tagged Expressions

When you use regular expressions to search for a string, you will often want the replace string to depend on what was found. Use tagged expressions to insert parts of what is found into the replace string. Tagged expressions are denoted based on the syntax:

  • Brief syntax - Use { } (curly braces) to denote a tagged expression in the search string. The replace string specifies tagged expressions with a \ (backslash) 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.

  • UNIX syntax - Use ( ) (parentheses) to denote a tagged expression in the search string. The replace string specifies tagged expressions with a \ (backslash) followed by a tag group number 1-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.

  • Perl syntax - Use ( ) (parentheses) to denote a tagged expression in the search string. The replace string specifies tagged expressions with a \ (backslash) or $ (dollar sign) followed by a tag group number 1-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.

  • SlickEdit® syntax - Use { } (curly braces) to denote a tagged expression in the search string. The replace string specifies tagged expressions with a # (pound sign) 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.

Examples of Tagged Expressions

Example 1: Replace Occurrences

The expressions in the table below replace occurrences of "if" and "while" with "xify" and "xwhiley." Unmatched groups are null. Note that the \1 in Brief syntax, \2 in Perl/UNIX, and #1 in SlickEdit syntax are replaced with null.

Syntax | Expression
Brief | Search for: {{if}|while}} Replace with: x\0y\1
Perl/UNIX | Search for: (if|while) Replace with: x\1y\2
SlickEdit | Search for: {if|while} Replace with:x#0y#1
Example 2: Reverse Text on Lines Containing a Comma

The expressions in the table below reverse text on lines containing a comma. Lines with "abc,def" will be changed to "def,abc". Notice that the Perl/UNIX regular expression search string uses a *? minimal matching operator, so the comma actually matches the first comma in the line and not the last.

Syntax | Expression
Brief | Search for:^{*},{*}$ Replace with: \1,\0
Perl/UNIX | Search for: ^(.*?),(.*)$ Replace with: \2,\1
SlickEdit | Search for:^{?*},{?*}$ Replace with:#1,#0

Replacing with Regular Expressions

When using regular expressions, some characters have a different meaning when used in the replace string, depending on the syntax:

  • Brief - The backslash character (\) in the replace string has the same meaning as in the search string except that \c and \:char are not supported.

  • UNIX - A backslash in the replace string has the same meaning as in the search string except that \c and \:char are not supported.

  • Perl - A backslash in the replace string has the same meaning as in the search string except that \c and \:char are not supported. A dollar sign ($) must be escaped (\$) when replacing a literal $.

  • SlickEdit® - The pound sign character (#) and backslash (\) have special meaning in the replace string. A backslash in the replace string has the same meaning as in the search string except that \c, :char, and \gd are not supported.

See the Regular Expression Syntax tables for a list of options for these characters. See Using Tagged Expressions for information on specifying tagged expressions in the replace string.

Case Modification in Replace

When used in a replace operation, the expressions in the following table can be used to modify the character casing of matched expressions. These work in Brief, Perl, SlickEdit, and UNIX syntaxes.

Expression | Description
\l | Convert next character lowercase.
\u | Convert next character uppercase.
\L | Convert all characters lowercase until \E.
\U | Convert all characters uppercase until \E.
\Q | Replace all characters literally until \E.
\E | End all case modification or \Q.
Examples of Replacing with Regular Expressions

The table below contains some examples of replace operations using regular expressions.

Operation | Expression
Search for occurrences of the string "hat" that occur at the end of a line and replace it with "cat". | In all syntaxes: Search for: hat$ Replace with: cat
Delete blank lines. | Brief: Search for: <\n Replace with: (leave blank) Perl/SlickEdit/UNIX: Search for: ^\n Replace with: (leave blank)
Replace occurrences of two consecutive blank lines with one. | Brief: Search for: <\n\n Replace with: \n Perl/SlickEdit/UNIX: Search for: ^\n\n Replace with:\n
Search for lines containing "a" and replace the "a" with a formfeed character. | Brief: Search for: <a+$ Replace with:\d12 Perl/UNIX: Search for:^a+$ Replace with:\d12 SlickEdit: Search for:^a+$ Replace with:\12
Select occurrences of "Title:" at the beginning of a line and capitalize the text following "Title:". | Brief: Search for: <Title: {\:*} Replace with: Title: \U\0 Perl/UNIX: Search for: ^Title: (.*) Replace with: Title: \U\1 SlickEdit: Search for: ^Title\: {?@} Replace with: Title: \U#0

The Regex Evaluator

Regular expressions are used to express text patterns for searching. The Regex Evaluator provides the capability to interactively create, save, and re-use tests of regular expressions.

To access the Regex Evaluator, click Tools → Regex Evaluator (or use the activate_regex_evaluator command). Like other tool windows in SlickEdit®, this tool window is dockable. Docking options can be accessed by right-clicking on the tool window's title bar.

Type some samples of the text you are trying to match in the top portion of the tool window labeled Test Cases. Enter your regular expression pattern in the bottom field. The Regex Evaluator will highlight matched portions of your sample text and identify groups.

Entering Test Cases

Type your test cases in the Test Cases text box. These test cases will be evaluated as you type your regular expression in the bottom field. A wavy underline will indicate the ranges of text that match the entire expression. Matches are also marked with a yellow arrow that appears in the gutter to the left of the test case. You can hover your mouse on this arrow to see a tool tip which displays the matched expression details. When groups (tagged expressions) are used in your regular expression pattern, the groups will be boxed and highlighted in yellow in the Test Cases section.

Entering a Regular Expression

Enter the regular expression to test in the text field. Use the radio buttons to select the expression syntax that you wish to use: UNIX, SlickEdit®, Brief, or Perl. Click the arrow to the right of the regular expression field to pick from a menu of common syntax and operators.

Regex Evaluator Options

The following options and buttons are available on the Regex Evaluator tool window:

  • Multiline mode - If Multiline mode is selected, rather than searching through the test cases line-by-line, regular expressions will be searched on all lines at once. This is useful for test cases that wrap to the next line. This works just as if you had entered \om on the SlickEdit® command line.

  • Case sensitive - If Case sensitive is selected, the regular expression search will be case sensitive. This option is on by default.

  • New expression button - To clear the tool window of all entries in order to start a new evaluation, click the button at the top of the tool window labeled New expression.

  • Open a saved expression button - To open an expression that you have already saved, click the folder button at the top of the tool window labeled Open a saved expression.

  • Save the current expression button - To save the current expression, click the diskette button at the top of the tool window labeled Save the current expression. Both the expression and the test cases will be saved to a file. The default extension is .regx.

  • Save as button - To save the current expression with a different file name than what has previously been saved, click the button at the top of the tool window labeled Save the current expression as.

Regular Expression Syntax

This section provides charts of regular expressions for each supported syntax (Brief, Perl, SlickEdit, UNIX, and Wildcards), including examples.

Note

There are some differences between our implementation of these syntaxes and those elsewhere.

Brief Regular Expressions

Brief regular expressions are defined in the following table.

Brief Regular Expression

Definition

%

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 Minimal versus Maximal Matching for more information.

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

Matches exactly n1 occurrences of X. Use {} to avoid ambiguous expressions. For example, a:9{}1 searches for nine instances of the letter "a" followed by a "1".

X\: n1 ,

Maximal match of at least n1 occurrences of X.

X\:, n2

Maximal match of at least zero 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 zero 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 subexpression X but does not define a tagged expression.

{X}

Matches subexpression X and specifies a new tagged expression. See Using Tagged Expressions for more information.

{@ d X}

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

X|Y

Matches X or Y.

~{X}

Search fails if expression X is matched.

[ char-set ]

Matches any one of the characters specified by char-set. A dash (-) character may be used to specify ranges. The expression [A-Z] matches any uppercase letter. Backslash (\) can 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 SlickEdit® regular expressions, [] matches no characters. In both syntaxes, the expression [\]] matches a right bracket.

[~ char-set ]

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

[ char-set1 - [ char-set2 ]]

Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. For example, [a-z-[qw]] matches all English lowercase letters except "q" and "w". [\p{L}-[qw]] matches all Unicode lowercase letters except "q" and "w".

[ char-set1 & [ char-set2 ]]

Character set intersection. Matches all characters in char-set1 that are also in char-set2. For example, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127.

\x{ hhhh }

Matches up to 31-bit Unicode hexadecimal character specified by hhhh.

\p{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters in UnicodeCategorySpec. Where UnicodeCategorySpec uses the standard general categories specified by the Unicode consortium. For example, [\p{L}] matches all letters. [\p{Lu}] matches all uppercase letters. See Unicode Category Specifications for Regular Expressions.

\P{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters not in UnicodeCategorySpec. For example, [\P{L}] matches all characters that are not letters. This is equivalent to [^\p{L}]. [\P{Lu}] matches all characters that are not uppercase letters. See Unicode Category Specifications for Regular Expressions.

\p{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters in UnicodeIsBlockSpec. Where UnicodeIsBlockSpec one of the standard character blocks specified by the Unicode consortium. For example, [\p{isGreek}] matches Unicode characters in the Greek block. See Unicode Character Blocks for Regular Expressions.

\P{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters not in UnicodeIsBlockSpec. For example, [\P{isGreek}] matches all characters that are not in the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Unicode Character Blocks for Regular Expressions.

\x hh

Matches hexadecimal character hh where 0<=hh<=0xff.

\d ddd

Matches decimal character ddd where 0<=ddd<=255.

\ 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 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 at word boundary. For example, \bre matches all occurrences of "re" that only occur at the beginning of a word. Note that this notation previously matched a backspace character. It can still be used to match a backspace character by using it in a character set (for example, [\b]).

\B

Matches all except at word boundary. For example, \Bre matches all occurrences of "re" as long as it is not at the start of a new word.

\Q and \E

\Q matches all characters as literals until \E. This is useful for longer sequences of characters without the need for the escape character. \Q does not require termination with \E, as it will continue to match characters literally until the end of the search string. \E returns to using special character tokens for matching.

\f

Matches form feed character.

\od

Matches any 2-byte DBCS character. This escape is only valid in a match set ([...\od...]). [~\od] matches any single byte character excluding end-of-line characters. When used to search Unicode text, this escape does nothing.

\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.

\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.

\oi

Ignore case. Turns off case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. See also \oc.

\oc

Case-sensitive match. Turns on case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. See also \oi.

\ char

Declares character after slash to be literal. For example, \* represents the asterisk (*) character.

\: char

Matches predefined expression corresponding to char. The predefined expressions are:

  • \:a [A-Za-z0-9 - Matches an alphanumeric character.

  • \:b\([ \t]#\) - Matches blanks.

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

  • \:d [0-9] - Matches a digit.

  • \:f \([~\[\]\:\\/<>|=+;, \t"']#\) - Matches a file name part.

  • \:f \([~/ \t"']#\) - UNIX: Matches a file name part.

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

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

  • \:n\([0-9]#\(.[0-9]#|\)|.[0-9]#\)\([Ee]\(\+|-|\)[0-9]#|\)\) - Matches a floating number.

  • \:p\(\([A-Za-z]\:|\)\(\\|/|\)\(:f\(\\|/\)\)@:f\) - Windows: Matches a path.

  • \:p\(\(/|\)\(:f\(/\)\)@:f\) - UNIX: Matches a path.

  • \:q\(\"[~\"]@\"|'[~']@'\) - Matches a quoted string.

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

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

Brief Regular Expression Examples

The table below shows examples of Brief regular expressions.

Brief Regular Expression Example | Description
<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. Two 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.
\x0d\x0a\x01\x02 | Matches a sequence of hex binary characters.
\d13\d10\d1\d2 | Matches a sequence of decimal binary characters.

Perl Regular Expressions

Perl regular expressions are defined in the following table.

Perl Regular Expression

Definition

^

Matches beginning of line.

$

Matches end of line.

.

Matches any character except newline.

X+

Maximal match of one or more occurrences of X. See Minimal versus 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 zero 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 }?

Matches exactly n1 occurrences of X.

X{ n1 ,}?

Minimal match of at least n1 occurrences of X.

X{, n2 }?

Minimal match of at least zero 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)

Assert, positive lookahead. Searches for subexpression X, but X is not returned as part of the match. For example, to match words ending in "ed" while excluding "ed" as part of the match, use \b[a-z]+(?=ed\b). See also (?!X).

(?>X)

Prohibit backtracking. This expression is advanced usage. It can be used to prevent the subexpression X from backtracking when using maximal (greedy) matching.

(?#text)

Comment. No text is matched in this expression; it is used for comment and documentation only.

(X)

Matches subexpression X and specifies a new tagged expression (see Using Tagged Expressions). No more tagged expressions are defined once an explicit tagged expression number is specified as shown below.

(? d X)

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

(?:X)

Matches subexpression 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 dash (-) character may be used to specify ranges. The expression [A-Z] matches any uppercase letter. A backslash (\) 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 SlickEdit® regular expressions, [] matches no characters. In both syntaxes, the expression [\]] matches a right bracket. The expression [^] matches a caret (^) character but this does not work for SlickEdit regular expressions. In both syntaxes, [\^] matches a caret (^) character.

[^ char-set ]

Matches any character not specified by char-set. A dash (-) character may be used to specify ranges.

[ char-set1 - [ char-set2 ]]

Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. The expression [^A-Z] matches all characters except uppercase letters. For example, [a-z-[qw]] matches all English lowercase letters except q and w. [\p{L}-[qw]] matches all Unicode lowercase letters except q and w.

[ char-set1 & [ char-set2 ]

Character set intersection. Matches all characters in char-set1 that are also in char-set2. For example, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127.

\x{ hhhh }

Matches up to 31-bit Unicode hexadecimal character specified by hhhh.

\p{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters in UnicodeCategorySpec. Where UnicodeCategorySpec uses the standard general categories specified by the Unicode consortium. For example, [\p{L}] matches all letters. [\p{Lu}] matches all uppercase letters. See Unicode Category Specifications for Regular Expressions.

\P{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters not in UnicodeCategorySpec. For example, [\P{L}] matches all characters that are not letters. This is equivalent to [^\p{L}]. [\P{Lu}] matches all characters that are not uppercase letters. See Unicode Category Specifications for Regular Expressions.

\p{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters in UnicodeIsBlockSpec. Where UnicodeIsBlockSpec one of the standard character blocks specified by the Unicode consortium. For example, [\p{isGreek}] matches Unicode characters in the Greek block. See Unicode Character Blocks for Regular Expressions.

\P{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters not in UnicodeIsBlockSpec. For example, [\P{isGreek}] matches all characters that are not in the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Unicode Character Blocks for Regular Expressions.

\x hh

Matches hexadecimal character hh where 0<=hh<=0xff.

\#ddd

Matches decimal character where 0<=ddd<=255.

\ 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.

\d

Equivalent to [0-9]. Can also be used inside a character class. For example, [A-F\d] is equivalent to [A-F0-9].

\D

Equivalent to [^0-9]. Can also be used inside a character class.

\w

Equivalent to [a-zA-Z0-9_]. Can also be used inside a character class.

\W

Equivalent to [^a-zA-Z0-9_]. Can also be used inside a character class.

\s

Equivalent to [ \t\n\r\f]. Can also be used inside a character class.

\S

Equivalent to [^ \t\n\r\f]. Can also be used inside a character class.

\ooo

Octal ASCII value.

\cx

Control character (ASCII values 0-31) '@' <=x<='_'

\z

Specifies cursor position if match is found. If the expression abc\z is found, the cursor is placed after the c. Note that in UNIX, this is the same as \c. However in Perl, \c is used only for control characters.

\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 an ASCII 10 character.

\r

Matches carriage return (ASCII 13). 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.

\t

Matches tab character.

\b

Matches at word boundary. For example, \bre matches all occurrences of "re" that only occur at the beginning of a word.

\B

Matches all except at word boundary. For example, \Bre matches all occurrences of "re" as long as it is not at the start of a new word.

\Q and \E

\Q matches all characters as literals until \E. This is useful for longer sequences of characters without the need for the escape character. \Q does not require termination with \E, as it will continue to match characters literally until the end of the search string. \E returns to using special character tokens for matching.

\f

Matches form feed character.

\od

Matches any 2-byte DBCS character. This escape is only valid in a match set ([...\od...]). [^\od] matches any single byte character excluding end-of-line characters. When used to search Unicode text, this escape does nothing.

\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.

\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.

\oi

Ignore case. Turns off case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. Note that this is the equivalent to the Perl syntax ?i. See also \oc.

\oc

Case-sensitive match. Turns on case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. Note that this is equivalent to the Perl syntax ?-i. See also \oi.

\ char

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

\: char

Matches predefined expression corresponding to char. The pre-defined expressions are:

  • \:a [A-Za-z0-9] - Matches an alphanumeric character.

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

  • \:b (?:[ \t]+) - Matches blanks.

  • \:d [0-9] - Matches a digit.

  • \:f (?:[^\[\]\:\\/<>|=+;, \t"']+) - Windows: Matches a file name part.

  • \:f (?:[^/ \t"']+) - UNIX: Matches a file name part.

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

  • \:i (?:[0-9]+) - Matches an integer.

  • \:n (?:(?:[0-9]+(?:\.[0-9]+|)|\.[0-9]+)(?:[Ee](?:\+|-|)[0-9]+|)) - Matches a floating number.

  • \:p (?:(?:[A-Za-z]:|)(?:\\|/|)(?:\:f(?:\\|/))*\:f) - Windows: Matches a path.

  • \:p (?:(?:/|)?:(?::f(/))*\:f) - UNIX: Matches a path.

  • \:q (?:\"[^\"]*\"|'[^']*') - Matches a quoted string.

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

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

The precedence of operators, from highest to lowest, is as follows:

  • +, *, ?, {}, +?, *?, ??, {}? (These operators have the same precedence.)

  • concatenation

  • |

Perl Regular Expression Examples

The table below shows examples of Perl regular expressions.

Perl Regular Expression Example | Description
^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. Two 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.
[a-z-[qw]] | Character set subtraction. Matches all English lowercase letters except q and w.
[\p{isGreek}&[\p{L}]] | Character set intersection. Matches all Unicode letters in the Greek block.
\x{6587} | Matches Unicode character with hexadecimal value 6587. Character set intersection. Matches all Unicode letters in the Greek block.
[\p{L}-[qw]] | Matches all Unicode letters except q and w.
[\p{L}] | Matches all Unicode letters.
[\p{Lul}] | Matches all Unicode uppercase and lowercase letters.
[\P{L}] | Matches all Unicode characters that are not letters.
[\p{isGreek}] | Matches all Unicode characters in the Greek block.
\x0d\x0a\x01\x02 | Matches a sequence of hex binary characters.
\d13\d10\d1\d2 | Matches a sequence of decimal binary characters.

SlickEdit Regular Expressions

SlickEdit regular expressions are defined in the following table.

SlickEdit Regular Expression

Definition

^

Matches beginning of line.

$

Matches end of line.

?

Matches any character except newline.

X+

Minimal match of one or more occurrences of X. See Minimal versus Maximal Matching for more information.

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

Matches exactly n1 occurrences of X. Use () to avoid ambiguous expressions. For example a:9()1 searches for nine instance of the letter a 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 subexpression X.

{X}

Matches subexpression X and specifies a new tagged expression. See Using Tagged Expressions for more information.

{# d X}

Matches subexpression 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 dash (-) character may be used to specify ranges. The expression [A-Z] matches any uppercase letter. Backslash (\) 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 syntaxes, the expression [\]] matches a right bracket. The expression [\^] matches a caret (^) character in both syntaxes.

[~ char-set ]

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

[^ char-set ]

Same as [~char-set] above.

[ char-set1 - [ char-set2 ]]

Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. For example, [a-z-[qw]] matches all English lowercase letters except q and w. [\p{L}-[qw]] matches all Unicode lowercase letters except q and w.

[ char-set1 & [ char-set2 ]]

Character set intersection. Matches all characters in char-set1 that are also in char-set2. For example, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127.

\x{ hhhh }

Matches up to 31-bit Unicode hexadecimal character specified by hhhh.

\p{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters in UnicodeCategorySpec. Where UnicodeCategorySpec uses the standard general categories specified by the Unicode consortium. For example, [\p{L}] matches all letters. [\p{Lu}] matches all uppercase letters. See Unicode Category Specifications for Regular Expressions.

\P{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters not in UnicodeCategorySpec. For example, [\P{L}] matches all characters that are not letters. This is equivalent to [^\p{L}]. [\P{Lu}] matches all characters that are not uppercase letters. See Unicode Category Specifications for Regular Expressions.

\p{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters in UnicodeIsBlockSpec. Where UnicodeIsBlockSpec one of the standard character blocks specified by the Unicode consortium. For example, [\p{isGreek}] matches Unicode characters in the Greek block. See Unicode Character Blocks for Regular Expressions.

\P{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters not in UnicodeIsBlockSpec. For example, [\P{isGreek}] matches all characters that are not in the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Unicode Character Blocks for Regular Expressions.

\x hh

Matches hexadecimal character hh where 0<=hh<=0xff.

\ ddd

Matches decimal character ddd where 0<=ddd<=255.

\g d

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 an ASCII 10 character.

\r

Matches carriage return.

\t

Matches tab character.

\b

Matches at word boundary. For example, \bre matches all occurrences of "re" that only occur at the beginning of a word. Note that this notation previously matched a backspace character. It can still be used to match a backspace character by using it in a character set (for example, [\b]).

\B

Matches all except at word boundary. For example, \Bre matches all occurrences of "re" as long as it is not at the start of a new word.

\Q and \E

\Q matches all characters as literals until \E. This is useful for longer sequences of characters without the need for the escape character. \Q does not require termination with \E, as it will continue to match characters literally until the end of the search string. \E returns to using special character tokens for matching.

\f

Matches form feed character.

\od

Matches any 2-byte DBCS character. This escape is only valid in a match set ([...\od...]). [^\od] matches any single byte character excluding end-of-line characters. When used to search Unicode text, this escape does nothing.

\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. NOTE: Test the regular expression on a very small file before using it on a large file. This option 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.

\oi

Ignore case. Turns off case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside all ( ) and { } groups, after which case matching is restored to the previous case match setting. See also \oc.

\oc

Case-sensitive match. Turns on case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside all ( ) and { } groups, after which case matching is restored to the previous case match setting. See also \oi.

\ 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 an alphanumeric character.

  • :b ([ \t]#\) - Matches blanks - note that :b is not like the Perl/.NET \s.

  • :c [A-Za-z] - Matches an alphabetic character.

  • :d [0-9] - Matches a digit.

  • :f ([~\[\]\:\\/<>|=+;, \t"']#) - Windows: Matches a file name part.

  • :f ([~/ \t"']#) - UNIX: Matches a file name part.

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

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

  • :n (([0-9]#(.[0-9]#|)|.[0-9]#)([Ee](\+|-|)[0-9]#|)) - Matches a floating number.

  • :p (([A-Za-z]\:|)(\\|/|)(:f(\\|/))@:f) - Windows: Matches a path.

  • :p ((/|)(:f(/))@:f) - UNIX: Matches a path.

  • :q (\"[~\"]@\"|'[~']@') - Matches a quoted string.

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

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

The precedence of operators, from highest to lowest, is as follows:

  • +, #, *, @, :, :* (These operators have the same precedence.)

  • concatenation

  • |

SlickEdit Regular Expression Examples

The table below shows examples of SlickEdit regular expressions.

SlickEdit Regular Expression Example | Description
^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 colon 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. Two 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.
\x0d\x0a\x01\x02 | Matches a sequence of hex binary characters.
\13\10\1\2 | Matches a sequence of decimal binary characters.

UNIX Regular Expressions

UNIX regular expressions are defined in the following table.

UNIX Regular Expression

Definition

^

Matches beginning of line.

$

Matches end of line.

.

Matches any character except newline.

X+

Maximal match of one or more occurrences of X. See Minimal versus 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 zero 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 }?

Matches exactly n1 occurrences of X.

X{ n1 ,}?

Minimal match of at least n1 occurrences of X.

X{, n2 }?

Minimal match of at least zero 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)

Assert, positive lookahead. Searches for subexpression X, but X is not returned as part of the match. For example, to match words ending in "ed" while excluding "ed" as part of the match, use \b[a-z]+(?=ed\b). See also (?!X).

(?>X)

Prohibit backtracking. This expression is advanced usage. It can be used to prevent the subexpression X from backtracking when using maximal (greedy) matching.

(?#text)

Comment. No text is matched in this expression; it is used for comment and documentation only.

(X)

Matches subexpression X and specifies a new tagged expression (see Using Tagged Expressions). No more tagged expressions are defined once an explicit tagged expression number is specified as shown below.

(? d X)

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

(?:X)

Matches subexpression 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 dash (-) character may be used to specify ranges. The expression [A-Z] matches any uppercase letter. A backslash (\) 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 SlickEdit® regular expressions, [] matches no characters. In both syntaxes, the expression [\]] matches a right bracket. The expression [^] matches a caret (^) character but this does not work for SlickEdit regular expressions. In both syntaxes, [\^] matches a caret (^) character.

[^ char-set ]

Matches any character not specified by char-set. A dash (-) character may be used to specify ranges.

[ char-set1 - [ char-set2 ]]

Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. The expression [^A-Z] matches all characters except uppercase letters. For example, [a-z-[qw]] matches all English lowercase letters except q and w. [\p{L}-[qw]] matches all Unicode lowercase letters except q and w.

[ char-set1 & [ char-set2 ]

Character set intersection. Matches all characters in char-set1 that are also in char-set2. For example, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127.

\x{ hhhh }

Matches up to 31-bit Unicode hexadecimal character specified by hhhh.

\p{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters in UnicodeCategorySpec. Where UnicodeCategorySpec uses the standard general categories specified by the Unicode consortium. For example, [\p{L}] matches all letters. [\p{Lu}] matches all uppercase letters. See Unicode Category Specifications for Regular Expressions.

\P{ UnicodeCategorySpec ]

(Only valid in character set) Matches characters not in UnicodeCategorySpec. For example, [\P{L}] matches all characters that are not letters. This is equivalent to [^\p{L}]. [\P{Lu}] matches all characters that are not uppercase letters. See Unicode Category Specifications for Regular Expressions.

\p{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters in UnicodeIsBlockSpec. Where UnicodeIsBlockSpec one of the standard character blocks specified by the Unicode consortium. For example, [\p{isGreek}] matches Unicode characters in the Greek block. See Unicode Character Blocks for Regular Expressions.

\P{ UnicodeIsBlockSpec ]

(Only valid in character set) Matches characters not in UnicodeIsBlockSpec. For example, [\P{isGreek}] matches all characters that are not in the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Unicode Character Blocks for Regular Expressions.

\x hh

Matches hexadecimal character hh where 0<=hh<=0xff.

\d ddd

Matches decimal character ddd where 0<=ddd<=255.

\ 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 an ASCII 10 character.

\r

Matches carriage return (ASCII 13). 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.

\t

Matches tab character.

\b

Matches at word boundary. For example, \bre matches all occurrences of "re" that only occur at the beginning of a word.

\B

Matches all except at word boundary. For example, \Bre matches all occurrences of "re" as long as it is not at the start of a new word.

\Q and \E

\Q matches all characters as literals until \E. This is useful for longer sequences of characters without the need for the escape character. \Q does not require termination with \E, as it will continue to match characters literally until the end of the search string. \E returns to using special character tokens for matching.

\f

Matches form feed character.

\od

Matches any 2-byte DBCS character. This escape is only valid in a match set ([...\od...]). [^\od] matches any single byte character excluding end-of-line characters. When used to search Unicode text, this escape does nothing.

\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.

\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.

\oi

Ignore case. Turns off case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. See also \oc.

\oc

Case-sensitive match. Turns on case-sensitive matching in the pattern, overriding the global case setting. This modifier is localized inside the current grouping level, after which case matching is restored to the previous case match setting. See also \oi.

\ char

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

\: char

Matches predefined expression corresponding to char. The pre-defined expressions are:

  • \:a [A-Za-z0-9] - Matches an alphanumeric character.

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

  • \:b (?:[ \t]+) - Matches blanks.

  • \:d [0-9] - Matches a digit.

  • \:f (?:[^\[\]\:\\/<>|=+;, \t"']+) - Windows: Matches a file name part.

  • \:f (?:[^/ \t"']+) - UNIX: Matches a file name part.

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

  • \:i (?:[0-9]+) - Matches an integer.

  • \:n (?:(?:[0-9]+(?:\.[0-9]+|)|\.[0-9]+)(?:[Ee](?:\+|-|)[0-9]+|)) - Matches a floating number.

  • \:p (?:(?:[A-Za-z]:|)(?:\\|/|)(?:\:f(?:\\|/))*\:f) - Windows: Matches a path.

  • \:p (?:(?:/|)?:(?::f(/))*\:f) - UNIX: Matches a path.

  • \:q (?:\"[^\"]*\"|'[^']*') - Matches a quoted string.

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

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

The precedence of operators, from highest to lowest, is as follows:

  • +, *, ?, {}, +?, *?, ??, {}? (These operators have the same precedence.)

  • concatenation

  • |

UNIX Regular Expression Examples

The table below shows examples of UNIX regular expressions.

UNIX Regular Expression Example | Description
^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. Two 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.
[a-z-[qw]] | Character set subtraction. Matches all English lowercase letters except q and w.
[\p{isGreek}&[\p{L}]] | Character set intersection. Matches all Unicode letters in the Greek block.
\x{6587} | Matches Unicode character with hexadecimal value 6587. Character set intersection. Matches all Unicode letters in the Greek block.
[\p{L}-[qw]] | Matches all Unicode letters except q and w.
[\p{L}] | Matches all Unicode letters.
[\p{Lul}] | Matches all Unicode uppercase and lowercase letters.
[\P{L}] | Matches all Unicode characters that are not letters.
[\p{isGreek}] | Matches all Unicode characters in the Greek block.
\x0d\x0a\x01\x02 | Matches a sequence of hex binary characters.
\d13\d10\d1\d2 | Matches a sequence of decimal binary characters.

Wildcard Expressions

SlickEdit® supports *, ?, and # wildcards:

  • The asterisk (*) matches zero or more characters. For example, search for a*b to find any string that contains a lowercase letter "a" followed by a lowercase letter "b" allowing for text in between.

  • The question mark (?) matches any single character. Use multiple question marks in succession to represent that number of characters. For example, search for a???b to find any string that contains a lowercase letter "a" followed by any three characters, followed by a lowercase letter "b".

  • The pound sign (#) matches any single digit, 0-9. Use multiple pound signs in succession to represent that number of digits. For example, use ##:## to search for four-digit time-of-day values.

Unicode Categories and Character Blocks

Unicode Category Specifications for Regular Expressions

The Unicode consortium standard regular expression categories are supported. The syntax for specifying categories is:

\p{MainCategoryLetter Subcategories}

The above syntax matches the categories specified. The following syntax matches all characters not in the categories specified:

\P{MainCategoryLetter Subcategories}

The \p and \P notations can only be used inside a character set specification. MainCategoryLetter can be L, M, N, P, S, Z, or C. The valid Subcategories depend on the MainCategoryLetter specified. If no Subcategories are specified, all are assumed. For example:

  • [\p{L}] matches all Unicode letters.

  • [\p{Lul}] matches all uppercase and lowercase letters.

  • [\P{L}] matches all characters that are not letters.

The following table lists the valid subcategories for a specific main category. These character tables were generated using the file UnicodeData-3.1.0.txt found on the Unicode Consortium Web site (http://unicode.org).

Subcategory | Description
Lu | Letter, Uppercase
Ll | Letter, Lowercase
Lt | Letter, Titlecase
Lo | Letter, Other
Mn | Mark, Non-Spacing
Mc | Mark, Spacing Combining
Me | Mark, Enclosing
Nd | Number, Decimal Digit
Nl | Number, Letter
No | Number, Other
Pc | Punctuation, Connector
Pd | Punctuation, Dash
Ps | Punctuation, Open
Pe | Punctuation, Close
Pi | Punctuation, Initial quote (may behave like Ps or Pe depending on usage)
Pf | Punctuation, Final quote (may behave like Ps or Pe depending on usage)
Po | Punctuation, Other
Sm | Symbol, Math
Sc | Symbol, Currency
Sk | Symbol, Modifier
So | Symbol, Other
Zs | Separator, Space
Zl | Separator, Line
Zp | Separator, Paragraph
Cc | Other, Control
Cf | Other, Format
Cs | Other, Surrogate
Co | Other, Private Use
Cn | Other, Not Assigned (no characters in the file have this property)

Unicode Character Blocks for Regular Expressions

The Unicode consortium standard regular expression block categories are supported. The syntax for specifying a character block is:

\p{Is BlockName}

The above syntax matches the characters in the block specified. The following syntax matches all characters not in the block specified:

\P{Is BlockName }

The \p and \P notations may only be used inside a character set specification. For example, [\p{isBasicLatin}] matches all characters in the Greek block. [\P{isBasicLatin}] matches all characters that are not in the Greek block.

The following table lists the non-standard valid character block names. These character tables were generated from XML standards found at the World Wide Web Consortium Web site).

Block Name | Description
XMLNameStartChar | All characters that are valid for the start of an XML tag name.
XMLNameChar | All characters that are valid in an XML tag name.

The following table lists the valid character block names. These character tables were generated using the blocks.txt file found on the Unicode Consortium Web site (http://unicode.org).

Range | Block Name
0000..007F | BasicLatin
0080..00FF | Latin-1Supplement
0100..017F | LatinExtended-A
0180..024F | LatinExtended-B
0250..02AF | IPAExtensions
02B0..02FF | SpacingModifierLetters
0300..036F | CombiningDiacriticalMarks
0370..03FF | Greek
0400..04FF | Cyrillic
0530..058F | Armenian
0590..05FF | Hebrew
0600..06FF | Arabic
0700..074F | Syriac
0780..07BF | Thaana
0900..097F | Devanagari
0980..09FF | Bengali
0A00..0A7F | Gurmukhi
0A80..0AFF | Gujarati
0B00..0B7F | Oriya
0B80..0BFF | Tamil
0C00..0C7F | Telugu
0C80..0CFF | Kannada
0D00..0D7F | Malayalam
0D80..0DFF | Sinhala
0E00..0E7F | Thai
0E80..0EFF | Lao
0F00..0FFF | Tibetan
1000..109F | Myanmar
10A0..10FF | Georgian
1100..11FF | HangulJamo
1200..137F | Ethiopic
13A0..13FF | Cherokee
1400..167F | UnifiedCanadianAboriginalSyllabics
1680..169F | Ogham
16A0..16FF | Runic
1780..17FF | Khmer
1800..18AF | Mongolian
1E00..1EFF | LatinExtendedAdditional
1F00..1FFF | GreekExtended
2000..206F | GeneralPunctuation
2070..209F | SuperscriptsandSubscripts
20A0..20CF | CurrencySymbols
20D0..20FF | CombiningMarksforSymbols
2100..214F | LetterlikeSymbols
2150..218F | NumberForms
2190..21FF | Arrows
2200..22FF | MathematicalOperators
2300..23FF | MiscellaneousTechnical
2400..243F | ControlPictures
2440..245F | OpticalCharacterRecognition
2460..24FF | EnclosedAlphanumerics
2500..257F | BoxDrawing
2580..259F | BlockElements
25A0..25FF | GeometricShapes
2600..26FF | MiscellaneousSymbols
2700..27BF | Dingbats
2800..28FF | BraillePatterns
2E80..2EFF | CJKRadicalsSupplement
2F00..2FDF | KangxiRadicals
2FF0..2FFF | IdeographicDescriptionCharacters
3000..303F | CJKSymbolsandPunctuation
3040..309F | Hiragana
30A0..30FF | Katakana
3100..312F | Bopomofo
3130..318F | HangulCompatibilityJamo
3190..319F | Kanbun
31A0..31BF | BopomofoExtended
3200..32FF | EnclosedCJKLettersandMonths
3300..33FF | CJKCompatibility
3400..4DB5 | CJKUnifiedIdeographsExtensionA
4E00..9FFF | CJKUnifiedIdeographs
A000..A48F | YiSyllables
A490..A4CF | YiRadicals
AC00..D7A3 | HangulSyllables
D800..DB7F | HighSurrogates
DB80..DBFF | HighPrivateUseSurrogates
DC00..DFFF | LowSurrogates
E000..F8FF | PrivateUse
F900..FAFF | CJKCompatibilityIdeographs
FB00..FB4F | AlphabeticPresentationForms
FB50..FDFF | ArabicPresentationForms-A
FE20..FE2F | CombiningHalfMarks
FE30..FE4F | CJKCompatibilityForms
FE50..FE6F | SmallFormVariants
FE70..FEFE | ArabicPresentationForms-B
FEFF..FEFF | Specials
FF00..FFEF | HalfwidthandFullwidthForms
FFF0..FFFD | Specials
10300..1032F | OldItalic
10330..1034F | Gothic
10400..1044F | Deseret
1D000..1D0FF | ByzantineMusicalSymbols
1D100..1D1FF | MusicalSymbols
1D400..1D7FF | MathematicalAlphanumericSymbols
20000..2A6D6 | CJKUnifiedIdeographsExtensionB
2F800..2FA1F | CJKCompatibilityIdeographsSupplement
E0000..E007F | Tags


Using the Calculator and Math Commands

The Calculator

To access the calculator, click Tools → Calculator , or use the calculator command.

You can use the calculator in various ways. Type in mathematical expressions from the keyboard or by clicking buttons, including parentheses. Almost all the editing keys including undo, next word, and previous word are supported. The calculator uses a slightly enhanced C expression syntax. The calculator supports specifying binary numbers and allows just an x prefix when specifying hexadecimal numbers.

For example, to add the decimal numbers 135 and 288, type 135+288=. Press the = character to evaluate the expression and place the result on the next line. To see the result in a different base, click Hex, Dec, Oct, or Bin.

Calculating Expressions with Mixed Bases

To add hex FF with octal 77 with binary 111 with decimal 99, complete the following steps:

  1. Click Hex then type or click FF.

  2. Click +.

  3. Click Octal, and type or click 77.

  4. Click +.

  5. Click Bin, and type or click 111.

  6. Click +.

  7. Click Dec, and type or click 99.

  8. Select the output base by clicking one of the base buttons and type or click =to compute the result.

Math Commands

Evaluate mathematical expressions by selecting expressions in a buffer and executing the add command or by executing one of the math commands on the 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 evaluates the Slick-C® language expression given and places the results in the message line. You can specify octal numbers by prefixing the number with a zero and specify binary numbers by prefixing the number with the character b. If no operator is specified between two unary expressions, addition is assumed. The characters $ and comma (,) are stripped from the expression before it is evaluated. The mathx, matho, and mathb commands evaluate the Slick-C language expression given and places the result in the message line in hexadecimal, octal, and binary respectively. The 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.

Operator | Meaning
&, | | 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.

Math Command Examples

The following table shows some examples of math commands:

Example | Description
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

Overflow/Underflow

If overflow or underflow occurs, the message Numeric overflow or underflow is displayed on the message line. Floating point numbers may have up to a 32-digit mantissa and a 9-digit exponent.

Document Math

Type mathematical expressions into a buffer and evaluate them with the add command. This feature is called document math. The add command 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.

Prime Numbers

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, its first divisor. The nextprime command takes a decimal number as an argument and finds the next greater prime number.


OS File Browser

SlickEdit® provides a way to display the operating system's (OS) file manager/browser. For example, Windows Explorer is displayed on Windows, Finder on Mac OS X, Konquerer on Linux KDE desktop, etc.

To display the OS file browser, click Tools → OS File Browser , or use the explore or finder command (the finder command is the same as the explore command).

If you are editing a document, the file manager will be rooted in that file's directory, otherwise it will default to the current working directory. Using the - option after the command (for example, explore -) will ignore any file directory or working directory and go to the system root.


Chapter 11. Macros and Macro Programming

This chapter contains the following topics:

  • Recorded Macros

  • Programmable Macros

There are two types of macros in SlickEdit® Core:

  • Recorded Macros - A recorded macro is a series of SlickEdit operations that you can save and run as one operation any time. Recorded macros are useful for automating repetitive tasks. Because recording a macro generates Slick-C® code for the action being recorded, recorded macros provide a good starting point for learning the Slick-C macro programming language.

  • Programmable Macros - Slick-C lets you take editor customization to the next level. With Slick-C, you have more control over the SlickEdit Core editor and can even add new functionality. "Programmable macros" is a term we use to describe Slick-C modules, Slick-C batch macros, and Slick-C variables. In other words, Slick-C code that you write yourself.

Recorded Macros

You can automate repetitive tasks by recording a series of SlickEdit® operations in a macro. After you create a macro, you can run it, save it, bind it to a key sequence, and/or modify the macro's source code.

Recording a macro generates Slick-C® code for performing the action being recorded. Therefore, recording a macro is also a useful way to discover and implement Slick-C code that controls the behavior of SlickEdit.

Topics in this section are:

  • Recorded Macros

  • Recording a Macro

  • Binding Recorded Macros to Keys

  • Running a Recorded Macro

  • Saving and Editing Recorded Macros

  • Deleting Recorded Macros

  • Using Macros to Discover and Control Options

Common Macro Operations

Macros can be recorded, executed, and saved from the Macro menu, or you can use commands or predefined key bindings to perform macro operations:

  • To start or end macro recording, from the main menu, click Macro → Record Macro or Macro → Stop Recording Macro , respectively. Alternately, you can toggle recording on and off with one of the following methods:

    • Click the recording indicator REC, located along the bottom edge of the editor. When a macro is being recorded, the recording indicator is active (not dimmed).

    • In CUA emulation, press Ctrl+F11 (the key binding associated with the record_macro_toggle command).

    • On the SlickEdit command line, type record_macro_toggle.

    See Recording a Macro for more information.

  • To run the last macro that you recorded, click Macro → Execute last-macro , press Ctrl+F12, or use the record_macro_end_execute command. See Running a Recorded Macro for more information.

  • To display a list of your recorded macros, from which you can edit, run, delete, or bind to a key sequence, click Macro → List Macros , or use the list_macros command.

Note

List Macros only shows your "saved" macros, not your last recorded macro or macros created using execute_last_macro_key.

Recording a Macro

To record a macro, simply start the recording, enter the keystrokes you want to record, then end the recording. The instructions below outline the steps.

  1. From the main menu, click Macro → Record Macro (or use one of the toggle methods to start recording, as described under Recorded Macros above).

  2. Enter the keystrokes that you want to record. For example, to record a macro of the cursor moving three spaces to the right, press the right arrow key three times. You can also change a configuration option, view settings, or expand a code template during macro recording.

  3. When you have finished recording the macro, end recording by clicking Macro → Stop Recording Macro (or the same toggle you used in Step 1). The Save Macro Dialog is displayed.

    Tip

    • For recorded macros you don't need to track, perhaps for immediate or one-time use, SlickEdit provides a way to stop macro recording and instantly bind the macro to a key sequence. This allows you to keep a set of recent, unnamed macro recordings instead of having just one "last recorded macro". See Binding Macros Using execute_last_macro_key for more information.

    • If you're recording the macro to discover Slick-C® code (see Using Macros to Discover and Control Options), click Edit (or press Alt+E) at this time to view the source code. If you choose to view/edit the source code now, you will need to save it by using Macro → Save last-macro prior to recording a new macro or exiting the editor. See Saving and Editing Recorded Macros for more details.

  4. Specify the name for the macro in the Macro Name text box.

  5. Select any desired options. Leave the default settings if you aren't sure what to select. See Save Macro Dialog for more information on these advanced options.

  6. If you plan to use the macro frequently, we recommend creating a key binding for it. To create the key binding, click Save and Bind to Key, then see Binding Recorded Macros to Keys for more information.

Alternately, click Save. The List Macros Dialog is displayed, from which you can run the macro, edit the source, delete it, or bind it to a key sequence.

Binding Recorded Macros to Keys

To use recorded macros most effectively, create key bindings for them so they can be executed quickly when you want to use them. Macros can be bound through the Key Bindings option screen (see Binding Macros Using the Key Bindings Option Screen), or by using the instant "stop recording and bind" method associated with the execute_last_macro_key command (see Binding Macros Using execute_last_macro_key).

Binding Macros Using the Key Bindings Option Screen

To create a key binding for a recorded macro, you can either click the Save and Bind to Key button on the Save Macro dialog that appears automatically after you end recording, or at any time you can use the Bind to Key button on the List Macros Dialog (Macro → List Macros or list_macros command). Clicking either button displays the Key Bindings option screen with the macro selected, so you can add a key binding.

Note

You can also display the Key Bindings option screen by clicking Tools → Options → Keyboard and Mouse → Key Bindings , or by using the gui_keybindings command. However, if you display the screen in this manner, it will show a list of all commands and user-recorded macros. To view your recorded macros, click on the Recorded column header to sort and display items with a "Yes" (which indicates these are recorded macros). A more convenient method is to use the Bind to Key button on the List Macros dialog to only show recorded macros on the Key Bindings option screen.

Creating bindings for recorded macros works the same as creating bindings for SlickEdit commands. Click Add to initiate the binding, then specify the key sequence or mouse event to use. See Managing Bindings for more information about creating, editing, and removing bindings.

Binding Macros Using execute_last_macro_key

The execute_last_macro_key command provides functionality to stop macro recording and instantly bind the macro to a key sequence. This feature is convenient for recorded macros you want to use perhaps immediately or one-time only, and don't need to track. It allows you to keep a set of recent, unnamed macro recordings instead of having just one "last recorded macro", similar to a feature provided by early text editors that supported macro recording, such as the EVE and Edt editors on the Vax (VMS).

Unlike other SlickEdit commands that we document, execute_last_macro_key is not intended to be used on the command line®instead, you use a key binding that is automatically assigned when you press it to stop macro recording.

To bind a macro to a key sequence using this method, start recording the macro and enter the keystrokes you want to record. Then press Ctrl+Shift+F12,key where key stands for keys 0 through 9, A-Z, or F1-F12, to stop recording the macro and instantly bind it to the key sequence you just pressed.

Note

The prefix key sequence Ctrl+Shift+F12 works in all emulations except SlickEdit text mode edition. In that emulation, the prefix key sequence is Ctrl+Shift+T.

Each macro that you record and bind using this feature is saved to a new file named lastmac<key>.e, located in your configuration directory, where <key> matches the key you used when creating the binding (keys 0-9, A-Z, or F1-F12). These files can be helpful for determining what was recorded, because if you use this method to bind a recorded macro, you will not have an opportunity to name the macro or see a list of macros created with this method (they will not appear in the List Macros dialog or Key Bindings option screen).

Running a Recorded Macro

If you have saved the macro and created a key binding for it, the easiest way to run it is to simply press the associated key sequence. You can also run it by:

  • Typing the name of the macro in the SlickEdit® command line then pressing Enter.

  • Using the List Macros Dialog (Macro → List Macros or list_macros command)'select the macro and click Run.

You can run the last macro that you recorded, whether it was saved or not, by clicking Macro → Execute last-macro (Ctrl+F12 or execute_last_macro command).

Saving and Editing Recorded Macros

When a recorded macro is saved, the source code of the macro is appended to the vusrmacs.e user macros file located in your configuration directory.

To edit a macro that has previously been recorded and saved, from the main menu, click Macro → List Macros (or use the list_macros command) to display the List Macros Dialog. The list box on the left displays a list of your recorded macros. Select the macro you want to edit, then click Edit. The vusrmacs.e file opens in the editor. Save the file when you're done making edits.

If you are using recorded macros to discover Slick-C® code (see Using Macros to Discover and Control Options), you can view/edit the source of a macro that you have just recorded but have not yet saved. After creating a new recorded macro, you are prompted with the Save Macro Dialog. Instead of naming the macro and saving it, click Edit (or press Alt+E) to view the source. Aneweditor window named lastmac.e, which is the name of the file that contains the source of the last macro that was recorded, is opened showing the macro's source code. If you make edits, you will need to save the changes by clicking Macros → Save last-macro . The Save Macro dialog is displayed again so you can name the macro and then click Save, which appends the new code to the user macros file (vusrmacs.e). Or click Save and Bind to Key to save and create a key binding for the macro (see Binding Macros Using the Key Bindings Option Screen).

Each macro recorded and bound using execute_last_macro_key is saved in a file named lastmac<key>.e, and the corresponding compiled byte code is saved in lastmac<key>.ex, where <key> matches the key you used when creating the binding (keys 0-9, A-Z, or F1-F12). Both files are located in your configuration directory. To edit a macro bound using this method, open the .e file for the macro you want to edit, make and save the changes, then from the main menu, click Macro → Load Module (F12 or gui_load command). Find and select the .e file you just edited and click Open. The message Module(s) loaded appears on the message line, and SlickEdit will now honor the changes you made to the .e file when you use the corresponding key sequence.

Deleting Recorded Macros

To delete a macro that has been recorded and saved, from the main menu, click Macro → List Macros (or use the list_macros command). Select the macro you want to delete, and click Delete.

To delete a macro that you recorded and bound to a key sequence using execute_last_macro_key, browse to your configuration directory and delete lastmac<key>.e and its corresponding lastmac<key>.ex file, where <key> matches the key you used when creating the binding (keys 0-9, A-Z, or F1-F12).

Using Macros to Discover and Control Options

Recording macros provides a good starting point for discovering variables in Slick-C® code that control the behavior of SlickEdit®.

Since responses to dialog boxes (such as when you select/clear options) are recorded as Slick-C source, you can use recorded macros to discover and change these variables quickly. For example, perhaps you frequently switch line insert styles. The Line insert style option is located on the General Editing options page. Instead of every time clicking Tools → Options Editing → General , then selecting the option, you can record those steps as a macro and bind it to a key sequence. Now you have an easy way to toggle a feature on and off.

You can also view the source of a recorded macro without naming or saving it, if you just want to see the code. See Saving and Editing Recorded Macros for more information.


Programmable Macros

The Slick-C® macro programming language is behind most of the actions performed in SlickEdit®. Slick-C functions are mapped to menus, buttons, and keys, and perform the action behind an event. You can use Slick-C to extend the editor's functionality. With Slick-C, you can manipulate buffers; parse strings; navigate buffers and source code; and create and modify menus, dialogs, toolbars, and tool windows.

For documentation purposes, "programmable macros" is a term used to encompass Slick-C modules, variables, and batch macros. These items are described in detail below.

This section contains the following topics:

  • Slick-C® Modules

  • Slick-C® Variables (Config Variables)

  • Slick-C® Batch Macros

  • State File

  • Slick-C® Header Files and More Resources

Slick-C® Modules

A Slick-C module is a file with the extension .e that contains Slick-C code. Slick-C modules are the most typical use of Slick-C, used to define functionality that you want to keep loaded, such as user-defined commands. You must compile and load a Slick-C module into the State File before it can be utilized. When a module is compiled, the Slick-C translator converts the file into byte code, which is saved in a corresponding file with the extension .ex. To compile and load the module, use the menu item Macro → Load Module . See Loading and Unloading Slick-C Modules for more information.

Tip

Slick-C modules that are included with SlickEdit are located in the [SlickEditInstallDir]/macros subdirectory. You can store the macros you write in any directory you like. It is best not to store your macros in the macros subdirectory, however.

Loading and Unloading Slick-C® Modules

To compile and load a Slick-C module into the State File, from the main menu, click Macro → Load Module . You can also press F12 or use the gui_load command on the SlickEdit® command line. The Open dialog is displayed, prompting you for the file to load.

Note

The dialog used to open a file depends on whether you are using Smart Open. With Smart Open, you use the Open tool window to browse files and open them. With that off, a standard file browser dialog is displayed. For more information see Opening Files.

To unload a Slick-C module from the State File, from the main menu, click Macro → Unload Module , or use the gui_unload command.

Caution

  • Use caution when unloading modules that are shipped with SlickEdit (standard SlickEdit modules). Unloading a standard module could cause the editor to behave unpredictably.

  • Standard modules are identified by file name. If you load a module with a name that matches a standard SlickEdit module, it will replace the standard module, which (like unloading a standard module), could potentially cause problems.

Slick-C® Variables (Config Variables)

Slick-C variables are global variables that are persistently stored in the State File. Because these typically contain user configuration settings, Slick-C variables are also called "configuration variables". Config variables start with the prefix def_. See Configuration Variables for more information.

Slick-C® Batch Macros

A Slick-C batch macro is a .e file that contains a defmain() function. This file cannot be loaded - you must compile and run it from the SlickEdit® command line. Slick-C batch macros are useful for infrequent tasks that do not involve a persistant state. They are different from recorded macros in that they usually perform specific tasks and cannot be bound to a key. An example of a Slick-C batch macro is a file called autotag.e. This batch macro launches the Create Tag Files for Run-Time Libraries dialog that appears when you run SlickEdit for the first time. See Creating Tag Files for Compiler Libraries for more information.

State File

SlickEdit® ships with a system state file that contains default settings. The system state file is only changed or updated when you upgrade. As you make changes to the configuration of the editor or apply customizations, the changes are saved to a user state file, which is a copy of the system state file with user customizations.

The user state file is located in your User Configuration Directory. On Windows, the state file is named vslick.sta, and on UNIX, vslick.stu. The file extensions were made different to avoid any confusion between the two, since a Windows state file is not compatible with UNIX, and vice versa.

The state file is a binary file that stores the following information:

  • Loadable Slick-C® Modules.

  • Slick-C settings such as global options, language-specific options, etc.

  • Slick-C resources such as event tables, dialogs, toolbars, tool windows, menus, bitmaps, and icons.

  • DLL-exported function linkage.

The state file does not include DLLs themselves or Slick-C® Batch Macros.

Slick-C® Header Files and More Resources

Slick-C header files use the .sh extension. All Slick-C source files #include slick.sh.

To learn more about Slick-C functions, from the main menu, click Help → Macro Functions by Category . This will display the Help dialog, with a list of all macro functions organized into categories.

For information about writing Slick-C, see the Slick-C Macro Programming Guide, which is included in the SlickEdit® Help system and also available as a stand-alone PDF in the docs installation subdirectory.


Chapter 12. Menus, Dialogs, and Tool Windows

This chapter contains the following topics:

  • File

  • Edit

  • Search

  • View

  • Project

  • Build

  • Debug

  • Document

  • Macro

  • Tools

  • Options

  • Window

  • Help

  • Menu Editing

File

This section describes items on the File menu and associated dialogs and tool windows. See the chapter Workspaces, Projects, and Files for more details about file operations.

File Menu

The table below describes items on the File menu.

File Menu Item | Description | Command
New | Displays the New dialog, which allows you to create an empty file to edit. This dialog also lets you create new projects and workspaces. See Dialogs and Tool Windows. | new
New Item from Template | Displays the Add New Item dialog, which allows you to create a new file from a template. See Code Templates. | add_item
Open | Displays the Open dialog, which allows you to open a file for editing. See Standard Open Dialog and Windows 3.1-Style Open Dialog. | gui_open
Open URL | Displays the Open URL dialog, allowing you to open an HTTP file. See Open URL Dialog. | open_url
Close | Closes the current file. | quit
Close All | Closes all files. | close_all
Save | Saves the current file. | save
Save As | Displays the Save As dialog, which allows you to save the current file under a different name. See Save As Dialog. | gui_save_as
Save All | Saves all modified files. | save_all
Revert | Revert current file to version on disk. | revert
Change Directory | Displays the Change Directory dialog, which lets you change the current working directory. See Change Directory Dialog. | gui_cd
Backup History for | Displays the Backup History tool window, where previous versions are listed. Diffs can be run from here. See Backup History. | activate_deltasave
FTP | Displays menu of FTP commands. See File FTP Menu. | N/A
Print | Displays the Print dialog (or Text Mode Print dialog for Mac/Linux/UNIX), which contains options to print the current file or selection and provides setup options. See Print Dialog for Windows and Print Dialog for Mac, Linux, and UNIX. | gui_print
Insert a File | Displays the Insert File dialog, which lets you insert a selected file at the cursor location. See Inserting Files. | gui_insert_file
Write Selection | Displays the Write Selection dialog, which lets you write or append selected text to a file you choose. See Using Write Selection. | gui_write_selection
Template Manager | Create, edit, and delete your templates. See Code Templates. | template_manager
Export to HTML | Write file to HTML format. | export_html
File Manager | Displays menu of file manager commands. See File Manager Menu. | N/A
Exit | Prompts you to save files if necessary and exits the editor. See Exiting the Program. | safe_exit

File FTP Menu

The File → FTP menu is available for performing FTP operations and changing FTP options. See FTP for more information about working with these features.

FTP Menu Item | Description | Command
Start New Connection | Activates FTP tool window and starts a new connection. | ftpOpen 1
Activate FTP | Activates FTP tool window. | activate_ftp
Upload | Uploads the current FTP file. | ftpUpload
Client | Activates FTP Client toolbar. | ftpClient
Profile Manager | Display FTP Profile Manager dialog box. See Add/Edit FTP Profile Dialog. | ftpProfileManager
Default Options | Displays the default FTP options. See FTP Default Options. | show _ftpOptions_form

File Manager Menu

The File → File Manager menu contains options for working with the SlickEdit® File Manager, which offers a rich set of file listing, selecting, and operating capabilities. See The SlickEdit® File Manager for detailed information about this feature.

File Manager Menu Item | Description | Command
New File List | Displays a directory of files you choose. | fileman
Append File List | Appends files to current list. | fileman append
Sort | Sorts file list. | fsort
Backup | Copies selected files and preserves directory structure. | fileman_backup
Copy | Copies selected files to a directory you choose. | fileman_copy
Move | Moves selected files to a directory you choose. | fileman_move
Delete | Delete selected files. | fileman_delete
Edit | Edits selected files. | fileman_edit
Select | Displays menu of file manager select commands. See File Manager Select Menu. | N/A
Files | Displays menu of file manager listing commands. See File Manager Files Menu. | N/A
Attribute | Sets the Read Only, Hidden, System, and Archive attributes of the selected files. | fileman_attr
Repeat Command | Runs internal or external command on selected files. | for_select
Global Replace | Performs search and replace on selected files. | fileman_replace
Global Find | Performs search on selected files. | fileman_find
File Manager Select Menu

The File → File Manager → Select menu contains File Manager selection operations.

File Manager Select Menu Item | Description | Command
All | Selects all files. | fileman_select_all
Deselect All | Deselects all files. | deselect_all
Invert Select | Selects files which are not selected and deselects files which are selected. | select_reverse
Attribute | Selects files based on file attribute. | select_attr
Extension | Selects files based on file extension. | gui_select_ext
Highlight | Selects files which are highlighted. | select_mark
Deselect Highlight | Deselects files which are highlighted. | deselect_mark
File Manager Files Menu

The File → File Manager → Files menu contains operations for working with files in the File Manager. Note that commands in this menu do NOT delete files on disk.

File Manager Files Menu Item | Description | Command
Unlist All | Removes all files from the list. | unlist_all
Unlist Select | Removes selected files from the list. | unlist_select
Unlist Extension | Removes files with a specific extension from the list. | gui_unlist_ext
Unlist Attribute | Removes files with a specific attribute from the list. | unlist_attr
Unlist Search | Removes lines which contain a particular search string. | unlist_search
Read List | Appends a list of files contained in a file. | read_list
Write List | Writes a file containing the currently selected files. | write_list

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with File menu items.

New Dialog

The New dialog is used to create new files, projects, and workspaces. The dialog consists of three tabs:

  • New Dialog

  • Project Tab

  • Workspace Tab

File Tab

This tab on the Dialogs and Tool Windows is used to create new files. It is displayed when you click File → New or use the new command. See Creating Files for more information.

The fields and options on the File tab are described as follows:

  • Document Mode - Specifies the language editing mode for the new file. The language editing mode determines the options and features that will be available for this file (see Language Editing Mode). Double-click on a mode to instantly create an empty, untitled buffer set to that mode. Recently used language modes appear at the top of the list. You can control the number of recently used items that appear with the option Number of recent modes to store on Tools → Options → File Options → History .

    When you select the Automatic mode, the language mode is picked based on the file extension of the file you name. If your extension doesn't match a mode, you'll be asked if you want to create it as plain text. Double-clicking Automatic creates an untitled plain text file.

  • Add to Project - When selected, the new file will be added to the selected project in the current workspace. Use the drop-down list to select the project. This option is set automatically if a project is open.

  • Filename - Specifies the name (without path) of the file to create.

  • Location - Specifies the directory in which the file should be created. By default, this is set to the current working directory (see The Working Directory). Click the Browse button to the right of this field to browse for a location. You can also type a path and if the directory does not exist, you will be prompted to create it after you click OK.

  • Encoding - The encoding indicates whether to convert a file to either SBCS/DBCS for the active code page or Unicode (more specifically UTF-8) data. By default, XML and Unicode files with signatures (UTF-16, UTF-32, and UTF-8) are automatically loaded as Unicode UTF-8 data, while other more common program source files like .c, .java, and .cs source files are loaded as SBCS/DBCS active code page data. To provide better support for editing Unicode and non-Unicode files, two modes of editing exist: Unicode and SBCS/DBCS mode. Files that contain Unicode, XML, or code page data not compatible with the active code page should be opened as Unicode files. See Encoding for more information.

Project Tab

The Project tab on the New dailog is used to create new projects. It is displayed when you click Project → New or use the workspace_new command. The fields and options on the Project tab are described below. See Creating Projects for step-by-step instructions and Managing Projects more information about choosing the correct project type.

The fields and options on the Project tab are described as follows:

  • Project type - Specifies the type of project that you want to create (see Managing Projects for more information). Expand your language in the tree to see all types for that language. It is very important to select the correct type of project at this stage, because it is not possible to change it after the project has been created. Recently used project types appear at the top of the list. You can control the number of recently used items that appear with the option Number of recent types to store found on Tools → Options → File Options → History

  • Customize - Displays the Customize Project Types dialog, which allows you to create, edit, and delete project packages from the Project type list. System-defined project types are stored in prjtemplates.vpt. User-modified or additional project types are stored in usrprjtemplates.vpt. See Creating Custom Project Types for more information.

  • Project name - Specifies the name of the new project.

  • Create project directory from project name - When selected, the name you specify for the project is used as the name for the new directory in which the project will be created. The new directory will be created as a subdirectory under the specified Location. When this option is not selected (cleared), the project will be created inside the Location directory. The area below the Location field shows where the project files will reside based on this option and other Project tab settings. For example, if the project is named "TestProject", this option is selected, and the location is set to C:\dev\, files for this project will reside at C:\dev\TestProject. If the option is not selected, files for the project will reside at C:\dev.

  • Location - Specifies the directory in which the project should be created. By default, this is set to the current working directory (see The Working Directory). Click the Browse button to the right of this field to select a different location. You can also type a path and if the directory does not exist, you will be prompted to create it after you click OK. The area below this field shows where the project files will reside based on this field and other Project tab settings.

  • Files will be located at - Shows the path where the project files will reside, based on the information you have specified on the tab.

  • Executable name - Specifies the name of the executable or output file.

  • Create new workspace - Specifies that the project should be created in a new workspace. This option and Add to current workspace are mutually exclusive.

  • Add to current workspace - Specifies that the project should be created inside the current workspace. For example, if the current workspace is named "OrderChart" located in C:\dev\OrderChart, the name of the new project is "TestProject", and this option is selected, files for the new project will reside at C:\dev\OrderChart\TestProject. This option and Create new workspace are mutually exclusive.

    • Dependency of - When Add to current workspace is selected, this option specifies that the new project should be a dependency of an existing project in the current workspace. Use the drop-down to select the existing project on which you want the new project to depend. See Defining Project Dependencies for more information.

Workspace Tab

This tab on the Dialogs and Tool Windows is used to create a new workspace. To access it, click Project → New or use the workspace_new command. See Creating Workspaces for more information.

  • Blank Workspace - Select this only if you want to create an empty workspace to which you can add projects.

  • Workspace name - Specify the name of the new workspace.

  • Location - Specify the directory location of the new workspace. If the directory does not exist, you will be prompted to create it when you click OK.

The data for each workspace, solution, or project is stored in a text file with the .vpw extension.

Open Tool Window

Smart Open uses the Open tool window to browse and open files. Like other tool windows, it can be docked in any location within SlickEdit or left floating. You can type part of a file name to filter the list. Once a pattern is typed, this window also will display files from the current workspace, list of open files, and file history, depending on your settings.

Note

By default, patterns typed into the File name field will be used to find matching files in the current workspace, the list of open files, and the file history. This makes it faster to locate files by name with less concern about where they come from. See Open Tool Window Options for information on how to change this behavior.

At the top of window, the File name field is used to filter the list of files and directories displayed in the pane, below it. By default, the string is matched anywhere in the file name. If you prefer, you can set your options to do a prefix match. See Open Tool Window Options for more information.

You can also filter the list to show only files of certain types, using the Files of type field at the bottom of the tool window.

Next to the File name field are two icons. The first is for creating a new file using the name in the File name field. Newly created files are not saved but are opened for editing. The ellipsis icon brings up the standard file browser to open a file.

Below the File name field is the list of files and directories. The file list is divided into two columns: Name and Path. The Path column is useful to distinguish files pulled in outside of the selected directory. This list is not sortable. If you right-click in the file list, a number of operations are available, including Open, Execute, Print, and Refresh. You can also a open file by double-clicking it or by selecting it and pressing Enter.

Below the file list is a tree that displays the folder hierarchy for the current directory. It also displays systems drives, a Network entry, and a Favorites node. You can use this to navigate to a different directory. If you don't want this action to change the current directory in SlickEdit, change the options to set Sync current directory to False.

You can add folders to your list of favorites by selecting one in the file list and picking Add to Favorites from the context menu. Remove a favorite by selecting it and pressing the Del key. On Windows, the list of Favorites is automatically populated with Documents and Desktop. On Linux/UNIX we added an entry for Home.

Filtering and Matching

The File Name field is used both to filter the list of files and directories and to match files and directories from the current workspace, file history, or open files. Patterns can be matched at the beginning of a name or anywhere in the name, depending on your setting for Prefix match in the Open Tool Window options. You can use a "*" to match 0 or more characters.

You can use a slash to match against the final directory in the path along with a part of the file name. The pattern "foo\bar" matches files with "foo" somewhere in the final directory name and "bar" somewhere in the file name, controlled by your setting for Prefix match. This is useful to match files in a particular directory. Patterns without a slash will match against any files and directories displayed in the list below the File name field, but they will only be used to match file names in your workspace, open files, or file history.

Here are some sample patterns and what they will match:

Pattern | Matches
foo | Files that begin with or contain "foo".
foo* | This produces the same result as typing "foo". So, you never need to add a star at the end of a pattern.
*foo | This produces the same result as typing "foo" if you have Prefix match set to False. If you have Prefix match set to True, then a star at the front will allow you to match items with "foo" anywhere in the name.
foo*bar | Items that contain "foo", followed by zero or more characters, followed by "bar".
docs\ | Matches files that have "docs" in the final directory name, but not directory names earlier in the path. This will match "C:\src\docs\foo.txt" and "C:\src\MyDocs\foo.txt" depending on your setting for Prefix match. This will not match "C:\docs\current\foo.txt".
*docs\ | This produces the same result as typing "docs\" if you have Prefix match set to False. If you have Prefix match set to True, then a star at the front will allow you to match items with "docs" anywhere in the name.
docs\foo | Matches files with "docs" in the final directory of the path and "foo" somewhere in the file name: "C:\src\docs\food.txt". Will not match "C:\docs\src\food.txt".
Completions

Completions can be used to speed the entry of file names and paths in the File name field. After typing a few characters of a name, press the spacebar to fill in the rest of the name. If no matches are available, then a space will be entered in this field.

Hotkeys for Open Tool Window

The following sequences can by used when the cursor is in the File name field:

  • Shift +Enter - creates a new file with the name in the filter.

  • Ctrl +Enter - if the text in the File name field is a filespec (i.e. *.ext), then that filespec is added to the Files of type combo box at the bottom of the screen and selects that filter.

The following key sequences are support when the focus is anywhere in the Open tool window:

  • Alt +E - changes the focus to the File name field.

  • Alt +N - creates a new file using the name in the File name field.

  • Alt +D - changes the focus to the explorer tree at the bottom of the tool window.

  • Alt +F - changes the focus to the list of files and directories under the File name field.

  • Alt +T - changes the focus to the Files of type combo box at the bottom of the tool window.

Open Tool Window Options

You can set options for the Open tool window in either of two ways:

  • Right-click in the file list portion of the tool window and select Options.

  • Using the SlickEdit Options dialog, select Tools → Options → File Options → Open .

In either place you can set the following options:

  • Dismiss on select - hides the tool window after you select a file from the list. This setting only has an effect if the tool window is not docked.

  • Show hidden files - set to true to display files that are considered "hidden" by the operating system.

  • Sync current directory - when this value is true, changing the directory in the Open tool window will set the current directory in SlickEdit.

  • Prefix match - set to true if you want patterns entered into the File name field to match only at the beginning of a file name.

  • Show/match workspace and project files - when set to True, the Open tool window will display files from the current workspace that match the string entered into the File name field.

  • Show/match open files - when set to True the Open tool window will display already open files that match the string entered into the File name field. This is useful if you have a large number of open files and you want to be able to use this tool window to switch files.

  • Show/match files in history - when set to True the Open tool window will display recently opened files that match the string entered into the File name field.

Standard Open Dialog

On Windows, this is the standard dialog used to browse and open files. It is displayed when you click File → Open or use the gui_open command if you have turned Smart Open off (see Opening Files). A Windows 3.1-Style Open Dialog is displayed on Mac, Linux, and UNIX platforms.

  • Look in - Specify the directory for which to display files. 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. Click the OK button to open the selected files. This text box supports alias expansion. Type the alias name and press Ctrl+Space to expand an alias. Aliases save time typing in long path names and wasting time clicking through the Directories list box. See Directory Aliases for more information.

  • 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.

    You can change the file specifications that appear in theFiles of type combo box at the bottom left of the Open and Save As dialog boxes. From the main menu, click Tools → Options → File Options , then select File Filters. The first wildcard pattern(s) specified is used to initialize the Open dialog box. The default is to list all files. You may want an initially smaller list which displays the source files you typically edit. See Files of Type Filter Options for more information.

  • 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. Files are automatically opened with the read-only attribute set as read-only, regardless of the setting of this check box.

  • Encoding - The encoding specifies whether to convert a file to either SBCS/DBCS for the active code page or Unicode (more specifically UTF-8) data. By default, XML and Unicode files with signatures (UTF-16, UTF-32, and UTF-8) files are automatically loaded as Unicode UTF-8 data, while other more common program source files like .c, .java, and .cs source files are loaded as SBCS/DBCS active code page data.

    To provide better support for editing Unicode and non-Unicode files, two modes of editing exist: Unicode and SBCS/DBCS mode. Files that contain Unicode, XML, or code page data not compatible with the active code page should be opened as Unicode files. See Encoding for more information on the available encodings.

  • Expand tabs - When this option is checked, tabs found in opened files are expanded to spaces in increments of eight.

  • Preload file - This check box is used to force the entire contents of opened files to be read into memory (may spill to disk), count the number of lines in the file, and truncate the file when an EOF character is found.

  • Change dir - (Not always present) Check this box if you want the current directory to be changed to the path where this file is located. To set the default value of this check box to always enabled, from the main menu click Tools → Options → Appearance → General , and set the Change directory option to True.

  • Line format - This option specifies the type of line ending to be used. Select DOS, UNIX, or MAC line endings, or select Current line format to use the line endings already in the current file.

  • Line separator char (decimal) - 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 option to open ASCII record files or binary files.

  • Find File - This button displays the Find File dialog box used to scan subdirectories for wildcard file names. Files found may be opened. See Find File Dialog.

Windows 3.1-Style Open Dialog

On Mac, Linux, and UNIX platforms, this dialog used to open files. It is displayed when you click File → Open or use the gui_open command, if you have turned off Smart Open (see Opening Files).

This dialog contains the same options as the Standard Open Dialog, with the following additions/differences:

  • 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 syntax for specifying a sequential data set is //dataset. The syntax for specifying a partitioned data set member is //dataset/member. For example, type //SYS1.PARMLIB/BPXPRM00 into the File name combo box and press Enter to edit the BPXPRM00 member of SYS1.PARMLIB.

    The following characters have special meaning when entered as the last part of a file name:

Character | Meaning
* | Matches zero or more characters.
? | Matches any character.
[char-set] | Matches any one of the characters specified by char-set. A dash (-) character may be used to specify ASCII (not EBCIDIC) ranges. The expression [A-Z] matches any uppercase letter. A backslash (\) may be used inside the square brackets to define literal characters or ASCII characters. For example, \- specifies a literal dash character.

File name wildcard examples:

Example | Meaning
//sys1.* | Match data sets starting with sys1.
//p*a.b.* | Match data sets starting with p that have a.b. in the middle.
//sys1.maclib/a* | Match all members that start with the letter a.
//dataset/vs*xy | Match all members starting with vs and ending with xy.
//dataset/a?c | Match member names that start with a, end with c, and are exactly three characters long. For example, this matches abc or axc.
//dataset/a[a-c]c | Matches members names aab, abc, and acc.

Like many combo boxes in SlickEdit®, the File name combo box has the following powerful features:

  • Combo box retrieval - Press the Down arrow key to retrieve the previous file name you entered here. The combo box list (Alt+Down) displays all the previous file names entered. This retrieval information is saved across edit sessions.

  • Completion - Press the spacebar (Space) to automatically type the rest or more of the partial file name for you. For example, type c:\aut and press Space. 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. See Completions for more information.

  • Alias expansion - Type the alias name and press Ctrl+Space to expand an alias. Aliases save you from typing long path names and wasting time clicking through the Directories list box. Many keys from your emulation are supported here such as Ctrl+K (copy word to clipboard), Ctrl+Backspace (cut line), and Ctrl+Shift+K (cut word). See Directory Aliases for more information.

  • Multiple clipboards - Press Ctrl+Shift+V to view a list of all your clipboards.

Note

(UNIX) Embed ~, ~login name, or $envvar in the File Name specification in the same way as 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.

Tip

You can change the file specifications that appear in the List files of type combo box at the bottom left of the Open and Save As dialog boxes. From the main menu, click Tools → Options → File Options , then select File Filters. The first wildcard pattern(s) specified is used to initialize the Open dialog box. The default is to list all files. You may want an initially smaller list which displays the source files you typically edit. See Files of Type Filter Options for more information.

  • Directories - Double-click on files in this list box to change the directory. The File List is updated.

  • 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. 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. This check box is also present when saving a file. It allows you to save a read-only file as read-only.

  • Show hidden files - Dot files (files with names beginning with a dot character) are hidden in the Open dialog by default. To view dot files, select this option. The default state of this option is controlled by the option Show files beginning with a dot (Tools → Options → Appearance → General ). Show files beginning with a dot can be also set using the def_filelist_show_dotfiles configuration variable.

  • 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 Open dialog box initially 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 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. SlickEdit allows many load options to be based on the drive from which the file you open resides. For more information, see Load File Options.

  • File locking - When on, ensures that a file handle is kept open to the file for locking purposes. This allows SlickEdit to detect when another user is editing the same file.

  • 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.

  • New window - Select this option to cause the file to be opened in a new editor window.

  • File format - SlickEdit automatically detects DOS, Macintosh, and UNIX file formats by checking the first 8096 bytes of the file. If this logic is not working for a particular file you have, force a file in a specific format. Select the DOS, Mac, or UNIX radio button.

Find File Dialog

This dialog is used to find a file to open. It is displayed when you click File → Open , then click the Find File button, or when you use the find_file command.

  • 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 checked, the selected files are opened as read-only.

  • Open - Opens the selected files in the Files Found list box.

  • Advanced - These are the same options found on the Open dialog box. See Standard Open Dialog or Windows 3.1-Style Open Dialog.

Open URL Dialog

This dialog is used to specify an HTTP file to open. It is displayed when you click File > Open URL or use the open_url command.

  • URL - Enter a URL to open in this field. You may use forward or backward slashes. The prefix "http://" is not required.

  • Use cache - If this option is selected, and the URL being opened already exists in the cache, the cached version is opened. This option is intended to save time required to download remote files. If the URL specified is already open, this option has no effect.

  • Include header - If this option is selected, all of the URL header data is displayed. If the URL specified is already open, this option has no effect.

Save As Dialog

This dialog is used to save the current file under a different name. It is displayed when you click File → Save As or use the gui_save_as command. By default, on Windows, the standard Save As dialog is displayed. On Linux, UNIX, or Mac, a Windows 3.1-style Save As dialog is displayed. The Standard Save As dialog is described below.

  • Save as type - This option filters the list of files displayed based on file extension. Changing this value will not change the extension of the file, unless the extension is not specified in the File name field.

  • Encoding - The encoding specifies whether to convert a file to either SBCS/DBCS for the active code page or Unicode (more specifically UTF-8) data. By default, XML and Unicode files with signatures (UTF-16, UTF-32, and UTF-8) files are automatically loaded as Unicode UTF-8 data, while other more common program source files like .c, .java, and .cs source files are loaded as SBCS/DBCS active code page data. See Encoding for more information.

  • Line format - This option specifies the type of line ending to be used. Select DOS, UNIX, or MAC line endings, or select Current line format to use the line endings already in the current file.

  • Change dir - Check this box if you want the current directory to be changed to the path where this file is saved. To set the default value of this check box, from the main menu, click Tools → Options → Appearance → General , and set the Change directory option.

  • Show hidden files - (UNIX only) Dot files (files with names beginning with a dot character) are hidden in the Save As dialog by default. To view dot files, select this option. The default state of this option is controlled by the option Show files beginning with a dot (Tools → Options → Appearance → General ). Show files beginning with a dot can be also set using the def_filelist_show_dotfiles configuration variable.

  • 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.

  • Add to project - When checked, the saved file will be added to the project that is currently open in the workspace. If no project is open, this option is unavailable. To set the default value of this check box, from the main menu click Tools → Options → File Options → Save , and change the option Add file to project upon Save As.

Tip

This option is also available from the command line by using the option letter +P with the save_as command. For example, save_as +P /path/to/file.cpp will add file.cpp to the current project. Similarly, save +P will save the current file and add it to the current project.

Save Failed Dialog

This dialog appears automatically when a Save operation has failed. The following options are available:

  • Save as read only - (UNIX only) This check box is automatically selected if your file does not have any write permissions (no "w" letter). Turn this option on to have 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 automatically selected if SlickEdit was unable to create a backup file when trying to save your file. This can happen when you do not 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 rights for creating a backup directory on that drive.

  • Configure local backup directory - (Non-UNIX only) If you are editing files on a network drive, you may not have access rights 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, SlickEdit will create one for you.

Exiting with Modified Buffers Dialog

If files have not been saved or closed upon exit, this dialog appears so you can save or discard any changes.

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 prompted to give a file name.

  • 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 buffers. 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.

Change Directory Dialog

This dialog is used to change the current working directory. It is displayed when you click File → Change Directory or use the gui_cd command.

  • Directory name - Name of directory to change to make active.

  • Expand alias - Check this box if you want to specify directory aliases in the Directory name text box. See Directory Aliases for more information.

  • Process chdir - Check this box if you want the current directory in the Build tool window 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 affect the cd command which is used to change directory using the command line.

Print Dialog for Windows

On Windows, this is the default dialog used to configure print options and send text or files to a printer. It is displayed when you click File → Print or use the gui_print command. Mac, Linux, and UNIX platforms have a different print dialog (see Print Dialog for Mac, Linux, and UNIX for its description. See Printing for more information about printing from within SlickEdit®).

The general settings on the Print dialog for Windows are described below.

  • Print - Sends the selection or active buffer to the printer specified in the Print Setup dialog (print command).

  • Font - Displays the Fonts option screen, which allows you to specify the font for the printed text. See Font Options for more information.

  • Setup - Displays the Print Setup dialog, which allows you to specify the printer to use (printer_setup command). The Print Setup dialog box is built into the operating system, and its contents might vary depending on the print driver that you are using.

  • Preview - Displays a preview of what the printed file will look like (print_preview command).

  • Files - Expands the Print dialog to allow you to pick another file or multiple files for printing (as opposed to the active file).

The remaining options are categorized into the following tabs:

  • General Tab

  • Header/Footer Tab

  • Margins Tab

  • Schemes Tab

General Tab

This tab on the Print Dialog for Windows is used to set general print options.

  • Selection only - When this option is selected, only the selection is printed. To print the selection immediately using the default configuration, use the print_selection command.

  • Visible lines only y - When this option is selected, only visible lines are printed. This option allows you to print selective display.

  • Print color coding - When this option is selected, language-specific color coding is printed using the same font attributes (bold, italic, underline).

  • Print color - When this option is selected, language-specific color coding is printed using the same colors.

  • Print hex - When this option is selected, printed output is displayed as if it were the hex display mode.

  • Two up - When this option is selected, it 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 - Specifies whether text is printed top to bottom (portrait) or left to right (landscape).

  • Space between - This text specifies the width between columns, in inches. This text box is unavailable unless the Two Up check box is marked.

  • Number lines every - When the value is not zero, lines at intervals of this value are printed with line numbers.

  • Number of copies - This value specifies the number of copies to print.

Header/Footer Tab

This tab on the Print Dialog for Windows is used to configure header/footer printing options.

Type directly into the text boxes to specify text for the top left, center, and right headers and bottom left, center, and right footers. Click the arrow to the right of each text box pick from a list of escape sequences to be inserted. Escape sequences are values that are replaced with real data, such as %f (which will be replaced with the file name) and %d (which will be replaced with the date).

Margins Tab

This tab on the Print Dialog for Windows is used to configure print margins.

  • After header/Before footer - Specifies the amount of spacing to come between the header and the first line on a page, and the amount of spacing to come between the last line on a page and the footer.

  • Margins - The Top, Bottom, Left, and Right margin fields specifies the amount of spacing in inches to come between the outer edge of the paper and the printed text. To print the maximum amount of text, specify "0" for all margins.

Schemes Tab

This tab on the Print Dialog for Windows lets you to save the current printer settings as a scheme. See Print Schemes for more information.

Print Dialog for Mac, Linux, and UNIX

On Mac, Linux, and UNIX platforms, the Text Mode Print dialog is the default dialog used to configure print options and send text or files to a printer. It is displayed when you click File → Print or use the gui_print command. Windows uses a different print dialog. See Print Dialog for Windows for its description. See Printing for more information about printing from within SlickEdit®.

The Text Mode Print dialog contains the following general settings:

  • OK - Sends the selection or active buffer to the print device.

  • Save Settings - Saves the settings that are configured in the Text Mode Print dialog. The next time a print command or this dialog is invoked, the previously saved settings are restored.

  • Files - Expands the Text Mode Print dialog to allow you to pick another file or multiple files for printing (as opposed to the active file).

The remaining options are categorized into the following tabs:

  • General Tab

  • Header/Footer Tab

  • Advanced Tab

General Tab

This tab on the Print Dialog for Mac, Linux, and UNIX contains general print settings.

  • Selection Only - When this option is selected, only the selection is printed. To print the selection immediately using the default configuration, use the print_selection command.

  • Visible lines only - When this option is selected, only visible lines are printed. This option allows you to print selective display.

  • Print hex - When this option is selected, printed output is displayed as if it were the hex display mode.

  • Form feed after last page - Determines whether the built-in print text formatting prints a form feed after the last page.

  • Use PostScript (Enscript) - When this option is selected, the enscript program is used to print a source file. This allows for print formatting such as fonts, page layout, etc. To specify the options for enscript, see Advanced Tab. Activating this option will make the following settings available:

    • Print color coding - When this option is selected, language-specific color coding is printed using the same font attributes (bold, italic, underline).

    • Print color - When this option is selected, language-specific color coding is printed using the same colors.

    • Two Up - When this option is selected, it specifies two columns where one page is printed in the left column and the next page is printed in the right column.

  • Number Lines Every - When the value is not zero, lines at intervals of this value are printed with line numbers.

  • Lines per page - Maximum number of lines that can be printed. This includes header, footer, and blank lines.

  • Columns per line - Maximum number of columns that can be printed on a line.

Header/Footer Tab

This tab on the Print Dialog for Mac, Linux, and UNIX is the same as the Header/Footer Tab on the Print Dialog for Windows.

Advanced Tab

This tab on the Print Dialog for Mac, Linux, and UNIX is used to configure advanced print options.

  • Print 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. The default print command is lp -c -o nobanner %f. The %fspecifies the file to be printed. If the print program is not found, the command lpr %f is used instead.

  • PostScript Options - To use PostScript options, you must first select the option Use PostScript (Enscript) on the General print settings tab. The default options are --media=Letter --no-header --quiet. For a list of all available enscript options, see the enscript man page.

  • Print filter - Specifies an external program to format text before it is printed and overrides the built-in print text formatting. The program specified here must accept input from standard in and writes its output to standard out. A typical print filter command is pr -1 -w76 -o0 -l50.

  • Print device - Specifies a printer device file name in which to write the formatted text. This text box is ignored if a Print Command has been specified. The default print device is /dev/lp0.

Add/Edit FTP Profile Dialog

This dialog is used to create or edit profiles for FTP connections. It is displayed when you click File → FTP → Profile Manager , then click Add or Edit. The title of the dialog box changes based on whether you are adding a profile or editing an existing profile, but the interface is the same. The dialog consists of two tabs: General Tab and Advanced Tab.

General Tab

This tab on the Add/Edit FTP Profile Dialog is used to configure general FTP profile settings.

  • Profile name - Name displayed in connection combo box.

  • Host name - Host name of the FTP server.

  • Server type - If you are connecting to an FTP server, select FTP. If you are connecting to a Secure Shell (SSH) server that supports the SFTP subsystem, select SFTP/SSH.

  • Host type - If the file listing is blank after connecting, select the host type from the list. Otherwise, leave it set to Auto. If the server type is SFTP/SSH, then this type is ignored.

  • User ID - Logon user ID.

  • Password - Logon password.

  • Anonymous login - Specifies whether the FTP login uses the anonymous user ID.

  • Save password - Specifies whether to save a password.

  • Transfer type - Specifies the default file transfer method. Select ASCII if you want line breaks translated. Otherwise, specify Binary.

  • Initial directory - Specifies the initial remote and local directories after login.

  • Filters - Specifies the initial remote and local file filters after login.

Advanced Tab

This tab on the Add/Edit FTP Profile Dialog is used to configure advanced FTP profile settings.

  • Timeout - The value that you type in this field specifies the amount of time that the application should wait for a reply from the FTP server.

  • Port - FTP or SFTP/SSH port. By default, this is 21 for FTP server type, and 22 for SFTP/SSH.

  • Keep alive - Keeps a connection alive even when idle. Unavailable for SFTP/SSH server type.

  • Resolve links - Resolves symbolic links on the remote host. Unavailable for SFTP/SSH server type.

  • Auto refresh - Determines whether the host directory listing is updated after an operation. Turn this off if the 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 option is not available until a firewall is set up and activated.

  • Upload filename case - Indicates what file case should be used for the remote file name based on the local file name.

  • 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 tool windows.


Edit

This section describes items on the Edit menu and associated dialogs and tool windows. See Basic Editing for more details about editing operations.

Edit Menu

The table below describes items on the Edit menu.

Edit Menu Item | Description | Command
Undo | Undoes the last edit operation. | undo
Redo | Undoes an undo operation. | redo
Multi-file Undo | Undoes the last multi-file operation (i.e.: Find and Replace in all files). | mfundo
Multi-file Redo | Undoes an multi-file undo operation. | mfredo
Cut | Deletes the selected text and copies it to the clipboard. | cut
Copy | Copies the selected text to the clipboard. | copy_to_clipboard
Paste | Inserts the clipboard into the current file. | paste
List Clipboards | Displays the Clipboards tool window, which allows you to view and insert the selected clipboard. See Clipboards and also Edit Dialogs and Tool Windows. | list_clipboards
Copy Word | Copies the current word to the clipboard. | copy_word
Append to Clipboard | Appends the selected text to the clipboard. | append_to_clipboard
Append Cut | Deletes the selected text and appends it to the clipboard. | append_cut
Insert Literal | Displays the Insert Literal dialog, which allows you to insert a specified character code. See Inserting Literal Characters. | insert_literal
Select | Displays menu for selecting and deselecting text. See Edit Select Menu. | N/A
Delete | Displays menu for deleting text. See Edit Delete Menu. | N/A
Complete Previous Word | Retrieves previous word or variable matching word prefix at cursor. | complete_prev
Complete Next Word | Retrieves next word or variable matching word prefix at cursor. | complete_next
Fill | Displays the Fill Selection dialog, which lets you fill the selected text with a character you choose. | gui_fill_selection
Indent | Indents the selected text based on the tabs or indent for each level. | indent_selection
Unindent | Unindents the selected text based on the tabs or indent for each level. | unindent_selection
Other | Displays menu containing more edit-related commands. See Edit Other Menu. | N/A

Edit Select Menu

The Edit → Select menu contains selection operations. See Selections for more information.

Edit Select Menu Item | Description | Command
Char | Starts or ends a character/stream selection. | select_char
Block | Starts or ends a block/column selection. | select_block
Line | Starts or ends a line selection. | select_line
Word | Selects the word under cursor. | select_whole_word
Code Block | Selects text in current code block (if/loop/switch block etc.). | select_code_block
Procedure | Selects text in current function including function heading. | select_proc
Deselect | Unhighlights selected text. | deselect
All | Selects all text in current buffer. | select_all

Edit Delete Menu

The Edit → Delete menu contains text deletion operations. See Cutting and Deleting Text for more information.

Edit Delete Menu Item | Description | Command
Word | Deletes text from the cursor to the end of the current word and copies it to the clipboard. | cut_word
Line | Deletes the current line and copies it to the clipboard. | cut_line
To End of Line | Deletes text from the cursor to the end of the line and copies it to the clipboard. | cut_end_line
Selection | Deletes the selected text. | delete_selection
All | Delete all text in current buffer. | delete_all

Edit Other Menu

The Edit → Other menu contains miscellaneous editing operations.

Edit Other Menu Item | Description | Command
Lowcase | Translates the characters in the selected text to lowercase. | lowcase_selection
Upcase | Translates the characters in the selected text to uppercase. | upcase_selection
Capitalize | Capitalizes the first character of the current word. | cap_selection
Shift Left | Deletes the first column of text in each line of the selected text. | shift_selection_left
Shift Right | Inserts a space at the first column of each line of the selected text. | shift_selection_right
Overlay Block | Overwrites selected block/column of text at the cursor. | overlay_block_selection
Adjust Block | Overlays the selected text at the cursor and fills the original selected text with spaces. | adjust_block_selection
Enumerate | Displays the Enumerate dialog, which allows you to add incrementing numbers to a selection. See Enumerate Dialog. | gui_enumerate
Filter Selection | Displays a Command dialog, which allows you to filter selected text through an external command. See Filter Selection: Command Dialog. | filter_selection
Copy UCN As Unicode | Copies selected UCN to the clipboard as Unicode. See Using Unicode. | copy_ucn_as_unicode
Copy Unicode As | Displays menu containing commands for copying Unicode as UCN. See Copy Unicode As Menu. | N/A
Tabs to Spaces | Converts tabs to appropriate number of spaces. If there is no selection the entire buffer is converted. | convert_tabs2spaces
Spaces to Tabs | Converts leading spaces to tabs. If there is no selection the entire buffer is converted. | convert_spaces2tabs
Remove Trailing Whitespace | Removes trailing whitespace characters from the ends of lines. | remove_trailing_spaces
Block Insert Mode | Allows you to insert/delete text for an entire block/column selection. | block_insert_mode
Copy Unicode As Menu

The Edit → Other → Copy Unicode As menu contains operations for copying Unicode characters. See Using Unicode for more information.

Copy Unicode As Menu Item | Description | Command
C++ (UTF-16 \xHHHH) | Copies Unicode characters in selection as C++ UTF-16 \xHHHH notation. | copy_unicode_as_c
Regex (UTF-32 \x{HHHH}) | Copies Unicode characters in selection as Regex UTF-32 \x{HHHH} notation. | copy_unicode_as_regex
Java/C# (UTF-16 \uHHHH) | Copies Unicode characters in selection as Java/C# UTF-16 \uHHHH notation. | copy_unicode_as_java
UCN (UTF-32 \uHHHH and \UHHHHHHHH) | Copies Unicode characters in selection as UCN UTF-32 \uHHHH and \UHHHHHHHH notation. | copy_unicode_as_ucn
SGML/XML hexadecimal (UTF-32 &xHHHH;) | Copies Unicode characters in selection as SGML/XML hexadecimal UTF-32 &xHHHH; notation. | copy_unicode_as_xml
SGML/XML decimal (UTF-32 &xDDDD;) | Copies Unicode characters in selection as SGML/XML decimal UTF-32 &xDDDD; notation. | copy_unicode_as_xmldec

Edit Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with text editing.

Select Text to Paste Dialog

This is a modal dialog available for viewing and inserting recently used SlickEdit® clipboards (not the same as the operating system clipboard). To display the dialog, you can use either the old_list_clipboards command or the list_clipboards_modal command. These commands are identical. If there are no clipboards, the message line states No clipboards. See Clipboards for more information.

Tip

You can also use the Clipboards tool window to view and insert clipboards (Edit → List Clipboards or list_clipboards command). It provides the same information as the Select Text to Paste dialog, except it includes a Preview area to view color-coded clipboard contents and provides some additional functionality. See Clipboards for more information.

The dialog shows a list of clipboards. To insert a clipboard at the current cursor location, double-click on the clipboard to insert, or, select the clipboard to insert and press Enter or click OK.

To see the entire contents of a condensed clipboard, click the View button. The View Clipboard dialog opens showing the color-coded contents in an edit window. From here, you can copy all or part of the contents to the operating system clipboard.

The dialog shows the following information:

  • Clipboard name/number - This is the number of the clipboard or the name, if using Named Clipboards. Clipboards are numbered with the most recent clipboard first, which always appears at the top of the list. You can use this value with the paste command to insert the specified clipboard. For example, type paste 2 on the command line to insert clipboard 2 at the cursor location.

  • Clipboard type - The clipboard type can be CHAR, LINE, or BLOCK. A CHAR type clipboard is inserted before the current character. 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 → Options → Editing → General ). A BLOCK type clipboard is inserted before the current character and pushes over all text intersecting with the block. No lines are inserted.

  • Line count - The number following the clipboard type indicates the number of complete or partial lines of text in the clipboard.

  • Clipboard contents/summary - This area shows all or a portion of the clipboard contents. If the contents exceed the viewing area, they are condensed.

Enumerate Dialog

This dialog contains options for adding incrementing numbers to a selection. It is displayed when you click Edit → Other → Enumerate or use the gui_enumerate command. Alternatively, you can add incrementing numbers to a selection using the enumerate command with options on the command line. See the Help system for command syntax.

  • 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 with which to start.

  • 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 by which to increment.

  • 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 zeros.

  • Output - Both the Hexadecimal and Hexadecimal flags options 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.

Filter Selection: Command Dialog

The Command dialog is used to specify a command to run against the selected text. It is displayed when you click Edit → Other → Filter Selection or use the filter_selection command.

Enter the command in the Command text box. The selected text will be used as input to the command, and the output from the command will replace the selected text. Use the drop-down arrow to the right of the Command text box to select from a history of previously entered commands.


Search

This section describes items associated with searching and replacing. For more information about using search and replace operations, see Find and Replace.

Search Menu

The Search menu contains items pertaining to search and replace, navigation, and bookmarks.

Search Menu Item | Description | Command
Find | Displays the Find and Replace tool window, open to the Find tab, which allows you to search for a specified string. See Search Dialogs and Tool Windows. | gui_find
Find in Files | Displays the Find and Replace tool window open to the Find in Files tab, which lets you search for a string in files. See Find in Files Tab. | find_in_files
Next Occurrence | Searches for the next occurrence of the last string you searched for. | find_next
Previous Occurrence | Searches for the previous occurrence of the last string you searched for. | find_prev
Replace | Displays the Find and Replace tool window, open to the Replace tab, which allows you to search for a string and replace it with another string. See Replace Tab. | gui_replace
Replace in Files | Displays the Find and Replace tool window, open to the Replace in Files tab, which allows you to search for a string and replace it with another string in files. See Replace in Files Tab. | replace_in_files
Incremental Search | Searches for match incrementally. See Incremental Searching. | i_search
Find File | Displays the Find File dialog, which lets you search for files on disk. | find_file
Find Symbol | Searches Context Tagging® databases for a symbol you specify. See Find Symbol Tool Window. | activate_find_symbol
Go to Line | Places the cursor on a line you specify. See Navigating to a Specific Line. | gui_goto_line
Go to Column | Places the cursor in a column you specify on the current line. | gui_goto_col
Go to Offset | Places the cursor on a byte/character offset in the current file. See Navigating to an Offset. | gui_seek
Go to Matching Parenthesis | Finds the matching parenthesis or begin/end structure pair. See Begin/End Structure Matching. | find_matching_paren
Go to Definition of | Pushes a bookmark at the cursor and navigates to the definition of the current symbol. See Symbol Navigation. | gui_push_tag
Go to Reference of | Searches for references to the symbol under the cursor. See Symbol Navigation. | push_ref
Last Find/Grep List | Displays list of Files/Buffers generated by Find commands. | grep_last

Search Bookmarks Menu

Bookmarks Menu Item | Description | Command
Push Bookmark | Pushes a bookmark at the cursor. See Bookmarks. | push_bookmark
Pop Bookmark | Pops the last bookmark. See Bookmarks. | pop_bookmark
Bookmark Stack | Displays the Bookmark Stack tool window. See Bookmark Stack Dialog. | pop_bookmark
Set Bookmarks | Sets a persistent bookmark on the current line. See Bookmarks. | set_bookmark
Go to Bookmark | Displays the Go to Bookmark dialog from which you can select a bookmark to navigate to. See Navigating Named Bookmarks. | gotot_bookmark
Toggle Bookmark | Toggles setting a bookmark on the current line. See Bookmarks. | toggle_bookmark
Bookmarks Tool Window | Lists bookmarks and allows you to add and delete bookmarks. See Bookmarks. | activate_bookmarks
Next Bookmark | Go to next bookmark. See Bookmarks. | next_bookmark
Previous Bookmark | Go to previous bookmark. See Bookmarks. | prev_bookmark

Search Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated searching and replacing. Note that default search options are also available (Tools → Options → Editing → Search ). See Search Options for a description of these settings.

Find and Replace Tool Window

This tool window is displayed when you click one of the find or replace items on the Search menu, or when you click Search → Find . See Find and Replace for information about searching and replacing in SlickEdit®.

The Find and Replace tool window contains a right-click context menu and four tabs: the Find Tab, the Find in Files Tab, the Replace Tab, and the Replace in Files Tab.

Find and Replace Tool Window: Context Menu

Right-click in the background of the Search Dialogs and Tool Windows to access the following items:

  • Saved Search Expressions - See Saving Search and Replace Values.

  • Configure Options - Displays the Search Options screen, from which you can set the default search options that the tool window should use.

  • Use Default Options - If selected, the options specified in the Search Options are used instead of the options selected in the Find and Replace tool window. See Default Search Options.

  • Clear All Options - Clears all options that are selected in the Find and Replace tool window.

  • Set Current Options as Default - If selected, the options that are selected on the tool window replace the settings in the Search Options.

  • Hide/Show Tabs - Toggles the display of the tabs on the Find and Replace tool window.

  • Clear Highlights - Removes all highlighting from text that was highlighted during a search or replace operation.

  • Allow Docking - If selected, the Find and Replace tool window can be docked.

Find Tab

This tab on the Search Dialogs and Tool Windows provides fields and options for searching and finding text.

  • Search for - Enter the string you want to search for here. You can retrieve previous search strings by clicking the drop-down list button. Strings may be text or regular expressions and can include wildcards. Note that ISPF search expressions cannot be used here.

    Click the right-pointing arrow button to the right of the Search for field to display a menu containing specific search syntax options such as Character in Range, Beginning of Line, and Decimal Digit.

  • Look in - This field allows you to specify a range for your search to the current selection, current procedure, current buffer or all buffers.

  • Search options - Click this button to expand or contract the search options section of the tool window. When contracted, the options that are selected are summarized in this area.

  • Match case - If selected, a case-sensitive search is performed.

  • Match whole word - If selected, 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 can be changed. To change these, from the main menu click Tools → Options → Languages → [Language Category] → [Language] → General . Enter your desired characters in the Word chars field.

  • Use - Set this option to select one of the following types of search syntax from the drop-down list:

    • Regular expression (UNIX)

    • Regular expression (Brief)

    • Regular expression (SlickEdit®)

    • Regular expression (Perl)

    • Wildcards (*,?)

    See Using Regular Expressions in SlickEdit® for more information.

  • Color - Displays the Color Coding Search Options dialog. This dialog lets you pick various syntactic elements to filter a search. These are the same elements used by the Color Coding engine. Using these filters helps to reduce the number of false positives you find in a search. Each check box has three states:

    • Neutral (the default) - All check boxes start in the neutral state. These elements will be used in a search until cleared or until one or more other elements are selected. Putting a check in any check box essentially clears all non-checked boxes.

    • Selected - If the check box is selected, the search will be restricted to this element and any other selected elements. There is no need to clear any other elements if any elements are selected. If any elements are selected, only selected elements will be searched. For example, to search for the word "result" only in comments, put a check only in the Comment check box. All other syntactic elements will be ignored as part of this search.

    • Cleared - If the check box is clear, these elements will not be searched. For example, if you want to find the word "result" anywhere in your code except for in comments, clear the Comment check box.

    Click the Reset button to mark all items as neutral.

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=.>).

  • Wrap at beginning/end - If selected, the search will always be performed on the entire buffer, starting from the cursor.

  • Place cursor at end - If selected, the cursor is placed at the end of the occurrence found.

  • Search backward - Select this option to have the search performed from the end to the beginning.

  • Search hidden text - Select this option to search for text hidden by Selective Display. Matches found that were set to be hidden by Selective Display will be revealed. To set Selective Display options, from the main menu click View → Selective Display . See Selective Display for more information.

  • List all occurrences - Select this option to see a list of all instances of the search string in the file. The Find tab expands to show the Results options, where you can specify the output destination. These options are similar to the Results options on the Find in Files tab. See Find in Files Tab for more information.

  • Highlight matches - Select this option to highlight all matched patterns in the current search range. Highlight colors for these matches are customizable. To set this color, from the main menu, click Tools → Options → Appearance → Colors and select Highlight from the Screen element list. Choose your desired color settings and click OK. See Colors for more information.

    To clear all highlighted text in all buffers, clear the Highlight matches option or simply close the Find and Replace tool window.

  • Bookmark matches - Select this option to bookmark lines with matching patterns and display the Bookmarks tool window when a match is bookmarked.

  • Incremental search - Select this option to search incrementally on patterns being typed into the Search for field, showing the location of the match at the cursor. See Incremental Searching for more information on this method of searching.

  • Find button - Click this button when you have entered all desired search options and are ready to initiate a search. If no matches are found, the Search for field will turn red, and the text String not found will be displayed in the status area of the editor.

Find in Files Tab

This tab on the Search Dialogs and Tool Windows provides the same functionality as the Find Tab, with the added ability to conduct multi-file searches. Additional options are described below.

  • Look in - This field allows you to specify a range for your search to the current selection, current procedure, current buffer or all buffers.

    Click the right-pointing arrow button to the right of the Look in field to display a menu containing more specific range options such as Directory, Project, and All Buffers. From this sub-menu, you may also select Append and choose an item for which to have the search results appended.

  • File types - Specifies one or more file types (extensions) to search for. Type in this field or use the drop-down list to select the extensions desired. When a file title is specified in the Look in field, the file types wildcards are ignored.

  • Exclude - Paths, files, or file types can be excluded from a multi-file search by specifying them with wildcards or full path names. To specify multiple patterns, separate them with semicolons. No files are searched in a path that is excluded, including any files in sub-directories beneath. See examples of exclude patterns, below.

    Example

    Description

    *math*.cpp

    Exclude any .cpp with "math" in the file name.

    readme.txt

    Exclude all files named readme.txt.

    *.a

    Exclude any file with extension .a.

    *.png;*.ico;*.jpg

    Exclude any file with extension .png, .ico, or .jpg.

    *\CVS\

    Exclude any files in paths named "CVS".

    /home/build/debug

    Exclude all files in this path name.

    *demo*

    Exclude any file or path with "demo" in the name.

  • Look in subfolders - Select this option to expand the search to sub-directories of the folder specified in the Look in field.

  • Results options - Click this button to expand or contract the Results options section of the tool window. When contracted, the options that are set are summarized in this area.

  • Search Results window - This field allows you to send the search results to a specific Search Results window. The window to be used can be selected from the drop-down list, and these are labeled starting at Search<0>. A new results window can be added with the <New> option up to a pre-set limit of open Search Results windows. If <Auto Increment> is selected, the search results will cycle through all of the open Search Results tabs in the Search Results tool window with each new search. See Search Results Output for more information.

    Right-click in the Search Results window to access the following options:

    • Quick Search - Finds the next occurrence of the text selected.

    • Filter Search Results - Select this option to display the Filter Search Results dialog. From here, if a match is found, you can choose to keep or delete lines with additional searches, match case, limit to current default regular expression syntax and/or remove matches found on the same line number in the same file (this can also be accomplished by selecting List matching lines only from the Find in Files tab).

    • Open as Editor window - Opens current search results in a new editor window.

    • Go to Line - Goes to the file/line number of the current line in the Search Results window.

    • Bookmark Line - Places a bookmark at the line in the file where the result was found.

    • Clear Window - Clears all results in the current Search Results window.

    • Align Columns - Aligns the line numbers and column numbers for all search results.

    • Collapse All - Collapses all Selective Display levels. See Selective Display for more information.

    • Expand All - Expands all Selective Display levels. See Selective Display for more information.

  • Output to editor window - If selected, search results are sent to an editor window.

  • Append to output - Select this option to append search results to the search results window that is in focus.

  • List matching lines once only - Selecting this option will display only one line in the search results window for each line containing one or more matching patterns on the same line, and will highlight all matching patterns.

  • List matches only - If selected, only the matching expression is displayed in search output, instead of the line the match occurs.

  • List filenames only - If selected, only file names and not occurrences are listed in the search output.

  • Foreground search - If selected, activates the three range options listed below. This option offers slightly better performance than a background search, but prevents you from continuing to work while the search is being performed. The default search for SlickEdit® is background searching unless this option is selected.

    • Prompted - When this option is selected, you are prompted whether to continue searching when an occurrence is found.

    • Single - When this option is selected, your cursor is placed on the first occurrence found, but the remaining files are not searched.

    • Global - When this option is selected, all files are searched for occurrences without prompting.

  • Stop button - Click Stop to terminate a multi-file, background search. Press Esc to terminate a long foreground search.

Replace Tab

This tab on the Search Dialogs and Tool Windows provides options for searching and replacing text. The same search options from the Find Tab are provided, as well as the additional replace options described below.

  • Replace with - Enter the text or regular expression for which to replace the item that is searched. You can retrieve previous replacement text or regular expressions by clicking the drop-down list button.

    Click the right-pointing arrow button to the right of the Replace with field to display a menu containing tagged expressions. See Using Tagged Expressions for more information.

  • Preserve case - Select this option to perform a case-sensitive search and replace operation.

  • Highlight replaced text - Select this option to highlight all instances of the text that was replaced.

  • Replace button - Click to replace the first instance of the item.

  • Replace All button - Click to replace every instance of the item.

  • Preview All button - Click to show a side-by-side comparison of the original file and the file with replacements made. This lets you see the changes and confirm them before committing the changes to the file.

Tip

You can use the menu items Edit → Undo and Edit → Redo to undo/redo replacements.

Replace in Files Tab

This tab on the Search Dialogs and Tool Windows provides the same functionality as the Replace Tab, with the added ability to conduct multi-file replacements. It contains one additional option, described below.

  • Leave modified files open - Select this option to open all of the files on which a replace has been performed.

The Results options are the same as those on the Find in Files Tab.

Tip

You can use the menu items Edit → Multi-File Undo and Edit → Multi-File Redo to undo/redo replacements in multiple files.

Find Symbol Tool Window

The Find Symbol tool window is used to locate symbols in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match. The tool window is displayed when you click Search → Find Symbol or View → Tool Windows → Find Symbol , or when you use the gui_push_tag command.

See Find Symbol Tool Window under the Symbol Browsing topic for more information.

  • Search for - Enter the name of the symbol to find. If you select the option Use pattern, you can enter regular expressions or wildcards in the search field. If you specify <Use Context Tagging®> for the Look in field, then you can enter language-specific expressions, such as "this->get" to find getters in your current class. SlickEdit® displays a progress bar at the top of this tool window while a search is in progress.

    Incremental matches are displayed with each character you type, and the first element in the list is selected. Press Tab to put focus into the list of matches. Press Enter to navigate to the first match. Press Down to select the next match. Press Escape to stop the search.

  • Symbol List - The list of search results are refreshed as you type the search string. They include the symbol name, the file that contains it, and the line number. You can sort by any of the three columns.

    The selected match is highlighted and is displayed in the Preview tool window. Single-click or use the arrow keys to select a match. Double-click or press Enter to navigate to that match.

  • Look in - Use this control to specify the scope of the symbol search. The options are:

    • <Use Context Tagging®> - This is the default setting. It uses Context Tagging to intelligently determine which tag files to search.

    • <Current File> - Select this setting to only search the tags in the current file, including local variables in the current function scope.

    • <Current Project> - Select this setting to only search in files that are in the current project.

    • <Current Workspace> - Select this setting to only search in files that are in the current workspace.

    • < Language Tag Files> - Select this setting to search all language-specific tag files for the indicated extension. This may also include your workspace tag file.

    • Specific tag files - Select one of the specific tag files listed to limit search to that file.

    • <All Tag Files> - Select this setting to search all tag files for all languages.

  • Search Options - The search options can be expanded or collapsed to save space.

    • Match case - When selected, SlickEdit uses a case-sensitive search to find symbol matches. When this option is not selected, SlickEdit uses a case-insensitive search. When this option is in the neutral (mixed) state, SlickEdit first searches for case-sensitive matches, and if none are found, attempts to perform a case-insensitive search. Note that for case-insensitive languages, this may have no effect.

    • Match substring (slower) - When selected, SlickEdit searches for the specified string within the available symbols. For example, finding all symbols containing the word "order," not just those that begin with "order." Selecting this option causes the search to execute more slowly.

    • Use pattern (slower) - When selected, SlickEdit interprets the search string as a regular expression or wildcard expression. This can result in slower search times, since SlickEdit must test every symbol in the tag file against the regular expression.

    • Filters - Use filters to restrict the search to certain types of symbols. The filters are the same the ones available on the Definitions tool window. See Defs Tool Window for more information.

  • Buttons - The following buttons are located at the bottom of the tool window:

    • Go to definition - Navigates to the definition of this symbol in the editor window. If the programming language allows for separate declaration and definition, you can control which is selected by using the language-specific Context Tagging® options screen (Tools → Options → Languages → [Language Category] → [Language] → Context Tagging® ): Select either Go to Definition navigates to symbol definition (proc) or Go to Definition navigates to symbol declaration (proto). See Code Navigation for more information.

    • Go to reference - Displays a list of references for the selected symbol in the References Tool Window and, optionally, navigates to the first reference. Click Tools → Options → Editing → Context Tagging® and check the option Go to Reference only lists references if you just want to build the list of references. See Code Navigation for more information.

    • Show in symbol browser - Displays the selected symbol in the Symbols Tool Window. Note that this feature does not work for local variables or symbols from the current file that are not in a tag file.

    • Manage tag files - Displays the Context Tagging - Tag Files Dialog, which can be used to update your tag files.

Bookmarks Tool Window

The Bookmarks tool window is used to create and manage Named Bookmarks. To display the tool window, from the main menu, click Search → Bookmarks → Bookmarks Tool Window . You can also press Ctrl+Shift+N or use the activate_bookmarks command to display the window.

Note

The Bookmarks tool window does not work with Pushed Bookmarks. To view a list of pushed bookmarks, use the Bookmark Stack Dialog.

See Toolbars and Tool Windows for information about working with tool windows. See Tabular Lists for information about resizing columns and other layout information.

Tip

  • Global named bookmarks are shown in the Bookmarks tool window, unless the option Use workspace bookmarks is enabled (Tools → Options → Editing → Bookmarks ). In this case, only bookmarks for the current workspace are shown. See Using Workspace Bookmarks for more information.

  • If you activate the Bookmarks tool window and start typing the name of a bookmark, SlickEdit attempts to match it. This provides a fast and easy way to jump to a named bookmark. Using the preceding screen shot as an example, you could press Ctrl+Shift+N to activate the tool window, type "i" to select the bookmark named "inventory.css:65", then press Enter to quickly go to the bookmark's location in your code.

The Bookmarks tool window can be used to perform the following operations:

  • Jump to bookmark - To go to the line in your source code that contains a bookmark, double-click on a bookmark in the tool window. Alternately, select the bookmark to jump to, then select Go to Bookmark from the right-click context menu or press the Enter key. See Navigating Named Bookmarks for more navigation methods.

  • Create new bookmark - To create a new, named bookmark on the current line, click the Create New Bookmark button, or select this operation from the window's right-click context menu. You can also press the Insert key (with the focus in the tool window). A dialog is displayed where you can specify a name for the bookmark or allow automatic naming (see Setting a Bookmark With an Automatic Name). Each new bookmark is placed at the top of the list in the Bookmarks tool window.

  • Delete all bookmarks - To delete all named bookmarks, click the Delete All Bookmarks button, or select this operation from the window's right-click context menu. You can also press Shift+Delete to delete all bookmarks. A confirmation prompt is displayed prior to deletion. See also Deleting Named Bookmarks.

  • Delete selected bookmark - This operation is also available as a button on the tool window and on the window's right-click context menu. You can also press the Delete key to delete the selected bookmark. See also Deleting Named Bookmarks.

  • Go to previous bookmark and Go to next bookmark - Use these two buttons to navigate to the previous and next bookmark in your source code, respectively. The order of navigation matches the order in which the bookmarks were created, regardless of any selection in the tool window. See Navigating Named Bookmarks for more information.

Go to Bookmark Dialog

The Go to Bookmark dialog appears automatically when you use the gb or goto_bookmark command without arguments. It can be used to view, navigate to, and delete Named Bookmarks.

Note

The Go to Bookmark dialog does not work with Pushed Bookmarks. To view a list of pushed bookmarks, use the Bookmark Stack Dialog.

See Tabular Lists for information about resizing columns and other layout information.

The Go to Bookmark dialog displays the same information as the Bookmarks Tool Window, except it does not provide a way to create bookmarks.

Tip

Global named bookmarks are shown in the Go to Bookmark dialog, unless the option Use workspace bookmarks is enabled (Tools → Options → Editing → Bookmarks ). In this case, only bookmarks for the current workspace are shown. See Using Workspace Bookmarks for more information.

The following operations are available:

  • To go to the line in your source code that contains a bookmark, double-click on the bookmark in the dialog. Or, select the bookmark to jump to and press the Enter key or click OK. The Go to Bookmark dialog is dismissed after this operation.

    Prior to jumping to the bookmark, SlickEdit® automatically creates a pushed bookmark at the current location in your source code, so you can return to the current location easily by popping the bookmark with Ctrl+Comma. See Pushed Bookmarks for more information.

  • To delete a bookmark, select it and press the Delete key or click Delete. See also Deleting Named Bookmarks.

Bookmark Stack Dialog

The Bookmark Stack dialog can be used to view, navigate to, and delete Pushed Bookmarks. To display it, from the main menu, click Search → Bookmarks → Bookmark Stack , or use the bookmark_stack command.

See Tabular Lists for information about resizing columns and other layout information.

The first column in the Bookmark Stack dialog (labeled No.), indicates the numerical order of each bookmark in the stack, according to when the bookmark was pushed. New pushed bookmarks are always placed at the top of the stack, so you can pop them off one by one with Ctrl+Comma as you make your way back through the code. See Pushing and Popping Bookmarks for more information.

Popping bookmarks is the best way to navigate through your pushed bookmarks, deleting them in the process. However, you can also use the Bookmark Stack dialog to navigate to pushed bookmarks or delete a pushed bookmark:

  • To go to the line in your source code that contains a pushed bookmark, double-click on the bookmark in the dialog. Or, select the bookmark to jump to and press the Enter key or click OK. The Bookmark Stack dialog is dismissed after this operation. Prior to jumping to the bookmark, SlickEdit® automatically creates a new pushed bookmark at the current location and places it on top of the stack.

  • To delete a pushed bookmark, select it and press the Delete key or click Delete. The order of the stack is still maintained, indicated by the numbers in the No. column.

Bookmarks Dialog

The Bookmarks dialog can be used to set Named Bookmarks. It appears when you click Search → Bookmarks → Set Bookmark from the main menu, or use the set_bookmark (or sb) command without arguments. See Setting Named Bookmarks for more information.

Tip

Global named bookmarks are shown in the Bookmarks dialog, unless the option Use workspace bookmarks is enabled (Tools → Options → Editing → Bookmarks ). In this case, only bookmarks for the current workspace are shown. See Using Workspace Bookmarks for more information.

When the dialog appears, the name field is prepopulated with an automatic name (see Setting a Bookmark With an Automatic Name). You can use the automatic name, or type over it to name the bookmark yourself. Use the drop-down list to select a previously used name. Click Add to set the new bookmark.

The box below the bookmark name field shows a list of your current named bookmarks. It shows the name, path and file name, line number, and the text of the bookmarked line. Use your keyboard navigation keys to move up and down in the bookmark list. Press Enter to jump to the selected bookmark.

The buttons on the Bookmarks dialog are described as follows:

  • Add - Used to set a new bookmark. The Add button changes to a Replace button if you select a bookmark in the list. When you click Replace, a new bookmark is set with the name of the selected bookmark, so you can have multiple bookmarks with the same name but at different locations in your code.

  • Close - Cancels the operation and closes the dialog.

  • Go To - Navigates to the selected bookmark in the source code.

  • Delete - Deletes the selected bookmark.

Go to Definition Dialog

The Go to Definition dialog (gui_find_proc command) was used to navigate to symbols in previous versions. This functionality has been replaced with the Find Symbol Tool Window.

For more information about navigating between symbols, see Code Navigation.

Select Symbol Dialog

The Select Symbol dialog is automatically displayed when you use the Go to Definition feature (by pressing Ctrl+Dot, clicking Search → Go to Definition from the main menu, or using the push_tag command), when multiple code locations match the selected symbol. See Symbol Navigation for more information about this feature.

The dialog displays all tagged instances of the symbol in your project, including definitions and declarations. The name of the symbol and the file path and line number are shown.

To go to a symbol, select it and click OK or double-click on it. Like other selection dialogs, you can also start to type the name of the symbol and as you type, SlickEdit auto-selects the matched item in the list.

The options on this dialog set the behavior of Go to Definition going forward. The first three options match the Go to Definition options found at Tools → Options → Languages → [Language Category] → [Language] → Context Tagging® (see Language-Specific Context Tagging® Options). When you make a setting on the Select Symbol dialog, the settings on the Options dialog are updated to match, and this dialog does not appear again unless there is more than one unique definition or declaration.

When the option Do not show these options again is selected, the Select Symbol dialog does not show these options when/if it is displayed in the future. This option is automatically checked when you select one of the Prioritize navigation to... options.

To reset the default behavior so this dialog with options appears again when applicable, go to the language-specific Go to Definition options and uncheck both of the Prioritize navigation to... options.

The item selected in the Select Symbol dialog will be shown in the Preview tool window. If you wish to scroll the previewed text use the following keyboard shortcuts.

  • Ctrl+Down -- Scroll down one line.

  • Ctrl+Up -- Scroll up one line.

  • Ctrl+Page Down -- Scroll down one page.

  • Ctrl+Page Up -- Scroll down one page.


View

This section describes items related to viewing and displaying within the editor. For more information, see Viewing and Displaying.

View Menu

The View menu contains options that pertain to viewing and displaying special characters, code, and toolbars.

View Menu Item | Description | Command
Hex | Toggles hex/ASCII display. See Hex Mode Editing. | hex
Line Hex | Toggles line hex/ASCII display. See Hex Mode Editing. | linehex
Special Chars | Toggles viewing of tabs, spaces, and new line character(s) on/off. See Viewing Special Characters. | view_specialchars_toggle
New Line Chars | Toggles viewing of new line character(s) on/off. See Viewing Special Characters. | view_nlchars_toggle
Tab Chars | Toggles viewing of tab character(s) on/off. See Viewing Special Characters. | view_tabs_toggle
Spaces | Toggles viewing of space character(s) on/off. See Viewing Special Characters. | view_spaces_toggle
Line Numbers | Toggles the display of line numbers on/off for the current document. See Viewing Line Numbers. | view_line_numbers_toggle
Soft Wrap | Toggles wrapping of long lines to window width. | softwrap_toggle
Symbol Coloring | Displays Symbol Coloring menu. See Symbol Coloring Menu. | N/A
Language View Options | Displays View options for the language in the current buffer. This is the same as if you had selected Tools → Options → Languages → Application Languages → C/C++ → View from the main menu. See Language-Specific View Options. | setupext -view
Toolbars | Show, hide, or customize a toolbar . See Customizing Toolbars. | toolbars
Tool Windows | Show, hide, or customize a tool window. See Customizing Tool Windows. | customize_tool_windows
Fullscreen | Toggles full screen editing mode. See Full Screen Mode. | fullscreen
Selective Display | Displays the Selective Display dialog, which allows you to hide lines and create an outline. See Selective Display. | selective_display
Hide All Comments | Hides all lines that only contain a comment. | hide_all_comments
Hide Code Block | Hides lines inside current code block. See Expanding/Collapsing Code Blocks. | hide_code_block
Hide Selection | Hides selected lines. | hide_selection
Hide #region Blocks | Hides .NET #region blocks. | hide_dotnet_regions
Function Headings | Collapses all function code blocks in the current file. See Selective Display. | show_procs
Expand/Collapse Block | Toggles between hiding and showing the code block under the cursor. See Expanding/Collapsing Code Blocks. | plusminus
Copy Visible | Copies text not hidden by Selective Display. See Selective Display. | copy_selective_display
Show All | Ends selective display. All lines are displayed and outline bitmaps are removed. See Selective Display. | show_all

View Symbol Coloring Menu

The table, below, describes each item on the View → Symbol Coloring menu and its corresponding command. For more information see Symbol Coloring.

Symbol Coloring Menu Item | Description | Command
Customize | Opens the Symbol Coloring options screen. | config Symbol Coloring
Enable Symbol Coloring | Turns Symbol Coloring on/off for this file. | symbol_coloring_toggle
Highlight Unidentified Symbols | Turns on/off highlighting of symbols that are unidentified by the Symbol Coloring engine.. | symbol_coloring_errors_toggle
All symbols - Default | Selects the default, All symbols scheme. | symbol_coloring_set_scheme All symbols - Default
Global Variables | Selects the Global Variables scheme. | symbol_coloring_set_scheme Global Variables
Protected and Private | Selects the Protected and Private scheme. | symbol_coloring_set_scheme Protected and Private
Unidentified Symbols Only | Selects the Unidentified Symbols Only scheme. | symbol_coloring_set_scheme Unidentified Symbols Only

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with View menu items.

Selective Display Dialog

The Selective Display dialog (View → Selective Display or selective_display command) allows you to activate Selective Display and choose the regions in your code that you want to display or hide. Each region contains settings that are specific to that region. The dialog also contains static options for expanding. See Selective Display for more information about working with this feature.

Search Text

Select Search text to specify a search string and display lines containing the search string specified or lines not containing the search string specified. Click the right-pointing arrow button to the right of the field to display a menu containing specific search syntax options such as Character in Range, Beginning of Line, and Decimal Digit. The following settings are available:

  • 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 using the Word chars field on the language-specific General options screen (see Language-Specific General Options).

  • Regular expression - When checked, a regular expression search is performed. See Find and Replace with Regular Expressions for more information.

  • Reset selective display - When checked, all lines are made visible and Plus and/or Minus bitmaps are removed before a search is performed.

  • Hide matched lines - When checked, lines containing the search pattern are hidden.

Function Headers

Select Function headers to display only function headings and optional function heading comments. The following settings affect how comments before function headings are handled:

  • Show comments - When checked, comments above function headings are displayed as if they were part of the function heading.

  • Collapse comments - When checked, comments above function headings are visible but multi-line comments will require that you expand them to see all comments.

When both options are off, comments will not be visible at all, making it difficult to copy or move functions and comments.

Preprocessor Directives

Select Preprocessor directives to display a source file as if it were preprocessed according to the define values you specify. If you do not remember your defines, use the Scan for Defines button. The following settings are available:

  • Defines - Specifies defines and optional values used when you select the Preprocessor Directives option on the Selective Display dialog box. The syntax is:

    name1 [=value1] name2 [=value2]

    For 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.

Multi-Level

Select Multi-levelto set multiple levels of selective display based on braces or indent. The following settings are available:

  • Braces - When on, multiple levels of selective display are set to correspond to curly brace nesting levels.

  • Indentation - When on, multiple levels of selective display are set to correspond to indentation levels.

  • Limit levels - When too many nested levels of selective display get confusing, place a limit on the maximum number of nested levels. Nesting deeper than this specified level is ignored.

Paragraphs

Select Paragraphs to 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

Select Hide selection to hide the lines in the current selection.

Expansion Options

The following expansion options can be applied for each region:

  • 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 they were last displayed.

Toolbar Control Properties Dialog

To change a button's command binding, on the actual toolbar or tool window, right-click on any control and select Properties. This will display the Toolbar Control Properties dialog, shown below. Note that the Properties option is only available for controls that can be modified.

The following options are available:

  • Command - Specifies the command that the button is bound to. Use the drop-down arrow to pick from a list of commands. Use the right-pointing arrow to insert special escape sequences for a file name, line number, or word.

  • Message - Use this text box to enter the tool tip message that should appear when hovering the mouse over the button.

  • Bitmap - Specifies the bitmap that will be used for the button. Click the drop-down arrow to display an Open dialog in order to specify an alternate bitmap. This option is only available for graphical controls.

  • Caption - Specifies the text that appears on the button for text-only controls (like the Sample Button).

  • Auto Enable - Displays the Auto Enable Properties dialog, which allows you to enable/disable predefined attributes. See Auto Enable Properties Dialog for more information.

  • Bind to Key - Displays the Key Binding Options so that you can create a key binding for this command.


Project

This section describes items on the Project menu and associated dialogs and tool windows. For more information, see Workspaces and Projects.

Project Menu

The Project menu contains operations and options for working with projects and workspaces. The table below contains a summary of these items.

Project Menu Item | Description | Command
New | Allows you to create a workspace and/or project. | workspace_new
Open Workspace | Opens a workspace. | workspace_open
Open Other Workspace | Displays menu for open projects, workspaces, or makefiles from other tools. See Open Other Workspace Menu. | N/A
Close Workspace | Closes the current workspace. | workspace_close
Organize All Workspaces | Allows you to organize your workspaces which appear in the All Workspaces menu. | workspace_organize
Workspace Properties | Displays the Workspace Properties dialog, which allows you to add/remove projects from the current workspace. See Workspace Properties Dialog. | workspace_properties
Add New Item from Template | Adds new template file to the existing project. | project_add_item
Open Files from Project | Allows you to open files from the current project. See Files Tool Window. | project_load -p
Open Files from Workspace | Allows you to open files from the current workspace. See Files Tool Window. | project_load
Insert Project into Workspace | Adds an existing project to the current workspace. Use the Workspace Properties dialog box to remove a project from the current workspace. | workspace_insert
Dependencies | Displays the Project Properties dialog open to the Dependencies tab, which lets you set the dependencies for the active project. See Dependencies Tab. | workspace_dependencies
Set Active Project | Allows you to set the active project | projecttbSetCurProject
Project Properties | Displays the Project Properties dialog, which is used to edit settings for the current project. See Project Properties Dialog | project_edit

Open Other Workspace Menu

The Project → Open Other Workspace menu contains options for opening projects, workspaces, or makefiles from other tools. The table below contains a summary of these items.

Open Other Workspace Menu Item | Description | Command
Visual Studio .NET Solution | Open a Visual Studio .NET Solution. | workspace_open_visualstudio
Visual C++ Workspace | Open a Visual C++ Workspace. | workspace_open_visualcpp
Visual C++ Embedded Workspace | Open a Visual C++ Embedded Workspace. | workspace_open_visualcppembedded
Tornado Workspace | Open a Tornado Workspace. | workspace_open_tornado
Ant XML Build File | Open an Ant XML Build File. | workspace_open_ant
Makefile | Open a Makefile. See Open Makefile as Workspace Dialog. | workspace_open_makefile
JBuilder Project | Open a JBuilder® Project. | workspace_open_jbuilder
Xcode Project | Open a Xcode Project. | workspace_open_xcode
Flash Project | Open a Flash Project. | workspace_open_flash
Workspace from CVS | Checkout and open a workspace from CVS. | cvs_open_workspace
Convert CodeWright Workspace | Convert a CodeWright workspace and projects to SlickEdit workspace and projects. | cwprojconv.e

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Project menu items.

Workspace Properties Dialog

To list projects in the current workspace, add or remove projects from the current workspace, or to set the active project, use the Workspace Properties dialog box. The dialog, pictured below, can be accessed from the main menu by clicking Project → Workspace Properties .

The following options are available:

  • 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.

  • Environment - Displays the Workspace Environment Options dialog box, allowing you to set environment variables. For more information on setting environment variables, see Environment Variables.

Project Properties Dialog

The Project Properties dialog, shown below, is used to manage and edit many settings for the current project. To access this dialog, click Project → Project Properties or use the project_edit command. You can also right-click within the Projects tool window and select Project Properties.

Click and drag the dialog box's edges to resize it. Both the size and position of the dialog are remembered between editing sessions. The buttons on the Project Properties dialog are described below (see Project Properties Dialog - General Options). Other options are categorized into the following tabs. Click on an item to go to that section in the documentation.

  • Files Tab

  • Directories Tab

  • Tools Tab

  • Build Tab

  • Compile/Link Tab

  • Dependencies Tab

  • Open Tab

Project Properties Dialog - General Options

The following options are available at the top of the dialog:

  • Settings for - Allows you to select which configuration to modify. The All Configurations option allows you to change the settings for all the configurations. All settings in the Project Properties dialog are per configuration except the working directory, open command, and filters.

  • Configurations - Click this button to view, add, or delete configurations. See Project Configurations for more information.

Files Tab

The Files tab of the Project Properties dialog (Project → Project Properties ) is shown below, and displays a list of the files in the current project and also allows you to remove files from projects.

The following buttons are available:

  • Add Files - Adds one or more existing files from a single directory to the project.

  • Add Tree - Prompts for one or more wildcard file specifications separated with semicolons (*.c;*.cpp;*.h) and searches through a directory tree adding the files that are found to the project. To search directories recursively, select the Recursive option.

  • Add Wildcard - Adds one wildcard filespec to the project. For example, you could add a wildcard such as *.java to your project. You will get duplicate entries if you repeat wildcards or add files that are already included by a wildcard.

  • Invert - Inverts the selected items in the Project files list box.

  • Remove - Removes selected items from the project.

  • Remove All - Removes all files from the project.

  • Refresh - Provides an easy way to remove files that do not exist from the project.

  • Properties - Only checked when the current file has wildcard characters. Displays various supported options for a wildcard specification.

Directories Tab

The Directories tab of the Project Properties dialog box (Project → Project Properties ), shown below, allows you to set the working directory, references file, and include file search directories for the current project.

The following information describes the available fields and settings:

  • Working directory - When a project is set active, the current directory is set to the working directory (if specified). This information is stored per project and not per configuration. Click the button to the right of this field to browse for and specify an alternate working directory.

  • References file - You only need to complete this text box if you are using Microsoft Visual C++ and you prefer to use a Visual C++ .bsc database file instead of the Context Tagging® database when viewing references. If you open a Visual C++ v5.0 or later workspace and you have configured Visual C++ to generate a .bsc database file, this field is automatically configured.

  • Includes - Specifies the directories the cursor_error (Alt+1) and next_error (Ctrl+Shift+Down) commands will search when trying to open a file. For COBOL and High Level Assembler, this list of directories is used to find copy books or macros. You might want to add some of your own include directories here before the compiler's include directories. You can specify environment variables with the syntax %(EnvVarName) (see Environment Variables). Click the button to the right of this field to browse for an include directory to specify. Use the up and down arrows to move the includes up or down in the list.

Tools Tab

The Tools tab of the Project Properties dialog box (Project → Project Properties ) is used to change project commands and their properties.

The following options are available:

  • Tool name - Contains a list of the tools/commands that can be used for projects in SlickEdit®. You can have different tools for different projects. The options on the Tools tab vary, depending on the tool name that is selected in the Tool name text box.

    Use the Up and Down arrows to move the tools up and down in the list. This order corresponds to the order in which the tool appears on the Build menu. Click the Delete button (displayed as a red "X") to remove a user-defined tool (default tools cannot be deleted).

  • New - Click the New button to add a tool.

  • Advanced - Click the Advanced button to change environment variables (see Environment Variables).

  • Options - Displays an Options dialog box specific to the language with which you are currently working. This button is only available for selected tools that support the language-specific options. For more information, see Language Options.

  • Command line - Defines the command line that is set to be executed for the selected tool in the Tool name combo box. This text box is only available (and visible) for selected tools that support a command line execution. Click the buttons to the right of this text box to insert files and escape sequences (such as %f which inserts the current buffer name) that you can use to build your command line. See Escape Sequences for Build Commands for a full list of available escape sequences.

  • Run from dir - Specifies the directory from which to run selected tool command. By default, all of the tools are run from the working directory that is specified using the %rw or %rp escape sequences, which indicate the working directory or project directory, respectively. When running programs like ant or make, this is typically set to the directory containing the makefile.

  • Capture output - Captures and processes the output of the command with SlickEdit's built-in error message processing facility. When the output is captured, the commands next_error (Ctrl+Shift+Down or Build → Next Error ) and prev_error (Ctrl+Shift+Up or Build → Previous Error ) are used to go to the next and previous compilation error positions respectively.

Note

(UNIX only) Output of text mode programs that are executed using xterm cannot be captured. To see the output, uncheck the Output options Capture output and Output to build window, then prefix the program name in the Command line field with xterm -e or dos -w (this waits for a key press).

  • Output to build window - Specifies that the output of the command be run in the concurrent build window. The concurrent build window has the following limitations:

    • You cannot run graphical applications in the concurrent build window.

    • Only programs that use standard in and standard out to read and write data can run in the concurrent build window. This is true for most compilers.

    • Some programs which use standard in and standard out will not run properly in the concurrent build window because they use ANSI escape sequences or do not flush standard output data before prompting for input.

    • For Windows 2000, alternate command shells are not supported. Only cmd.exe is supported.

  • Clear build window - Clears the build window output before the command is executed. The Output tool window displays the results of the processes that are run.

  • Save none - Saves no files before the command is executed.

  • Save current file - Saves the current file before the command is executed.

  • Save all files - Saves all files before the command is executed.

  • List modified files - Displays a selection list of modified files, which allows you to choose files to save before the command is executed.

  • Save workspace files - Saves modified workspace files before the command is executed.

  • Always show on menu - Always shows the command on the Build menu.

  • Hide if no command line - Hides the menu item if the command line is blank. This is useful for saving space on the Build menu for blank command lines.

  • Never show on menu - Never shows the command on the Build menu.

  • Application type - Used to indicate the type of application as which a Java project should be executed. This primarily affects the Execute and Debug commands for Java applets and j2me projects.

  • Menu caption - Defines the menu item text which appears on the Build menu. Prefix the selection character with an ampersand (&) to choose the selection character. If you have run out of selection letters, try using numbers. For example, "&1MyTool" picks "1" as the selection character.

  • Build first - Executes the build command before the selected tool/command. If the build completes with a non-zero return code, this command is not executed. This option requires the use of the vsbuild utility (see Using Build and Compile Operations) and will not work for build commands that do not return a valid return code. If the build command returns a zero return code, the command is executed even if the build actually failed.

Note

  • Windows: For commands which will not execute in the concurrent build window, prefix the command with start (for example: start debug\myprogram.exe).

  • UNIX: If the build command is a shell script, make sure it returns a zero return code for a successful build and a non-zero return code for an unsuccessful build. For commands which will not execute in the concurrent build window, prefix the command with xterm ®e (for example: xterm ®e debug/myprogram).

  • Command is Slick-C macro - Specifies that the command line is a Slick-C® macro as opposed to an external program.

  • Verbose output - Specifies that the vsbuild utility is used to build the projects (see Using Build and Compile Operations). Detailed information about the commands that are executed will be output during the build.

  • Beep on completion - Specifies that the vsbuild utility is used to build the projects and to sound a status beep upon completion (see Using Build and Compile Operations). A single beep indicates a successful build. Two beeps indicate an error occurred.

  • Run in an X terminal - (UNIX only) Runs the command in an X terminal. This is useful for running programs which are full screen console applications such as vi.

Build Tab

The Build tab of the Project Properties dialog (Project → Project Properties ), pictured below, allows you to run programs and/or execute commands before or after a build. You can run different programs and commands for different projects as the information is stored per-configuration. The contents of this tab are unavailable for extension-based projects.

The list below describes the settings that are available. For more in-depth information, see Build System Options.

  • Pre- and Post-Build Commands - Each line can contain a program to execute a command. For example, the set command could be used to set environment variables. Double-click on the text as indicated in the text boxes to add commands. Use the Up and Down arrows to the right of the text boxes to move the commands up and down in the list. The order corresponds to the order in which the command will be run.

  • Stop on error - When this option is checked and the current project depends on other projects, the vsbuild utility (see Using Build and Compile Operations) will be used to build the projects and check for error codes. When the vsbuild program detects an error, it does not continue building other dependencies.

Note

(Windows only) Under Windows 95 or later, vsbuild cannot detect error codes returned from a batch program.

  • Build System Options - These build methods apply to GNU C/C++ projects only and affect all configurations. With these options, you will not need to convert the current build methods to use the GNU debugger; you can select one of these methods when you create a new GNU C/C++ Wizard project.

    • Build without a makefile (dependencies automatically checked) - Automatically checks dependencies and does not generate a makefile. Instead, the vsbuild utility (see Using Build and Compile Operations) determines what should be compiled dynamically. This option is useful when you are not concerned with how the build gets done. Make sure the project include directories are set up correctly (Project → Project Properties , select the Directories Tab) so include files may be found.

    • Build with a user-maintained makefile or custom build command - Sets the build command to make and does not generate a makefile. The build command can be changed from the Tools tab of the Project Properties dialog box (see Tools Tab). Select this option when you already have your own method for building the source.

    • Build with an auto-generated, auto-maintained makefile - Automatically generates a makefile and updates when files are added to the project. This option is useful when you need a makefile and do not want to use the built-in vsbuild utility (see Using Build and Compile Operations). Specify the path to the makefile in the Makefile field. Make sure the project include directories are set up correctly (Project → Project Properties , select the Directories Tab) so include files may be found.

    To start a build from outside the application, execute the following command where make is the name of the make program, Makefile is the name of the makefile, and ConfigName is the name of the configuration: make -f Makefile CFG=ConfigName.

Compile/Link Tab

The Compile/Link tab of the Project Properties dialog (Project → Project Properties ), shown below, is used to specify project compilation and linking options.

The following settings are available:

  • Compiler - By default, the compiler configuration is set to the active compiler tag file based on the active project. To change the compiler or its configuration and properties, click the arrows to the right of the Compiler field. See C/C++ Compiler Settings for more information.

  • Defines - Defines listed here can be used in build commands as %defs. Double-click as indicated to add a define. Click the /D button to enter a macro. Click the /U button to undefine a macro. Defines that set in an associated project are listed in bold and can not be modified here.

  • Libraries/Objects - Libraries and objects listed here can be used in build commands as %libs. To add libraries and objects, click the button to the right of this field. This displays the Link Order dialog box. The <ProjectObjects> marker indicates where all remaining object files produced by the project will appear in the list of libraries and objects. Use the arrows to the right of the text box to move the libraries/objects up and down in the list, or use the red X button to remove a library or object.

Dependencies Tab

The Dependencies tab on the Project Properties dialog (Tools → Project Properties ), pictured below, allows you to define a relationship between two projects, causing the dependent project to be built after the projects it depends on. This ensures that elements in a depended-on project are up-to-date prior to building the dependent project. See Defining Project Dependencies for more information.

Open Tab

The Open tab of the Project Properties dialog (Project → Project Properties ) lets you enter commands that are executed when the project is activated. This information is stored per project, not per configuration. This tab is unavailable for extension-based projects. For instructions on entering commands on this tab, see Specifying Open Commands.

Add Tree Dialog

The Add Tree dialog is used to add files in a directory or directory tree to a tag file or a project. It also gives you the ability to use wildcards so that you can add only files with certain extensions.

This dialog is displayed when you click the Add Tree button on the Context Tagging - Tag Files Dialog or the Files Tab of the Project Properties dialog.

The dialog contains the following elements:

  • Path - The Path text box lets you type out the path to the directory from which to include files. As you type, the first matching item is selected and expanded in the directory list.

  • File types - The File types combo box lets you select from predefined wildcard specifications or you can type your own. Each file spec should be separated with semicolons (*.c;*.cpp;*.h). For example, to include only Java files, select *.java from the predefined list. To include all files in a directory, type the wildcard *.

  • Directory list - The directory list box lets you pick the directory from which to add files.

  • Recursive - If checked, the selected directory will be searched recursively.

  • Drives - Select the disk drive to look in.

  • Exclude - Use this combo box to exclude paths, files, or file types from the specified directory using wildcards. To specify multiple patterns, separate them with semicolons. No files are searched in a path that is excluded, including any files in sub-directories beneath. For examples, see Exclusion Examples below.

Exclusion Examples

The table below shows some examples of filespec exclude patterns that you can use in various Exclude combo boxes within SlickEdit®.

Example | Description
*math*.cpp | Exclude any .cpp with "math" in the file name.
readme.txt | Exclude all files named readme.txt.
*.a | Exclude any file with extension .a.
*.png;*.ico;*.jpg | Exclude any file with extension .png, .ico, or .jpg.
*\CVS\ | Exclude any files in paths named "CVS".
/home/build/debug | Exclude all files in this path name.
*demo* | Exclude any file or path with "demo" in the name.

Open Makefile as Workspace Dialog

The Open Makefile as Workspace dialog is used to import makefiles. To display it, from the main menu, click Project → Open Other Workspace → M akefile (or use the workspace_open_makefile command). See Importing Makefiles for more information about using this feature.

The dialog contains the following:

  • Makefile - Specifies the makefile. Use the Browse button [image] to browse for the makefile.

  • Scan for recursive makefile calls - When selected, SlickEdit scans the makefile for invocations of make on other makefiles and includes the referenced files in the new project.

    • Make recursive makefile calls separate projects - When this option is selected, if Scan for recursive makefile calls is enabled, and if the makefile contains invocations of make on other makefiles, a new, separate project is created for each of the referenced makefiles. When this option is cleared, SlickEdit creates only one project that includes all of the files found in all of referenced makefiles.

  • File types - Specifies the file types to include. Use the drop-down arrow to populate this field or type a list of file types separated with semicolons.

  • Exclude - Specifies the file types to exclude. Use the drop-down arrow to populate this field or type a list of file types separated with semicolons.


Build

This section describes items on the Build menu. Currently, the section Building and Compiling contains all of the information about building and the dialogs and options that are available.

Build Menu

The Build menu is language-specific and can have alternate options depending on the language in which the project is written.

Build Menu Item | Description | Command
Compile | Compiles the current file. | project_compile
Build | Builds the active project, typically compiling only the files that have changed. | project_build
Rebuild | Rebuilds the active project, typically compiling all files in the project. | project_rebuild
Execute | Executes the built program associated with the active project. | project_execute
Next Error | Processes the next compiler error message. | next_error
Previous Error | Processes the previous compiler error message. | prev_error
Go to Error or Include | Parses the error message or file name at the cursor and places cursor in file. | cursor_error
Clear All Error Markers | Removes all error markers in all files. | clear_all_error_markers
Configure Error Parsing | Configures regular expressions used to search for compiler messages. See Parsing Errors with Regular Expressions. | configure_error_regex
Stop Build | Sends break signal to the Build tool window. | stop_process
Show Build | Starts or activates the Build tool window. | start_process
Build Automatically on Save | When enabled, the project is built each time the workspace is saved. | project_toggle_auto_build


Debug

This section describes items on the Debug menu and associated dialogs and tool windows. For more information about debugging, see Running and Debugging.

Debug Menu

The Debug menu contains debugging-related operations and options. The table below summarizes these items.

Debug Menu Item | Description | Command
Windows | Displays debug window toolbars. See Debug Windows Menu. | N/A
Start | Starts debugger. | project_debug
Suspend | Suspends execution. | debug_suspend
Stop Debugging | Stops debugging the program. | debug_stop
Restart | Restarts the program. | debug_restart
Attach Debugger | Attach debugger to a process or remote server. | N/A
Detach | Detach from target process and allow application to continue running. | debug_detach
Debugger Information | Displays the Debugger Information dialog. | debug_props
Step Into | Steps into the next statement. | debug_step_into
Step Over | Steps over the next statement. | debug_step_over
Step Out | Steps out of the current function. | debug_step_out
Step Instruction | Steps one instruction at a time. | debug_step_instr
Run to Cursor | Runs the program to the line containing the cursor. | debug_run_to_cursor
Show Next Statement | Displays the source line for the instruction pointer. | debug_show_next_statement
Set Instruction Pointer | Set the instruction pointer to the current line. | debug_set_instruction_pointer
Show Disassembly | Toggle display of disassembly. | debug_toggle_disassembly
Toggle Breakpoint | Toggles a breakpoint at the current line. | debug_toggle_breakpoint
Delete All Breakpoints | Deletes all debugger breakpoints. | debug_clear_all_breakpoints
Disable All Breakpoints | Disables all debugger breakpoints. | debug_disable_all_breakpoints
Add Watch | Add a watch on the variable under the cursor. | debug_add_watch
Set Watchpoint | Set a watchpoint on the variable under the cursor. | debug_add_watchpoint
Debugger Options | Displays the Debugger Options dialog. See Viewing Debugger Info and Setting Options for detailed information. | debugger_options

Debug Windows Menu

The Debug → Windows menu items activate the debugging tool windows. The table below summarizes these items. See also Debugger Tool Windows for more information.

Debug Windows Menu Item | Description | Command
Call Stack | Activates the Call Stack window. | activate_call_stack
Locals | Activates the Locals window. | activate_locals
Members | Activates the window which displays member variables. | activate_members
Autos | Activates the Autos window. | activate_autos
Watch | Activates the Watch window. | activate_watch
Threads | Activates the Threads window. | activate_threads
Breakpoints | Activates the Breakpoints window. | activate_breakpoints
Registers | Activates the Registers window. | activate_registers
Memory | Activates the Memory window. | activate_memory
Classes | Activates the Classes window. | activate_classes

Attach Debugger Menu

The Debug → Attach Debugger menu items are summarized in the table below. See Multiple Session Debugging for more information.

Attach Debugger Menu Item | Description | Command
Attach to Running Process using GDB | Attach debugger to a running process using GDB. | debug_attach gdb
Attach to Remote Process using GDB | Attach debugger to a remote GDB server or executable with GDB stub. | debug_remote gdb
Attach to Java Virtual Machine | Attach to a Java virtual machine executing remotely. | debug_attach jdwp
Attach to Xdebug | Attach to a PHP session using Xdebug. | debug_remote xdebug
Attach to pydbgp | Attach to a Python debugger sessiony. | debug_remote pydbgp
Attach to perl5db | Attach to a Perl 5 debugger session. | debug_remote perl5db
Debug Other Executable | Step into a program using GDB. | debug_executable gdb


Document

This section describes items on the Document menu and associated dialogs and tool windows.

Document Menu

The Document menu contains items pertaining to editor windows and the current document. The table below lists a summary of these items.

Document Menu Item | Description | Command
Next Buffer | Switches to the next buffer. See Files, Buffers, and Editor Windows. | next_buffer
Previous Buffer | Switches to the previous buffer. See Files, Buffers, and Editor Windows. | prev_buffer
Close Buffer | Closes the current buffer. See Files, Buffers, and Editor Windows. | close_buffer
List Open Files | Displays the Files tool window, which lists all buffers and allows you to activate one. See Files Tool Window. | list_buffers
Edit Associated File | Switch to header or source file associated with the current file. | edit_associated_file
Select Mode | List all modes and lets you select one. See Language Editing Mode. | select_mode
Language Options | Displays the Options dialog open to the language-specific General options screen for the language in the current buffer. See Language Options. | setupext
Tabs | Sets tab stops. | gui_tabs
Margins | Sets margins. | gui_margins
Format Paragraph | Reflows the text in the current paragraph according to the margins. | reflow_paragraph
Format Selection | Reflows the selected text according to the margins. | reflow_selection
Format Columns | Format columns according to words. | format_columns
Edit Javadoc Comment | Edits Javadoc comments for the current source file. | javadoc_editor
Comment Block | Converts selected text into block comment using box comment setup characters. See Commenting. | box
Comment Lines | Converts selected lines into line comments using the line comment setup. See Commenting. | comment
Uncomment Lines | Uncomments any commented lines and ignores any that isn't commented. See Commenting. | comment_erase
Reflow Comment | Reflows and reformats the current block comment. See Reflow Comment Dialog. | gui_reflow_comment
Comment Setup | Displays the language-specific Comment options screen, which contains settings for box and line comments. See Language-Specific Comment Options. | comment_setup
Comment Wrap | Toggles comment wrap on/off. | comment_wrap_toggle
XML/HTML Formatting | Displays the XML/HTML Formatting menu. See XML/HTML Formatting Menu. | N/A
Indent with Tabs | Toggles indenting with tabs on/off. See Syntax Indent. | indent_with_tabs_toggle
Word Wrap | Toggles word wrap on/off. | word_wrap_toggle
Justify | Sets/displays paragraph justification style. | gui_justify
Read Only Mode | Toggles read-only mode on/off. | read_only_mode_toggle.
Adaptive Formatting | Toggles Adaptive Formatting on/off. See Adaptive Formatting. | adaptive_format_toggle

XML/HTML Formatting Menu

The Document → XML/HTML Formatting menu is used to activate these features in SlickEdit®. You can enable and/or disable Tag Layout and/or Content Wrap for either file type on a global basis or on a per document basis. See XML/HTML Formatting for more information.

XML/HTML Formatting Menu Item | Description | Command
Current Document Options | Displays the Current Document Options Dialog. | xml_html_document_options
Enable XML Formatting | Toggles XML Formatting on/off. | xml_formatting_toggle
(XML) Content Wrap | Toggles XML Content Wrap on/off. | xml_contentwrap_toggle
(XML) Tag Layout | Toggles XML Tag Layout on/off. | xml_taglayout_toggle
Enable HTML Formatting | Toggles HTML Formatting on/off. | html_formatting_toggle
(HTML) Content Wrap | Toggles HTML Content Wrap on/off. | html_contentwrap_toggle
(HTML) Tag Layout | Toggles HTML Tag Layout on/off. | html_taglayout_toggle

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Document menu items.

Files Tool Window

The Files tool window contains three tabs that allow you to view open files, project files, and workspace files. The files can be sorted by file name or path. It includes a filter to narrow the list of files shown in the list, as well as shortcuts for basic file operations (Open, Save, etc.).

Note

For documentation purposes, the word "files" generally includes both files and buffers.

Accessing the Tool Window

There are several ways to access the Files tool window:

  • Click Document → List Open Files , press Ctrl+Shift+B, or use the list_buffers command.

  • Use the activate_files command.

  • Toggle display of the tool window by clicking View → Tool Windows → Files , or by using the toggle_files command.

When the Files tool window is not docked, it can be dismissed by opening a file for editing or by pressing Esc. To make this dialog behave like other tool windows, right-click inside the Files list area and uncheck Dismiss on select.

Tip

By docking this tool window, you have quick access for switching between files or opening other files.

List Views

The Files tool window presents three available views with a tab to select each:

  • Buffers - shows the list of files that are being edited. Useful for selecting the file to edit when working on multiple files.

  • Project - shows the files in the active project.

  • Workspace - shows the files in this workspace.

Working with the Files List

The bottom part of the tool window shows the Files list. The Name column displays, in alphabetical order, a list of file names or untitled buffers based on the selected view setting. The Path column displays the associated paths for the files listed. Click on either column header to sort by that column. When you click to sort, an arrow on the right side of the column header shows the ascending or descending order.

The Filter text box can be used to display matching file names. Files are removed from the list that do not contain the specified text. For example, if you type "ml," the Files list is filtered to only show file names that contain the letters "ml," as they appear in that order, anywhere in the file name.

To allow Fast Prefix Matching inside the Filter text box, right-click inside the Files list area and select Prefix match. When prefix matching is on, matching starts at the beginning of the word. For example, if you type "d," the Files list is filtered to only show file names that begin with the letter "d."

When the focus is not in the Filter text box, you can incrementally search the list of file names by typing the first few characters of the name. If you pause for a few seconds, the search is reset, and you can search for a different file name just by typing the first few characters again. You do not need to press Backspace, or reselect the first item in the list. Regardless of which item is selected, incremental search starts at the top of the list. For example, if items are sorted in descending alphabetical order, the incremental search starts at the top of the list, which would be the file that would appear last, if sorted in ascending alphabetical order.

Opening Files for Editing

The name of the file that has current focus in the editor is displayed in a bold font style. The tool window provides several ways to a file for editing:

  • Press Enter or Alt+E.

  • Double-click on the file to be opened.

  • Right-click and select Open.

Tip

If there is no selection when you invoke an Open operation, the Open dialog is displayed from which you can specify a file to open.

Saving Modified Files

Modified files are listed in a red font, and when selected, they have a red highlight. A Disk bitmap to the left of the file name acts as another visual indicator for modified files and allows for a quick save.

Note

The Project and Workspace views do not display modified file indicators.

The Files tool window provides several ways to save modified files:

  • Press Ctrl+S, Alt+S, or Alt+W.

  • Click the Disk icon to the right of the Filter field.

  • Right-click and select Save.

Tip

  • When you invoke a Save operation, if a file is selected, it is simply saved. If an untitled buffer is selected, the Save As dialog is displayed from which you can save it with a specified name. If both a file and an untitled buffer are selected, the file will be saved, and the Save As dialog is displayed in order to save the untitled buffer.

  • The red highlight color for modified files can be changed by specifying a different background color for the Modified File screen element (Tools → Options → Appearance → Colors ). Note that this is the same element that specifies coloring in tree controls such as DIFFzilla®, so change with caution. See Setting Colors for Screen Elements for more information.

Closing Files

When you close a file, all windows displaying the buffer are closed as well (if the Files per window option One file per window is enabled at Tools → Options → Editing → Editor Windows ). You are also prompted to save modified buffers.

The Files tool window provides several ways to close files:

  • Press Delete, Alt+C, orAlt+D.

  • Right-click and select Close.

  • Click the Close Selected File(s) icon.

Diffing Files

In the Buffers view, you can select a modified file and compare it against the version on disk by doing one of the following:

  • Right-click and select Diff .

  • Click the Diff Selected File(s) icon.

Files Tool Window Interface

The elements on the Files tool window are described as follows, from left to right and top to bottom:

  • Buffers tab - displays all files and buffers that are currently open in the editor.

  • Project tab - displays all files in the current project, regardless of whether they are open or not. This view does not show an indicator for modified files. Further, it does not provide icons to Save, Close, or Diff a file. See Workspaces and Projects for more information about working with projects.

  • Workspace tab - displays the set of all files in the current workspace. This view does not show an indicator for modified files. Further, it does not provide icons to Save, Close, or Diff a file. See Workspaces and Projects for information about workspaces.

  • Save Selected File(s) icon - if a file is selected, it is simply saved. If an untitled buffer is selected, the Save As dialog is displayed from which you can save it with a specified name. If both a file and an untitled buffer are selected, the file will be saved, and the Save As dialog is displayed in order to save the untitled buffer. This operation can also be specified by using the right-click menu inside the Files list. This icon is only displayed when the Buffers tab is selected.

  • Close Selected File(s) icon - closes the selected file(s) in the editor,which in turn, removes the names from the Files window. If you are using the option One file per window (on by default), all windows displaying the buffer are closed as well. You are prompted to save modified buffers. This operation can also be specified by using the right-click menu inside the Files list. This icon is only displayed when the Buffers tab is selected.

  • Diff Selected File(s) icon - compares the selected file(s) against the version on disk. This icon is only displayed when the Buffers tab is selected.

  • Filter - used to display matching file names. Right-click inside the Files list area to allow Prefix match inside the Filter text box. When the focus is not in the Filter text box, you can incrementally search the list of file names by typing the first few characters of the name.

  • Files list - the Files list is divided into two columns:

    • Name column - displays a list of file names or untitled buffers based on the selected view setting. Items are listed in alphabetical order. Click on the Name column header to sort by this column. When you click to sort, an arrow on the right side of the column header shows the ascending/descending order. The name of the file that has current focus in the editor is displayed in a bold font style. Modified files are listed in a red font, and when selected, they have a red highlight. A Disk bitmap to the left of the file name acts as another visual indicator for modified files and allows for a quick save.

    • Path column - displays the corresponding paths to the files/buffers listed. Click on the Path column header to sort by this column. When you click to sort, an arrow on the right side of the column header shows the ascending/descending order.

  • Context menu - right click in the files list to see the available operations:

    • Open - select this option to open the selected file.

    • Open in Current Window - select this option to open the selected file in the current window. This is useful if you do not have the One file per window option on (see Files, Buffers, and Editor Windows).

    • Save - saves the selected file. This is only available when the Buffers tab is selected.

    • Close - closes the selected file. This is only available when the Buffers tab is selected.

    • Diff - compares the selected file against the version on disk. This does nothing if the selected file is not modified.

    • Dismiss on select - this option dismisses the Files tool window after you select a file. This is useful when you use the Files tool window undocked.

    • Prefix match - select this option to perform a prefix match instead of matching anywhere in the filename.

    • Refresh - refreshes the file list.

Reflow Comment Dialog

The Reflow Comment dialog (Document → Reflow Comment ), shown below, is used to reflow block comments, paragraphs, or a selection of the current file.

The following options are available:

  • Entire block comment - If selected, reflows an entire block comment based on the current width and border settings for the block comment.

  • Match block comment border settings - If selected, forces the borders to conform to the comment settings (Document → Comment Setup - see Language-Specific Comment Options).

  • Current paragraph - If selected, reflows the current paragraph within the block comment.

  • Selection - If selected, reflows a selection within a block comment paragraph based on current settings.

  • Comment width - Select one of the width options to reflow a block comment to the margins or the width that you specify in these fields. See Language-Specific Comment Wrap Options for information.

For more information about comments, see Commenting.

Current Document Options Dialog

The Current Document Options dialog allows you to enable/disable aspects of XML or HTML Formatting for just the current document. It can be displayed by clicking Document → XML/HTML Formatting → Current Document Options , or by using the xml_html_document_options command.

The dialog contains the following:

  • Formatting scheme - This drop-down specifies the formatting scheme applied to this document. Choose from the list of available schemes.

  • Auto formatting options - These are the aspects of XML/HTML Formatting that can be enabled/disabled for the current document.

  • Configure Schemes button - Displays the XML/HTML Formatting Scheme Configuration Dialog, which allows you to modify or create a new scheme to apply to the current document.

For more detailed information, see Enabling/Disabling for the Current Document.

XML/HTML Formatting Scheme Configuration Dialog

This dialog is used to configure the way XML and HTML code is automatically formatted as you edit. Note that XML/HTML Formatting must be enabled in order for these settings to work. See XML/HTML Formatting for more information.

To access this dialog, from the main menu, click Document → XML/HTML Formatting → Current Document Options , then click the Configure Schemes button on the Current Document Options dialog. Or, use the xml_html_options command to display the dialog.

The Scheme column shows a list of available schemes. The Tags column shows a list of tags associated with the selected scheme. Right-click in this column for a menu of operations such as add, save, and more. See Working with Schemes and Working with Tags for more details.

A Preview at the bottom of the dialog shows how the selected tag will be formatted in your code. Click the XML Options or HTML Options button to jump to the language-specific Formatting Options page for each language (this is the same as Tools → Options → Languages → [Language Category] → [Language] → Formatting Options ).

The following sections describe the tabs and how each setting works. Before configuring settings, be sure the scheme and tag(s) that you want to affect are selected.

Caution

XML/HTML Formatting does not currently affect XML or HTML Beautifier settings. If you run the beautifier on documents that have been automatically formatted through XML/HTML Formatting, you may find unexpected results.

General Settings

The General tab of the XML/HTML Formatting dialog is shown below.

It contains the following general settings:

  • End tags settings - These options control how the end tags for the selected tag are formatted:

    • Has end tag - This option tells SlickEdit® whether or not the specified tag is intended to be closed with an end tag. This information is used for SlickEdit to know when to start or stop calculating information based on the tag. For example, the <div> tag in HTML has a start and end tag, while the <br> tag does not have an end tag.

    • Insert end tags on '>' - When selected, SlickEdit automatically inserts the end tag after you type the closing brace (>) of the start tag. For example, when you type <div>, </div> is automatically inserted. The placement of the inserted tag depends on other settings you have specified, such as whether or not the end tag should be on a separate line (specified on the Tag Layout tab).

  • Match tag style of - Select this option if you want the selected tag's settings to match the style of another tag, then pick the tag to use from the drop-down list. This can be a time-saver when adding a batch of new tags that should all have the same settings.

  • Scheme uses case-sensitive tag search - When this option is selected, tags in the Tags column are displayed in the list exactly as you have typed them, with the case preserved. When you type the tags in the editor, the case must match exactly or the tag will not be recognized (and the (default) tag settings will be applied). This option is appropriate for XML. HTML is not case-sensitive.

Content Wrap Settings

The Content Wrap tab of the XML/HTML Formatting dialog contains options for specifying how wrapping should occur for the selected tag's content.

There are three main (mutually-exclusive) options:

  • Wrap tag content - When selected, content between tags is wrapped according to the settings specified in the Tag content width group box. See Tag Content Width Settings below for details.

  • Treat as content - When selected, the tag as well as its content is wrapped according to the parent tag content. The tag is treated as "inline" with the surrounding text. This could be useful for style tags such as <b> or <i> that you want to appear "inline" with the content. For example:

    <div>
    This is a sample paragraph with the <b>bold tags</b> being treated as
    content, "inline" with the rest of the text.
</div>

  • Preserve content - When selected, content between start and end tags is not wrapped, but the tags are laid out properly with the parent tag. This could be useful for tags such as <pre>, where the content needs to be rendered exactly as it appears in the code.

Note

  • When Treat as content is selected, the wrapping options in the Tag content width group box, as well as options on the Tag Layout tab, are unavailable.

  • When Preserve content is selected, the wrapping options in the Tag content width group box are unavailable.

Tag Content Width Settings

When Wrap tag content is selected, content between tags is wrapped according to the settings specified in this group box. The options Fixed width, Automatic width, and Fixed right margin are mutually exclusive.

  • Fixed width - When selected, tag content is formatted to the specified width. The original left margin of the content is maintained, and the right margin is adjusted to meet the target width.

    If Maximum right column is used, lines will be wrapped when they reach the specified column, even if they have not reached the specified fixed width. This is useful if coding standards mandate that text should not exceed a specified column.

  • Automatic width - When selected, the width of the longest multi-line paragraph in the tag's content is used as the width. This is useful for preserving the formatting of existing content.

    If Maximum right column is used, lines will be wrapped when they reach the specified column, even if they have not reached the specified automatic width. This is useful if coding standards mandate that text should not exceed a specified column.

  • Fixed right margin - When selected, lines will break before the specified number of columns in the Right column field has been reached.

Tip

If coding standards mandate that text should not exceed a specified column, you can still use Fixed or Automatic width settings. Select and set the Maximum right column, and lines will be wrapped when they reach the specified column, even if they have not reached the specified fixed or automatic width.

  • Parent tag right margin - When selected, tag content is wrapped at the right margin to the width of the parent tag.

  • Include tags in width calculation - When selected, the start and end tag characters are counted in addition to the content. The number of characters and spaces (including attributes) within tags are calculated, and the specified width is adjusted accordingly. This is useful for producing uniform blocks of text.

  • Preserve width of existing content - When selected, SlickEdit® preserves the width of the existing content while editing. The width is determined by the length of the longest multi-line paragraph. If the width of the existing content cannot be determined, the formatting option specified (Fixed, Automatic, or Fixed right) will be used instead.

Tag Layout Settings

The Tag Layout tab of the XML/HTML Formatting dialog contains options to control the location of the start tag, end tag, and the content between them.

  • Start tag on separate line - When selected, the start tag occurs on a separate line, and the cursor will be placed on the line below for you to type the content. Note the cursor location (|) in the examples below.

  • End tag on separate line e - When selected, the end tag placed on a separate line below the content.

    Example of both settings checked:

    <div>
     |
</div>

    Example of both settings unchecked:

    <div>|</div>

    Example of start checked and end unchecked:

    <div>
    |</div>

Note

Dynamic Surround is triggered when you type a tag that has both options StartandEnd tag on separate line checked. Note that Dynamic Surround cannot wrap content and only indents to match your indent style setting (Tools → Options → Languages → [Language Category] → [Language] → Indent ). See Syntax Indent for more information about indent styles.

  • Content indent - These mutually exclusive options control how content between tags is indented:

    • Match extension indent style - When selected, tag content is indented according to your indent style setting (Tools → Options → Languages → [Language Category] → [Language] → Indent ). See Syntax Indent for more information about indent styles.

    • Indent - When selected, indenting for the tag occurs at the column number specified in the spin box. When Indent after start tag '>' is selected, indenting is relative to the close bracket. Otherwise indenting is relative to the open bracket.

  • Nested tag indent - Indenting is activated after the end tag is typed (or automatically inserted if Insert end tags on '>' is checked on the General tab). These mutually exclusive settings apply to all tags in the selected scheme:

    • Match extension indent style - When selected, SlickEdit® indents the selected tag according to your indent style setting (Tools → Options → Languages → [Language Category] → [Language] → Indent ). See Syntax Indent for more information about indent styles.

    • Match content indent - When selected, SlickEdit indents the selected tag to the same level as its parent content.

  • Insert line breaks - The values for Before start tag and After end tag specify the number of line breaks that are inserted before and after start and end tags. Note that in order to insert one or more blank lines, the values should be set to 2 or higher.


Macro

This section describes items related to macros.

Macro Menu

The table below describes each item on the Macro menu and its corresponding command. For more information about working with macros, see Recorded Macros, Programmable Macros, and the Slick-C® Macro Programming Guide.

Macro Menu Item | Description | Command
Load Module | Loads a macro source module. | gui_load
Unload Module | Unloads a Slick-C macro file from the state file. | gui_unload
List User-Loaded Macros | Lists user-loaded Slick-C modules. See User-Loaded Modules Dialog. | gui_list_macfiles
Record Macro | Starts recording a Slick-C language macro. | record_macro_toggle
Stop Recording Macro | Stops recording a Slick-C language macro. | record_macro_toggle
Execute last-macro | Runs last recorded macro. | record_macro_end_execute
Save last-macro | Saves the last recorded macro under a name you specify. See Save Macro Dialog. | gui_save_macro
List Macros | Lists saved, recorded macros. See List Macros Dialog. | list_macros
Set Macro Variable | Allows you to set global macro variables. See Set Variable Dialog and Variable Editor Dialog. | gui_set_var
Start Slick-C Debugger | Activates the Slick-C debugger window. See "Slick-C Debugger" in the Help → Index . | slickc_debug_start
Go to Slick-C Definition | Opens a macro source file and places your cursor on the definition of a macro symbol. | gui_find_proc
Find Slick-C Error | Places your cursor on the macro source line which caused the last interpreter run-time error. | find_error
New Form | Opens a new form for editing with the Dialog editor. | new_form
Open Form | Opens an existing or new form for editing with the Dialog editor. | open_form
Selected Form | Displays edited form window currently selected. | show_selected
Load and Run Form | Loads form, loads Slick-C code, and runs the currently selected/edited form. | run_selected
Grid | Sets form grid settings. This affects the distance displayed between the dots on a form that is being edited. See Grid Settings Dialog. | gui_grid
Menus | Lists all menus and allows you to edit, create, delete, or show menus. Provides access to the Menu Editor dialog box. See Menu Editor Dialog. | open_menu
Insert Form or Menu Source | Inserts source code into current file for a form or menu you specify. | insert_object

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Macro menu items.

User-Loaded Modules Dialog

The User-Loaded Modules dialog is used to view a list of Slick-C® modules that you have loaded. It also lets you add, delete, and re-order modules. See Slick-C® Modules for more information.

To display the dialog, from the main menu, click Macro → List User-Loaded Modules , or, use the gui_list_macfiles command on the SlickEdit® command line.

To add a module to the list, double-click where indicated or click the Add button. To remove a module from the list, select it, then click the Delete button. Use the arrow buttons to rearrange the order, moving the selected module up and down in the list. This is the order in which modules are re-loaded when you upgrade to a newer version of SlickEdit.

When you add a module to the list, SlickEdit prompts to load the module in the editor. When you delete a module from the list, SlickEdit prompts to also unload the module. See Loading and Unloading Slick-C Modules for more information.

Save Macro Dialog

The Save Macro dialog appears automatically when you end macro recording, or when you click Macro → Save last-macro . You can also display the dialog by using the gui_save_macro command.

The dialog contains the following elements:

  • Macro Name - Specifies the name for the recorded macro. If you attempt to give the macro a name that is already taken, a message is displayed asking if you want to overwrite the existing macro.

  • Macro list - The box under the Macro Name field shows a list of all macros you have recorded (if any exist).

  • Requires editor control - When selected, the macro only operates if the target is an editor control.

  • Allow in read only mode - When selected, the macro is permitted to operate even in read-only mode. Select this option if your macro does not modify the current buffer.

  • Allow when window is iconized - When selected, the macro is permitted to operate even when the edit window is iconized. If the macro modifies the current buffer, you may prefer to leave this option off.

  • Allow in non-MDI editor control - When selected, the macro is permitted to operate even 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.

  • Save and Bind to Key - Saves the recorded macro by appending the source code of the macro to the vusrmacs.e user macros file located in your configuration directory, then displays the Key Bindings option screen so you can create a keyboard shortcut for the macro. See Binding Recorded Macros to Keys for more information.

  • Save - Saves the recorded macro by appending the source code of the macro to the vusrmacs.e user macros file located in your configuration directory.

  • Edit - (Alt+E) Displays the macro source code in a new editor window (to save it, click Macros → Save last-macro orto bind the macro to a key, use the menu item Macro → List Macros ). Note that this button is disabled for existing macros because with the Save Macro dialog, you can only edit the macro you have just recorded prior to saving it. To edit a macro that has been previously recorded and saved, use the List Macros dialog. See Saving and Editing Recorded Macros for more information.

  • Delete - Deletes the selected macro.

List Macros Dialog

The List Macros dialog is used to view and work with a list of macros you have recorded. It is accessed by clicking Macro → List Macros on the main menu, or by using the list_macros command on the SlickEdit® command line.

The dialog shows a list of all macros you have recorded. Use the buttons to perform the following operations:

  • Run - Runs the selected macro. See Running a Recorded Macro for more information.

  • Cancel - Closes the dialog.

  • Edit - Opens the macro source for editing. See Saving and Editing Recorded Macros for more information.

  • Delete - Deletes the selected macro. See Deleting Recorded Macros for more information.

  • Bind to Key - Displays the Key Bindings option screen so you can assign a key or mouse shortcut to the macro. See Binding Recorded Macros to Keys for more information.

Set Variable Dialog

You can set Slick-C® variables to specific values using the Set Variable dialog box (Macro → Set Macro Variable or gui_set_var command).

Enter the name of Slick-C variable in the Variable text field. You may use the spacebar and "?" (completion) to assist you in entering the name. Click the drop-down arrow to select a variable from the list. Enter the new value of the variable in the Value text box and click OK, or click Edit to display the Variable Editor Dialog, used for editing complex variables such as arrays, hash tables, structures, and unions.

Variable Editor Dialog

The Variable Editor dialog, shown below, is used to edit complex variables for macros. For more information about working with these programmable macros, see Programmable Macros. To access the Variable Editor, click Macro → Set Macro Variable , or use the gui_set_var command, select a variable to edit from the list, then click the Edit button.

The data structure of the variable is displayed in the list box at the top of the dialog, and the value for each entry is displayed in the Value text box.

The following buttons are available:

  • 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 necessarily the same as when this dialog box was originally displayed.

  • Squish - Deletes array items which have the value _notinit.

Grid Settings Dialog

The Grid Settings dialog (Macro → Grid or gui_grid command) is used to set the width and height of grid dots displayed on forms when you use the Dialog Editor. These settings affect the distance between the dots on a form that is being edited.

The width and height parameters are in twips (1440 twips equal one inch on the display).

Menu Editor Dialog

The Menu Editor dialog, shown below, contains options for editing menus. To access this dialog, click Macro → Menus , select the menu to edit from the list, then click Open.

The following fields and settings are available:

  • Menu name - Name of the current menu resource. 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 (for example, -m mymenu) or set the def_mdi_menu macro variable to your menu name (see Setting/Changing Configuration Variables).

  • Caption - Title displayed for the menu item. For menu items, set the caption to "-" to specify a line separator.

  • Short Cut - Key binding shortcut for the menu item.

  • 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 the Menu Item Alias dialog box to set an alias for the menu item. See Defining Menu Item Aliases.

  • Help Cmd - Macro command executed when F1 is pressed 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 do not 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 helpcommand 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 SlickEdit® menu bar.

  • Submenu - Check this box if you want to create a menu which contains other menu items.

  • Auto Enable - Displays the Auto Enable Properties dialog box to set the properties for the menu item that should be automatically enabled. See Enabling/Disabling Menu Items and Auto Enable Properties Dialog .

  • 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.

Auto Enable Properties Dialog

This dialog is used to set the auto-enable properties for a menu item. For example, the screen capture below shows the Auto Enable Properties dialog for cut on the _textbox_menu. For more information, see Enabling/Disabling Menu Items. To access this dialog, click the Auto Enable button on the Menu Editor dialog.

The following settings are available:

  • 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 editor window 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 Context Tagging® - Indicates that this command should be disabled if Context Tagging does not support the current buffer language type.

  • Requires fileman mode - Indicates that this command should be disabled if the current buffer is not in Fileman mode.

  • Requires unicode buffer - Indicates that this command should be disabled if the current buffer is not Unicode.

  • 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 a type of block or 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.


Tools

This section describes items on the Tools menu and associated dialogs and tool windows.

Tools Menu

The table below describes each item on the Tools menu and its corresponding command.

Tools Menu Item | Description | Command
Options | Displays the Options dialog. See Options. | config
Quick Start Configuration | Displays the Quick Start Configuration Wizard. See Quick Start Configuration Wizard. | quick_start
Regex Evaluator | Shows the Regex Evaluator tool window. See The Regex Evaluator. | activate_regex_evaluator
OS Shell | Runs operating system command shell (DOS). | dos
OS File Browser | Runs operating system file system browser. See OS File Browser. | explore or finder
Calculator | Displays the Calculator, which allows you to evaluate mathematical expressions. See Using the Calculator and Math Commands. | calculator
Add Selected Expr | Adds the result of evaluating each line in a selected area of text. | add
ASCII Table | Opens ASCII table file. | ascii_table
Generate GUID | Generates a Globally Unique IDentifier. See GUID Generator. | gui_insert_guid
Version Control | Displays Version Control menu. See Version Control Menu. | N/A
Quick Refactoring | Displays Quick Refactoring menu. See Quick Refactoring Menu. | N/A
Imports | Displays Imports refactoring menu. See Imports Menu. | N/A
Generate Debug Statement for | Generates debug code for symbol under the cursor. | generate_debug
Sort | Sorts current buffer or selected text. See Sorting Text. | gui_sort
Beautify | Displays a language-specific beautifier dialog box used for setting options and beautifying source. See Beautifying Code. | gui_beautify
File Merge | Displays the 3-Way Merge Setup dialog, which provides settings for merging two sets of changes made to a file. See 3-Way Merge and Dialogs and Tool Windows. | merge
File Difference | Displays the DIFFzilla® dialog, which allows you to view and edit differences between files. See DIFFzilla® and DIFFzilla® Dialog. | diff
Spell Check | Displays menu of spell checking commands. See Spell Check Menu. | N/A
Tag Files | Displays a dialog which allows you to build tag files for use by the Symbols tool window and other Context Tagging® features. See Creating Language-Specific Tag Files and Context Tagging - Tag Files Dialog. | gui_make_tags

Version Control Menu

The table below describes each item on the Tools → Version Control menu and its corresponding command. For more information about working with Version Control, see Version Control.

Version Control Menu Item | Description | Command
Check In | Checks in current file. | vccheckin
Get | Checks out current file read only. | vcget
Check Out | Checks out current file. | vccheckout
Lock | Locks the current file without checking out the file. | vclock
Unlock | Unlocks the current file without checking in the file. | vcunlock
Add | Adds current file to version control. | vcadd
Remove | Removes current file from version control. | vcremove
History | Views history for current file. | vchistory
Difference | Views differences of current file. | vcdiff
Properties | Views properties of current file. | vcproperties
Manager | Executes Version Control Manager. | vcmanager
Setup | Displays the Version Control Setup options screen, which allows you to choose and configure a Version Control System interface. See Version Control Setup Options. | vcsetup

Quick Refactoring Menu

TheTools → Quick Refactoring menu contains the Quick Refactorings that can be used for C++, C#, Java, and Slick-C®. These are summarized in the table below. For more information about working with these refactorings, see Quick Refactoring.

Quick Refactoring Menu Item | Description | Command
Rename | Rename symbol. | refactor_quick_rename
Extract Method | Extract the selected code block into a new function. | refactor_quick_extract_method
Modify Parameter List | Modify the parameter list of a method. | refactor_quick_modify_params
Encapsulate Field | Encapsulate field using Context Tagging®. | refactor_quick_encapsulate_field
Replace Literal with Constant | Replace literal value with a declared constant. | refactor_quick_replace_literal

Imports Menu

The Tools → Imports menu contains options for organizing Java imports. For more information, see Organize Imports.

Imports Menu Item | Description | Command
Organize Imports | Organize import statements in a Java file. | jrefactor_organize_imports
Add Import | Add import statement for symbol under cursor. | jrefactor_add_import
Options | Displays the Options dialog open to Organize Java Imports node. See Organize Imports. | jrefactor_organize_imports_options

Spell Check Menu

The Tools → Spell Check menu contains spell checking operations and access to options. For more information about working with Spell Check, see Spell Checking. The table below contains a summary of the Spell Check menu items.

Spell Check Menu Item | Description | Command
Check from Cursor | Spell check starting from cursor. | spell_check
Check Comments and Strings | Spell check comments and strings starting from cursor. | spell_check_source
Check Selection | Spell check words in selection. | spell_check_selection
Check Word at Cursor | Spell check word at cursor. | spell_check_word
Check Files | Spell check multiple source files. | spell_check_files
Spell Options | Display/modify spell checker options. | spell_options

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Tools menu items.

3-Way Merge Dialog

The 3-Way Merge dialog (Tools > File Merge), shown below, is used for merging file differences.

The Ellipses buttons to the right of the text boxes are used to select files. The Bbuttons to the right of the text boxes are used to select from the open buffers.

The list below describes the remaining fields and settings:

  • Base file - Specifies the file/buffer name of the original source file before any changes are made.

  • Revision 1 and2 - Specifies the file/buffer names of the modified versions of the base file.

  • Output file - Specifies the output file name.

  • Merge style - The following merge styles are available:

    • Auto merge - If selected, 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.

    • Show changes - If selected, if a change does not cause a conflict, the change is automatically applied to the output file and the change IS indicated, so that using the Next Conflict button will show you the change.

  • Output style - Output style has no effect if there are no conflicts. The following output styles are available:

    • Interactive - Provides a friendly side-by-side dialog box which lets you pick the change you want in the output file. It also lets you edit.

    • Interleaved buffer - Creates an editor buffer which you must edit to resolve conflicts.

  • Use smart merge - If selected, the number of conflicts found is reduced.

  • Ignore spaces - If selected, leading and trailing spaces are ignored. The side-by-side output allows you to easily select the change that you want.

DIFFzilla

The DIFFzilla® dialog (Tools → File Difference ) is used to configure a file differencing operation and begin the diff. The left side of the dialog contains a tree that shows recent diff sessions and sessions you have saved under an assigned name.

The Sessions tree records your last several diff sessions, and they are at the top of the tree. You can re-fill the dialog with the information from a previous session by clicking on it. You can save a session with a name by clicking the Save As button at the bottom of the dialog. If you have selected a named session from the bottom of the tree, you can save changes to it by clicking the Save button at the bottom of the dialog.

The dialog contains two tabs:

  • DIFFzilla® Files Tab - used to select the items to compare.

  • DIFFzilla Options Tab - used to specify options to control how the diff is performed and control the setup of the diff dialog.

DIFFzilla® Files Tab

Use this tab to specify the items to compare and the manner in which the comparison is performed. After filling in the needed information, click OK to start the diff.

Diff Types

The following Diff Types are available:

  • Compare Two Files - Compares two files and shows the differences between them. When this option is selected, after you click OK on this dialog to start the comparison, the interactive Diff dialog is displayed, allowing you to preview the differences one-by-one before committing.

    If the option on the Options tab, Instead of an interactive dialog, output one buffer with the differences labeled, is checked, a buffer with the differences between the two files marked up will be displayed instead.

  • Compare Two Folders - Compares two directories or directory trees, and shows which files do not match. Select Recurse into subdirectories to search subdirectories recursively. Click Previous diff to load a diff state file (.dif), restoring the saved state of a multi-file diff session.

Items to Compare

The dialog contains two areas used to specify the items to compare: Path 1 and Path 2. Items specified in the Path 1 section will appear on the left side of the diff output window. Items specified in the path 2 section will appear on the right side. For each you can specify the following items:

  • Path 1, Path 2 - When comparing files, set Path 1 and Path 2 to file names. When comparing folders, set Path 1 and Path 2 to directory names. If the file names only differ by path, you only need to specify a directory for Path 2.

    Tip

    By default, SlickEdit will automatically set the Diff Type based on whether the values for Path 1 and Path 2 contain directory names or file names. To configure that option, see Expert mode setup dialog.

    You can use the drop-down list to select a previously used item to compare. To browse for a file or directory, click the Ellipses button. Click the B button to select an open buffer.

  • Compare type - the second drop-down list lets you select the type of comparison to run. Select one of the following:

    • Compare lines: all - this is the default comparison type, comparing all of the lines in the specified files.

    • Compare lines: range - this option allows you to select a subset of the lines to compare, using the dialog, below.

    • Compare symbols: all - this compares the symbols from the two files, ignoring differences in order. For example, if a function was declared higher up in the file in one version than the other, selecting this option would ignore that difference.

  • Use file on disk - Select this option to diff the file on disk and not the copy in memory.

DIFFzilla Icons

In the center of the DIFFzilla dialog are icons that help to configure a comparison:

  • Toggle automatic directory mapping - when on, Path 2 is calculated based on other Path 2 directories used with the current Path 1 directory. The icon contains a little, red 'x' when off.

  • Copy path - copies the path from Path 1 to Path 2 or vice versa. The direction of the copy is indicated by the arrow in the icon. When the arrow is pointing down, it will copy from Path 1 to Path 2. The direction is controlled by the location of the cursor, which designates the origin of the copy.

  • Swap paths - click on this button to swap the paths from Path 1 to Path 2.

  • Toggle Code Diff - turns Source Diff on or off. When Source Diff is off, the icon contains a small, red 'x'. Source Diff is on by default.

Filespecs

For multi-file diff, you can set specific file types to compare or to exclude:

  • Filespecs - Enter a space-delimited list of wildcard file specifications to difference. For example, enter "*.c *.cpp *.h" to difference all files with .c, .cpp, and .h extensions.

  • Exclude filespecs - Enter a space-delimited list of wildcard file specifications to be excluded from the differencing. For example, enter junk* test* to exclude all files with names beginning with the words "junk" or "test".

DIFFzilla Options Tab

Use this tab to set up file comparison options and options that affect the interactive Diff dialog. Click Save to save the options and close this dialog without running DIFFzilla. There are two types of options available: File Compare Options and Dialog Setup Options.

File Compare Options

The file compare options, shown above, are described as follows:

  • Expand tabs into spaces before comparing - When selected, tabs are expanded to the appropriate number of spaces before lines from each file that is compared.

  • Ignore leading spaces before text on each line - When selected, differences in leading spaces of lines are ignored.

  • Ignore trailing spaces after text on each line - When selected, differences in trailing spaces at the end of lines are ignored.

  • Ignore all spaces in file - When selected, differences in spacing between characters in lines are ignored.

  • Compare files case insensitive - When selected, differences in character casing are ignored.

  • Do not compare newline characters - When selected, differences in end-of-line characters are ignored. This is useful when comparing UNIX-formatted files with DOS-formatted files.

  • Skip comments at the beginning of the file - When selected, leading comments are ignored. This is useful if you are using a version control system that automatically inserts comment file headers.

  • Instead of an interactive dialog, output one buffer with the differences labeled - When selected, a new buffer is created that contains color-coded difference output. You can edit the output buffer. When this option is not selected, the Diff dialog box opens displaying the two files side-by-side and the differences are color-coded.

  • Source Diff - Determines whether Code Diff is used. Source Diff compares the code temporarily reformatting the code from Path 2 to match the format in Path 1. This is very useful when one version has been both beautified and contains other meaningful changes. Source Diff can also be toggled by an icon on the diff dialog.

  • Date and Size Optimization - These options control how DIFFzilla analyzes multi-file diffs.

    • Always compare files - when selected, the two files are always compared. This was how SlickEdit performed multi-file diffs in SlickEdit 2008 and earlier.

    • Assume match if date and size match - when selected, the two files are assumed to be the same if the date and size are the same. This will significantly speed multi-file diffs.

    • Assume mismatch if date different and size matches - defines how to handle the case when the size is the same but the date differs.

Dialog Setup Options

Setup options for the DIFFzilla® dialog are described as follows:

  • Show gauge during diff - When selected, a gauge control will show various processing statistics while you wait for the differences output to complete.

  • Jump to next diff after copy block - When selected, the cursor is moved to the next difference when you apply changes from one file to the other. For example, after clicking Block on the Diff dialog box, the tab moves to the next difference. This option has no effect on interleaved output.

  • Automatic directory mapping - When selected, the Path 2 text box is automatically updated when you type a directory in the Path 1 text box.

  • During multi-file diff, automatically close after last difference - When selected, clicking Next Diffon the Diff dialog box when there are no more differences, triggers the Close button on that dialog box.

  • When closing multi-file diff, do not prompt to save results - suppresses the prompt to save results after a multi-file diff.

  • Put buttons at top of diff dialog - When selected, the buttons that control operations such as Next Diff, Prev Diff, and Block, are displayed at the top of the Diff dialog box.

  • Launch multi-file diffs in a separate process - When selected, source trees are diffed in a separate process so you can continue working.

  • Expert mode setup dialog - When this is on, Compare Two Files or Compare Two Folders will be selected automatically based on whether the paths contain folder names or file names. This was the how SlickEdit 2008 and previous versions worked.

  • Number of sessions automatically saved - Determines the number of sessions automatically saved under Recent Sessionsin the Sessions tree. The default value is 10.

  • Starting position - Determines whether to place the cursor at the top of the file or at the first difference when the Diff dialog box is displayed. This option has no effect on interleaved output.

  • Dialog initialization - Determines whether the DIFFzilla dialog box restores previous dialog settings (history) or just places the current buffer name into the Path 1 text box. Press F7/ F8 to restore the previous next dialog settings, respectively.

DIFFzilla Diff Dialog

The Diff dialog is used to display the results of a file comparison. It displays the file from Path 1 on the left and the file from Path 2 on the right. Colored markers are used to indicate differences between the two files. Unlike most diff tools, the two panes are editable and support many of the same operations as the main editor windows, including syntax expansion and completions.

Imaginary Buffer Lines are inserted any time a line exists in only one file. This ensures that lines that are considered to be the same line (even if they contain changes) are displayed next to each other. This aids in viewing the differences.

A contiguous set of the same type of differences (inserted lines or modified lines) is called a block. A block can be a a whole line or several lines. If a particular code change to a file consists of three modified lines followed by three inserted lines, that comprises two blocks of three lines each. Operations you perform will act upon a block, a line, or the whole file.

The following buttons are displayed below each code pane in the Diff dialog. These are used to move changes from one side to the other or save the modified contents of the pane.

  • Del Block - this button only appears when one side contains code that is not present on the other side. Click this button to delete the block.

  • Block - click this button to move the current block of differences from one side to the other.

  • Line - use this button to move the contents of the current line from one side to the other.

  • Merge All - merges all changes from the selected side to the other.

  • Save File - saves the file, including all changes made during the diff session.

  • Read only - lets you change the read-only status of the file.

The bottom of the Diff dialog contains the following buttons:

  • Close - close the Diff dialog. You will be prompted to save any unsaved changes.

  • Next Diff - moves to the next block of differences in the file.

  • Prev Diff - moves to the previous block of differences in the file.

  • Find - performs a search in the two files.

  • Undo - undo the last change. This includes changes made by editing and those made using the Block, Line, and Merge buttons.

  • Help - brings up Help on the Diff dialog.

  • Source Diff/Line Diff - switches from Source Diff to Line Diff. The button changes based on the kind of diff that was performed. If you did a Code Diff, the button will say Line Diff and vice versa.

To change the colors used, select Tools → Options from the main menu, then expand the Appearance → Colors node in the tree. The items to change are listed under the Modifications node in the list of elements. Set the following colors used by the Diff dialog:

  • Inserted Line - sets the color for lines that exist in one file but not the other. This color is displayed in the margin of the file that contains the inserted line. The other file will contain an Imaginary Buffer Line, to make sure that identical lines are always present next to each other.

  • Modified Line - sets the color lines that exist in both files but are different. Again, the color is rendered in the margin of the file.

  • Modified Whitespace - sets the color used for whitespace adjustments created by Source Diff. The Code Diff capability adjusts the formatting of the Path 2 file to match that of the Path 1 file. Inserted or removed whitespace is shown with this color. For more information, see Source Diff.

  • No Save Line - sets the color used for Imaginary Buffer Lines. These are inserted into the buffer to make sure that lines that are believed to be the same line (even if one has changed) are drawn next to each other. This helps when viewing and understanding differences.

Caution

These colors are not used exclusively by the Diff dialog. They are used wherever that same information needs to be conveyed. For example, the Modified Line color is also used for margin markers when you enable the viewing of modified lines in the editor window.

For more information on setting colors see Colors.

Multi-File Diff Output Dialog

When using DIFFzilla® to perform a directory comparison (Multi-File diff type), the results are presented in the Multi-File Diff Output dialog.

The Multi-File Diff Output dialog box contains the following elements:

  • Diff - Shows current files in the difference editor when the selected files differ.

  • Del File - Deletes the selected file(s). Hold Ctrl+Click to multi-select in either tree. The X bitmap is displayed.

  • View - Shows current files in the difference editor when the selected files match.

  • Copy File/Copy Tree - Copy File is displayed when the selected files differ or when the selected file only exists in the current source tree. The Plus bitmap is displayed. Copy Tree is displayed when the selected item is a directory that only exists in the current source tree. When you click Copy Tree, you are prompted as to whether you want to copy the directory source tree recursively.

  • Next - Moves the cursor to the next set of mismatched files in both source trees.

  • Prev - Moves the cursor to the previous set of mismatched files in both source trees.

  • Save - Lets you save a diff state file (.dif) that you can load later with thePrevious diff button on the DIFFzilla® dialog box. This is especially useful when you have not completed merging files and you want to continue at a later time. Also, you can generate a file list.

  • Refresh - Rediffs modified files or all files.

  • Options - Displays the DIFFzilla Options Tab. 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 can save the report.

Context Tagging - Tag Files Dialog

The Context Tagging® - Tag Files dialog, shown below, is used to manage all your tag files. For more information on tagging in general, see Context Tagging. For more information about tag files, see Building and Managing Tag Files. To access the Context Tagging® - Tag Files dialog, click Tools → Tag Files .

The left section of the dialog lists all of your tag files, separated into categories. A tag file having a File bitmap with blue arrows indicates the tag file is built with support for cross-referencing. The right section of the dialog lists all the source files indexed by the currently selected tag file.

For descriptions of the Tag File categories, listed on the left side of the dialog, see Tag File Categories.

The following buttons are available on the Context Tagging® - Tag Files dialog:

  • Done - Saves tag file settings and closes the dialog box.

  • Add Files - Displays the Add Source Files dialog box, from which you can add a set of files to the currently selected tag file. This button will be unavailable for read-only tag files and auto-updated tag files. If you add files to your workspace tag file, you will be prompted if you want to also add the files to your project.

  • Add Tree - Displays the Add Tree dialog box, from which you can recursively add a directory of files to the currently selected tag file. This button will be unavailable for read-only tag files and auto-updated tag files. If you add files to your workspace tag file, you will be prompted if you want to also add the files to your project.

  • Remove Tag File - Deletes the currently selected tag file. You will be prompted whether or not to delete the tag file from the list, and then whether or not to permanently delete the tag file from disk. Note that some language-specific tag files are automatically generated, and thus will be automatically regenerated if you delete them.

  • Remove Src. File - Removes the selected files from the currently selected tag file. If no files are selected, you will be prompted whether or not to remove all source files from the tag file. If you remove files from your workspace tag file, you will be prompted if you want to also remove the files from your project.

  • Options - Displays the Context Tagging® Options screen for you to configure Context Tagging® options. See Context Tagging® Options for more information.

  • Up - Moves the selected tag file higher in the search order. This primarily applies to language-specific tag files (see Creating Language-Specific Tag Files).

  • Down - Moves the selected tag file lower in the search order. This primarily applies to language-specific tag files (see Creating Language-Specific Tag Files).

  • Add Tag File - Displays the Add Tag File dialog box, which allows you to choose from a list of languages the source type for which to insert the tag file. To automatically create tag files for C++, Java, and .NET, you can instead use the Create Tag Files for Compiler Libraries dialog (see Creating Tag Files for Compiler Libraries).

  • Retag Src. Files - Updates the Context Tagging information for the selected files in the currently selected tag file. If no files are selected, you will be prompted whether or not to retag all source files.

  • Rebuild Tag File - Displays the Rebuild Tag File dialog box containing options for rebuilding the selected file. See Rebuilding Tag Files.

  • Auto Tag - Displays the Create Tag Files for Compiler Libraries dialog box used to automatically create run-time library tag files for C++, Java, and .NET (see Creating Tag Files for Compiler Libraries).

GUID Generator

The GUID Generator (Tools → Generate GUID ), shown below, is used to create Globablly Unique IDentifiers for use in your code.

The GUID Generator dialog contains the following fields and controls:

  • Current GUID - Displays the last create GUID. A new GUID is geenrated each time you invoke this dialog.

  • GUID Format - Lets you select the format for the GUID.

  • New - Click this button to generate a new GUID.

  • Copy - Click this buton to copy the current GUID to the clipboard.

  • - Click this button to insert the current GUID into the active buffer at the cursor location.


Options

Options Dialog

The Options dialog is used to configure SlickEdit®. To display it, from the main menu, click Tools → Options , or use the config command on the SlickEdit® command line.

The following sections describe how to use the Options dialog. For descriptions of individual options, skip to the index located at Option Categories.

Using the Options Dialog

The Options dialog is divided into two sections: the tree on the left, which contains category nodes (see Option Categories), and the option panel on the right, which contains specific options. Right-click inside the tree area to expand or collapse all nodes in the tree.

As you click on nodes, the option panel updates to show the applicable options. The layout of the option panel can be either a property sheet in tabular format (like Tools → Options → Appearance → General ), or a form with radio buttons, check boxes, etc. (like Tools → Options → Appearance → Colors ).

Tip

The Options dialog supports keyboard shortcuts, so you can use the dialog and change settings without having to touch the mouse. See Keyboard Shortcuts in the Options Dialog for more information.

See the following sections for more information:

  • Changing and Applying Option Settings

  • Navigating to Previously Viewed Panels

  • Option Favorites

  • Option Search

  • Keyboard Shortcuts in the Options Dialog

Changing and Applying Option Settings

When options are displayed as a property sheet, the name of the option is shown in the Option column, and the setting is shown in the Value column. The manner in which an option value is changed depends on the type of option:

  • For options with combo boxes - Use the drop-down arrow to make a selection. Alternately, to cycle through and select a setting, double-click on the option. If you're using keyboard shortcuts, you can toggle a combo box up and down using F4 or Alt+Up and Alt+Down, respectively, and then use the Up and Down keys to make a selection.

  • For options with numeric text boxes - Click on the option and type directly in the text box to change the value. If you're using keyboard shortcuts, use one of the keys Right, Space, or F4 to enable the text box.

  • For color options - Double-click on the color block or press F4, and the color picker is displayed.

  • For file and directory path options - Double-click on the value or press F4, and a directory picker is displayed. If you have specified a file name or directory in a field and wish to change it back to the default, press the Delete key. This clears the value and SlickEdit® will use the default setting.

For both forms and property sheets, when you change the value of an option, an asterisk appears after the node name in the tree. If the option is in a property sheet, an asterisk also appears next to the option name. This helps you see the options that have changed when you've made a lot of settings changes at once. The asterisks remain until you click Apply or close the dialog. To see changes made in previous dialog sessions, click the Options History node in the tree. See Options History for more information.

Click Apply to save option changes and leave the dialog open, or click OK to save the changes and close the dialog. If you attempt to close the dialog by any other means, and if changes have been made but not yet applied, you are prompted to save the changes. When the Options dialog is closed, the view is saved and restored the next time the dialog is opened.

Navigating to Previously Viewed Panels

Some options link to other option panels, like options for Adaptive Formatting. To make it easy to get back to an option panel after clicking a link, Backward and Forward navigation buttons are available along the top right side of the dialog. These buttons let you navigate between previously viewed panels, similar to the Windows Explorer back/forward navigation features. Click the drop-down arrows to see lists of the previously viewed option panel. Click on an item in one of the lists to navigate to the panel directly.

Tip

  • If your mouse has Back and Forward navigation buttons, you can use them to navigate through previously viewed option panels.

  • If you prefer to use keyboard shortcuts, use Alt+Left and Alt+Right to navigate backward and forward, respectively. See Keyboard Shortcuts in the Options Dialog for more information about keyboard navigation.

Option Favorites

You can mark a frequently used options page as a favorite for quicker access. To add the current page to your favorites list, click the Add [OptionsPage] to Favorites button located at the bottom of the tree. After adding favorites, click the Show Favorites button located above the tree, and the tree changes to only show a list of nodes which are favorites or parents of favorites. Favorite nodes are displayed in bold type. To remove the selected favorite, click Remove from Favorites. To reset the tree to the default view, click Show All. Note that initiating a search while viewing Favorites causes the tree to reset as well.

Option Search

The dialog lets you search for keywords throughout the options with an incremental search field located at the top left of the dialog under Enter search text. As you type each character in the search box, the tree is filtered to show only nodes that contain the search text. The node that contains a match is displayed in bold type in the tree.

To perform a more in-depth search, check the Search descriptions checkbox. In the case that you do not find what you are looking for using the regular search, this will enable searching of help information included in the options dialog. This search will likely yield more results. Since the additional results will be more difficult to go through, this search is off by default.

To reset the tree and clear the search box, click the Clear button or press Alt+C. Note that viewing Favorites resets the tree and clears the search box as well.

After you have initiated a search, to see a list of search results, select the Search Results node. This node only appears in the tree (at the bottom of the list) after you have started a search. The search results are divided into columns showing the option name and the path to the option in the dialog. Double-click on an option to navigate to the corresponding option page. For options in forms embedded in the Options dialog, the results only show the name of the form. For example, if the Fixed Fonts Only option on the Fonts form was a match, the results show "Fonts" as the option name and "Appearance" as the path.

Keyboard Shortcuts in the Options Dialog

If you prefer to keep your hands on the keyboard, invoke the Options dialog with the config command and use keyboard shortcuts to navigate and change options.

Some quick tips:

  • Each time the dialog is displayed, the focus is in the Search box at the top left of the dialog. Use Tab to navigate through the elements on the dialog.

  • Use the Right and Left keys to expand and collapse nodes in the tree.

  • Prefix matching is supported for tree nodes and in property sheets. For example, if the Appearance node category is expanded and focus is in the tree, you can type "F" and the first node beginning with that letter is selected (Fonts). Likewise, if focus is at the top of the Appearance → General property sheet, you can type "C" and the first option beginning with "C" is selected (Cursor style). Note that only the current visible hierarchy of the tree is searched, and on property sheets, property group headings are not included in the search.

  • Use Alt+O to jump from the option tree to the option panel.

  • On property sheets, use F4 to toggle combo boxes up and down, enable numeric text boxes, and display color and directory pickers.

  • Press Enter to save changes and close the Options dialog, or Esc to prompt for changes before closing the dialog.

The table below describes all of the available shortcuts.

Summary

Keyboard Shortcut(s)

Description

Navigation

Alt+[ letter ] or Alt+[number]

Performs the following actions:

  • If neither form nor property sheet is visible, jumps to the first Alt-prefixed shortcut on the Options dialog proper (for example, Alt+C corresponds to the Clear button next to the Search field). Note that for most operating systems, Alt-prefixed shortcuts correspond to the underlined letters in labels on forms and dialogs.

  • If a form is visible, jumps to the first Alt-prefixed shortcut on the form (for example, in the Appearance → Colors form, Alt+E corresponds to the Screen element list).

  • If a property sheet is visible, jumps to the first option starting with that letter or number (for example, on the Appearance → General property sheet, Alt+T selects the first option that starts with a "T", which is Top of file line).

Navigation

Tab

Moves the focus to each area/button on the Options dialog. In a form, Tab moves between each area/button on the form until reaching the last element and placing focus back on the Options dialog proper. In a property sheet, Tab jumps back to the dialog proper.

Navigation

Up and Down

In the tree, moves up and down the visible nodes. In property sheets, moves up and down line-by-line. In combo boxes, moves up and down through the available settings.

Navigation (dialog to panel)

Shift+Tab

Jumps from the OK button on the Options dialog to the currently visible option panel.

Navigation (tree to panel)

Alt+O

Shifts focus from the tree to the currently visible option panel. Subsequently, if the panel is a property sheet, use the Up and Down keys to navigate through the options. If the panel is a form, use Tab to navigate through the elements on the form.

Navigation (between panels)

Alt+Left and Alt+Right

Navigates backward and forward, respectively, between previously viewed option panels. Same as using the Back and Forward buttons on the Options dialog.

Navigation or exit

Enter

Saves changes and closes the Options dialog, or, if inside a text box or combo box, shifts focus back to the option panel. Same as pressing OK on the Options dialog.

Navigation or exit

Esc

Prompts to save any changes and closes the Options dialog, or, inside a text box or combo box, shifts focus back to the option panel. Same as pressing Cancel on the Options dialog.

Expands/collapses tree nodes and enables property sheet controls

Right and Left

Expands/collapses nodes in the tree. In property sheets, enables numeric text boxes and drops down combo boxes (but not up).

Enables property sheet controls

F4

Toggles combo boxes up and down, enables numeric text boxes, and displays color and directory pickers.

Enables property sheet controls

Alt+Up and Alt+Down

Toggles combo boxes on property sheets up and down, respectively.

Enables property sheet controls

Space

In property sheets, enables a numeric text box and drops down combo boxes (but not up). In the Option Search results or Options History nodes, displays the selected option in the option panel (same as double-clicking).

Scrolling

Ctrl+Down and Ctrl+Up

Scrolls the option tree and long property sheets one line at a time.

Scrolling

PageUp and PageDown

Scrolls the option tree and long property sheets one page at a time.

Clears a directory/file name property

Delete

Clears a directory or file name field, resetting the default value.

Option search

Alt+C

Clears the Search box on the Options dialog. Same as using the Clear button. See Option Search for more information.

Option favorites

Alt+F

Adds or removes the selected node to or from your favorites list. Same as using the Add to Favorites or Remove from Favorites button on the Options dialog. See Option Favorites for more information.

Option favorites

Alt+S

Trims the tree to show only your favorite option nodes (same as the Show Favorites button), or displays all nodes again when viewing favorites (same as the Show All button). See Option Favorites for more information.

Save changes

Alt+A

Saves all option changes yet leaves the Options dialog displayed. Same as using the Apply button on the Options dialog.

Help

Alt+H

Displays the Help topic for the Options dialog.

Option Categories

The tree in the Options dialog (Tools → Options ) contains the following category nodes, which are described in subsequent sections:

  • Appearance Options

  • Keyboard and Mouse Options

  • Editing Options

  • Debugging

  • Language Options

  • File Options

  • Application Options

  • Network and Internet Options

  • Tool Options

  • Help Options

  • Options History

Appearance Options

Appearance options (Tools → Options → Appearance ) allow you to customize the look of SlickEdit®. You can change fonts and colors, specify which toolbars and tool windows to display, enable display of special characters, and more. Appearance option categories are:

  • General Appearance Options

  • Color Options

  • Symbol Coloring Options

  • Font Options

  • Toolbar Options

  • Preview Tool Window

  • Special Character Options

  • Advanced Appearance Options

General Appearance Options

General appearance options are shown below (Tools → Options → Appearance → General ).

The options are described as follows:

  • Horizontal scroll bar - When set to True, each editor window displays a horizontal scroll bar. This does not affect edit window controls on dialog boxes.

  • Vertical scroll bar - When set to True, each editor window displays a vertical scroll bar. This does not affect edit window controls on dialog boxes.

  • Window left margin - Specifies the amount of space, in inches, between the left edge of the window and the editor text. This option has no effect when there are bitmaps displayed in the left margin, since more space may be necessary to accommodate the size of the bitmap.

  • Cursor style - Specifies the style of the cursor (block/text mode style, or vertical).

  • Hide mouse pointer - When set to True, the mouse pointer is hidden when typing, but visible when moving the mouse or when a dialog box is displayed.

  • Vertical line column - Specifies the column in which the editor is to display a vertical line. When the value is set to 0, the vertical line is not displayed. The vertical line is not displayed in Unicode files or when using proportional fonts.

  • Vertical line color - Specifies the color of the vertical line when it is displayed.

  • Top of file line - When set to True, a line 0 is inserted at the top of each buffer with the text "Top of File". Does not affect lines of code. Note that rather than setting this option, you can press Ctrl+Shift+Enter (Ctrl+Enter in the Visual C++ and Visual Studio default emulations) to insert a new line above the line where the cursor is located.

  • List command line completions - When set to True, a pop-up list of possible commands and argument completions is displayed for partially typed commands and arguments on the SlickEdit® command line. See Command Line Completion for more information.

  • Change directory - When set to True, the current directory is changed in the editor when the directory is changed in the Change Directory dialog (File → Change Directory ) and the Open and Save As dialogs (File → Open and File → Save As ).

  • Show files beginning with a dot - (UNIX only) When set to True, the Show hidden files option on the UNIX Open and Save dialogs, and the Open tool window on all platforms, is checked by default. This value is also controlled by the configuration variable def_filelist_show_dotfiles.

  • Scroll style options include:

    • Smooth horizontal scroll - When set to True, editor windows scroll column-by-column when the cursor moves out of view. When set to False, the cursor is centered and the text is scrolled one-fourth the width of the window when the cursor moves out of view.

    • Smooth vertical scroll - When set to True, editor windows scroll line-by-line when the cursor moves out of view. When set to False, the cursor is centered and the text is scrolled half the height of the window when the cursor moves out of view.

    • Scroll when - Specifies how close (in number of lines) the cursor may get to the top or bottom of the window before scrolling occurs. Does not affect horizontal scrolling.

  • Current line highlight options include:

    • Current line highlight - Specifies the type of highlight to be drawn around the current line. When None is selected, the current line is not highlighted. When Draw box only is selected, a dotted box is drawn around the current line. When Tabs ruler is selected, a box is drawn around the current line with tab stops marked. When Syntax indent ruler is selected, a box is drawn around the current line with Syntax Indent levels marked. When Decimal ruler is selected, a box is drawn around the current line with marks at multiples of five and 10. For Unicode files or when using proportional fonts, only a box will be drawn.

    • Current line box color - Specifies the color of the box outline when Current line highlight is enabled.

    • Current line column color - Specifies the color for column markers when using a current line highlight with column indicators (Tabs, Syntax Indent, or Decimal rulers). Note that this is the same as the margin color.

  • Message list colors - Select from the following options that pertain to the Message List feature:

    • Message visited color - Specifies the color of the message in the Message List tool window after you have navigated to the associated code location.

    • Message modified color - Specifies the color of the message in the Message List tool window after the line at the associated code location has been modified.

Color Options

Color options are shown below ( Tools → Options → Appearance → Colors ). These options let you specify colors for screen elements in SlickEdit® and create and manage color schemes. See Colors for more information.

The options are described as follows:

  • Scheme - Specify the color scheme to use from the drop-down list. Several predefined schemes are available or you can define your own. See Using Color Schemes for more information.

    • Save Scheme As... - Allows you to save the current color settings as a new color scheme with a name you specify.

    • Reset Scheme - Resets a SlickEdit installed scheme back to its default configuration.

    • Delete Scheme - Deletes the selected color scheme. Only available for user color schemes.

    • Rename Scheme... - Allows you to rename the selected color scheme. Only available for user color schemes.

  • Associated symbol coloring scheme - Each color scheme is associated with a corresponding symbol coloring scheme. This is necessary in order to insure that the symbol colors are compatible with the base colors in the color scheme. When you switch color schemes, you also switch symbol coloring schemes.

    Press the Symbol Coloring... button to jump to the Symbol Coloring options dialog to take a closer look at the available schemes. For more information about symbol coloring, see Symbol Coloring.

  • Reset Colors - Restores all colors to the values they were when the Color Options dialog was invoked. All color changes to the selected scheme are saved when you exit the dialog or switch schemes.

  • Screen element - Select the screen element before changing the Foreground and Background colors. Most of the screen element items are obvious except for those in the following list. For a complete list of color elements, see Color Elements.

    • Window Text - This is the color of other text which is not a specific syntax element.

    • Attribute (XML and HTML only) - This is the color used for a recognized attribute of an XML or HTML tag. For example, in HTML, the src attribute of the img tag gets this color.

    • Cursor - This screen element is displayed in the active edit window when the cursor is placed on the command line. It is not the color of the blinking cursor.

    • Current Line, Current Selected Line, Selection - SlickEdit® will attempt to render these elements using your normal color settings for the Foreground color. The selected Foreground color will only be used if there is not enough contrast between the font colors to be readable. It is best to specify a Background color for these elements that is only a slight tint from your normal background color, ensuring that the color-coded text is still easy to read.

  • Foreground color - Click the color square to change colors for the selected element. The Color Picker dialog is displayed, allowing you to pick a color from the palette or set your own custom color using RGB values.

  • Background color - Click the color square to change colors for the selected element. The Color Picker dialog is displayed, allowing you to pick a color from the palette or set your own custom color using RGB values.

    The Embedded code option is used to define the background color to be used for source code which is embedded in another language. (for example, JavaScript embedded in an HTML file). For HTML, the 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 the color-coding lexer names to get embedded language color-coding. For an example, see Setting Colors for Screen Elements

    Only color elements recognized by Color Coding, current line, and selection colors have an embedded color option.

    Select the Inherit option to specify that the background color and embedded code color should be inherited from the basic Window Text color. This feature can be used to keep the background colors synchronized among editor color elements.

  • Use system default - When this option is selected, the operating system's default colors are used. Currently, this check box is only available for the Status and Message fields. For UNIX, the system default colors are selected by the editor and not the operating system.

  • Font style - For color-coded elements, you may choose whether the element is normal, bolded, italicized, or underlined. For example, keywords are bold by default.

  • Sample Text - Use the sample text and the embedded sample text to preview the foreground, background, and font attribute choices, both in normal code and embedded code.

  • Sample Code - Use the sample code text box to view your selected color scheme in a language of your choosing. You can also cut and paste small samples of text into this box in order to view specific items.

    Note

    Due to limitations in the Sample Code display, when you switch between color schemes with different background colors, the new color scheme will be automatically applied, as if you had pressed the Apply button.

Color Elements

Each of the following color elements which can be configured from within SlickEdit®.

  • General - These color options are for syntactic elements displayed in editor windows. They correspond to items defined in the language's Color Coding specification. For more information, see Color Coding.

    • Function - This color is used to highlight identifiers which are followed by an open parenthesis, provided the language's Color Coding options specify to color them as such. Note that this color can be easily overridden by Symbol Coloring. For more information, see Symbol Coloring

    • Identifier - This color is used to highlight symbols matching the identifier characters defined for the current language.

    • Keyword - This color is used to highlight identifiers which match one of the keywords defined in the Color Coding for the current language.

    • Library Symbol - This color is used to highlight identifiers which match one of the library symbols defined in the Color Coding for the current language.

    • Operator This color is used to highlight symbols and punctuation which match one of the operators defined in the Color Coding for the current language.

    • Preprocessor - This color is used to highlight preprocessor keywords defined in the Color Coding for the current language.

    • Punctuation - This color is used to highlight symbols and punctuation which match one of the punctuation symbols defined in the Color Coding for the current language.

    • Special Characters - This color is used for special characters such as tabs, newlines, and spaces. The color is only used when the option to view special characters is turned on either at the language level or for the current file.

    • User Defined Symbol - This color is used to highlight identifiers which match one of the user-defined symbols defined in the Color Coding for the current language.

    • Window Text - This color is used for all the text in an editor control which does not match one of the other color coding elements defined for the current language.

  • Selections - These color options are for text selections and the current line in the editor control.

    • Current Line - This color is used to highlight the current line under the cursor. Underlying items will be colored using their configured foreground color and the background color specified for the current line, unless there isn't sufficient contrast, in which the foreground color for the current line will be used.

    • Cursor - This screen element is displayed in the active edit window when the cursor is placed on the command line. It is not the color of the blinking cursor.

    • Selected Current Line - This color is used to highlight the current line under the cursor when in a selection. Underlying items will be colored using their configured foreground color and the background color specified for the current line, unless there isn't sufficient contrast, in which the foreground color for the current line will be used. Ideally, you should select a background for this color that is a combination of the Current Line and Selection colors.

    • Selection - This color is used to highlight selections within the editor.

  • Comments - These colors are used to highlight different comment types defined in the Color Coding specification for the current language. For more information, see Color Coding.

    • Block Comment - This color is used to highlight block comments.

    • Documentation Attribute - This color is used for attribute names within HTML and XML tags recognized within documentation comments.

    • Documentation Attribute Value - This color is used for attribute values within HTML and XML tags recognized within documentation comments.

    • Documentation Comment - This color is used for documentation comments. Three types of documentation comments are supported: JavaDoc, XMLDoc, and Doxygen.

    • Documentation Keyword - This color is used for documentation comment keywords and HTML and XML tag names recognized within documentation comments.

    • Documentation Punctuation - This color is used for punctuation used for HTML and XML tags recognized within documentation comments.

    • Inactive Code - This color is used for inactive code regions recognized by color coding. Inactive code regions are found in languages that support C/C++ style preprocessing provided the option to color inactive code regions is enabled for the current language.

    • Inactive Code Keyword - This color is used for keywords within inactive code regions. Generally, the colors chosen for inactive code are such that the code appears to be grayed out. Highlighting keywords helps make inactive code still look somewhat like code, as apposed to just looking like block comments.

    • Inactive Code Comment - This color is used for comments within inactive code regions. Generally, the colors chosen for inactive code are such that the code appears to be grayed out. Highlighting comments helps make inactive code still look slightly more like normal code.

    • Line Comment - This color is used for line comments.

  • Strings - These colors are used to highlight different string types defined in the Color Coding specification for the current language. For more information, see Color Coding.

    • Backquoted String - This color is used for strings which use the backwards single quote character as a delimiter, such as found in shell scripts and Perl. Because the contents of these strings are executed and evaluated, it is important to be able to visually distinguish this kind of string from a common literal string.

    • Single Quoted String - This color is used for strings and character literals which use the single quote character as a delimiter. Because these are usually character literals, it is useful to be able to distinguish between them and double quoted strings.

    • String - This is the general string color, used for double quoted strings, regular expressions, and anything else that is regarded as a string literal by the color coding engine. For example, this color is also used for here-documents when they have no embedded language.

    • Unterminated String - This color is used for the background of the right hand side of the line when the string does not yet have a closing quote. You can disable this coloring simply by allowing it to inherit it's background color from Window Text.

  • Numbers - These colors are used to highlight different numeric types defined in the Color Coding specification for the current language. For more information, see Color Coding.

    • Floating Point Number - This color is used to highlight floating point numbers.

    • Hexadecimal Number - This color is used to highlight numbers specified in hexadecimal format.

    • Line Number - This color is used to highlight line numbers. This is different from the View → Line Numbers display option. This option is for coded line numbers, such as that found in dialects of Basic and COBOL.

    • Number - This color is used for all other numeric constants recognized by the Color Coding engine.

  • HTML and XML -

    • Attribute - This is the color used for a recognized attribute of an XML or HTML tag. For example, in HTML, the src attribute of the img tag gets this color. Unrecognized attributes are colored using the Window Text color. Attribute values are colored using the String color.

    • Unknown Tag Name - This is the color used for unrecognized XML or HTML tags. If an XML document has no DTD or Schema, all the tags in the document will be colored using this color. Recognized XML and HTML tags are colored using the Keyword color.

    • XHTML Element in XSL - This color is used for an XHTML element in an XSL style sheet.

  • Modifications - These color are used to show change bars in the left margin, as well as in DIFFzilla® to highlight changes.

    • Inserted Line - This color is used in the left-hand margin for lines that have been inserted into the current file since you started editing it. It is only displayed if you have Modified Lines coloring enabled for the current language. See Language-Specific General Options for more information.

    • Modified Line - This color is used in the left-hand margin for lines that have been changed in the current file since you started editing it. It is only displayed if you have Modified Lines coloring enabled for the current language. See Language-Specific General Options for more information.

    • Modified Whitespace - This color is used in DIFFzilla® when doing a source diff (ignoring whitespace). It is used to highlight locations where whitespace has been inserted, removed, or changed. To disable display of modified whitespace in DIFFzilla®, set the background for this color to inherit from Window Text.

    • No Save Line - This color is used to display lines which are shown in the editor or DIFFzilla® which will not be saved when the file is saved. These lines are also known as imaginary lines. This color is also used for the top-of-file line.

  • Highlighting - These color are used for various types of text highlighting used to display search results.

    • Block Matching - This color is used to highlight matching parentheses, braces, brackets, and keyword begin-end pairs. The behavior of this option is language-specific.

    • Filename - This color is used in the Search Results tool window to highlight file names. It is not used for file names in source code or for names displayed in the File Manager.

    • Hex Mode - This color is used to display hexadecimal characters when displaying text in hex mode or line hex mode.

    • Highlight - This color is used to highlight word matches found by word completion.

    • Incremental Search Current Match - This color is used to highlight the current matching word when doing an incremental search.

    • Incremental Search Highlight - This color is used to highlight matches to the current incremental search expression.

    • Symbol Highlight - This color is used to highlight other references to the current symbol under the cursor within the current file.

  • Margins - These colors are used for various marker lines and the left-hand indicator margin.

    • Current Line Box - This color is used for the box drawn around the current line or the ruler line drawn around the current line if a Current line highlight option is enabled. See Current line highlight for more information.

    • Line Prefix Area - This color is used for the background of the left-hand indicator margin and for line numbers when the View → Line Numbers display option is on.

    • Line Prefix Divider Line - This color is used to draw the single thin line between the left-hand indicator margin and the editor control text area.

    • Margin Column Line(s) - This color is used to draw a thin vertical line where the word-wrap margins are set. This line is only displayed if word-wrap is enabled for the current file. This option does not apply to comment formatting or HTML and XML text wrap options. See Language-Specific Word Wrap Options for more information.

    • Truncation Column Line - This color is used to draw a hard vertical line at the column where this file is to be truncated. This option is only used, generally, for languages with fixed line length restrictions, such as COBOL or certain dialects of assembly. See Truncation Column for more information.

    • Vertical Column Line - This color is used to draw a thin vertical line at the column designated as the vertical column line. This line simply gives you a visual indicator when the current line may be getting longer than allowed by your coding conventions. See Vertical line column for more information.

  • Application Colors - The following colors are used to configure specific elements of the GUI displayed outside of the editor windows themselves.

    • Message - This color is used for the text displayed in the message bar found on the lower, left-hand side of the main SlickEdit® window.

    • Modified file - This color is used in the File Tabs tool window and the Files tool window to indicate that the current file has unsaved modifications.

    • Modified variable - This color is used in the debugger tool window and the to indicate that the the value of a variable or watch has changed in the last debug stepping operation.

    • Status - This color is used for the text displayed in the status bar found on the lower, right-hand side of the main SlickEdit® window.

Symbol Coloring Options

Symbol Coloring options are shown below ( Tools → Options → Appearance → Symbol Coloring ). These options let you specify colors for symbols identified using Context Tagging® and create and manage symbol coloring schemes. See Symbol Coloring Schemes for more information.

Symbol Coloring settings

The options are described as follows:

  • Scheme - Specify the symbol coloring scheme to use from the drop-down list. Several predefined schemes are available or you can define your own. See Selecting a Symbol Coloring Scheme for more information.

    • Save As... - Allows you to save the current symbol coloring scheme as a new scheme with a name you specify.

    • Reset Scheme - Allows you to reset a modified system scheme back to its original configuration.

    • Delete Scheme - Deletes the selected symbol coloring scheme. Only available for user-created schemes.

    • Rename... - Allows you to rename the selected symbol coloring scheme. Only available for user-created schemes.

    • Compatible with and Edit Compatibility... - Each symbol coloring scheme can, optionally, be associated with a set of color schemes that it is compatible with. This is necessary in order to insure that the symbol colors are compatible with the base colors in the color scheme. If a scheme does not list any specific compatible color schemes, it will be regarded as compatible with all color schemes. For example, the Protected and Private scheme only changes font attributes and is therefore compatible with any color scheme.

      Press the Edit Compatibility... button to select which color schemes which are compatible with the currently selected symbol coloring scheme.

      Generally, compatibility hinges on the amount of contrast between the selection of foreground colors in the symbol coloring scheme and the selection of background color in the base color scheme. This is why the standard schemes are classified, generally, as Light and Dark background.

  • Rule list - The symbol coloring rules are presented in order of precedence. Symbol coloring rules are matched in order from the top to bottom. For a symbol to match a rule, it must be the first rule in the symbol coloring scheme that matches all of the requirements. See Color Rules for detailed descriptions of each of the standard symbol coloring rules shipped with SlickEdit®.

    • Rule name - This is the name of the symbol coloring rule.

    • Symbol declaration - This column contains a synopsis of the symbol coloring rule, including the types it matches, it's attribute requirements, and regular expressions, if applicable. It is rendered using color and font attributes specified for the rule. This is also why this column appears to have a different background in color schemes which have a non-white background.

    • Add rule - Click the plus bitmap to add a new symbol coloring rule. Focus will be placed on the rule name field.

    • Move Up - Use the up arrow button to move the currently selected rule up one position in the list precedence. Remember that rules are applied in order of precedence.

    • Move Down - Use the down arrow button to move the currently selected rule down one position in the list precedence. Remember that rules are applied in order of precedence.

    • Delete rule - Use the delete button to delete the currently selected rule.

  • Rule name - This is the name of the rule. Press Tab or Enter to apply your changes after editing the name of the currently selected symbol coloring rule.

  • Color and font attributes - Use this panel to select how symbols which match the current symbol coloring rule will be rendered in the editor.

    • Base color on rule - A symbol coloring rule can selectively inherit parts of it's color information from another symbol coloring rule within the currently selected symbol coloring scheme. It can also inherit color information from certain colors from the basic color scheme, listed below.

      • --Window Text-- - This color is used for all the text in an editor control which does not match one of the other color coding elements defined for the current language.

      • --Function-- - This color is used to highlight identifiers which are followed by an open parenthesis, provided the language's Color Coding options specify to color them as such.

      • --Preprocessor-- - This color is used to highlight preprocessor keywords defined in the Color Coding for the current language.

      • --Library Symbol-- This color is used to highlight identifiers which match one of the library symbols defined in the Color Coding for the current language.

      • --User Defined Symbol-- This color is used to highlight identifiers which match one of the user-defined symbols defined in the Color Coding for the current language.

      • --Highlight-- This color is used to highlight word matches found by word completion.

      • --Symbol Highlight-- This color is used to highlight other references to the current symbol under the cursor within the current file.

    • Foreground - Select Inherit to inherit the foreground color from the base color. If Inherit is unchecked, you can click on the color sample to change the foreground color for this symbol coloring rule. If Inherit is checked, the inherited foreground color will be displayed, but clicking on the sample to change it will be disabled.

    • Background - Select Inherit to inherit the background color from the base color. If Inherit is unchecked, you can click on the color sample to change the background color for this symbol coloring rule. If Inherit is checked, the inherited background color will be displayed, but clicking on the sample to change it will be disabled.

      For best results, you almost always want the symbol color to inherit it's background color instead of setting it's own.

    • Font attributes - Select Inherit font to inherit the font attributes from the base color. If Inherit is unchecked, you can click on Normal, Bold, Italic, or Underline to select font attributes for this symbol coloring rule. Note that font attributes can not be combined. If Inherit is checked, the inherited font attribute will be checked, but all the font attribute choices will be disabled.

      Note

      For certain languages, identifiers which are followed by a parenthesis are colored using "Function" color, as configured in the Color Options dialog. Typically, this will make those identifiers bold. Symbol coloring will preserve this information and propagate the font attributes for "Function" color forward when highlighting an identifier which is followed by a parenthesis. This makes it possible, for example, to visually distinguish between constant-like defines and function-like defines in a language such as C++.

    • Sample Text - The sample text shows what the symbol coloring text might look like in the editor. The text is rendered in the same font as used in the editor for SBCS/DBCS Source Windows.

  • Symbol types - A matching symbol's type must be one of the specified types. The special *SYMBOL NOT FOUND* type is used to identify symbols which Context Tagging® can not locate. See Symbol types for detailed descriptions of each symbol type.

  • Symbol attributes - The attributes can be either required, ignored, or disallowed. A matching symbol must have all the required attributes, and none of the disallowed attributes. See Symbol attributes for detailed descriptions of each symbol attribute.

  • Regular expression matching - In addition to the symbol type and attribute specifications, you can further refine a symbol coloring rule by adding a Class name or Symbol name regular expression, using the regular expression syntax of your choice. The class name regular expression is matched against the name of the scope (class, package, struct) which a symbol is defined in. Do not confuse this with the name of the scope in which the symbol is used. The symbol name regular expression is matched against the name of the symbol. For example, a Wildcards expression of "vs*" would match all symbols starting with the characters "vs". Case sensitivity for the regular expression matching is regulated by the language's case-sensitivity. See Color Coding for more information.

    • Use - This allows you to select the regular expression syntax you prefer to use for this symbol coloring rule's class and symbol name regular expressions. See Regular Expressions for more information.

    • Class name - A matching symbol must belong to a class matching the regular expression.

    • Symbol name - A matching symbol's name must match the regular expression.

Symbol types

The following symbol types may be included in a symbol coloring rule. A rule can include as many symbol types as it requires, and sometimes that is necessary to create a rule with enough generality. For example, to make a rule that matched any kind of constant value, you would need to include: Constant, Enumeration value, and Preprocessor macro.

  • *SYMBOL NOT FOUND* - This is a special symbol type used when a symbol found in the editor is not recognized by Context Tagging®. This type is useful to have in a single rule as a rudimentary form of error checking.

    Warning

    Context Tagging® tries very hard to correctly recognize symbols, but it is not as accurate as your language's compiler. There are situations where a symbol will be highlighted as unknown, even though it is not strictly an error. This is particularly true for dynamic languages and languages that depend heavily on implicit declarations of local variables, such as most popular scripting langauges.

    Note

    Highlighting of unknown symbols can be turned off on a per-language basis. This is a good idea for languages that are dynamically typed or have implicit declarations. It is also a good idea for Java because highlighting unknown symbols overlaps with the functionality provided by Java Live Errors.

  • Annotation or attribute instance - This is metadata. Examples include the use of a Java annotation or C# attribute in code.

  • Annotation or attribute type - This is the definition of a metadata type. Examples include a Java annotation type or C# attribute class.

  • Class constructor - This is a constructor for a class in an object-oriented language. Note that in some languages, constructors are treated as functions with a Constructor symbol attirbute.

  • Class destructor - This is the destructor for a class in an object-oriented language. Note that in some languages, destructors are treated as functions with a Destructor symbol attirbute.

  • Class property - This is a property variable within a class type, as found in C#, Visual Basic .NET, and Managed C++.

  • Class type - This type is used for classes in object oriented languages.

  • Constant - This is a named literal constant.

  • Container variable - This is used for a container (or group) variable, as found in COBOL data sections. A container variable is like an transparent structure type.

  • Control or widget - This is used for a control type in languages that have built-in support for user interfaces, such as Slick-C®.

  • Database - This type is used for the name of a database. It only applies to SQL dialects.

  • Database column - This type is used for the column name of a database table. It only applies to SQL dialects.

  • Database cursor - This type is used for a database cursor type. It only applies to SQL dialects.

  • Database index - This type is used for a database index name. It only applies to SQL dialects.

  • Database table - This type is used for a database table name. It only applies to SQL dialects.

  • Database trigger - This type is used for a database trigger definition. It only applies to SQL dialects.

  • Database view - This type is used for a database view name. It only applies to SQL dialects.

  • Enumerated type - This type is used for type names of enumerated types.

  • Enumeration value - This type is used for the names of the constants defined in an enumerated type.

  • Event table - This type is used for event tables, as found in languages that have built-in support for graphical user interfaces, such as Slick-C®.

  • File descriptor - This is a COBOL file descriptor declaration.

  • Form - This type is used for form or dialog names, as found in languages that have built-in support for graphical user interfaces, such as Slick-C®.

  • Friend relationship - This type is used for friend relationships. Note that friend relationships refer to other symbols, so a symbol coloring rule that colored friend relationships would only color the actual friend relationship declaration, not uses of the symbol that depended on the friend relationship.

  • Function - This type is used for function names, both global functions and class member functions.

  • Function prototype - This type is used for a function declaration, both global and abstract class member functions.

  • Global variable - This type is used for global variables and variables declared at the namespace or package level. It does not apply to local variables or member variables.

  • Interface type - This is a class interface declaration, as found in most object-oriented languages.

  • Library - This is a library module type, as found in Pascal.

  • Local variable - This is a local variable, that is, a variable declared within the scope of a function.

  • Member variable - This is a class member variable or the member of a structured or record type or variable declared in a COBOL data section.

  • Menu - This type is used for menu names, as found in languages that have built-in support for graphical user interfaces, such as Slick-C®.

  • Mixin construct - This type is used for class mixin statements, as found in the D Programming Language. Note that, like friends, mixin's are only detected at the point of use. A function or variable pulled into a class through a mixin will not be considered as a mixin type.

  • Nested function - This type is used for functions which are nested inside of other functions or procedures, as found in Pascal, Ada, and other languages.

  • Nested procedure or paragraph - This type is used for procedures which are nested inside of other functions or procedures. It is also used for COBOL paragraphs.

  • Package import or using statement - This type is used for an import or using statement. Note that that imports are only detected at point of use. A class or function pulled into a module through an import will not be considered as an import type.

  • Package, module, or namespace - This type is used for package, module, or namespace names used to divide code into logical boundaries.

  • Parameter - This type is used for the names of formal parameters to a function or procedure. It can also be used for template parameter names in class templates.

  • Preprocessor include - This type is used for a preprocessor include statement or COBOL copy book.

  • Preprocessor macro - This type is used for a preprocessor macro (for example, a #define in C and C++).

  • Procedure or command - This type is used for procedure names, both global and class members. It is also used for command names in languages that support command types.

  • Procedure prototype - Type type is used for procedure declarations, that is, forward declarations of procedures.

  • Program - This type is used for program names, as found in Pascal, Cobol, and other languages.

  • Statement label - This type is used for statement labels within functions or in assembly language code.

  • Structure type - This type is used for struct types or record types.

  • Task - This type is used for tasks, as found in Ada and Verilog dialects.

  • Type alias - This type is used for a type definition name, or type alias.

  • Union type - This type is used for union types, also known as variant types.

Symbol attributes

The following symbol attributes may be required or excluded in a symbol coloring rule. Each attribute can be in one of three states:

  1. If the attribute is checked, then it is required to be set for a symbol to match the rule. For example, if you check the Inline function attribute then the rule will only match functions that are recognized as inline, as in C++.

  2. If the attribute is unchecked, then it is required to be unset for a symbol to match the rule. For example, if you uncheck the Abstract attribute then the rule will only match functions which are not recognized as abstract (also known as pure virtual in C++).

  3. If the attribute is in the grayed state, then it is ignored with respect to rule matching.

Some attributes are mutually exclusive, such as Public, Protected, Package, and Private. In these cases, checking two mutually exclusive attributes will produce a rule which will not match anything. Instead, you need to use boolean logic and create a rule which unchecks the mutually exclusive attributes that you do not want.

  • 01 level in Cobol linkage section - Variables at the 01 level in COBOL data sections are given this flag to indicate that they are at the top-most level of the data section. This may be a very useful attribute to configure specialized coloring for if you are a Cobol programmer.

  • Abstract - This attribute is set for abstract classes as well as pure-virtual methods or abstract methods within a class definition.

  • Ambiguous prototype/var declaration - In C and C++ and some other languages, there is an ambiguity in syntax between function prototype declarations and variable declarations with initializers. See the example below, not knowning type information, it could either be the prototype for a function named ambiguousDeclaration which returns a ClassName and takes one parameter of type Argument, or a variable named the same thing which is of type ClassName and is initialized with Argument.

                    ClassName ambiguousDeclaration(Argument);

  • Class constructor - This attribute is set for functions or procedures which act as a class constructor or static initalizer for a class type.

  • Class destructor - This attribute is set for class destructors.

  • Const - This attribute is set for variables which are declared with a const return type, meaning that they can not be modified, or that they point to data which can not be modified. It is also set for class member functions that are declared as const, meaning that the function is not allowed to modify members of the class or call other non-const functions.

  • Created by preprocessor macro - This attribute is set for symbols which are declared in a section of code that was expanded from a preprocessor macro, for exmaple, in C++ where it is common to use preprocessor macros to generate code.

  • External function or data - This attribute is set for functions or global variables which are declared as extern, meaning that they are defined in another module.

  • Final - This attribute is set for functions which can not be overridden in derived classes. It is also set for variables, for example, in Java, which are initialized only once and do not change.

  • Forward declaration - This attribute is set for a forward declaration of a symbol. Since there is a separate symbol type for function prototypes, this attribute is primarily used for forward declarations of classes and structured types.

  • Ignore/placeholder - This attribute is set for symbols which are merely placeholders, and should be ignored by symbol searches.

  • Inline function - This attribute is set for functions which are marked as inline, meaning that instead of being compiled into separate functions, their function bodies may be pulled inline at the point where the function is called.

  • Member of class or package - This attribute is set for symbols which are declared inside a class, package, namespace, or other structured type.

  • Mutable - This attribute is set for variables which are declared as mutable in, for example, C++.

  • Native code function - This attribute is set for functions which are implemented in native code, for example, in Java, where certain functions are implemented in DLLs for better performance.

  • Opaque enumerated type - In C++, the constants declared in an enumerated type do not need to be qualified with the name of the enumerated type. In this sense, they are transparent. In certain other languages, enumeration constants need to be qualified with the name of the enumerated type. These are considered as opaque. This attribute is set for enumerated types whose constants are opaque.

  • Overloaded operator - This attribute is set for functions whose purpose is to overload standard language operators, such as multiplication, division, assignment.

  • Package scope - This attribute is set for symbols which are scoped at the package or namespace level. They are visible within the package they are declared in, but considered as private outside of that package. Package scope is the default scope in Java if no other scope (public, protected, or private) is specified.

  • Part of an external file - This attribute is set for symbols which are declared in an external file which was parsed as part of the process of parsing the current file. For example, this attribute is set for symbols in COBOL copy books.

  • Partial class - This attribute is set for classes which are marked as partial, meaning that the complete class definition may be spread across several modules.

  • Private scope - This attribute is set for symbols declared in classes which have private scope. These symbols are visible within the class they are declared in, but not in derived classes, and not outside of the declaring class.

  • Protected scope - This attribute is set for symbols declared in classes which have protected scope. These symbols are visible within the the class they are declared in, derived classes, but not outside of the declaring class.

  • Public scope - This attribute is set for symbols declared in classes which have public scope. These symbols are visible everywhere. Note that in many languages, public scope is the default scope if none is otherwise specified (private, protected, or package).

  • Static - This attribute is set for symbols which are marked as static. The static attribute can be applied in several contexts:

    • Local variables which are marked as static will retain their last value between function calls.

    • Global variables and functions which are marked as static are visible only with the current module or compilation unit.

    • Class members which are marked as static do not require an instance of the class in order to be accessed. In many respects, they are like globals, but scoped within the class declaration.

  • Synchronized - The synchronized attribute is set for functions which are marked as synchronized, meaning that the function is not re-entrant and can not allow two threads to enter it at the same time.

  • Template or generic - The template attribute is set for class and function templates, also known as generic functions or generic classes.

  • Transient data - The transient attribute is set for variables which contain non-persistent data. This is a Java-specific attribute.

  • Unnamed structure - This attribute is used for anonymous structure types and other anonymous (unnamed) types.

  • Virtual function - This attribute is used for virtual functions in class definitions.

  • Volatile - This attribute is used for variables and functions which are marked as volatile. A volatile variable is one whose value can change unpredictably, such as a memory address that echos the value of the system clock. A volatile function is one that accesses a volatile variable.

Color Rules

The standard color rules in the All symbols - Default symbol coloring scheme are described below. These same rules are used in most all the standard symbol coloring schemes, just with different colors, or a subset of the rules.

The list below not only explains the rule types, but also tries to explain the reasoning behind the coloring choices that were made for various rules.

  • Local variable - This rule matches local variables within a function, excluding static local variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window.

  • Static local variable - This rule matches static local variables. It is colored slightly more blue that the variable rule, in order to indicate the static (or frozen) nature of the local variable.

  • Parameter - This rule matches function parameter names and template argument names. Like local variables, they are colored green, matching the color used for variables in the Defs tool window.

  • Public member variable - This rule matches public member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window.

  • Package member variable - This rule matches package scope member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window.

  • Protected member variable - This rule matches protected member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Private member variable - This rule matches private member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Public static member variable - This rule matches public member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the variable.

  • Package static member variable - This rule matches package scope member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the variable.

  • Protected static member variable - This rule matches protected static member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the variable. Protected and private members are shown in italic in order to indicate their limited scope.

  • Private static member variable - This rule matches private static member variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the variable. Protected and private members are shown in italic in order to indicate their limited scope.

  • Global variable - This rule matches global variables. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window.

  • Static global variable - This rule matches static global variables, which are visible only within the current module. In most schemes, variable types are colored green, mirroring the color used for variables in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the variable.

  • Global function - This rule matches global functions and functions declared within namespaces and packages. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window.

  • Static global function - This rule matches static global functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the function.

  • Class constructor - This rule matches class constructors. Class constructors, destructots, and class names are colored blue, mirroring the color used for Class constructors and destructors in the Defs tool window.

  • Class destructor - This rule matches class destructors. Class constructors, destructots, and class names are colored blue, mirroring the color used for Class constructors and destructors in the Defs tool window.

  • Public member function - This rule matches public class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window.

  • Package member function - This rule matches package scope class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window.

  • Protected member function - This rule matches protected scope class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Private member function - This rule matches private scope class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Public static member function - This rule matches public static class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the function.

  • Package static member function - This rule matches package scope static lass member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the function.

  • Protected static member function - This rule matches protected static class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the function. Protected and private members are shown in italic in order to indicate their limited scope.

  • Private static member function - This rule matches private static class member functions. In most schemes, functions are colored magenta, mirroring the color used for functions, procedures, and prototypes in the Defs tool window. It is colored slightly more blue, in order to indicate the static nature of the function. Protected and private members are shown in italic in order to indicate their limited scope.

  • Public class property - This rule matches public class property names. In most schemes, properties are colored cyan, mirorring the color used for properties in the Defs tool window.

  • Package class property - This rule matches package scope class property names. In most schemes, properties are colored cyan, mirorring the color used for properties in the Defs tool window.

  • Protected class property - This rule matches protected class property names. In most schemes, properties are colored cyan, mirorring the color used for properties in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Private class property - This rule matches private class property names. In most schemes, properties are colored cyan, mirorring the color used for properties in the Defs tool window. Protected and private members are shown in italic in order to indicate their limited scope.

  • Class - This rule matches Class names. Class names are colored blue, mirroring the color used for class constructors in the Defs tool window.

  • Template class - This rule matches template or generic class names. Class names are colored blue, mirroring the color used for class constructors in the Defs tool window.

  • Abstract class - This rule matches an abstract class name. Class names are colored blue, mirroring the color used for class constructors in the Defs tool window.

  • Interface class - This rule matches class interface names. Class and interface names are colored blue, mirroring the color used for class constructors in the Defs tool window.

  • Struct - This rule matches a structured type, such as a struct in C/C++ or a record type in Pascal or Modula. Structure types are colore blue-green.

  • Union or variant type - This rule matches union types or variant record types in Pascal. They are colored yellow, mirroring the color used for union types in the Defs tool window.

  • Type definition or alias - This rule matches type definitions or type aliases.

  • Preprocessor macro - This rule matches preprocessor macro names. The color inherits it's color from the preprocessor keyword color of the base color scheme.

  • Package or namespace - This rule matches a package or namespace name. In most schemes, they are colored red, mirroring the color used for package, namespace, and programs in the Defs tool window.

  • Symbolic constant - This rule matches symbol constants used to give names to constant literal values. In most schemes, they are colored gray, mirroring the color used for constants in the Defs tool window.

  • Enumerated type or constant - This rule matches enumerated types and constants defined in enumerated types. In most schemes, they are colored cyan, mirroring the color used for enums in the Defs tool window.

  • Statement label - This rule matches statement labels. They are colored blue, matching the color used for labels in the Defs tool window.

  • Symbol not found - This rule is present as a catch-all for the case where a symbol is not found by Context Tagging®. It is colored bright red in order to indicate that there is a fair likelihood that the source file contains an error.

Font Options

You can specify which fonts are used by the command line, status text, and other screen elements using the options shown below (Tools → Options → Appearance → Fonts ). If you want to change the font used in editor windows, use Window → Font instead. See Fonts for more information about changing fonts and a list of recommendations.

The options are described as follows:

  • Element - This drop-down contains the screen elements for which fonts can be changed. When an element is selected, the font type and size will automatically adjust to the current settings for that element, and a preview of the font will be displayed in the Sample area. Select from the following elements:

    • Command Line - The SlickEdit® command line displayed at the bottom of the application window.

    • Status Line - For status messages displayed at the bottom of the application window.

    • SBCS/DBCS Source Windows - Editor windows that are displaying non-Unicode content (for example, plain text).

    • Hex Source Windows - Editor windows that are being viewed in Hex mode (View → Hex ).

    • Unicode Source Windows - Editor windows that are displaying Unicode content (for example, XML).

    • File Manager Windows - Controls the display of the SlickEdit® File Manager (File → File Manager ).

    • Diff Editor Source Windows - The editor windows used by DIFFzilla®.

    • Parameter Info - Controls the fonts used to display pop-ups with information about symbols and parameters.

    • Parameter Info Fixed - Used when SlickEdit® needs to display a fixed-width font for parameter info, such as when displaying example code.

    • Selection List - The font used for selection lists, like the buffer list (Document → List Buffers ).

    • Dialog - Controls the font used in SlickEdit® dialogs and tool windows.

    • HTML Proportional - The default font used by HTML controls for proportional fonts. In particular, this affects the Version Control History dialog, the About SlickEdit dialog, and the Cool Features dialog.

    • HTML Fixed - The default font used by HTML controls for fixed-space fonts.

  • Font and Size - The Font and Size fields allow you to make typeface and point size changes to the selected screen element. The fonts that are listed are the fonts that are installed on your computer.

  • Style - Styles, such as bold and italic, can be set to affect the selected font.

  • Sample area - This area provides a preview of the selected font, size, and style.

  • Fixed Fonts Only - Select this option to display only fixed fonts in the Font field. By default, this option is not selected.

  • Use fixed spacing for bold and italic fixed Unicode fonts - (Unicode support required) When this option is selected, and a fixed font is selected for a Unicode source window, bold and italic color-coding is supported. Since this requires the Unicode text to be converted to the active code page, some characters may be displayed incorrectly. The current editor display engine ignores bold and italic settings for proportional fonts or fixed Unicode fonts (which are treated like proportional fonts).

  • Script (Windows only) - Choose Default unless you are editing files that have characters not in the active code pages. Choose Western to use the typical English characters.

Toolbar Options

Toolbar options (Tools → Options → Appearance → Toolbars ) let you modify, create, and change the behavior of toolbars. You can also access these options from the main menu by selecting View → Toolbars → Customize or by right-clicking on the toolbar and selecting Customize. See Toolbars and Tool Windows for more information.

The options are divided into three tabs:

  • Toolbar Options, Toolbars Tab

  • Toolbar Options, Categories Tab

  • Toolbar Options, Options Tab

Toolbar Options, Toolbars Tab

The Toolbars tab contains a list of the default toolbars within SlickEdit®, and settings made here affect each toolbar individually.

The following options are available:

  • New - Creates a new, empty toolbar.

  • Rename - Renames the selected toolbar. Note that you can only rename custom toolbars.

  • Delete - Deletes the selected toolbar. Note that you can only delete custom toolbars.

  • Reset - Restores the default buttons to the selected toolbar (not applicable for custom toolbars).

  • Visible - When checked, the selected toolbar is displayed, if it is not already displayed. When unchecked, the selected toolbar is closed.

  • Always on top - When checked, the selected toolbar, when not docked, will remain on top of the editor window.

  • Allow docking - When unchecked, the selected toolbar, when non-docked, cannot accidentally be docked.

Toolbar Options, Categories Tab

This tab categorizes the toolbar controls (buttons) and allows you to drag and drop them onto existing toolbars.

Select a category from the Categories list and the associated controls are displayed in the Controls box. To add a control, click on the control you wish to add, and drag it onto a toolbar. To remove a control, drag it from the toolbar onto the Categories screen. See also Toolbar Control Properties Dialog.

Toolbar Options, Options Tab

The Options tab contains settings that apply to all toolbars.

The following options are available:

  • Toolbar button size and spacing - Specify the size of buttons and the amount of vertical and horizontal spacing between buttons on a toolbar. Click Apply to save changes.

  • Show tool tips - When set to True, pop-up tool tips are displayed when the mouse pointer rolls over a button. This option is global to all toolbars.

  • Delay (ms) - Specifies the delay, in thousands of a second, before tool tips are displayed when Show tool tips is enabled.

  • Hide when application is inactive - When checked, non-docked toolbars are hidden when you switch to another application. When you switch back to SlickEdit®, the toolbar is made visible again. This option is global to all toolbars.

Tool Window Options

Tool Windows Options (Tools → Options → Appearance → Tool Windows ) let you control the behavior of tool windows. You can also access these options from the main menu by selecting View → Tool Windows → Customize or by right-clicking on any tool window's title bar (or on UNIX/Mac, the tool window's background) and selecting Customize.

Tool Window Options, Tool Windows Tab

The Tool Windows tab allows you to set visibility options for each tool window.

The following options are available:

  • Visible - When checked, the selected tool window is displayed, if it is not already displayed. When unchecked, the selected tool window is closed.

  • Always on top - When checked, the selected tool window, when non-docked, will remain on top of the editor window.

  • Allow docking - When unchecked, the selected tool window, when non-docked, cannot accidentally be docked.

  • ESC dismisses floating window - When checked, pressing Esc on a floating tool window (not a docked or auto-hide window) will dismiss the tool window as if it were a dialog. When unchecked, pressing Esc on a floating tool window puts focus back to the active MDI child.

Tip

Pressing Esc on a docked tool window puts focus back to the active MDI child. Pressing Esc on an auto-hide tool window will hide the tool window.

Tool Window, Options Tab

The Options tab provides general options to control the behavior of all tool windows.

  • Close button affects active tab only - When checked, the Close button on a tool window will close only that tool window. When unchecked, and the tool window is tab-linked with other tool windows, all tab-linked tool windows are closed. By default, this option is selected.

  • Auto Hide button affects active tab only - When checked, the Auto Hide button (the Pushpin button) on a tool window will auto-hide only that tool window. When unchecked, and the tool window is tab linked with other tool windows, all tab-linked tool windows are auto-hidden. Auto-hidden tool windows are displayed in the dock channel on the side of the editor where they were auto-hidden. By default, this option is not selected.

  • Animate tool windows - When checked, auto-hide and auto-show of tool windows is animated. When unchecked, tool windows are shown and hidden immediately. By default, this option is selected.

  • Speed - When Animate tool windows is checked, a slider is used to adjust the speed of animation during auto-hide and auto-show. Adjust positive (+) to increase speed and negative (-) to decrease speed. By default, the speed is set to medium.

  • Auto show tool window on mouse over - When checked, auto-hidden tool windows are auto-displayed when the mouse is over the item in the dock channel. Delay specifies how long to wait (in tenths of a second) before the mouse triggers an auto-hidden tool window to auto-display.

  • Auto hide delay - Specifies how long to wait (in tenths of a second) before an auto-displayed tool window auto-hides itself.

  • Hide when application is inactive - When checked, non-docked tool windows are hidden when you switch to another application. When you switch back to SlickEdit®, the tool window is made visible again. This option is global to all tool windows.

Preview Tool Window

These options are used to control when the Preview window is activated with a new symbol lookup. By selecting a symbol in another tool window, you can activate the Preview tool window and see the preview of that symbol.

The options are described as follows:

  • Activate Preview tool window from other windows - Setting this option to True allows you to activate the Preview tool window automatically from other windows. You can further specify which windows by setting the options below.

  • Bookmarks - When set to True, selecting a bookmark in the Bookmarks tool window will activate the Preview tool window with the bookmarked line shown.

  • Breakpoints - When set to True, selecting a breakpoint in the Breakpoints tool window will activate the Preview tool window and show the line with the selected breakpoint.

  • Class - When set to True, selecting an item in the Class tool window will activate the Preview tool window with the corresponding symbol shown.

  • Code Annotations - When set to True, selecting an item in the Code Annotations tool window will activate the Preview tool window with the line containing the annotation shown.

  • Defs - When set to True, selecting an item in the Defs tool window will activate the Preview tool window with the corresponding symbol shown.

  • Files - When set to True, selecting an item in the Files tool window will activate the Preview tool window with the selected file shown.

  • Find Symbol - When set to True, selecting an item in the Find Symbol tool window will activate the Preview tool window with the corresponding symbol shown.

  • Message List - When set to True, selecting an item in the Message List tool window will activate the Preview tool window with the line relevant to the selected message shown.

  • References - When set to True, selecting an item in the References tool window will activate the Preview tool window with the corresponding reference shown.

  • Search results - When set to True, selecting an item in the Search results tool window will activate the Preview tool window with the located search item shown.

  • Symbols - When set to True, selecting an item in the Symbols tool window will activate the Preview tool window with the corresponding symbol shown.

  • Unit Test - When set to True, selecting an item in the Unit Test tool window will activate the Preview tool window with the selected unit test shown.

Special Character Options

Special character options are shown below (Tools → Options → Appearance → Special Characters ). These options are used to define the characters that are displayed when the view of special characters is enabled. Enabling special characters inserts characters into your file to show such items as tabs, spaces and line endings that are otherwise invisible. See Viewing Special Characters for more information about these settings.

Note

The viewing of special characters is only available for ASCII files.

Advanced Appearance Options

Advanced appearance options are shown below (Tools → Options → Appearance → Advanced ).

The options are described as follows:

  • Short key names - Specifies how keyboard shortcuts are displayed in the MDI menu bar. For example, when Long is selected, the Edit → Undo menu item shows Ctrl+Z for the shortcut. This is traditional for the CUA emulation. When Short is selected, C-Z is displayed, traditional in other emulations.

  • Windows style Browse for Folder dialog - (Windows only) When set to True, a Windows-style Browse for Folder dialog box is used to choose directories when possible. This dialog displays the navigation tree in a more Windows-friendly structure, letting you navigate to items such as the Desktop, My Computer, etc. When set to False, the standard Choose Directory dialog is used at all times. This dialog displays the navigation tree on a disk-drive basis, starting with the current drive, and includes a text box that supports Directory Aliases that help you quickly type the directory name.

Keyboard and Mouse Options

Keyboard and Mouse options (Tools → Options → Keyboard and Mouse ) pertain to use of the keyboard and mouse, and include options for setting the emulation you want to use and creating custom key bindings.

Keyboard option categories are:

  • Emulation Options

  • Key Binding Options

  • Redefine Common Key Options

  • Advanced Keyboard Options

  • ISPF Options

Emulation Options

Emulation options (Tools → Options → Keyboard and Mouse → Emulation ) are shown below. Use these options to specify the editor's emulation mode and to restore default key bindings. Be sure to save your custom bindings before switching emulations. This can be done by exporting (click Key Bindings in the Options tree) or by using the prompt that is displayed when you switch emulations. See Emulations for more information about these settings.

Key Binding Options

Key binding options are shown below (Tools → Options → Keyboard and Mouse → Key Bindings ). From here, you can view, create, and manage key binding associations for SlickEdit® commands and user-recorded macros. You can also import, export, or save a chart of your key bindings. See Managing Bindings for more information.

Note

  • The first time the Key Bindings option screen is invoked, the Building Tag File progress bar may be displayed while Slick-C® macro code is tagged.

  • Bindings are based on the editor emulation mode (CUA is the default). To change the emulation mode, click Tools → Options → Emulation . For more information, see Emulations.

The Key Bindings option screen is described as follows:

  • Search by command - This filter is used for searching commands in the Command column. Type a string in the filter box, and the list of commands is filtered as you type to show only those commands that contain the specified string. The redXbutton is used to clear the text box or you can edit inside the text box manually.

  • Search by key sequence - This filter is used for searching bindings in the Key Sequence column. It captures literal keyboard input. For example, when the focus is in this filter, press Ctrl and C at the same time, and "Ctrl+C" is displayed. Press the Backspace key and "Backspace" is displayed. Mouse events inside the filter are literal as well. For example, right-clicking within the filter displays the text "RButtonDn". Because the key sequence filter captures literal keyboard input, you cannot edit the text or use key functions such as backspacing or tabbing in and out of the field. You must use the red X button to clear the filter.

  • Command - This column lists, in alphabetical order by default, the SlickEdit® commands and user macros that are or can be bound to keys or mouse events. Click on the column label to sort bindings by this column. An arrow in the column header indicates the sort order (ascending or descending).

    If a command/macro has more than one binding, each instance is listed on a separate row. For example, in CUA emulation, the command gui_open is bound to F7, Command+O (on the Mac), and Ctrl+O. Therefore, gui_open appears in the Command column three times, once for each binding.

  • Key Sequence - This column shows the mouse event or key sequence associated with the command or macro. If a Key Sequence cell is empty, no binding is associated with that command/macro. Click on the column label to sort bindings by this column. An arrow in the column header indicates the sort order (ascending or descending).

  • Mode - This column shows the language editing mode to which the key binding applies. The default mode causes the binding to work in all language editing modes. However, the default mode will be overridden by any language-specific mode binding to another command/macro. Click on the column label to sort bindings by this column. An arrow in the column header indicates the sort order (ascending or descending).

Note

To change the mode for a command/macro that is already bound, first you should unbind the command/macro, then recreate the binding with the mode you want to use. See Editing Bindings for more information. For information about editing modes, see Language Editing Mode.

  • Recorded - This column indicates if the item in the Command column is a SlickEdit® command (No) or a user-recorded macro (Yes).

  • Documentation pane - The bottom pane displays the code documentation for the selected command or macro, if it exists. Click "See Also" hyperlinks (if any exist) to display Help for that item. For See Also links, if a Help entry does not exist, a message box notification is displayed. The documentation pane can be resized by dragging the size bar above it. The size is remembered the next time the screen is displayed.

  • Import and Export- These buttons allow you to import and export bindings. This is useful for creating backups, sharing with other team members, or taking with you should you switch computers. See Exporting and Importing Bindings for details of these features.

  • Save Chart - This button allows you to save a reference chart of all current bindings for all language editing modes in the selected emulation. The chart is saved in HTML format with a name and location that you specify. Commands/macros that are not bound are not included.

  • Remove - This button clears the binding for the selected command/macro. You can also press the Delete key to clear the binding.

  • Add - This button displays the Bind Key dialog, which is used to initiate a new binding. See Bind Key Dialog and Creating Bindings for more information.

Bind Key Dialog

This dialog is used to initiate a new key binding and is displayed when you click Add on the Key Bindings option page.

The dialog is described as follows:

  • Command - This field shows the command that you have selected to bind.

  • Key Sequence - This field is used to enter the key sequence or mouse event that you want bound to the command. For example, to enter the key sequence Ctrl+W, literally press the Ctrl and W keys together. It accepts literal keyboard/mouse input, so you cannot edit the text or use key functions such as backspacing or tabbing in and out of the field. You must use the red X button to clear the filter.

  • Mouse Event button - Click this button located next to the red X button to pick a mouse event to use for the binding. If the event involves pressing a modifier key or keys, such as Ctrl, Alt, Shift, Cmd, Ctrl+Alt, etc., in conjunction with a mouse click, for example, Ctrl+RButtonDn, press the modifier key(s) when clicking the Mouse Event button. Then the Select Mouse Event dialog shows a list of modifier-prefixed mouse events. After selecting the mouse event you want to look up, click OK. The Key Sequence field updates to show the selected mouse event.

  • Bind - After entering the key sequence or mouse event, click this button to save the binding and close the dialog. Prior to clicking Bind, you may want to assign the binding to a specific language editing mode (see below).

  • Cancel - Click this button to cancel the binding operation and close the dialog.

  • Advanced - Click this button to expand the language editing mode settings. By default, all new bindings are assigned to the "default" language editing mode, which means that the binding will work in all modes. To assign the binding to a specific language editing mode, select Bind to mode and click the language editing mode from the drop-down list.

Redefine Common Key Options

Redefine Common Key options (Tools → Options → Keyboard and Mouse → Redefine Common Keys ) allow you to change the behavior of certain common keys. See also Redefining Common Keys for more information.

The options are described as follows:

  • Backspace in Replace mode - Specifies the behavior of the Backspace key when the Start mode is set to Replace (Tools → Options → Editing → General → Start mode ). When Remove previous character only is selected, Backspace removes the previous character and moves the cursor left. Otherwise the previous character is replaced with a space.

  • Backspace over tab - Specifies the behavior of the Backspace key when the previous character is a tab. When Convert tab to spaces and remove 1 space is selected, the Backspace key deletes through tab characters one column at a time.

  • Use Ctrl+Space for input method editor - (Linux only) When set to True, pressing Ctrl+Space activates the Smart Common Input Method (SCIM) editor. When set to False, Ctrl+Space executes its key binding, which performs symbol completion by default. You must enable SCIM support for this option to have any effect. To enable SCIM support, set the VSLICK_XIM environment variable to scim, and set the XMODIFIERS environment variable to @scim. This feature only supports the SCIM editor on Linux.

  • Redefinable keys options are:

    • Backspace key - Specifies when the cursor is allowed to wrap to the previous line when pressing the Backspace key at the left margin.

    • Delete key - Specifies the behavior of the Delete key when the rest of the current line is empty. When Next line always joins is selected, the line below the current line is joined with the current line.

    • End key - Specifies where the cursor is placed when pressing the End key. The Toggle option is useful for trimming extra spaces from long lines, because it gives you a natural and quick way to get to your vertical line column and the last non-blank column.

    • Enter key - Specifies whether a line is split when pressing Enter and how the cursor is aligned on the new line. 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 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 means that if the Start mode is set to Insert (Tools → Options → Editing → General → Start mode ), 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 Start mode is set to Replace, the cursor is moved to column one of the next line.

      Note

      When changing the key binding for the Enter key, the binding for Ctrl+Enter will automatically switch to the opposite setting, depending on whether it is bound to Split Insert Line or Nosplit Insert Line.

  • Home key - Specifies where the cursor is placed when pressing the Home key.

Advanced Keyboard Options

Advanced keyboard options are shown below (Tools → Options → Keyboard and Mouse → Advanced ).

The options are described as follows:

  • Alt menu hotkeys - (Non-CUA emulation modes only) When set to True, "Alt"-prefixed keyboard shortcuts display the corresponding drop-down menu. When set to False, you can be more selective about key bindings because you are permitted to bind Alt keys you normally could not, such as Alt+F. Set to False if you bind Alt keys that are normally menu keys; otherwise, you will lose these key bindings.

  • Alt menu - When set to True, pressing the Alt key without following it with another key causes the focus to shift to the menu bar, and the hotkeys in the menu names are underlined.

  • Key message delay - Specifies the maximum delay, in tenths of a second, between two key combinations when used as a single key binding (for example, Ctrl+X,Ctrl+C). If the time limit is exceeded between when the two key combinations are pressed, the key sequence is interpreted as two separate bindings.

  • Command line prompting - When set to True, pressing a key binding that normally opens a dialog box causes the SlickEdit® command line to prompt for arguments instead of opening the dialog. For example, instead of displaying the Open file dialog, Ctrl+O (bound to gui_open) opens the command line prompting for the file to open. See Command Line Prompting for more information.

  • Selective Display, Expand/collapse - Specifies how Selective Display expand/collapse bitmaps (View → Selective Display ) are clicked in order to expand/collapse areas. For more information, see Selective Display.

ISPF Options

  • Prefix area width - Sets the width of the prefix area.

  • Display prefix area for readonly files - By default, the prefix area is not displayed for read-only files. Since the prefix area can be used to enter commands, you may wish to have the prefix area visible for these files.

  • Enter places cursor in prefix area - When set to True, pressing the Enter key places the cursor in the prefix area on the next line.

  • Right CTRL = Enter/Send - When set to True, pressing the right-hand CTRL key sends the command.

  • Cursor page up/down - When set to True, pressing PageUp or PageDown will move the current line to the top or bottom of the screen, respectively. If the current line was already at the top/bottom of the screen, then the display is scrolled one page. When False, the display is always scrolled one page.

  • END command saves the file - When set to True, the END command saves the file before closing the file. When set to False, you will be prompted whether to save.

  • XEDIT line commands - When set to True, allows the use of XEDIT commands.

  • Home key places cursor on command line - When set to True, pressing the Home key puts the cursor on the SlickEdit command line.

Editing Options

Editing options (Tools → Options → Editing ) directly impact your SlickEdit® coding experience. By customizing these options so that SlickEdit® works the way you prefer and to which you are accustomed, you can greatly improve your coding speed and efficiency. Editing options include default search/replace values, selection styles, specifying the size of new editor windows, and more.

Editing option categories are:

  • General Editing Options

  • Editor Window Options

  • Cursor Movement

  • Context Tagging Options

  • Selection Options

  • Search Options

  • Bookmarks

  • Auto-Close

  • Global Alias Options

General Editing Options

General editing options are shown below (Tools → Options → Appearance → General ).

The options are described as follows:

  • Start mode - Specifies the default insert/replace editing mode to use each time the editor is invoked. The editing mode is indicated in the status line of the editor (Ins or Rep). You can also click on the indicator to toggle the editing mode.

  • Line insert style - SlickEdit® treats line selections differently than character selections. This option controls whether lines are inserted before or after the current line when you paste a line selection. This feature saves you from having to tediously position the cursor at the beginning or end of a line prior to pasting.

  • Next word style - Specifies the cursor behavior when navigating with the next_word command (Ctrl+Right). When Begin is selected, the cursor is placed on the beginning of the next word. When End is selected, the cursor is placed at the end of the next word.

  • Maximum clipboards - Specifies the maximum number of clipboards saved. By default, a stack of your last 50 clipboards are kept, any one of which can be pasted with Ctrl+Shift+V.

  • Allow drag/drop of text - When set to True, selected text can be copied or moved by dragging and dropping the selection using the left mouse button.

  • Throw away file lists - When set to True, File Manager file lists (File → File Manager ) can be modified and closed without a save prompt.

  • Auto exit build window - When set to True, the concurrent build window is automatically exited when the buffer is closed or when exiting the editor.

  • Reflow next - Specifies where the cursor is placed when running the reflow_paragraph command. When Cursor on next paragraph is selected, the cursor is placed on the next paragraph after it has reformatted the current paragraph.

  • Protect read-only mode - When set to True, read-only files cannot be modified. If you attempt to modify a read-only file, SlickEdit® displays a notification. If you attempt to save a read-only file, SlickEdit® prompts for a different output file name.

  • CUA text box - When set to True, the keys Ctrl+X, Ctrl+C, and Ctrl+V perform cut, copy, and paste commands respectively for text boxes other than the command line, regardless of the emulation. When False, these keys operate the same in a text box as they do in the command line and edit windows, which could be useful if you're using a non-CUA emulation or prefer to use your own editing key bindings.

  • Preserve column on top/bottom - When set to True, the top_of_buffer (Ctrl+Home) and bottom_of_buffer (Ctrl+End) commands do not change the column position unless already at the top or bottom of the buffer.

  • CR w/o LF erases line in build window - When set to True, lines of output sent to the Build tool window that contain carriage return (CR) characters without subsequent line feed (LF) characters are erased. When set to False, these lines are not erased.

Tip

Where does this concept originate? On manual typewriters, carriage return (CR) moves the carriage back to the first column of text, and line feed (LF) moves to the next line. Older computer terminals, such as VT100 and its successors (Windows and UNIX shells), used this terminology as a metaphor to redraw lines. For example, to draw a line that showed percent complete, you would output "CR <number>%" repeatedly, then issue the line feed when it finished. In SlickEdit® therefore, due to this practice, it is possible that output sent to the Build tool window may contain carriage return characters without subsequent line feed characters. When this happens, the line is erased in the Build window.

  • Parenthesis matching - See Begin/End Structure Matching for more information about paren matching. The following options available:

    • Parenthesis matching style - When Highlight is selected, after typing a closing paren, SlickEdit® temporarily block-selects the text within the paren pair. When Cursor to Begin Paren is selected, after typing a closing paren, SlickEdit® temporarily places the cursor on the matching begin paren. When None is selected, SlickEdit® just inserts the closing paren.

    • Highlight matching blocks - When set to True, the corresponding parenthesis, brace, bracket, or begin/end word pair under the cursor is automatically highlighted.

Tip

To customize the highlight color, go to Tools → Options → Appearance → Colors , and select the Block Matching screen element. To adjust the delay in milliseconds before the highlighting is updated, go to Macro → Set Macro Variable and modify the variable def_match_paren_idle. See Setting Colors for Screen Elements and Setting/Changing Configuration Variables for more information.

Editor Window Options

Editor window options are shown below (Tools → Options → Editing → Editor Windows ). See also Files, Buffers, and Editor Windows for more information.

The following options are available:

  • Files per window - Specifies whether each buffer opened in SlickEdit® is allocated in its own editor window or in the same editor window.

  • Smart next window style - Specifies preferences for navigating between editor windows. Select from the following values:

    • Smart next window - This is the default style. It allows you to press Ctrl+Tab (next_window command) to switch the focus between the two most frequently used open editor windows, rather than always going to the next window. Press Ctrl+Shift+Tab (prev_window command) to switch between all open editor windows. This style is similar to how Ctrl+Tab and Ctrl+Shift+Tab work in other Windows MDI applications, like Visual Studio.

      Note

      Under the Gnome desktop environment, Smart next window may not work correctly when the mouse option 'Highlight the pointer when you press Ctrl' is enabled.

    • Reorder windows - If selected, activating an existing window reinserts the window after the current window. Neither Ctrl+Tab nor Ctrl+Shift+Tab reorders the windows. This option is very good for switching between more than two files, but it is not the Windows standard. It's similar to the way SlickEdit® reorders buffers.

    • No window reordering - If selected, newly opened windows are inserted after the current window, like in all settings. Activating an existing window, pressing Ctrl+Tab, or pressing Ctrl+Shift+Tab does not reorder windows. This option is best if you memorize the hot key numbers on the Window menu (for example, Alt+W,1) because it attempts to keep the hot key numbers the same.

    Note

    In all cases, cycling through the windows using Ctrl+Tab or Ctrl+Shift+Tab does not affect the order of the windows. Specifically activating a file by clicking on a file tab or selecting it in the Files tool window will reorder the windows unless you have set this option to "No window reordering".

  • Place cursor on focus click - When set to True, clicking in an editor window that does not have focus will set focus and also place the text cursor. When set to False, clicking in an editor window that does not have focus only sets the focus.

  • File tab sort order - This setting controls the order of the file tabs. The following choices are available:

    • Alphabetical - File tabs are listed alphabetically by file name.

    • Most recently opened - File tabs are listed in the order they were opened. Most recently opened files are positioned according to the New file tab position setting. This order is useful if you prefer a static order, since switching buffers does not change the order.

    • Most recently viewed - File tabs are listed in the order in which they were last viewed. The current (and most recently viewed) file is at the left edge. Switching buffers reorders the tabs.

    • Manual - Enables you to drag and drop file tabs to the position where you want them. New files are opened according to the New file tab position setting.

  • New file tab position - This option specifies whether file tabs for newly opened files appear on the right or the left of the file tabs. This option is only available when File tab sort order is set to Most recently opened or Manual.

  • Abbreviate file tab captions - When set to True, files with the same name but different extension will have their captions abbreviated for all but the first file. For example, if you have files foo.cpp and foo.h, then the file tab for foo.h will directly follow foo.cpp, but the caption will only say .h. This feature is only available when File tab sort order is set to Alphabetical.

  • New window size - These options are used to specify the width and height for new editor windows. See Files, Buffers, and Editor Windows for more information.

    • New window width and New window height - Use the drop-down to specify one of the following values regarding the width and height for new editor windows:

      - Custom value - When this value is selected, you can specify a size in the Custom window width and height fields.

      - Default - When this value is selected, the default window size is used as determined by SlickEdit®.

      - Use current window to create custom size - When this value is selected, the width/height of the currently window is used to specify a custom width for new windows.

      - Use maximum available - When this value is selected, new windows are stretched to fill the size of the editor pane. This size is dynamic, so if you change the size of the editor pane, new windows will be created using the maximum size of the adjusted editor pane, but existing windows will retain their size.

      - Use size of active window when new window is created - When this value is selected, new windows are set to the width/height of the window that is active at the time the new window is created.

    • Custom window width and Custom window height - Specifies the custom width and height, in pixels, for new editor windows. The size you have specified is used each time an editor window is opened. This field is enabled when you select Custom as the value for the New window width/height options.

Cursor Movement

Cursor Movement options are shown below (Tools → Options → Editing → Cursor Movement ). These options control the movement of the cursor within editor windows.

The following options are available:

  • Cursor right/left wraps to next/previous line - When set to True, the cursor_left and cursor_right commands wrap to the previous or next line respectively.

  • Cursor up/down places cursor in virtual space - When set to True, the cursor_up and cursor_down commands place the cursor up or down, respectively, at either the end of the line or at the column of the original location, whichever comes first. The cursor is never placed past the end of the line. When set to False, cursor_up and cursor_down go to the same column of the next or previous line, regardless of the length of the line.

  • Click past end of line - When set to True, the cursor can be placed past the end of a line into virtual space.

  • Cursor up/down within soft wrapped lines - When set to True, if Soft Wrap is enabled (View → Soft Wrap ), the cursor_up and cursor_down commands move the cursor up to the next or previous visible line, including line continuations. When set to False, cursor_up and cursor_down moves the cursor to the previous or next physical line (the same position to which the cursor would move if Soft Wrap was off).

  • Cursor left/right in leading spaces - Specifies the behavior of the cursor_left and cursor_right commands when moving the cursor within leading space. The purpose of this option is to emulate the "feel" of real tab characters even if you only use spaces for indentation.

  • Line wrap - Specifies when line wrapping occurs, either when the cursor reaches column one or when it reaches the left margin. When language-specific Word Wrap is on (Tools → Options → Languages → [Language Category] → [Language] → Word Wrap ), wrapping occurs when the left margin is reached regardless of this setting.

  • Jump over tab characters - When set to True, moving the cursor over a tab character with the Left or Right arrow key causes the cursor to jump across the virtual space. When set to False, the Left and Right arrow keys move the cursor into the virtual space of tab characters. Note that this setting also controls where the cursor is placed when clicking in a buffer or making a selection.

  • Subword navigation - When set to True, the word navigation commands, like next_word, behave like their subword navigation counterparts, like next_subword. Word navigation jumps to the next word based on the Word chars value set at Tools → Options → Languages → [Language Category] → [Language] → General . Subword navigation stops within a word at each capital letter or after each underscore or dash, making it easier to edit the name of a symbol. For more information, see Subword Navigation.

  • Undo affects cursor movement - When set to True cursor movement is added to the undo stack, so undo operations will also undo cursor movement and edits.

Context Tagging® Options

Context Tagging options are shown below (Tools → Options → Editing → Context Tagging® ). These options let you set general parameters for the Context Tagging features. You can designate the way Context Tagging is performed and how the references function within the application, and you can also tune the application to maximize performance. See also Building and Managing Tag Files for more information.

The following options are available:

  • Background tagging of open files:

    • Tag file on save - When set to True, files are retagged when you save a modified file.

    • Background tagging of open files - When set to True, all open files are retagged in the background if they have been modified.

    • Use background thread when possible - When set to True, open files are tagged using a separate thread instead of using a timer on the main thread.

    • Start after seconds idle - Specifies the amount of time, in seconds, the editor remains idle (no keyboard or mouse movements) before retagging of buffers starts, when Background tagging of open files is enabled.

    • Max size of files to tag - Specifies the maximum size, in kilobytes, a file is allowed to have in order to be tagged.

    • Max number of tags per file - Specifies the maximum number of tags (including statements, if Statement Level Tagging is enabled) that a file is allowed to have in order to appear in the Defs and Current Context tool windows.

  • Background tagging of other files:

    • Background tagging of other files - When set to True, tag files are updated when another application modifies a file. Note that this causes SlickEdit® to constantly perform disk I/O to check dates of files on disk.

    • Use background thread when possible - When set to True, all open files are retagged in the background using a thread instead of being tagged on the main thread using a timer. This option applies only to languages that support threaded tagging.

    • Start after minutes idle - Specifies the amount of time, in minutes, the editor remains idle (no keyboard or mouse movements) before retagging of files on disk starts, when Background tagging of open files is enabled.

    • Maximum number of files to tag - Specifies the maximum number of files that SlickEdit® re-tags in one pass, when Background tagging of open files is enabled.

    • Maximum number of files to consider - Specifies the maximum number of file dates to consider for processing when background tagging starts. Specifying a smaller maximum value allows you to regain editor access more quickly, but re-tagging is slower. Specifying a larger maximum value allows re-tagging to be quicker, but it will take longer to regain editor access.

    • Minutes before restarting - Specifies the number of minutes to wait for background tagging to start again after all files have been fully tagged.

    • Workspace tag file only - When set to True, background tagging cycles through only the workspace tag file. When set to False, background tagging cycles through all of your language-specific tag files (listed under Tools → Tag Files ) in addition to the workspace tag file.

  • Background Tagging Threads:

    • Number of tagging threads to start - The number of threads to be used for background tagging. This number should be based on the number of processors/cores on your computer and the other tasks you may be running while editing.

    • Use background thread to build workspace tag file when possible - When set to True workspace files are initially built on a background thread instead of being built synchronously. This option applies only to languages that support threaded tagging.

    • Use background thread to build language support tag files when possible - When set to True tag files for language support, like compiler libraries, are built initially using a background thread instead of being built synchronously. This option applies only to languages that support threaded tagging.

    • Report background tagging progress on status bar - When set to True messages are written to the message line indicating the progress of background tagging.

    • Process background tagging jobs after (ms) idle - Specifies the amount of idle time to wait before polling for completed background tagging jobs.

    • Background tagging timeout (ms) - Specifies the maximum amount of time to spend gathering background tagging results before returning control to the editor.

  • Tagging Tool Windows:

    • Update tool windows after (ms) - Specifies the amount of idle time before the Preview window is updated to match the current location. Prevents the Preview window from showing results as you cursor through the code.

    • Additional time to wait before updating tool windows (ms) - Additional delay before updating other tool windows. This gives background threads more time to update the current file before other windows are updated.

    • Preview window timeout (ms) - Specifies the maximum amount of time that the preview window should spend trying to look up a symbol. If the symbol is not found in that time, it will not display the symbol preview. Smaller values will help prevent typing delays.

  • References - Select from the following:

    • Build workspace tag file with references - When set to True, newly created tag files are built with support for symbol cross-references.

    • Find references incrementally (faster) - When set to True, reference queries are faster because analysis stops when a file is found containing a valid reference. However, you may see files which do not have any references to the symbol you are looking for listed in the References tool window. When set to False, all files with potential references are searched and analyzed so that the files which do not contain any references are removed.

    • Update references and call tree on single click - When set to True, references in the References tool window are updated when you click on a new symbol in the Classes, Defs, or Symbols tool window.

    • "Go to references" only lists references - When set to True, Go to Reference searches for references but does not jump immediately to the first reference. When set to False, Go to Reference searches for references and automatically jumps to the first one. Note that you can find the next reference by using the find_next command (Search → Find Next or Ctrl+G).

    • Highlight references in editor - When set to True, each reference is highlighted within files.

  • Maximums (tune for performance) - You can tune Context Tagging performance and accuracy by adjusting these values. Higher values will find more tags but increase search time. Lower values improve performance but may cause tags to be omitted.

    • Maximum functions found by parameter help - Specifies the maximum number of overloaded functions to display when function parameter help (Parameter Information) is invoked.

    • Maximum globals shown in list members - Specifies the maximum number of global symbols to display when List Members is invoked.

    • Maximum class/struct members shown in list - Specifies the maximum number of class/struct members to display when List Members is invoked.

    • Maximum candidates for list parameters - Specifies the maximum number of local variables and class members that are evaluated to determine assignment compatibility when Auto List Compatible Parameters is invoked.

    • Maximum response time to list parameters - Specifies the maximum amount of time, in milliseconds, that SlickEdit® spends finding compatible parameters. Note that this is not a hard limit; in some cases, evaluating the assignment compatibility of a single variable can be time-consuming, especially when templates are involved.

    • Maximum tags found in symbol search - Specifies the number of tags found when Find Tag is invoked (right-click in the Symbols Tool Window and select Find Tag). This setting also controls the number of duplicate tags that are tried when SlickEdit® is attempting to evaluate the type of a symbol.

    • Maximum items found in references search - Specifies that a symbol references search should stop after this many hits are found.

    • Tag file cache size - Specifies the cache size, in kilobytes, for tag files. Tagging performance can be improved by adjusting this setting to better match the size of your tag files. Generally, a tag file cache size that matches the total size of the tag files being used will provide the best performance. For example, if the tag files for your source code and libraries adds up to 100 MB, you should set your cache size to 100 MB. You may have to experiment to find the optimum value. Use the following recommendations as a guide:

      * Minimum - 8 MB

      * Default - 64 MB

      * Ideal - Sum of tag file sizes

      * Maximum - 25% of physical system memory

      Note that this is the same as the Tag file cache size option under Tools → Options → Application Options → Virtual Memory .

    • Tag file cache maximum - Specifies the maximum cache size, in kilobytes, for tag files. The tag file cache size can be dynamically adjusted as high as this amount depending on the amount of available memory on your machine at the time SlickEdit is started.

      Note that this is the same as the Tag file cache maximum option under Tools → Options → Application Options → Virtual Memory .

    • Update after (ms) idle (0 implies no delay) - This option controls the idle time in milliseconds before the List Members feature displays a list.

    • Maximum response time (ms) for highlighting matching symbols - Specifies the maximum amount of time to spend locating matching symbols. Only symbols found in this amount of time will be displayed.

  • Symbol coloring performance: - Use these options to fine tune symbol coloring performance.

    • Update after (ms) idle - Specifies the amount of time (in milliseconds) to wait to update the symbol coloring information for a file after the file has been modified. Based on average typing speed, we do not recommend setting this value to less than 250 ms.

    • Timeout after (ms) - Symbol coloring will be performed in time slices no greater than the amount specified. Setting this value very low will protect against typing delays. However, you may see the symbols coloring from top to bottom rather than seeing the whole page colored in one shot.

    • Number of lines to color above and below the current page - For best performance, symbol coloring only colors the current visible page of lines and a small window of surrounding lines. This setting allows you to configure how many lines before and after the current visible page of lines are also colored. Set this to 0 for optimal performance with no prefetch of symbol coloring information.

    • Number of off-page lines to color per pass (chunk size) - After calculating the symbol coloring for the lines on the current page, symbol coloring will start prefetching coloring for surrounding lines. This setting controls the number of lines calculated per pass.

  • Auto-Complete performance tuning:

    • Maximum symbols - For performance tuning, you can limit the maximum number of symbols displayed by Auto-Complete. This setting affects all file extensions.

    • Maximum word completion - For performance tuning, you can limit the maximum number of word completions displayed by Word Completion. This setting affects all file extensions. This is especially useful when editing large files.

    • Display after (ms) idle - The number of milliseconds the editor must be idle before auto-completion suggestions will be displayed. This setting affects all extensions.

    • Update after (ms) idle - The number of milliseconds the editor must be idle before auto-completion suggestions will be refreshed. This setting affects all extensions.

    • Timeout after (ms) - The number of milliseconds allowed for Auto-Complete to find suggestions.

Selection Options

Selection options are shown below (Tools → Options → Editing → Selections ). See also Selections for more information.

The following options are available:

  • Styles - Choose the selection style you wish to use from the following options:

    • User defined - This option is for setting your own selection preferences. Any changes that are made to the CUA behaviors automatically select User Defined. Selecting CUA automatically resets the select behaviors.

    • CUA - When this style is selected, selected text is deleted before a paste or character is inserted unless the selection is locked. Pressing the Backspace or Delete keys 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 emulation commands select_line, select_block, or select_char. To access these commands from Edit pull-down menu, select this option in any emulation.

    • SlickEdit default - When this style is selected, SlickEdit® uses the default styles that are enabled when the product is installed.

  • Extend selection as cursor moves - When checked, the selection is extended to cursor position. This option is not available if using Brief or Emacs emulation.

  • Deselect after copy - Indicates whether copied text is selected. This is not available if using Brief or Emacs emulation.

  • Deselect after paste - Indicates whether pasted text is selected. This is not available if using Brief or Emacs emulation.

  • Inclusive character selection - When checked, a character selection includes the character following the cursor. This option is not available if using Brief or Emacs emulation.

  • Delete selection before insert - Indicates whether a selection is deleted before new text is inserted. This option is not available if using a Brief or Emacs emulation.

  • Auto deselect (i.e. when cursor moves) - Check this box to clear a selection when the cursor moves or one of a few other editor operations occurs. This option is not available if using a Brief or Emacs emulation.

  • Shift+Cursor always char select - When this check box is cleared, pressing the Shift+<arrow keys> will select line or block selections, depending upon the direction the cursor moves. This is not available if using a Brief emulation.

  • Mouse selection creates clipboard - Select this option to use the left mouse button to create a clipboard and to use the middle mouse button to paste.

  • Arrow keys traverse selection - If checked, the Left arrow key moves the cursor to the beginning of the selection and the Right arrow key moves the cursor to the end of the selection.

  • Enable block selections with right-click and drag - If checked, then clicking the right mouse button and dragging allows you to make block selections.

  • Clipboard formats - (Windows only) Select the type of editing format for clipboards, allowing you to paste formatted and color-coded text to other applications (as well as plain text). Choose from RTF Format or HTML Format.

Search Options

Search options are shown below (Tools → Options → Editing → Search ). This option screen can also be displayed from the Find and Replace tool window (Search → Find or Ctrl+F), or right-click in the background and select Configure Options.

These are the default search options that control the behavior of Find and Replace operations in the following instances:

  • The very first time the Find and Replace tool window is displayed. After that, dialog history takes over, unless:

    • You set the default search option Initialize with default options setting to True, then the options are reset to default every time the tool window is invoked, or

    • You use the right-click context menu in the Find and Replace tool window to select Use Default Options, which resets to the default state.

  • The default options are always applied when using:

    • Quick Search and Quick Replace.

    • Incremental Search.

    • Command-line searches (find and /) if you don't specify options explicitly.

    • Selective Display commands when searching by text.

For more information, see Find and Replace.

The following options are available:

  • Default search options - The following default search options apply to all command line searches, quick searches and incremental searches, and to the Find and Replace tool window when the option Initialize with default options is enabled.

    • Match case - When set to True, search commands default to case-sensitive searches.

    • Match whole word - When set to True, search commands default to only finding matches to the word as a whole. When set to False, search commands default to finding all instances of the word, ignoring characters that are to the left and right of the occurrence.

    • Regular expression - When set to True, search commands default to regular expression searching.

    • Regular expression syntax - Specifies which regular expression syntax to use for default regex searching, when Regular expression search is enabled.

    • Wrap at beginning/end - Specifies whether or not search commands always wrap at the beginning or end of a buffer during a search/replace operation to complete a search.

    • Search backward - When set to True, searches are always performed from the end to the beginning.

    • Place cursor at end - When set to True, the cursor is placed at the end of the found occurrence.

    • Search hidden text - When set to True, text hidden by Selective Display is allowed to be searched. To set Selective Display options, from the main menu click View → Selective Display . See Selective Display for more information.

  • Tool Window options - Select from the following:

    • Close after find/replace - When set to True, the Find and Replace tool window is closed after finding text in the buffer.

    • Initialize with default options - When set to True, options on the Find and Replace tool window are reset to the original default values each time the window is launched.

  • Search string initialization - The following options provide starting values for when a search and replace operation is activated:

    • Initialize search string - Specifies the initial value to be used in the Search for fields of the Find and Replace tool window when the window is activated. When History retrieval is selected, the Find and Replace tool window uses the last item that was searched for as the word used when performing a search. When Word at cursor is selected, the Find and Replace tool window uses the word that is at the cursor when performing a search.

    • Selected text (if exists) - When set to True, the current selection is used as the initial value in the Search for fields of the Find and Replace tool window when the window is activated. If a selection doesn't exist, the value specified by the Initialize search string option is used.

  • Additional options - Select from the following:

    • Restore cursor after replace - When set to True, the cursor is restored to its original position after a search/replace operation completes without being cancelled.

    • Leave selected - When set to True, the last occurrence of a matching search string is left selected when a search operation completes. This also affects whether pressing Esc during a search and replace leaves the search string selected.

    • Incremental search highlighting - When set to True, incremental searching highlights matching occurrences with two colors: one for the current match at the cursor and one for all possible matches. Highlights are removed when the search terminates. These colors are controlled by the I-Search Current Match and I-Search Highlight screen elements (Tools → Options → Appearance → Colors ). See Incremental Searching for more information.

    • Maximum search results output (KB) - Specifies the maximum amount of search results, in kilobytes, to return after a search operation.

Bookmarks

Bookmark options are shown below (Tools → Options → Editing → Bookmarks ) See Bookmarks for more information.

The following options are available:

  • Use workspace bookmarks - When set to True, bookmarks are associated with the workspace used to create them, even if the files they are in are not part of the workspace. When you switch workspaces, the Bookmarks tool window updates to show only the bookmarks associated with the current workspace. See Using Workspace Bookmarks for more information.

  • Show set bookmarks - When set to True, a green Bookmark bitmap is displayed in the left margin of the editor window at the location of each set bookmark.

  • Show pushed bookmarks - When set to True, a blue Bookmark bitmap is displayed in the left margin of the editor window at the location of each pushed bookmark. This helps you see where "Pop Bookmark" will go.

  • Close deletes pushed bookmarks - When set to True, any pushed bookmarks remaining are removed when a buffer is closed. This option is helpful for buffer management, because it prevents buffers which were explicitly closed from coming back when you pop up out of your bookmark stack.

  • Maximum stack depth - Specifies the maximum number of bookmarks kept in the bookmark stack. When this number is exceeded, the oldest bookmark is removed from the stack.

  • Automatically close visited files - Specifies the closing of visited files. A file is considered visited if it is opened as a result of a symbol navigation or search operation, not modified, and subsequently navigated away from. Features that open files for visiting include Go to Definition, Pop Bookmark (see Symbol Navigation), and some search operations. Select from the following values:

    - On - When this setting selected, visited files are automatically closed when you navigate away from them.

    - Off - When this setting is selected, the option is not enabled and visited files are not closed.

    - Prompt me each time - When this setting is selected, you will be prompted with a choice each time you navigate away from a visited file.

  • Top/bottom buffer pushes bookmark - When set to True, a bookmark is pushed whenever you jump to the top or bottom of the buffer (Ctrl+Home/Ctrl+End, or top_of_buffer/bottom_of_buffer commands, respectively). This is convenient, for example, in C++: if you jump to the top of the buffer to add a #include statement, a bookmark is pushed, so you can use Ctrl+Comma (pop_bookmark command) to get back to your previous position. This option corresponds to the configuration variable def_top_bottom_push_bookmark.

  • Navigating search results pushes bookmark - When set to True, a bookmark is pushed when you navigate between search results. This allows you to use pop-bookmark to jump back to the previous location.

Auto-Close

Auto-Close automatically inserts matching closing punctuation when opening punctuation is entered. Auto-Close options are shown below (Tools → Options → Editing → Auto-Close ).

The following Auto-Close options are available:

  • Show navigation hints - This option controls whether a navigation hint is shown when Auto-Close is used. These hints will tell you where you can jump by using the completion keys. Select from the following choices:

    • Caret - The navigation hint will appear as a small triangle at the bottom of the line of code.

    • Vertical pipe - The navigation hint will appear as a vertical pipe, similar to a non-blinking cursor.

    • None - Select this choice if you do not wish to see any navigation hints.

  • Completion Keys - These Options determine which keys can be used to jump to the end of automatically inserted punctuation.

    • Enter - When set to True, pressing Enter will jump to the end of automatically inserted punctuation. When set to False, Enter will perform its usual function when in the middle of automatically inserted punctuation.

    • Tab - When set to True, pressing Tab will jump to the end of automatically inserted punctuation. When set to False, Tab will perform its usual function when in the middle of automatically inserted punctuation.

Global Alias Options

Global alias options are shown below (Tools → Options → Editing → Global Aliases ). After using this screen to create an alias, use the alias in the editor by typing the identifier and pressing Ctrl+Space.

Note that the Global Aliases options page uses the same form that is used to create and manage Language-Specific Aliases. See Global Aliases for more information about this feature.

Debugging Options

Debugging options (Tools → Options → Debugging ) are used for tuning the run-time performance of the integrated debugger, examining the properties of the underlying debugger system, setting class filters, and controlling the directories searched for source files.

You can also access these options by clicking the Debug → Debugger Options from the main menu (or by using the debugger_options command).

Note

To see information about the underlying debugger system, including a general description retrieved from the debugger, version number, run-time version, and debugger name, make sure you're in debug mode, then click Debug → Debugger Information (or use the debug_props command). See Viewing Debugger Info and Setting Options for more information.

Debugging options categories are:

  • Debugging Settings Options

  • Debugging Numbers Options

  • Debugging Runtime Filter Options

  • Debugging Directories Options

  • Debugging Configurations Options

Debugging Settings Options

The Debugging Settings Options screen is shown below (Tools → Options → Debugging → Settings ). Use these options to increase debugger performance.

The options are described as follows:

  • Number of lines to scan for Autos - Specifies the number of lines, starting with the current line, to scan for symbols to evaluate and display in the Autos tab of the Debug Variables tool window.

  • Response timeout(s) - Specifies the number of seconds to wait for a connection or response from the underlying debugger system before giving up.

  • Minimum running update time(ms) - Specifies the minimum amount of time in milliseconds to spend polling for asynchronous events coming from the underlying debugger system. This value is also used to determine the frequency with which to poll for events when the application is running.

  • Maximum suspended update time(ms) - Specifies the maximum amount of time in milliseconds to spend polling for asynchronous events coming from the underlying debugger system. This value is also used to determine the frequency with which to poll for events when the application is suspended.

Tip

Decreasing the minimum and maximum update times will make the editor more responsive in some cases during debugging, however, increasing these times can improve overall performance.

  • Toolbar update delay(ms) - Specifies the amount of time to wait in milliseconds before updating the debugger toolbars. This is done to improve debugger performance and decrease overhead and redraws when single stepping through code. Set this value to 0 to force an immediate update.

  • Asynchronous message duration(s) - Specifies the amount of time in seconds to display certain informative messages caused by asynchronous events (such as loading classes in Java) before they are erased.

  • vsdebugio connection port - Specifies the TCP/IP port to connect to vsdebugio running locally on the same machine.

  • Allow edit and continue (hot swap) where available - (Edit and continue - Java only) When set to True, you can edit a file during a Java debugging session, compile or rebuild, and then continue to debug. Keep in mind that when using this feature, there are certain feature limitations that you might encounter that are defined by the Java Virtual Machine.

  • Allow editing of source files during debugging - When set to True, you can edit files during debugging sessions.

  • Show value of symbol under mouse - When set to True, as the mouse cursor floats over a symbol, the information about the symbol, including its value for variables, are displayed.

  • Automatically correct breakpoint scope - When a breakpoint is set in the debugger, the name of the function and the class it is in is recorded. If the class name or function name subsequently changes between debugging sessions, having this option enabled will allow the debugger to correct this information stored with the breakpoint.

Debugging Numbers Options

The Debugging Numbers Options screen is shown below ( Tools → Options → Debugging → Numbers ). Use these options to configure settings for viewing numbers in multiple bases (hex, octal, and binary views).

These settings allow you to specify how different numeric types are formatted by the debugger by default. You can specify settings for integer numbers, floating point numbers, and characters. Each option contains the same values for you to pick from. The table below shows examples of each type of configuration.

Option Value | Base | Example
Binary | 2 | 0b01000001
Char | N/A | 'A'
Decimal | 10 | 65
Hexadecimal | 16 | 0x41
Octal | 8 | 0101

These settings can be overridden by using the right-click context menu in any of the debugger variables tool windows. They may also be overridden on a per-variable basis, again by using the right-click context menu in the debugger variables tool windows (Autos, Locals, Members, Watches). See Debug Tool Windows for more information.

Debugging Runtime Filters Options

The Debugging Runtime Filters Options screen is shown below (Tools → Options → Debugging → Runtime Filters ). Use this screen to configure the Step Into command (Debug → Step Into , debug_step_into) to skip certain runtime functions and methods.

For GNU C/C++, click Add to specify a function, or class and method patterns (ex. strcpy, str*, MyClass::*, MyClass::Insert*) for the debugger to consider as run-time functions. This will affect the behavior of Step Into. Step Into will step over statements that call into run-time functions. The Reset button will reset the filters back to the defaults.

For Java, click Add to specify packages or specific classes or class patterns for the debugger to consider as run-time classes. This will affect the behavior of Step Into and the Debug Loaded Classes tool window. Step Into will step over statements that call into run-time classes. The Reset button will reset the filters back to the defaults, which are java.*, javax.*, com.sun.*, and sun.*, which correspond to the defaults used by Sun's JDB debugger.

Debugging Directory Options

The Debugging Directories Options screen is shown below (Tools → Options → Debugging → Directories ). Here, you can tune the search path used to find source files while debugging.

When debugging, if a source file path cannot be resolved using the current directory or the class path, you will be prompted for the source file. The debugger then saves the path in which the source file was found, so you will not be prompted again when that file or another in that directory is needed during a debugging session. The Reset button clears all stored source paths.

Debugging Configurations Options

The Debugging Configurations Options screen is shown below (Tools → Options → Debugging → Configurations ). Valid only for projects utilizing the GDB debugger, these settings provide the ability to define multiple GDB debuggers, specify arguments to be passed to each debugger in the list, and define one of the debuggers in the list as the default to be used when debugging local, native executables.

These settings are especially useful for development teams who use cross-compiler platforms for applications such as embedded systems. They are also useful for adding newer versions of the GDB debugger, when they become available, for use in the debugging processes.

The debuggers in this list also appear on the Remote Options tab of the Debug → Attach Debugger → Attach to Remote Process dialog box.

Language Options

SlickEdit® provides many options that can be configured on a language-specific basis, such as indenting and word wrap. For example, settings for coding in C/C++ can be set differently than those used for Java. SlickEdit® uses the extension of the current file to determine what language you are using, thereby only making available the features that are possible in that language and applying the associated settings. For convenience, we provide a means to set most of these values for all languages, too.

Use the [Language] section of the Options dialog (Tools → Options → Languages → [Language Category] → [Language] ) to control the behavior of SlickEdit for specific a language. Each supported language is categorized by its language type. Expand the applicable category node to find your language. For example, C/C++ and Java are located under the Application Languages node.

Tip

A shortcut method to access language options for the current buffer is to use the Document → [Language] Options menu item. This will open the Options dialog to the General language-specific option screen for that language.

The options available for each language are further categorized by type. In general, the option categories are the same for each language (General, Indent, View, etc.), although if a particular language does not support a particular set of options, that options category is not included. Conversely, some languages include additional options that are not available in other languages. While most of the options are common among all languages, the default settings for these options vary.

Many of the language options can be set for all languages as well, using Tools → Options → Languages → All Languages . This avoids having to repetitively set options for things like viewing line numbers. The All Languages options are arranged in the same hierarchy and screens used for the individual language options. For more information, about this section, see All Languages

The Language Manager and Extension Manager nodes are used to add and remove languages and manage language extension associations. See Managing Languages and Managing File Extensions for more information on these screens. You can also use the Extensionless File Manager to associate files without extensions to languages. See Managing Extensionless Files for more information about this screen.

The common categories for each language (when supported) are:

  • Language-Specific General Options

  • Language-Specific View Options

  • Language-Specific Indent Options

  • Language-Specific Formatting Options

  • Language-Specific Adaptive Formatting Options

  • Language-Specific Comment Options

  • Language-Specific Comment Wrap Options

  • Language-Specific Word Wrap Options

  • Language-Specific Alias Options

  • Language-Specific Auto-Complete Options

  • Language-Specific Context Tagging Options

  • Language-Specific Color Coding Options

  • Language-Specific File Options

  • Language-Specific Compiler Options

All Languages

SlickEdit supports many languages and allows you to configure each one on an individual basis. Should you wish to set a language-specific setting to the same value for each language, you can use the All Languages Options (Tools → Options → Languages → All Languages ). By expanding this category, you can see the same options nodes found underneath the individual languages.

Setting All Languages Options

To set an all language options, simply use the control as you would any other control. Set the value you wish to be used by all languages, then click OK or Apply. The settings of each language will be updated. Once you set a value, other language options nodes will be updated to reflect that change. For example, if you set All Languages > Indent > Tabs to +3, when you navigate to C/C++ > Indent, the Tabs value will be set to +3. You can still set an individual language option. If you then set Tabs for C/C++ to +4 and click OK, then the tabs for C/C++ will be set to +4, while the tabs for every other language will still be set to +3, as specified in the All Languages options.

Initial Settings

When you first view an options node for an individual language, the options show the current settings for that language. However, for All Languages, the options shown reveal amalgamated settings for all the languages that SlickEdit supports. If every language has a setting turned off, it will be shown as off under All Languages. Additionally, each control has a "neutral" setting, which indicates that all the languages do not share the same setting. This neutral setting appears differently for different controls.

  • Radio buttons - When all languages do not have the same setting for a radio button set, then none of the radio buttons will be selected.

  • Check boxes - A check box option will be filled in with a square to indicate that all languages do not have the same value for the setting.

  • Text boxes - Text boxes will be left blank to indicate that all languages do not share the same value.

  • Combo boxes - When all languages do not have the same value for a combo box setting, the combo box will say Languages Differ in the text area.

  • Property Sheet Options - If an option found in a property sheet does not have the same setting for all languages, then the property value will say Languages Differ.

Language-Specific General Options

This option screen shows the mode name and associated file extensions for the selected language, and provides other general options. The settings on this page depend on the selected language. As an example, the C/C++ General options are shown below (Tools → Options → Languages → Application Languages → C/C++ → General ).

The options are described as follows:

  • Mode name - Allows you to enter a more meaningful name for this extension setup. Define a mode name here for the Document → Select Mode menu item to work well. See Language Editing Mode for more information.

  • File Extensions - This area displays a list of file extensions associated with the selected language. See Managing File Extensions for more information.

  • Edit These Extensions - Allows you to add or remove file extensions for the language mode. The language-specific File Extensions dialog is displayed. Click the green Plus button to add a new extension and use the red X button to delete the selected extension. You can also add an extension by double-clicking where indicated.

  • Truncation - When On or Auto is selected, all editor operations prevent the data from the right of the truncation line length to be moved or to be modified. For example, search and replace operations do 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.

    Set this to Auto for the editor to determine the truncation line length based on the record format of the file. For files that 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 (the record length minus eight).

  • Auto CAPS - If selected, and a file is opened that does not contain any lowercase characters, caps mode is turned on (not the same as caps lock). When caps mode is on, all text is inserted in uppercase. This feature is intended to emulate ISPF.

  • Context menus - These options specify which context menu to display in the editor window based on whether a text selection is made in the editor window.

    • Menu if no selection - This specifies the menu that is displayed when right-clicking in an edit window that does not have a selection.

    • Menu if selection - This specifies the menu that is displayed when right-clicking in an edit window that has a selection.

    • Select first (Affects all extensions) - When checked (default), a selection can be made with the right mouse button instead of displaying the language-specific menu. When this is not checked, select menu items by clicking and dragging the mouse.

  • Begin/end pairs - Specify the begin/end pairs to use for the selected extension in a format similar to a regular expression. This text box is unavailable for languages that have special begin/end matching built-in. See Begin/End Structure Matching for more information about begin/end pairs and using this option.

  • Word chars - These are the characters that SlickEdit® uses to recognize a string of text as a word. The word characters affect the operation of all word-oriented commands, including word searching. You can use a dash (-) character to specify a range, such as "A-Z", which specifies uppercase letters. To specify the dash (-) character as a valid word character, place a dash at the beginning or end of the word character string.

    Note

    Word chars are not used for tagging operations. To adjust the identifier characters used by Context Tagging®, use the Identifiers options on the Tokens tab of the Color Coding options page (Tools → Options → Languages → [Language Category] → [Language] → Color Coding ).

  • Language-Specific Project - Click this button to set project properties specific to the selected language. See Defining Language-Specific Projects for more information.

Language-Specific View Options

These options control the display of special characters, line numbers, and more. C/C++ View options are shown below (Tools → Options → Languages → Application Languages → C/C++ → View ).

Special Characters

When this option is selected, view of all types of special characters is enabled for the language. This includes Tabs, Spaces, and Newline characters as well as all of the other special characters listed on the Appearance → Special Characters option screen.

Alternately, select the individual options to enable display of the special characters you want to see. Note that you can also toggle display of special characters on a per-document basis with the menu item View → Special Chars (or use the view_specialchars_toggle command). Viewing of special characters is only available for ASCII files. See Viewing Special Characters for more information.

Configure Special Characters - Jumps to the Appearance → Special Characters node in the Options dialog, where you can define the visible characters that represent each type of special character. See Special Character Options for more information.

Line Numbers

When this option is selected, display of line numbers is enabled for the selected language. By default, SlickEdit automatically adjusts the width of the line numbers based on the length of the current file. You can set a fixed width if you prefer.

Note that you can also toggle display of line numbers for a single document with View → Line Numbers (or the view_line_numbers_toggle command). See Viewing Line Numbers for more information.

Symbol Coloring

Use this to enable Symbol Coloring for the selected language.

Modified Lines

When checked, modified and inserted lines are indicated with a color bar in the left margin. Click the Select color link to select the colors for each. For more information see Modified Lines.

Current Line

When checked, the current line is highlighted using the selected background and foreground color. To select the colors used, click the Select colors link. For more information see Current Line.

Hex View

This option is used to enable Hex mode editing (choose Hex or Line hex). You can also enable Hex mode on a per-document basis with the menu items View → Hex and View → Line Hex (or use the commands hex and linehex). See Hex Mode Editing for more information.

Language-Specific Indent Options

These options lets you set the indenting style you like on a language-specific basis. You can also specify whether code is indented with spaces or tabs and set the behavior of the Tab key. The features Syntax Indent, SmartPaste®, Dynamic Surround, and Syntax Expansion are also enabled through this page.

The settings on this page depend on the selected language. As an example, the C/C++ Indent options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Indent ).

The options are described as follows:

  • Indent style - Select from the following indent styles:

    • None - When this option is selected, the Enter key will put the cursor at the beginning of the line.

    • Auto - When this option is selected, the Enter key indents according to the previous line.

    • Syntax indent- When this option is selected, the Enter key indents according to language syntax. The value in the text box specifies the amount to indent for each level. The hyperlink indicates if Adaptive Formatting is on or off for this setting. See Syntax Indent for more information.

  • When tab key reindents the line - These options specify that the Tab key be used to beautify or reindent the current line. Select from the following settings:

    • Never - When this option is selected, pressing Tab will never reindent the line. It will indent to the next tab stop.

    • Always - Pressing the Tab key in any column will reindent the current line.

    • In leading blanks - Pressing the Tab key will reindent the line if the cursor is positioned within the leading white space of the line. Otherwise it will indent to the next tab stop. This option is further controlled by the Strict check box.

    • Strict - Strict only applies to the In leading blanks option. When this option is selected, it reindents the line only if the cursor position is before the intended indent location; otherwise, it will insert an additional tab stop. When this option is cleared, it reindents the line when the cursor is located on the leading whitespace, regardless of whether the column is before or after the intended indent location.

  • Tabs - Set tabs in increments of a specific value or at specific column positions. To specify an increment of three, enter 3 in the text box. To specify columns, for example, enter 1 8 27 44, to specify tab stops that are not an increment of a specific value. The hyperlink indicates if Adaptive Formatting is on or off for this setting.

  • Indent with tabs - Determines whether Tab key, Enter key, and paragraph reformat commands indent with spaces or tabs. The hyperlink indicates if Adaptive Formatting is on or off for this setting. See Indenting with Tabs for more information.

  • Insert real indent - When this option is selected, the Enter key inserts real spaces or tabs representing the indent instead of virtual spaces. This option allows the function for the End key on the keyboard to place the cursor after blank text where new text can be typed.

  • Indent selection when text selected (affects all extensions) - When this option is selected, it affects all of the extensions, and pressing Tab or Shift+Tab indents or unindents the selected text.

  • Backspace at beginning of line unindents - When this option is selected and the cursor is located before the first non-blank character, pressing the Backspace key unindents the current line by one indent level. See also Setting the Backspace Unindent Style.

  • Use SmartPaste® - Specifies whether copied or pasted text should be reindented according to what the editor thinks is the correct indent level. See SmartPaste® for more information.

  • Use Dynamic Surround - Provides the ability to surround a group of statements with a block statement, indented to the correct levels according to your indent settings on this tab. In order for Dynamic Surround to work, the option Syntax Expansion must also be selected (see below). See Dynamic Surround for more information on how to use this feature.

  • Syntax expansion - Activates the Syntax Expansion feature. When this option is selected, pressing the spacebar after typing a keyword such as if or for will cause that syntax element to be expanded, inserting the rest of the if or for statement. Alternately, you can bind a space command to a key other than the spacebar. See Syntax Expansion for more information on using this feature.

    • Minimum expandable keyword length - Sets the minimum length for a keyword that will trigger Syntax Expansion. For example, if this is set to 3, then two-letter keywords such as if will not be expanded.

Language-Specific Formatting Options

These options let you configure the way SlickEdit® formats code as you type. Depending on the language, you can specify the code formatting templates, how various syntactical elements are treated, when and what code elements are automatically inserted, and more. The formatting options that are available depend on the selected language. For more information, see the following section for your language (or the one that most closely relates to your language):

  • C/C++ Formatting Options

  • Java Formatting Options Interface

  • XML Formatting Options

  • HTML Formatting Options

  • XML/HTML Formatting (the feature)

  • Ada Formatting Options

  • COBOL Formatting Options

  • Pascal Formatting Options

  • PL/I Formatting Options

Language-Specific Adaptive Formatting Options

Adaptive Formatting scans a file for the formatting styles in use and automatically matches those settings for the current editing session. The options on this screen are used to enable/disable Adaptive Formatting and configure the styles that SlickEdit® should recognize for the language. The C/C++ Adaptive Formatting options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Adaptive Formatting ).

Select or clear the Use Adaptive Formatting option to enable or disable the feature for the selected language. When Adaptive Formatting is enabled, use the subsequent check boxes to select the individual style settings for which SlickEdit should scan. The individual style settings that appear on the Options screen will vary depending on the language. See Adaptive Formatting for more information.

Language-Specific Comment Options

Comment options let you control how block and line comments are created.

To comment out selected lines, select text in the editor and then click Document → Comment Block orDocument → Comment Lines (box and comment commands, respectively). These operations use the matching comment style to comment out all text on the lines containing the selection. Comment Block surrounds multiple lines with a single block comment. Comment Lines comments out each line in the selection with a line comment. See Commenting for more information.

The settings on the Comments screen depend on the selected language. As an example, the C/C++ options for comments are shown below (Tools → Options → Languages → Application Languages → C/C++ → Comments ).

Comment block

These settings are used when you comment out a selected block of text (Document → Comment Block or box command). SlickEdit® provides eight fields to specify the characters used in your commenting style. If you want to apply a comment with no additional decoration, fill in the upper-left and lower-right fields with the characters to begin and end a block comment. To draw a box around the comment, fill in additional characters in the other fields. For example, you might put an asterisk in each of the other fields to draw a box of asterisks around the block comment.

SlickEdit interprets the contents of these fields literally. If you want the asterisks on the left-hand side to line up, you need to put a space before the asterisk in the left, middle field. Likewise you would put a space before the asterisk and slash in the field containing the end of comment characters. Trailing spaces are ignored on the right-hand fields.

To illustrate, the following code sample is a selection:

               if (!enabled) {
                  tabState = TIS_DISABLED;
               }

From the main menu, click Document → Comment Block , and the selection is commented out as follows:

/*
               if (!enabled) {
                  tabState = TIS_DISABLED;
               }
*/

Select from the following comment block options:

  • First line is top - When this option is selected, the first line of the text selection is used as the first line of the comment. The top border is not drawn. Otherwise the open comment characters will appear on their own line.

    If this option is selected for the preceding code sample, the comment will instead be formatted as follows:

    /*             if (!enabled) {
                  tabState = TIS_DISABLED;
               }
*/

  • Last line is bottom - When this option is selected, the last line of the text selection is used as the last line of the comment. The bottom border is not drawn. Otherwise the open comment characters appear on their own line.

    Using the same example, if this option is selected, the comment will be formatted as follows:

    /*
               if (!enabled) {
                  tabState = TIS_DISABLED;
               }                           */
Comment line

These settings are used when you comment out selected lines (Document → Comment Lines or comment command).

  • Left and Right - Characters that you specify in these boxes are literally inserted to the left and right of the text on each line of the selection when you use SlickEdit® to create a line comment. The placement of the Left characters can be controlled through the Location options below. Characters specified in the Right box are placed and aligned vertically at the end of the longest line of text in the selection. For example, if the Left and Right boxes both contain the characters //, clicking Document → Comment Line comments out the example code as follows:

    //             if (!enabled) {            //
//                tabState = TIS_DISABLED;//
//             }                          //

  • Location - Mutually exclusive location options control where characters specified in the Left box are placed:

    • At left margin - Places characters flush against the left margin of the editor window, as shown in the previous example. The indent levels are not changed. This provides better visibility for your comments and a way to clearly see the indent level relative to lines that are not commented out.

    • At level of indent - Places and aligns characters vertically at the current indent level. For example:

                 //if (!enabled) {
             //   tabState = TIS_DISABLED;
             //}

    • Start in column - Specifies in which column to start the comment for a line selection. This is useful for column-oriented languages such as COBOL. Type or use the spin box to select the desired column number. The left comment characters are placed at the specified column.

Doc comments

Select from the following options:

  • Automatically expand doc comments - When this option is selected, SlickEdit® automatically inserts a skeleton doc comment when you type comment start characters and then press Enteron a line directly above a function, class, or variable. The type of skeleton that is inserted is based on your start characters and style settings.

Note

In C#, you do not need to press Enter, as the skeleton comment is inserted after you type the third slash.

  • Edit expansion - Click this button to open the Doc Comment Editor, where you can define and edit the templates that are inserted when doc comments are expanded. See Modifying Doc Comment Templates for more information.

  • Extend leading border - Put a check in this box to precede each line with the leading characters from the previous line. This is useful if you like to have an asterisk in the first column of your doc comments, for example.

Comment editing

The following options control comment editing behaviors. These options will be unavailable for non-applicable extensions.

  • Split line comments - If selected, when you press Enter in the middle of a line comment, a new line comment will automatically be started on the new line. For example:

    // The quick brown fox [CURSOR_HERE]jumped over the lazy dog.

    Pressing Enter will result in:

    // The quick brown fox
// [CURSOR_HERE]jumped over the lazy dog.

  • Extend line comments - If selected, when you press Enter at the end of a line containing a line comment, and there is also an aligned line comment on the line before or after the current line, a new line comment will automatically be started on the new line. For example:

    // The quick brown fox
// jumped over the lazy dog.[CURSOR_HERE]

    Pressing Enter will result in:

    // The quick brown fox
// jumped over the lazy dog.
// [CURSOR_HERE]

  • Join comments when joining lines - If selected, when you press Delete at the end of a line containing a line comment to join the current line with the next line, and the next line is also a line comment, the line comment characters will automatically be deleted. For example:

    // The quick brown fox [CURSOR_HERE]
// jumped over the lazy dog.

    Pressing Delete will result in:

    // The quick brown fox[CURSOR_HERE] jumped over the lazy dog.
String editing

If Split strings on Enter is selected, when you press Enter to split a line when the cursor is inside of a string, the closing and opening quotes and, if necessary, operators, will automatically be inserted, and the string will be aligned with the original string. For example:

String x = "The quick brown fox [CURSOR_HERE]jumped over the lazy dog.";

Pressing Enter will result in:

String x = "The quick brown fox "+
           "[CURSOR_HERE]jumped over the lazy dog.";

Language-Specific Comment Wrap Options

Comment Wrap options let you activate wrapping and configure the way block, line, and doc comments are wrapped. See Comment Wrapping for more information.

The settings on this page depend on the selected language. As an example, the C/C++ Comment Wrap options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Comment Wrap ).

The options are described as follows:

  • Enable comment wrap - When selected, comments are allowed to be wrapped. You must still specify the type of comments that you want wrapped by selecting one or more of the Enable options for block, line, and doc comments.

    • Start wrapping on line - This setting pertains to line comments only. Make sure line comment wrapping is turned on, then type or select the number of consecutive line comments that must be present before wrapping is activated. If your code contains many one line descriptive comments, you may want to set this to 2 or more so that comment wrapping will not affect these short line comments.

  • Comment width - There are three types of width settings for comments:

    • Fixed width - If selected, comments are formatted to the specified width. This is useful since comments are typically indented with the corresponding code. This option maintains the original left margin of the comment and adjusts the right margin to meet the target width.

      If Maximum right column is used, comment lines will be wrapped when they reach the specified column, even if they have not reached the specified fixed width. This is useful if coding standards mandate that text should not exceed a specified column.

    • Automatic width - If selected, the width of the longest multi-line paragraph in the comment block is used as the width for block comments. This is useful for preserving the formatting of existing comments.

      If Maximum right column is used, comment lines will be wrapped when they reach the specified column, even if they have not reached the specified fixed width. This is useful if coding standards mandate that text should not exceed a specified column.

    • Fixed right margin - If selected, lines will break before the specified number of columns in the Right column field has been reached.

    • Preserve width on existing comments - If selected, when editing an existing comment, SlickEdit® preserves the width of the existing comment. The width is determined by the length of the longest multi-line paragraph. If the width of the existing comment cannot be determined, the formatting option specified under Comment width will be used instead.

    • Continue bullet list on Enter - If selected, when Enter is pressed inside a bulleted paragraph, a new bullet will be inserted and the cursor will be placed at the text starting position.

  • Javadoc - If Use hanging indent on block tag commentsis selected, the second line of a block tag comment will be automatically aligned to the first non-whitespace character after the first word after the tag.

  • Sync vertical line column - This button will make visible and move the vertical line column to match the hard margin column (if using fixed right column margins) or the maximum right column (if using fixed width).

Language-Specific Word Wrap Options

These language-specific options let you set margins and the justification style and configure Word Wrap, which keeps the cursor within the specified margins when entering text, moving the cursor, and deleting characters. Note that Word Wrap is intended for plain text only.

The settings on this page depend on the selected language. As an example, the C/C++ Word Wrap options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Word Wrap ).

The options are described as follows:

  • Margins - Sets the left, right, and new paragraph margins. Specify the column number at which each margin should begin. The margin indicator will only appear if the Word wrap option is selected, which activates word wrapping.

  • Justify style - Select from the following justification styles:

    • Left and respace - Left justification with space character reformatting. One space is placed between words except after the punctuation characters period, ?, and !, which get two spaces. To have only one space after the period, question mark, and exclamation point 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 Save File Options for more information.

    • Justified - Full justification. Left and right edges of text will align exactly at margins.

  • Word wrap - This option activates/deactivates Word Wrap. When selected, the editor keeps the cursor within the margins when entering text, moving the cursor, and deleting characters. Note that Word Wrap is intended for plain text only.

  • Soft wrap - Soft Wrap makes it easy to view long lines of code without scrolling. Each line is wrapped as though a carriage return was inserted, however, the file itself is not modified. The options are as follows:

    • Enable soft wrap - This option activates Soft Wrap. A curved arrow is displayed at the end of each line, along the right-hand border of the edit pane, indicating that the text continues on the next line. The horizontal scrollbar disappears as it is no longer needed.

    • Break on word boundary - Breaks the text at the end of the line so that words are kept whole. This makes for easier reading, especially in text files.

Language-Specific Alias Options

Aliases are identifiers that you can quickly type, which are then expanded into snippets of text. Language-specific aliases are useful for inserting comment headers, statement and function templates, or any other text that you frequently use. This option screen is used to manage language-specific aliases. As an example, the C/C++ Aliases options are shown below. See also Language-Specific Aliases for more information.

The name of the file that contains the aliases is displayed next to the label Alias file.

The left side of the options screen contains the alias list. The box on top of the alias list allows you to search the alias list incrementally as you type, so you can find the alias you want to edit or remove.

The Surround With check box is used to specify that you are working with aliases for Surround With. Surround With is a feature that lets you surround existing code with text or predefined structures. When this option is selected, the alias list changes to show only Surround With aliases. When this option is not selected, the alias list shows only normal aliases. See Surround With for more information about creating and working with Surround With aliases.

The large box on the right is the alias edit window. When an alias is selected in the alias list, you can type directly inside this window to define or edit the alias expansion.

Use the Insert Escape Sequence button to insert escape sequences into your alias expansion. See Alias Escape Sequences for a list of available sequences.

The following buttons appear under the alias list and alias edit window:

  • New - Click this button to create a new alias name to be added to the alias list. After doing this, define the expansion by typing in the alias edit window.

  • Delete - Deletes the alias that is currently selected in the alias list.

The bottom of the Aliases options page is used to create and manage parameter prompts in aliases. Parameter Prompting is a feature that lets you insert a parameter inside an alias so that when the alias is expanded, a dialog is displayed, prompting you to input the values.

The parameter list contains a list of the parameters you have created. It is divided into sections that correspond to the fields on the Enter Alias Parameter dialog, which is used to add a new parameter:

  • Param Name - The name that is used in the alias to identify this parameter.

  • Prompt String - This string appears as a label on the dialog that prompts for values when the alias is expanded.

  • Initial Value - (Optional) This text is automatically entered as the initial value for the parameter on the dialog that prompts for values when the alias is expanded.

The Parameters section of the Aliases options page provides the following buttons:

  • Add - Displays the Enter Alias Parameter dialog, used to add a new parameter for the alias that is currently selected in the alias list. See Parameter Prompting for more information.

  • Remove - Deletes the parameter that is selected in the parameter list.

  • Edit - Displays the Edit Alias Parameter dialog, used to edit the parameter that is selected in the parameter list. See Parameter Prompting for more information.

  • Up and Down - Use these buttons to change the order of the parameters, moving the selected parameter up or down in the parameter list.

Language-specific aliases can be automatically expanded when you type the alias identifier and press space.

  • Expand aliases on space - When set to True, typing an alias identifier, then pressing space will automatically expand the alias. When set to False, space does not expand aliases automatically.

Language-Specific Auto-Complete Options

These options let you configure the behavior of the Auto-Complete feature. The settings on this page depend on the selected language. As an example, the C/C++ Auto-Complete options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Auto-Complete ).

The options are described as follows:

  • Enable auto-completion - If selected, activates the Auto-Complete feature. See Auto-Complete for more information.

  • Syntax expansion - If selected, Auto-Complete will show Syntax Expansion choices for the word prefix under the cursor. Syntax Expansion completes syntactic elements of the language, like if or for statements, putting in the parentheses and braces matching your specified coding style settings. See Syntax Expansion for more information.

  • Keywords - If selected, Auto-Complete will show keyword choices for the word prefix under the cursor, if it matches one or more keywords in the current language.

  • Alias expansion - If selected, Auto-Complete will show the matching alias for the word under the cursor. Aliases names require an exact word match, not just a prefix match. For more information on using aliases, see Aliases.

  • Symbols - If selected, symbols will be displayed as completion options if the word prefix at the cursor matches one or more symbols using a strict, context-sensitive and language-specific tag search.

  • Word completion - If selected, word completions will be displayed if the word prefix under the cursor matches one or more words in the current file. The strength of this option is that it ties into the word and line completion features of SlickEdit®. After you select a word completion, you can press Ctrl+Shift+Space to complete the rest of the line from which the original word came. See Word Completion for more information.

  • Argument completion - If selected, turns Auto-Complete on in the Build tool window for completing file names and paths.

  • Options - More options are available:

    • Tab inserts longest unique prefix - If selected, pressing Tab will cause Auto-Complete to attempt to insert the longest unique prefix match of all its completions. If the word prefix cannot be extended, Tab will cycle to the next completion choices.

    • Tab cycles through choices - Select this option if you want to use Tab and Shift+Tab to cycle through completion choices, as is done in some command shells. If cleared, Tab will attempt to insert the longest unique prefix (if selected), or insert the selected completion, or cancel Auto-Complete and behave normally if there is no completion selected.

    • Minimum prefix length - The minimum number of characters the word prefix must contain before auto-completions will be displayed automatically.

    • Completion choice - When set to Automatically choose unique completion, if Auto-Complete finds exactly one word match, it will automatically select that match for completion. If Insert current completion in file is selected, then completions selected from Auto-Complete will replace the current text, modifying the file as you work. Choose Manually choose completion to select and insert the completion manually.

  • Details - Detailed options include:

    • Show light bulb - If selected, displays the light bulb as a reminder when Auto-Complete suggestions are available for the current word prefix.

    • Show expanded text - If selected, shows the rest of the word or statement being completed.

    • Show list of matches - If selected, shows the list of matches underneath the word prefix.

    • Show icons - If selected, displays symbol icons and folder icons. Turn this feature off to get a more compact list containing only completions.

    • Show categories - If selected, shows completions in a categorized list for each type. If cleared, all completions will be shown in one flat, sorted list.

    • Show symbol declaration - If selected, for symbol completions, this will show the symbol declaration as a comment to the right of the symbol completion.

    • Show comments - If selected, for symbol completions, this will display the symbol's comments to the right of the symbol completion.

Language-Specific Auto-Close

These options let you configure Auto-Close for a specific language. Auto-Close inserts matching closing punctuation when opening punctuation is entered. For example, when you type an open parenthesis, Auto-Close automatically inserts the closing parenthesis right next to it.

The settings on this page depend on the selected language. As an example, the C/C++ Auto-Close options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Auto-Close ).

The following options are available:

  • Enable Auto-Close - When set to True, the punctuation items selected in the additional checkboxes will Auto-Close. To turn off Auto-Close for all punctuation, set this value to False.

    • Parenthesis () - When set to True, Auto-Close will automatically insert a closing parenthesis when an open parenthesis is entered.

      • Insert padding - To insert spaces between the parentheses, set this value to True.

    • Bracket [] - When set to True, Auto-Close will automatically insert a closing bracket when an open bracket is entered.

      • Insert padding - To insert spaces between the brackets, set this value to True.

    • Angle Bracket <> - When set to True, Auto-Close will automatically insert a closing angle bracket when an open angle bracket is entered.

      • Insert padding - To insert spaces between the angle brackets, set this value to True.

    • Double Quote "" - When set to True, Auto-Close will automatically insert a closing double quote when an open double quote is entered.

    • Single Quote '' - When set to True, Auto-Close will automatically insert a closing single quote when an open single quote is entered.

  • Configure completion (Enter, Tab) - This link takes you to Auto-Close so that you can configure completion keys.

Language-Specific Context Tagging® Options

These options let you configure language-specific settings for Context Tagging (see Context Tagging). Note that global Context Tagging options are located at Tools → Options → Editing → Context Tagging® Options (see Context Tagging® Options).

The settings on this page depend on the selected language. As an example, the C/C++ Context Tagging options are shown below (Tools → Options → Languages → Application Languages → C/C++ → Context Tagging® ).

List Members

The following options apply to List Members. See List Members for more information.

  • Auto-list members - If selected, typing a member access operator (for example, "." or "->" in C++) will trigger SlickEdit® to display a list of the members for the corresponding type. To access this feature on demand, press Alt+Dot. If you use this feature on demand, and you are not in a member expression, this feature will display a list of locals, global variables, current class members, etc.

  • Show comments - If selected, the comments are displayed for the currently selected symbol in the list displayed by List Members. When a symbol has multiple definitions or overloads, and multiple sets of comments, the comments will indicate that you are looking at item "< 1 of n >". Click on the arrows or use Ctrl+PgUp and Ctrl+PgDn to cycle through the comment sets.

  • Completion on space - If selected, pressing the spacebar when List Members is displayed will insert the longest unique matching prefix from the symbols in the list. For example, if the list contains FLAG_CHAR and FLAG_LONG, then typing FL<Alt+Dot><spacebar> completes the line of code up to FLAG_. If this option is not selected, use Ctrl+Space when List Members is displayed to perform completion.

  • Space always inserts space - If selected, pressing the spacebar when List Members is displayed will insert the current item and a space in the list after the current item. If this option is not selected, pressing the spacebar will only insert the current item with no extra space.

  • Insert open parenthesis - If selected, selecting an item in the list inserts the current item in the list and any extra characters that are required by the symbol. For example, an open parenthesis is inserted after a function name for languages that require an open parenthesis after a function name. For C++, the less-than symbol (<) is inserted after a template class name.

  • Preserve identifier to right of cursor - When set to Preserve, only the identifier characters before the cursor are replaced with an item selected from a List Members dialog, while identifier characters after the cursor are preserved. When this option is set to Replace, identifier characters following the cursor are replaced with the item selected from a list members dialog. When this option is set to Preserve for auto list members only, trailing identifier characters are preserved for auto list members but not when listing members on demand by pressing Alt+Dot.

    For example, if List Members is active and the current line is as follows:

    this->foo<cursor_here>Bar

    Then if this option is set to Preserve and you choose a symbol named "foodForThought" from the List Members list, the line will be changed to:

    this->foodForThought<cursor here>Bar

    If this option is set to Replace, doing the same would result in:

    this->foodForThoughtBar<cursor here>

  • Auto-list compatible values - If selected, compatible variables are automatically listed after you press the spacebar after assignment operators and return statements. Global (non-module) variables are not listed. This only affects C, C++, and Java. To access this feature on demand, press Alt+Comma.

  • Use strict case-sensitivity rules - if checked, matches symbols with the same case as what was entered.

Parameter Information

The following options control the lookup of parameter information. See Parameter Information for more details.

  • Auto-display parameter information - If selected, the prototype and comments for a function are automatically displayed when a function operator such as the open parenthesis is typed, and the current argument is highlighted within the displayed prototype. To access this feature on demand, press Alt+Comma.

  • Show comments - If selected, comments are displayed when Parameter Info is displayed. When a symbol has multiple definitions, and multiple sets of comments, the comments will indicate that you are looking at item "< 1 of n >". Click on the arrows or use Ctrl+PgUp and Ctrl+PgDn to cycle through the comment sets.

  • Auto-insert matching parameter - If selected, when Parameter Info is displayed and the name of the current formal parameter matches the name of a symbol in the current scope of the appropriate type or class, the name is automatically inserted. When the name is inserted, it is also selected so that you can type over it, or you can type Comma, Space, Tab, or a closing parenthesis to use the automatically inserted parameter.

  • Auto-list compatible parameters - If selected, compatible variables are automatically listed when parameter info is active and typing the arguments to a function call. Global (non-module) variables are not listed. This only affects C, C++, and Java. To access this feature on demand, press Alt+Comma. See Auto List Compatible Parameters for more information.

  • Pad parentheses - If selected, a space is inserted after the open parenthesis when a parameter name is automatically inserted. In addition, if you type a close parenthesis after an automatically inserted parameter, it will insert a space before the close parenthesis.

  • Insert space after comma - If selected, a space is inserted after the comma when a parameter name is automatically inserted, such as myfun(a, b, c).

Go to Definition

These options control the behavior when you navigate from a symbol to its definition. You can do this by selecting Search → Go to Definition , selecting Go to Definition from the context menu, pressing Ctrl +Dot in CUA emulation, or by executing the push_tag command from the SlickEdit command line. See Symbol Navigation for more information.

  • Prioritize navigation to - Here you can specify if you prefer to navigate directly to a symbol's definition (proc) or declaration (proto). If Prompt is selected, the Select Symbol Dialog is displayed, prompting you for both definitions and declarations. In any case, if you use Ctrl+Dot to jump to a symbol, you can cycle through the alternate symbols by pressing Ctrl+Dot repeatedly. You can step backwards through the list of matches by pressing Ctrl+Comma. However, once you reach the first match, Ctrl+Comma will then pop you back to your original location, where you were before you pressed Ctrl+Dot.

    Independent of the settings for these options, in the following circumstances, SlickEdit® will jump directly to the definition or declaration.

    • If the cursor is on the first line of a symbol's declaration, it will jump directly to the definition, provided it is unique.

    • If the cursor is on the first line of a symbol's definition, it will jump directly to the declaration, provided it is unique.

    This behavior is particularly convenient for C++ programmers to navigate from a function to its prototype and vice versa. See Symbol Navigation for more information about navigating through your code.

  • Ignore forward class declarations - When this option is enabled, Go to Definition filters out forward class declarations, and only shows the actual class definitions and declarations.

  • Use strict case-sensitivity rules - when selected, factors upper/lowercase letters as part of the matching criteria.

  • Attempt to filter out non-matching function overloads (expensive and slow) - when selected, SlickEdit attempts to filter out functions with the same name but with different function signatures. As stated, this can slow down the matching.

Highlighting and Completion

  • Show info for symbol under mouse - When selected, as the mouse cursor floats over a symbol, the information and comments for that symbol are displayed.

  • Highlight matching symbols under cursor - When selected, all occurrences of the current symbol under the cursor in the buffer are highlighted. The highlight color is controlled by the Symbol Highlight screen element (Tools → Options → Appearance → Colors ). Advanced configuration options are available. See Cursor on Symbol Shows All Uses in File for more information.

  • Use strict case sensitivity when completing identifiers - when selected, factors upper/lowercase letters into the matching criteria.

Language-Specific Color Coding Options

Color Coding is a feature that displays various portions of code in color for identification purposes. The syntactic elements colored by Color Coding are determined by the settings on this options screen. The colors used for Color Coding are set through . See also Colors, Color Coding, and Symbol Colors for more information.

The settings on the Color Coding options page depend on the selected language. The C/C++ Color Coding options (Tools → Options → Languages → Application Languages → C/C++ → Color Coding ) are used in the screen shots for this section.

The Color Coding options page contains the following general options:

  • Lexer name - Select the language lexer to use from the Lexer name drop-down list. This sets the active lexer for that language.

  • New - Click this button, located next to Lexer name, to prompt for a lexer name to start a new language-specific color coding definition (see Creating Color Coding for a New Language).

  • Delete - Click this button, located next to Lexer name, to remove a lexer name from the list. You can only delete user-created lexers.

  • Import - Click this button to import lexer definitions from a VLX file.

  • Colors - Click this button to jump to the Tools → Options → Appearance → Colors option screen where you can specify the colors used. Click the Back button on the Options dialog to return to the Color Coding Language tab. See Setting Colors for Screen Elements for more information.

Other options are categorized into the following tabs:

  • Color Coding Tokens Tab

  • Color Coding Numbers Tab

  • Color Coding Strings Tab

  • Color Coding Language Tab

  • Color Coding Comments Tab

  • Color Coding Tags Tab

Color Coding Tokens Tab

The Tokens tab provides the capability to specify unique tokens to help you when working with your code.

The following options are available:

  • Token type - Select from the following token types:

    • Keywords - When this option is selected, the list box displays the words that have keyword color.

    • CS keywords - When this option is selected, 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 not selected.

    • Preprocessor - When this option is selected, the list box to the right displays preprocessor keywords in preprocessor color. All preprocessor keywords must start with the same character.

    • Punctuation, Lib Symbols, Operators, User Defined - When one of these options is selected, the list boxes to the right display the words associated with each.

  • Identifiers - All Context Tagging® operations use this set of characters to find identifiers in the code that is being analyzed. Therefore, it is important to set the start and follow characters in a manner that is consistent with the language specification. In most languages, identifiers can contain digits, but they cannot start with them. For example, in C/C++, start characters are "a-zA-Z_$" and follow characters are "0-9".

    • Case-sensitive - Indicates whether identifiers are case-sensitive.

    • 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 - Click this button on the Tokens tab to add one or more words. Separate each word with a space.

  • Delete - Deletes selected items in a list box.

  • Get - Click this button to add words by selecting the file that contains the keywords that you want to add.

Color Coding Numbers Tab

The Numbers tab provides options for color coding numerical values when working with SlickEdit®.

This tab contains the following:

  • Hex numbers

    • 0x#### (C-Style) - When this option is selected, text such as 0x123ABC is color coded in number color.

    • ####h (Intel assembler) - When this option is selected, text such as 123ABCh is color coded in number color.

    • $#### (Motorola) - When this option is selected, text such as $123ABC is color coded in number color.

    • &H#### (Basic) - When this option is selected, text such as &H123ABC is color coded in number color.

    • "####"X (Rexx) - When this option is selected, strings such as "123ABC"X are color coded in number color.

    • Z"####" (Fortran) - When this option is selected, strings such as Z"123ABC" are color coded in number color.

    • No Hex (COBOL) - When this option is selected, text such as 123ABC is not color coded in number color. By default (for most languages set in Language tab) 123ABC is color coded in number color.

  • Octal and binary numbers

    • ####O (Intel assembler) - When this option is selected, octal numbers such as 17723O are color coded in number color.

    • ####Q (Intel assembler) - When this option is selected, octal numbers such as 17723Q are color coded in number color.

    • ####B (Intel assembler) - When this option is selected, octal numbers such as 17723B are color coded in number color.

    • &O#### (Basic) - When this option is selected, octal numbers such as &017723 are color coded in number color.

    • O#### (C) - When this option is selected, octal numbers with a leading zero, such as 017723 are color coded in number color.

    • ####B (Binary numbers) - When this option is selected, binary numbers such as 110100B are color coded in number color.

  • Floating point numbers

    • #base#number#exponent float (Ada) - When this option is selected, text such as #23#56#67 is color coded in number color.

    • Floating point with "E" exponent - When this option is selected, text such as 123.4E24 is color coded in number color.

    • Floating point with "D" exponent - When this option is selected, text such as 123.4D24 is color coded in number color.

    • No exponents (COBOL) - When this option is selected, it specifies that the language does not allow floating point exponents of any kind.

  • Do not color code numbers (HTML) - When this option is selected, text such as 123.4E24 and 123ABC is not color coded in number color. By default (for most languages set in the Language tab), 123.4E24 and 123ABC is color coded in number color.

  • Allow underscores in integers (Ada) - When this option is selected, text such as 12_34 is color coded in number color.

Color Coding Strings Tab

The Strings tab contains options for color coding strings.

This tab contains the following:

  • Double quoted strings

    • Two consecutive quotes represent one (REXX) - """" for REXX represents a string of length one which is a double quote character.

    • \ " represents a double quote (C) - "\"" for C represents a string of length one which is a double quote character.

    • Double quoted strings are always 1 char long - When this option is selected, 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 (C) - When this option is selected, it 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 this option is selected, it 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 this option is selected, a string is not color coded unless an end quote is seen on the same line. This does not support multi-line strings.

  • Single quotes

    • Two consecutive quotes represent one (Pascal) - '''' (four consecutive single quote characters) for Pascal represents a string of length one which is a single quote character.

    • \ ' represents a single quote (C) - '\'' represents a string of length one which is a single quote character.

    • Single quoted strings are always 1 char long - When this option is selected, 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 backslashes continues string across lines (C) - When this option is selected, it 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 this option is selected, it 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 this option is selected, a string is not color coded unless an end quote is seen on the same line. This does not support multi-line strings.

  • Backquoted strings (Perl, Bourne shell, C shell) - When this option is selected, backquoted shell expansion strings such as ~ls -d /home/~ are color coded in string color.

Color Coding Language Tab

The Language tab is used to set more language-specific color coding options.

This tab contains the following:

  • Language specific - To avoid requiring complicated BNF for defining color-coding, some hardware language-specific adjustments have been added. You may be able to use one of these language-specific settings for another language, but there's no guarantee it will work.

  • Color Code Line Numbers (Basic/COBOL) - When this option is selected, indicates that leading line numbers should be color-coded in line number color.

  • 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) - Activates 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 to get HTML embedded language color-coding:

    print <<HTMLEOF;
<HTML><HEAD><TITLE>...</TITLE></HEAD>
<BODY>
...
</BODY>
</HTML>
HTMLEOF

    Unknown languages are color-coded in string color. Embedded language colors are user-definable.

  • Color identifiers followed 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 this option is selected, the Java syntax package and import statements are supported. This option is forced on for the lexer name Java. You must add the package and/or import keywords to your keyword list in order for this option to have any effect.

  • Preprocessing keywords can appear anywhere - When this option is selected, preprocessing keywords are color-coded even if they are not only preceded by white space.

  • Identifiers may start with a number (COBOL) - When this option is selected, identifiers may start with one or more decimal digits. By default, leading decimal digits indicate a number.

  • @''####'' Unicode strings (C#) - When this option is selected, text in the form of @"any text" is coded as a string.

  • Treat everything after 0x1a as comments (end of file) - Historically, DOS used 0x1a to mark the end of the file. When checked, SlickEdit will treat all characters after 0x1a as comments.

  • Color inactive code regions (C/C++ Preprocessing, eg. #if 0) - When checked, uses a single color for inactive code regions, instead of applying normal color coding.

Color Coding Comments Tab

The Comments tab is used to set comment options for Color Coding.

This tab contains the following:

  • New Line comment - Click this button to define new single-line comments.

  • New Multi-line comment - Click this button to define new multi-line comments.

  • Delete - Click this button to remove the selected comment definition from the list.

  • MultiLine comment - The following options apply to multi-line comments:

    • Start delimiter - Delimiter which starts the multi-line comment. Currently, the first character of this string cannot be a valid identifier character.

    • End delimiter - Delimiter which ends the multi-line comment. Currently, the first character of this string cannot be a valid identifier character.

    • Nesting allowed - When this option is selected, this multi-line comment may have this multi-line comment inside it.

    • Only if first non-blank character in line - Indicates the start delimiter must be the first non-blank character in the line in order to be considered the start of a comment. This check box is available only when the Only when start delimiter is in column text box is completed.

    • Check for start delimiter first - When this option is selected, the lexer checks for the start delimiter before looking for other items. When this option is specified, the start delimiter is limited to one character in length.

    • End delimiter must be the last character on the line - When this option is selected, the end delimiter text must occur at the end of a line to terminate the comment.

    • Only when start delimiter is in column - Indicates that the start delimiter 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 the start delimiter is immediately followed by one of the Comment Keywords. When the start delimiter is immediately followed by one of the Comment Keywords, keyword color is used.

  • Line Comment - The following options apply to single-line comments:

    • After column - Colors all characters after the specified column as a line comment.

    • Use delimiter - Uses the specified delimiter to recognize the following characters as a line comment.

    • Only if first non-blank character in line - If checked, a line comment cannot be preceded by any non-blank characters.

    • Check columns first - When checked, the lexer will look for the delimiter in the specified columns before doing other checks. This option clears any check marks in Only if first non-blank character in line and Only if preceded by blank.

    • End column is end of line - Put a check in this box if you are using Delimiter column to specify a column after which the delimiter is recognized as beginning a line comment. Then you only need to specify a start column using the fields for Delimiter column.

    • Only if preceded by blank - If checked, the delimiter must be preceded by a blank (space) to be recognized as starting a line comment.

    • Used for API documentation - If checked, the comment is colored using the Documentation Comment color rather than the Line Commentcolor.

    • Delimiter column - Specifies the columns in which the selected delimiter is recognized as beginning a line comment. If the delimiter begins in any other column, the text is colored as regular text. Specify a begin and end column to set a range of columns. Specify only a start column if line comments must begin in a specific column. If End column is end of line is checked, you need not specify an end column and the delimiter will be recognized in the start column and any column thereafter.

Color Coding Tags Tab

The Tags tab is used to set color-coding attributes when working with tagged-based languages such as HTML and XML. The following screen shot shows the Color Coding Tags tab for HTML:

It contains the following options:

  • Tag names - List box containing tags for HTML or XML. To add or delete tags, use the New and Delete buttons below this list box.

  • >>Attributes - List box containing attributes that belong to the tag selected in the Tag names list box. To add or delete attributes, use the New Attr and Delete buttons below this list box.

  • Attribute values - List box contains the values for the specified tag and attribute. To add or delete a value, use the New Value and Delete buttons below this list box.

  • For all tags - When this option is selected, the values in the Attribute valuelist box are applied to all tags that have the specified attribute.

Language-Specific File Options

These options are used to specify load and save options for files on a language-specific basis. As an example, the C/C++ file options are shown below (Tools → Options → Languages → Application Languages → C/C++ → File Options ).

The options are described as follows:

  • Load Options - Select from the following:

    • Load as Binary - When set to True, files are loaded without any translations (like changing tabs to spaces). This setting has precedence over all global options, as well as all language-specific options.

    • Expand tabs to spaces - When set to Default, SlickEdit® uses the setting for the global file load option, Expand tabs to spaces (Tools → Options → File Options → Load ). When set to True, SlickEdit always loads files with tabs expanded to spaces. When set to False, tabs are always left unexpanded.

  • Save Options - Select from the following:

    • Save as Binary - When set to True, files are saved without any translations, exactly byte-for-byte as they appear in the buffer. This setting has precedence over all global options, as well as all language-specific options.

    • Expand tabs to spaces - When set to Default, SlickEdit uses the setting for the global file save option, Expand tabs to spaces (Tools → Options → File Options → Save ). When set to True, SlickEdit always saves files with tabs expanded to spaces. When set to False, tabs are always left unexpanded.

    • Strip trailing spaces - When set to Default, SlickEdit uses the setting for the global file save option, Strip trailing spaces (Tools → Options → File Options → Save ). When set to True, trailing spaces at the end of lines are stripped. When set to False, spaces at the end of lines are always left.

    • Line format - Specifies how end of line characters are translated when a file is saved. When Automatic is set, the line breaks are saved automatically in the file format appropriate to the context in which you are working with no changes to the end of line characters. However, you can designate a file type for the line breaks. For example, if you are working in Windows and using CVS, using UNIX line breaks will make using CVS easier. Therefore, set the file format to UNIX.

    Note

    • The Save As dialog also allows the translation of the line end characters for the current file. See Save As Dialog.

    • Classic Mac line endings are a single carriage return (ASCII 13).

Language-Specific Compiler Properties

These settings are used to configure your compiler so that SlickEdit® can correctly perform full preprocessing, parsing, symbol analysis, and cross-referencing. The fields and options on this page depend on the selected language.

Note

These language-specific compiler settings are also available in a dialog interface. The fields and options are identical, so you can use the interface you prefer. To access the dialog, from the main menu, click Project → Project Properties . Select the Compile/Link tab, then click the Ellipsis button to the right of the Compiler combo box.

The following fields and options are common to all languages on the Compiler Properties interface:

  • Compiler Name - Contains a list of compilers. Names in this list are the names specified when you click Add.

  • Add - Used to add a new compiler name to the list. After adding the name, you will need to configure the compiler using the configuration settings on the lower-half of the interface.

  • Delete - Deletes the selected compiler and its associated configuration. Does not delete files from disk.

  • Copy - Used to add a new compiler configuration by copying the selected compiler's configuration. You will be prompted for a new compiler name.

  • Set Default - Specifies that the selected compiler should be used as the default. The current default is displayed under the Compiler Name field.

  • Build Tag File - Used to build tag files for the selected compiler configuration. This is especially useful when new configurations are created. If you do not build the tag file here manually, it will be built on demand.

  • Compiler Configuration - The lower half of the Compiler Properties interface is used to configure the selected compiler. In C/C++, you specify the header file and include directories. In Java, you specify the root JDK installation and system libraries.

For more information, see C/C++ Compiler Settings or Java Compiler Properties Dialog.

File Options

These global file options (Tools → Options → File Options ) are used to make settings regarding file operations such as loading and saving. For more information about working with files, see the chapter Workspaces, Projects, and Files.

File option categories are:

  • Open File Options

  • Load File Options

  • Save File Options

  • Backup File Options

  • AutoSave File Options

  • Files of Type Filter Options

  • Associate File Types Options

  • History Options

Open File Options

Open file options are shown below (Tools → Options → File Options → Open ). For more information about loading and opening files, see Opening Files.

The options are described as follows:

  • Edit 'A B C' start on file A - When set to True, the first file opened becomes the active buffer.

  • Open files using - Specifies which style of open dialog you wish to use to open files. Select one of the following values:

    • Browse files with Open Dialog - Uses the traditional open dialog to open files.

    • Smart Open - Uses the Open Tool Window to open files.

  • e/edit command Smart Open - Specifies the completion behavior when using the e or edit commands. Select one of the following values:

    • Smart Open off - No filename completion is used.

    • Smart Open open documents - Filename completion is used to suggest open documents only.

    • Smart Open workspace files - Filename completion is used to suggest workspace files only.

    • Smart Open workspace files and open documents - Filename completion is used to suggest open documents and workspace files.

  • Set current directory when switching buffers - When set to True, sets the current directory to the location of the selected file each time you change buffers.

  • Open Tool Window - The following options are available:

    • Dismiss on select - When set to True, the Open Tool Window is closed or auto-hidden after a file is selected and opened. When set to False, the tool window remains open and visible.

    • Show hidden files - Controls whether hidden files and directories are shown in the Open Tool Window.

    • Sync current directory - When set to True, changing the current directory outside of the Open Tool Window will also change the current directory within the tool window. Changing the current directory within the Open Tool Window also changes the application's current directory. When set to False, The Open Tool Window maintains its own current directory, independent from the rest of the application.

    • Prefix match - Controls whether the file name filter on the Open Tool Window performs a prefix match.

    • Show folders in file list - When set to True, files and folders are shown in the top pane of the Open tool window. This allows patterns in the File name field to match folders as well as files.

    • Show/match workspace and project files - When set to True, files from the current project and workspace are shown when their file names match the file name filter text. When set to False, these files are never shown in the list of matched file names.

    • Show/match open files - When set to True, open buffers are shown when their file names match the file name filter text. When set to False, these files are never shown in the list of matched file names.

    • Show/match files in history - When set to True, files from the recently opened file history are shown when their file names match the file name filter text. When set to False, these files are never shown in the list of matched file names.

Load File Options

Load file options are shown below (Tools → Options → File Options → Load ). For more information about loading and opening files, see Opening Files.

The options are described as follows:

  • Fast line count on partial load - When set to True, SlickEdit® counts the number of lines when files are opened. The line number is always displayed in the line indicator area of the editor. This option is much faster than the Count number of lines option when editing files larger than the cache size (2 MB by default), because very little data is written to the spill file. The Auto Reload feature does not work until the file is saved. If you are using the edit command to open files, use the switch +LFto control this option (see Command Line Switches).

  • Show EOF character - When set to True, the EOF character is not removed when a file is loaded. If you are using the edit command to open files, use the switch +LE to control this option (see Command Line Switches).

  • Expand tabs to spaces - When set to True, the entire contents of files are read into memory and tabs are expanded into spaces. If your tab settings for the file being loaded are of the form +<increment> (e.g. "+4"), then tabs are expanded in increments of the specified increment. Otherwise, tabs are expanded in increments of eight. To set tabs in a form +<increment>, select Tools → Options → Languages → [Language Category] → [Language] → Indent , and enter your values in the Tabs text box. For languages such as REXX and Linux containing shell scripts that require the contents of the file be analyzed before the file type is known, the Fundamental mode tab settings are used. If you are using the edit command to open files, use the switch +E to specify this option (see Command Line Switches).

  • File locking - When set to True, a file handle is kept open to the file for locking purposes. This detects when another user is editing the same file. If you are using the edit command to open files, use the switch +N to specify this option (see Command Line Switches).

  • Reinsert after current - When set to True, SlickEdit switches back to the previous buffer with the prev_buffer command. If you are using the edit command to open files, use the switch +BP to specify this option (see Command Line Switches).

  • Wrap line length - Specifies the number of characters at which long lines should be wrapped when a file is opened. This option improves editing performance and is particularly useful for editing very large, single-line XML files.

  • Use undo - When set to True, modifications to buffers may be undone (Ctrl+Z or Edit → Undo ).

  • Max undo steps - Specifies the maximum number of steps that are stored for undo operations when Use undo is enabled. Cursor motion can be undone but is not counted as a step. If you are using the edit command to open files, use the switch +U to specify this option (see Command Line Switches). For example, +U:32000 turns on undo and specifies a 32,000-step max.

  • Save/restore file position - When set to True, the cursor position in files is preserved on close and restored on open.

  • Max files - Specifies the maximum number of recently closed cursor positions to save when Save/restore file position is enabled.

  • Encoding - Unicode support required. Specifies the global (non-extension specific) file encoding. This setting is overridden if a extension-specific encoding is defined on the File Extension Manager for the selected language (see Managing File Extensions). Both the extension-specific and global setting are overridden if you specify an encoding in the Open dialog. SlickEdit records the encoding used to override default encoding settings and reuses this setting the next time you open the same file. This provides you with per-file encoding support. Encoding is also supported for Microsoft project files (vcproj, csproj, vbproj) that are XML files but that default to active code page encoding and not UTF-8, like XML. See Encoding for more information.

  • Load entire file - The following options are available:

    • Load entire file - When set to True, the entire contents of opened files are read into memory, however, the line indicator (located at the bottom right section of the editor) might become blank if the file does not fit in the editor's cache (defaults to 2 MB). When False, Auto Reload does not work until the file is saved. If you are using the edit command to open files, use the switch +L to specify this option (see Command Line Switches).

    • Load partially for large files - When set to True, the editor only partially loads files larger than the size specified in Load partially when files are larger than, in order to conserve memory. Since the file handle remains open to your file, Auto Reload does not work until the file is saved. The line indicator might be blank unless the Fast line count on partial load option is enabled.

    • Load partially when files are larger than - Specifies the size limit for files to be opened completely in the editor. If the size of the file being loaded is greater than this value, only a portion of the file is read into memory.

    • Count number of lines - When set to True, 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 indicator area of the editor. The Load entire file setting will have the same affect as this setting when the entire file fits within the cache of the editor (defaults to 2 MB) and does not have to be spilled. If you are using the edit command to open files, use the switch +LC to specify this option (see Command Line Switches).

    • Truncate file at EOF - When set to True, the entire contents of the opened files are read into memory and the number of lines are counted. In addition, DOS format files are truncated when an EOF (End of File) character is found. The line number is always displayed in the line indicator area of the editor. This option is useful for REXX .cmd files which can have p-code appended to them after the EOF character. If you are using the edit command to open files, use the switch +LZ to specify this option (see Command Line Switches).

  • Auto reload - The following options are available:

    • Auto reload - When set to True, SlickEdit detects when files being edited have been modified by other applications and prompts to replace the files with the new copies on disk. If there are files with unsaved changes, the user can select among them to compare them to the files on disk before choosing to reload or merge changes. Open files that have been deleted from disk are also detected and the user can select which to resave.

    • Suppress prompt unless modified - When set to True, files that have been changed on disk are automatically reloaded unless the file has been modified in SlickEdit.

    • Auto read only - When set to True, SlickEdit detects when other applications change the read-only attribute of a file, and automatically changes the permissions of the file being edited to match.

    • Fast auto read only - (Windows only) When set to True, this option speeds up the Auto read only feature by only checking the attribute on disk (not opening every file). This option is controlled by the configuration variable def_fast_auto_readonly (see Setting/Changing Configuration Variables).

    • Reload on switch buffer - When set to True, SlickEdit detects if a file has been modified by another application when you switch buffers to view the file in the active editor window. When False, the default check is still performed when you switch from another application.

Save File Options

Save file options are shown below (Tools → Options → File Options → Save ).

The options are described as follows:

  • Append EOF character - When set to True, an EOF (End of File) character is appended to the end of DOS files when the buffer is saved. Has no effect on UNIX, Mac, or binary files. If you are using the save command to save files, use the switch +Zto specify this option (see Command Line Switches).

  • Remove EOF character - When set to True, the EOF (End of File) character is removed from the end of DOS files when the buffer is saved. Has no effect on UNIX, Mac, or binary files. If you are using the save command to save files, use the switch +ZRto specify this option (see Command Line Switches).

  • Expand tabs to spaces - When set to True, tabs are expanded to spaces according to the tab stops when the buffer is saved. If you are using the save command to save files, use the switch +Eto specify this option (see Command Line Switches).

  • Strip trailing spaces - When set to True, trailing spaces at the end lines are stripped when the buffer is saved. If you are using the save command to save files, use the switch +Sto specify this option (see Command Line Switches).

  • Save files on loss of focus - When set to True, all modified files are saved when you switch to another application.

  • Reset modified lines - When set to True, line modify flags are reset when the buffer is saved. If you are using the save command to save files, use the switch +Lto specify this option (see Command Line Switches). For more information on viewing modified lines, see Modified Lines.

  • Add file to project upon Save As - This option controls the default value of the Add to project option on the Save As dialog. If you are using the save command to save files, use the switch +Pto specify this option (see Command Line Switches).

Backup File Options

Backup file options are shown below (Tools → Options → File Options → Backup ). For more information about backing up files, see File Backups.

The options are described as follows:

  • Make backup files - select one of the following values:

    • Create backup history on save - creates a new version each time you save a file. This produces a more fine grained version history than what is available in version control, bridging the gap between checkins. This is the default option.

    • Create backup file on first save - creates a single backup the first time in an editing session that you save a file. This is useful to preserve the state of a file prior to working on it.

    • Off - no backups are created.

  • Backup location - when Create backup file on first save is selected, you can use this to specify where the backup file is created. Select from the following:

    • Create backup history on save - This option just creates a backup history entry of the file when it is saved (recommended).

    • Global directory - This option places backup files in a single directory. The default backup directory is \vslick\backup\ (UNIX: $HOME/.vslick/backup). The backup file gets the same name 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). If you are using the save command to save files, use the switch +D to specify this option (see Command Line Switches). Note that for a network, you might need to create the backup directory with appropriate access rights manually before saving a file. See Backing Up Network Files.

    • Global nested directories - This option places backup files into a directory 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). If you are using the save command to save files, use the switch -D to specify this option (see Command Line Switches). Note that for a network, you might need to create the backup directory with appropriate access rights manually before saving a file. See Backing Up Network Files.

    • Same directory as *.BAK - This option places backup files in the same directory as the destination file but the extension is changed to .bak. This option is useful on networks. If you are using the save command to save files, use the switch +DB to specify this option (see Command Line Switches).

    • Use child directory - This option places backup files 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 is most convenient on networks because of file permission issues. If you are using the save command to save files, use the switch +DK to specify this option (see Command Line Switches).

  • Backup directory path - Specifies the path to the directory (including the drive, if you wish) in which to place backup files when Make backup files is enabled and one of the "Global" Backup directory options is selected. Sets the VSLICKBACKUP environment variable. Press Delete to clear this field, specifying the default.

  • Number of backups to keep for each file - Specifies the number of backups to store for each file.

  • Limit size of backup - When set to True, SlickEdit® limits backups to the size specified in the option Maximum size to backup.

  • Maximum size to backup - Specifies the maximum size, in kilobytes, for files in order to be backed up when Limit size of backup is enabled.

AutoSave File Options

AutoSave file options are shown below (Tools → Options → File Options → AutoSave ). For more information, see Saving Files.

The options are described as follows:

  • AutoSave activated - When set to True, AutoSave is enabled, which prevents you from losing data when an abnormal editor exit occurs (possibly from a power loss). AutoSave creates temporary files in the specified AutoSave directory. Temporary files are only created for modified files and are replaced when AutoSave runs subsequently. AutoSave files are deleted when you manually save the file, close the file, or exit SlickEdit normally.

    AutoSave does not save buffers that are not named. In addition, AutoRestore does not restore files that do not exist on the disk drive of your system. Save your file at least one time to ensure that the file has a file name and exists on the disk drive.

  • Save after period of inactivity - Specifies the amount of idle time, in seconds, after which modified files are saved. Set this value to 0 if you do not want this option ignored.

  • Exit SlickEdit on AutoSave - When set to True, the SlickEdit® application closes after an AutoSave, if AutoSave is enabled.

  • Save after period of time - Specifies the amount of time, in seconds, after which modified files should be saved. Set this value to 0 if you want this option ignored.

  • Save to - Specifies save options for AutoSave temporary files. Select from:

    • Save to different directory - This option places AutoSave files in the directory specified by the AutoSave directory field. Use this option to clean up or find all of the AutoSave files if an abnormal editor exit occurs.

Note

When editing two files with the same name but in different directories, one AutoSave temporary file is overwritten by the other.

  • Same name, different extension - This option places the AutoSave file in the same directory as the file that is being auto-saved, but with a different extension. The third character of the extension is replaced with a ~ (tilde) character. The length of the extension is padded with underscores if the length of the extension is less than three 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.

  • Same name - This option automatically saves the modified files and no AutoSave temporary files are created.

  • AutoSave directory - Specifies a different directory to use for AutoSave temporary files when Save to different directory is selected in the Save to options. If this field is blank, <configuration_directory>\autosave is used. To find the location of your configuration directory, see Help → About SlickEdit . Press Delete to clear this field, specifying the default.

  • Largest file to AutoSave - Specifies the maximum size, in kilobytes, a file is allowed to have in order to be automatically saved. To have all files auto-saved, set this value to 0.

Files of Type Filter Options

The Files of Type Filter options are shown below (Tools → Options → File Options → Files of Type Filters ). They are used to specify the list file filters for the Open and Save As dialogs. Each filter defines a set of related file types that are used together.

The order of the filters specifies the order they will appear in the Open and Save As dialogs. The first file filter is used to initialize the file list. Use the Up and Down arrow buttons to change the order. Click the Delete button to delete a selected filter from the list.

To add a new filter, click the Add button and enter the new filter name. Then set the value using the Filter value box on the options screen. Separate each filter with a comma. Place file patterns in parentheses and separate them with a semicolon. Some example filters are:

  • Basic Files (*.bas), All Files (*.*)

  • C/C++ Files (*.cpp;*.cxx;*.c;*.h), All Files (*.*)

Associate File Types Options

Use these options (Tools → Options → File Options → Associate File Types ) to set up file associations. Files that are associated run in SlickEdit® when you open them from Windows Explorer. The options, shown below, can also be displayed with the assocft command. See Setting File Associations for more information.

Note

This feature is available for Windows platforms only.

History Options

These options (Tools → Options → File Options → History ) let you view a list of recently opened files and projects.

You can see the history of items recently opened from the File or Project menu. These are listed in the History type box. When you select a menu, the Items box updates to show the latest files that were opened from that menu. Click Delete to remove selected items from the history list.

You can also specify how many items should appear in each history by changing the value of the History size This value will control the maximum number of items that will appear in the history selected in the History type list.

You can also control the number of recently used items appearing on the New File and New Project dialogs. These options are as follows:

  • Number of recent language modes to store on File > New - Specifies the number of recently used language editing modes to display at the top of the Document Mode list.

  • Number of recent project types to store on Project > New - Specifies the number of recently used project types to display at the top of the Project type list.

Application Options

Application options (Tools → Options → Application Options ) pertain to the SlickEdit® application. You can specify what parts of SlickEdit should be restored on startup, the amount of virtual memory to use, and more.

Application option categories are:

  • Auto Restore Options

  • Virtual Memory Options

  • Exit Options

  • Product Improvement Program Options

Auto Restore Options

Auto Restore options are shown below (Tools → Options → Application Options → Auto Restore ). They let you specify the elements of your SlickEdit® environment that are restored when you switch workspaces or close and re-open SlickEdit. See Restoring Settings on Startup for more information about these options.

The options are described as follows:

  • Auto restore files - When set to True, files and editor windows that were open in your last edit session are restored when you start SlickEdit.

  • Auto restore clipboards - When set to True, clipboards are preserved and restored across editing sessions.

  • Auto restore working directory - When set to True, the working directory is preserved and restored across editing sessions.

  • Auto restore build window - When set to True, the concurrent process buffer is preserved and restored across editing sessions.

  • Auto restore workspace files - When set to True, files and windows that were open in the workspace previously are restored when you switch between workspaces. See Workspaces and Projects for more information.

  • Auto restore line modify - When set to True, line modification flags are saved and restored when you save and open files, respectively. Line modification flags for the last 200 files are saved. This option works best when the language-specific Color Coding option Modified lines is enabled (Tools → Options → Languages → [Language Category] → [Language] → General ).

  • Auto restore selective display - When set to True, Selective Display is saved and restored when saving and opening files, respectively. Selective Display for the last 200 files is saved.

  • Auto restore symbol browser tree - When set to True, the symbol browser tree in the Symbols Tool Window is restored across edit sessions. The currently selected position is always restored regardless of this setting.

Virtual Memory Options

Virtual memory options are shown below (Tools → Options → Application Options → Virtual Memory ).

Note

You must restart SlickEdit® for these settings to take effect.

The options are described as follows:

  • Spill file path - Specifies the directory for spill and temporary files. On Windows, this defaults to the directory specified the TEMP environment variable. If it does not exist, the directory specified by the TMP environment variable is used. On UNIX, this defaults to the directory specified by the TMP environment variable. Press Delete to clear this field, specifying the default.

  • Buffer cache size (KB) - Specifies the maximum amount of memory, in kilobytes, used to store text buffer data. A value that is less than zero specifies all available memory.

Caution

If the operating system starts the swapping process before the cache is full, performance might be degraded. The cache size must be smaller than the amount of actual memory available.

  • Tag file cache size (KB) - Specifies the cache size, in kilobytes, for tag files. Tagging performance can be improved by adjusting this setting to better match the size of your tag files. Generally, a tag file cache size that matches the total size of the tag files being used will provide the best performance. For example, if the tag files for your source code and libraries adds up to 100 MB, you should set your cache size to 100 MB. You may have to experiment to find the optimum value. Use the recommendations below as a guide. Note that this is the same as the Tag file cache size option under Tools → Options → Editing → Context Tagging® Options . For more information about tagging, see Building and Managing Tag Files.

  • Tag file cache maximum - Specifies the maximum cache size, in kilobytes, for tag files. The tag file cache size can be dynamically adjusted as high as this amount depending on the amount of available memory on your machine at the time SlickEdit is started.

    Note that this is the same as the Tag file cache maximum option under Tools → Options → Editing → Context Tagging® Options . For more information about tagging, see Building and Managing Tag Files.

Tagging Performance | Recommended Setting
Minimum | 8 MB
Default | 64 MB
Ideal | Sum of tag file sizes
Maximum | 25% of physical system memory

Exit Options

Exit options are shown below (Tools → Options → Application Options → Exit ). For more information about exiting the editor, see also Exiting the Program.

The options are described as follows:

  • Save configuration - Specifies whether or not configuration changes are made immediately, or upon exit, and whether or not a confirmation prompt is displayed. If set to Save configuration immediately, configuration changes will be saved immediately after changes are detected.

  • Exit confirmation prompt - When set to True, SlickEdit always displays a confirmation prompt prior to exiting the application.

Notification Options

The Notifications system informs you when SlickEdit performs automatic actions. These actions are divided into two groups: background processes and feature notifications. Background processes include features like background tagging, which run while you work. Feature notifications provide information about features which may insert more text in the buffer than you have typed or format your code differently than your settings. For more information see Feature Notifications.

The Notifications options screen is shown above. From this form, you can set how you want to be notified about different events.

All background processes use a status bar icon and popup to notify you that they are running. If you wish to disable just the popup or even both the icon and the popup, you can do so using the checkboxes in the Background Processes group.

Feature Notifications offer more options to determine how you wish to be notified about what automatic events happen within the editor. You can turn all notifications to the same value or set them individually by feature. If you want to be notified of all features by a message on the status line, select Turn all notifications to and select Status line message. If you want to be notified about Adaptive Formatting with a dialog but only want notifications about Syntax Expansion to appear in the status line, select Set notification level by feature , choose the appropriate feature from the drop-down list and then set the level in the Notification level drop-down list. You can also set which notifications appear in the Notifications tool window by checking the Log in Notification tool window checkbox.

The Notifications options screen contains the following settings:

  • Turn all notifications to - choose a notification level for all features.

  • Set notification level by feature - allows you to set the notification level differently for each feature. Since some features are more surprising than others, you may wish to have a more intrusive notification.

The following options are only available if you have selected Set notification level by feature.

  • Feature - select the feature for which you want to set the notification level.

  • Notification level - sets the kind of notification for the selected feature. You can choose from the following:

    • Dialog - displays a dialog notification. This requires you to click a button to continue. This is used for the most surprising features.

    • Status line icon with pop-up - activates the status line icon and pops up a message. This option is not available when the status line icon or pop-ups have been disabled.

    • Status line icon without pop-up - activates the status line icon, but does not pop up a message. This option is not available when the status line icon has been disabled.

    • Message line - a short text message identifying the feature is displayed on the SlickEdit message line at the bottom of the application window.

    • None - suppresses all notifications.

  • Log in Notification tool window - By checking this, then all notifications of this type will be listed in the Notifications tool window.

  • There are two links at the bottom of this group that allow you to navigate to the options screen for the selected feature or view help about this feature.

Product Improvement Program Options

You can opt in or out of the SlickEdit Product Improvement Program using the options found at (Tools → Options → Application Options → Product Improvement Program ). These options are shown below.

To participate in the program, check the Participate in the Product Improvement Program checkbox. The options page contains information about the program, as well as a link to additional information found on SlickEdit's website. For more information about the Product Improvement Program, see Product Improvement Program.

Network & Internet Options

Network and Internet options (Tools → Options → Network & Internet Options ) are used to configure the IP setting, FTP connection profiles and options, proxy settings, and more.

Network and Internet option categories are:

  • Network Settings

  • FTP Default Options

  • URL Mapping Options

  • URI Scheme Options

  • Proxy Settings

  • Web Browser Setup Options

Network Settings

Network settings are shown below (Tools → Options → Network & Internet Options → Network Settings ). These options are used to set the Internet Protocol (IP) version.

The option is described as follows:

  • Internet Protocol (IP) - The IP setting affects how addresses are chosen when connecting to a host. Features that use this setting include FTP, SFTP, and Opening URLs. The options are mutually exclusive: Select IPv6 and IPv4 (the default) to automatically select the address when connecting to a host. Select IPv4 only to force IPv4 address connections or IPv6only to force IPv6 address connections.

FTP Default Options

Default FTP options are shown below (Tools → Options → Network & Internet Options → FTP Default Options ). This Options screen is also displayed when you click File → FTP → Default Options or when you click the Default Options button on the FTP Profile Manager. Options include the ability to set the default local directory, specify preferences such as the default time-out and port information, enable firewall/proxy support, and configure SSH information. See FTP for more information.

The options are categorized into the following tabs:

  • FTP Default Options General Tab

  • FTP Default Options Advanced Tab

  • FTP Default Options Firewall/Proxy Tab

  • FTP Default Options SSH/SFTP Tab

  • FTP Default Options Debug Tab

FTP Default Options General Tab

The General tab contains the following:

  • Anonymous e-mail 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.

  • Upload on save - Select from the following:

    • Do not upload - When on, saving an FTP file will not upload the file.

    • Prompt - When on, a prompt appears to upload when an FTP file is saved to specify ASCII or Binary transfer type.

    • Upload without prompting - When on, saving an FTP file will upload the file. The same transfer type used to open the file is used to upload the file.

  • Resolve links - Default for adding a new connection profile. Resolves symbolic links on remote host.

FTP Default Options Advanced Tab

The Advanced tab contains the following:

  • Timeout (sec) - Default used when adding a new connection profile. Specifies the wait time for a reply from the FTP server.

  • Port - Default used when adding a new connection profile.

  • 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 file name based on the local file name.

FTP Default Options Firewall/Proxy Tab

The Firewall/Proxy tab contains the following:

  • Enable firewall/proxy - When on, indicates you have a firewall or proxy. You need to turn this on to add a connection profile that uses a firewall.

  • Host name - Host name of firewall.

  • Port - Port number of firewall.

  • User ID - User ID used when logging into firewall.

  • Password - Password used when logging into firewall.

  • Type - Select from the following:

    • USER user@site - When this option is selected, host and port are required. User id and password are ignored. USER @remote_host is sent to the firewall when connecting.

    • OPEN site - When this option is selected, host and port are required. User ID and password are ignored. OPEN remote_host is sent to the firewall when connecting.

    • USER user@site after logon - When this option is selected, host, port, user id, and password are required. USER remote_userid@remote_host is sent to the firewall after logon.

    • Router - When this option is selected, 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 this option is selected, transfers are initiated by SlickEdit®.

FTP Default Options SSH/SFTP Tab

The SSH/SFTP tab contains the following options:

  • SSH executable - The location of the SSH client program that is used to establish the secure connection with the SSH server.

    SFTP support requires the OpenSSH client program to operate. Windows users can obtain the SSH client by downloading and installing the Cygwin package (www.cygwin.com) and making sure to choose the openssh package during install.

  • Subsystem/Service name - The name of the SFTP service being run by the SSH server. Defaults to sftp.

FTP Default Options Debug Tab

This tab is used by SlickEdit® Product Support to debug customer FTP/SFTP issues.

URL Mapping Options

URL Mapping options are shown below (Tools → Options → Network & Internet Options → URL Mappings ). These options let you map a URL path or file to a local or remote path or file, so you can work offline or from a test location that contains DTDs referenced by your XML files. See URL Mapping for information.

To add a new URL mapping, click the Add button (or click <add> in the From column) and type the URL that will be mapped to a different location. Then in the corresponding field in the To column, type the location to use for this URL. To delete the selected mapping, click Delete.

URI Scheme Options

URI Scheme options are shown below (Tools → Options → Network & Internet Options → URI Schemes ). These options let you specify URL types that SlickEdit should recognize as hyperlinks in the editor. See Navigating to URLs for information.

To add a new URI scheme, click Add, and type the scheme you want to add. Do not include the "://". For example, if you want to be able to click on e-mail addresses in the editor, you could add a mailto scheme. After adding a scheme, newly recognized URLs are underlined in the edit window as soon as it regains focus.

To delete the selected scheme, so that those URLs are not hyperlinked, click Delete.

Proxy Setting Options

Proxy options are shown below (Tools → Options → Network & Internet Options → Proxy Settings ). These options allow you to configure a proxy server to use when SlickEdit® needs to use an Internet connection. Internet Explorer settings are used by default.

The following options are mutually exclusive:

  • None - Specifies that no proxy server is used.

  • Use Internet Explorer settings - If selected, Internet Explorer settings will be used, and the remaining options and fields on the page are inapplicable and therefore dimmed.

  • Use proxy server - If selected, the remaining options and fields are applicable and available.

    • Servers - Indicates the proxy address and port to use.

    • Exceptions - Indicates the Web site addresses that the proxy server should disregard. Separate entries with semicolons (;).

Web Browser Setup Options

Web browser setup options are shown below (Tools → Options → Network & Internet Options → Web Browser Setup ). Use these options to specify the browser to use when SlickEdit® needs to launch one. Selecting a preferred browser automatically sets the defaults for the other options on this form.

Note

This configuration does not apply to the Help system. See Supported Help Web Browsers for more information.

The following options are available:

  • Browsers - Select which Web browser you want to use. Selecting a preferred browser automatically sets the defaults for the other items in the Web Browser Setup dialog box. Note the following:

    • Windows platforms - Your Web browser is automatically detected.

    • UNIX and Mac OS X platforms - You need to specify which Web browser you are using. In addition, you need to give the full path to the program executable.

  • Program - Indicates the program to run. You may specify a %F in this text box or any of the other text boxes on this dialog box to have the HTML file name 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 option is selected.

Tool Options

Options for tools (Tools → Options → Tools ) pertain to tools such as Spell Check, and utilities supported by SlickEdit®, such as version control (CVS, Subversion, etc.).

Tools option categories are:

  • Spell Check Options

  • Version Control Setup Options

  • Configure Error Parsing

Spell Check Options

Spell Check options are shown below (Tools → Options → Tools → Spell Check ). These settings control the behavior of Spell Check in the editor (Tools → Spell Check ). You can also access these options from the main menu item Tools → Spell Check → Spell Options , or by using the spell_options command.

The Spell Check Options screen contains the following:

  • Common list - Specifies the default dictionary list. Dictionary lists are text files that have the extension .lst. Words that are frequently misspelled are spelled correctly in these files for matching during spell checking. Each line of a dictionary list can contain only one word. The default dictionary list is named scommon.lst and is located in the SlickEdit® installation directory.

  • User lists - You can have up to two custom dictionaries. When a word is not found during a spell check and you add the word to User list 1 or 2, the word is added to the associated file specified in these fields. By default, the first time words are added, SlickEdit will create files named userdct1.lst and userdct2.lst in your configuration directory, so these file names are filled in for you. If you choose to create your own files, be sure to place them in the default configuration directory and add the file names here.

  • Ignore all UPPERCASE words - When set to True, all words in uppercase are ignored during a spell check operation. This applies to all spell check operations.

  • Detect repeated words - When set to True, words that are repeated twice in a row are detected during a spell check operation. This applies to all spell check operations.

Version Control

SlickEdit provides seamless integration with several version control systems. Version Control configuration options are found at (Tools → Options → Tools → Version Control ).

Version Control Setup Options

Version Control setup options are shown below (Tools → Options → Tools → Version Control → Version Control Setup ). Use these options to enable version control support and to specify configuration information and preferences. For more information, see Version Control.

This screen contains the following:

  • Command line systems support - The following items are used to manage your command line version control systems.

    • Command line systems - This is a list of command line version control systems that have built-in support. To select a version control system, first select this option and then select the system.

    • Setup - To change the individual commands that will be run for the selected system, click on the Setup button. You may need to fill in the VCS Project text box depending on your advanced version control setup. This Setup button takes you to the section of the options dialog that configures the version control system you have selected.

    • Add - To add a new command line version control system, click the Add button and you will be prompted to fill in a name for the new version control system. The newly-added version control system will be selected in the list.

    • Copy - To add a new command line version control system with the same settings as an existing system, click the Copy button and you will be prompted to fill in a name for the new version control system. The new version control system will be selected in the list.

    • Delete - To remove the support of a command line version control system, select the system in the list and then click this button. This action is only available for version control systems you previously added, not systems with built-in SlickEdit support.

    • Rename - To rename a command line version control system, select the system and then click the Rename button. You will be prompted for the new name. This action is only available for version control systems you previously added, not systems with built-in SlickEdit support.

  • SCC providers - This section is for SCC version control systems that are registered.

  • Other

    • Auto check-out on edit - When selected, a prompt appears 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 selected, 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.

    • Prompt for files - When selected, the Checkin or Checkout Files dialog is displayed when checking a file in or out, respectively. This option is not available for CVS or Subversion. See Checkin/Checkout Files Dialog for more information.

Version Control Providers

SlickEdit provides the capability for integration with several different Version Control Providers. Each provider is customizable on an individual basis, since your settings for one provider may be different from another.

Use the Version Control Providers section of the Options dialog (Tools → Options → Tools → Version Control → Version Control Providers ) to control the behavior of SlickEdit for specific version control systems. Each provider has its own node, some of which expand to show multiple options pages. If you add your own version control provider, it will also be added to the Options dialog under this node. Use Version Control Setup Optionsto add or remove your own custom provider.

Most command line version control systems, including user-defined systems, use the options forms shown below. However, CVS and Subversion have their own specific set of options. For more information about these options, see CVS Options and Subversion Options

Version Control Commands Setup Dialog

You can define what commands are used to run specific version control actions. To configure these commands, go to Tools → Options → Tools → Version Control → Version Control Providers , then expand your provider of choice, then select Commands. These options are available for all command line systems except CVS and Subversion. As an example, the ClearCase Commands dialog is shown below.

The following items appear on this setup dialog:

  • Version Control Command - This is a list of commands that can be run from the editor. To edit how a command is performed, select the command in this list and edit the Command text box described below.

  • Command - This is the command that is run by the operating system when the corresponding version control command is run. Click on the arrow to the right of the text box for a list of variables to be parsed in.

Version Control Advanced Setup Dialog

You can access advanced setup options for each version control system that supports them. From the Version Control Setup options (Tools → Options → Tools → Version Control ), expand the Version Control Providers node and select the version control system you wish to set up. Click the Advanced options node to access the advanced options. The options are similar for each version control system. For example, below is a screen capture of the Clearcase Advanced Setup dialog. For more information about working with Version Control, see Version Control.

The following options are available:

  • Write comment to file - Write comment to a temp file, the name of which can be parsed into the command line by putting in %c. If this option is not selected, and %c is in the command line, the comment can only be one line, and %c will be replaced with the comment itself.

  • UNIX comment file - Writes comment file with UNIX end-of-line characters. This option is for Windows only.

  • Run dosrc to get error code - Used to help get the return code, especially from 16-bit applications. Has no adverse affect, so it is best to leave this on under Windows.

  • Add *.??v to File Type list (PVCS) - Select this option 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 the 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.

  • VCS Project - Specifies VCS Project behavior. Select one of the following:

    • CD to this directory before running VCS command - Temporarily change the current directory to the path specified in the VCS Project text box 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 (RCS) - For command line versions of RCS, specify the directory that has the archive files for the VCS Project text box 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 text box 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 this style, the Source Project tree looks like the directory tree. If the name of the file you check in or check 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 checked in or 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 text box on the Version Control Setup dialog. For example:

      [ $/vslick15 ]

    • Source Safe Locate File - When using this file, the VCS Project text box 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.

    • None - Select this style if none of the others apply.

  • Error Capture

    • Error Capture - Specifies how error output from the version control system should be capture. The choices are as follows:Error Capture - Specifies how error ouptut from the version control system should be capture. The choices are as follows:

      • Capture errors from stdout and stderr - If the version control executable returns non-zero (indicating an error), display output from both stdout and stderr. Most command line version control systems will behave this way.

      • Capture errors from stdout (TLIB only) - Capture errors from stdout only. Displays output from version control system if the return code from the version control executable is non-zero.

      • Retrieve errors from file (SS only) - This option is for the command line version of Source Safe. It will open the error file and search for exit code. The error file name used is the default file name for directing errors into, and can be specified in the command line as %t. It also displays output from the version control system if the value after the colon is non-zero.

      • Internal command lookup - Check to see if the command specified is a Slick-C® command, otherwise run as an OS command.

    • Simulate return code (Search output for "Error")(Delta) - Searches for Error or Warning. Displays output from the version control system if either are found.

Note

If you are using Source Safe for Windows, use the SCC interface.

Checkin/Checkout Files Dialog

When the option Prompt for files is checked in the Version Control Setup options, the Checkin Files or Checkout Files dialog is displayed when checking files in or out, respectively. This allows you to see a list of files in the current workspace or project, or a list of open files (buffers), and select the files to check in or out.

Note

This dialog is not available for CVS and Subversion.

The Checkin Files and Checkout Files dialogs share a similar interface and contain the following elements:

  • Workspace - When this option is selected, all files in the workspace are added to the list.

  • Project - When this option is selected, all files in the current project are added to the list.

  • Buffers - When this option is selected, all open files are added to the list.

  • Available - When this option is selected, all files available for the check-in or check-out operation are displayed in the list. For example, if you are performing a check-in, all files that have been checked out will be added to the list. This option is only available for SCC systems.

  • Save if modified - When this option is selected, any unsaved files are saved before check-in.

  • Checkin or Checkout - Click these buttons to perform the check-in or check-out operation on the selected files.

  • Advanced - This button displays the options dialog specific to the version control system you are using. This option is only available for SCC systems.

Configure Error Parsing

Options used to configure error parsing are shown below (Tools → Options → Tools → Configure Error Parsing ). They can also be accessed by clicking Build → Configure Error Parsing from the main menu, or by using the configure_error_regex command. See Parsing Errors with Regular Expressions for information about these features.

Help Options

Help options (Tools → Options → Help Options ) pertain to the SlickEdit® Help system. Help option categories are:

  • General Help Options

  • F1 Index File Options

General Help Options

General Help options are shown below (Tools → Options → Help Options → General ).

  • Word help filename(s) - Specifies the Word Help files (.idx or .mvb) used by the wh command (Ctrl+F1), wh2 command (Ctrl+F2), and wh3 command. Separate each file with a plus sign. You can only specify one IDX or MVB file per command. See Changing the Default Word Help File(s) for more information about this setting.

  • Use MSDN help for F1 help - (Windows only) Enables the use of an MSDN Collection as the default Help. See Configuring F1 MSDN Help for information.

  • MSDN help collection - (Windows only) Specifies which of the available MSDN help collections to use as the default Help.

F1 Index File Options

F1 Index File options are shown below (Tools → Options → Help Options → F1 Index File ). They are used to build and manage the Help files for Help searches and look-up. You can also display this Options screen by selecting Help → Configure F1 Index File from the main menu, or by using the configure_index_file command. See F1 Index Help for more information.

The following options are available:

  • Help files - This list box displays Help files that you have added. Use the Up and Down buttons to move the selected files up and down in the list. Use the Remove button to remove selected files.

  • Add - The Add icon, located above the Up and Down buttons, lets you to browse for another Help file on your system to add.

  • Edit - Use this button to change the description of the selected Help file.

  • Export - Use this button to save the list of keywords for the selected Help file in Help List Text File format (*.hlt).

  • Help file path - Type a list of directories, separated with semicolons, in this text field. These directories are used when searching for Help files. These directories are required because .idx files contain the Help file names without path information.

  • Load - Allows you to browse for a Help Index File in .idx format to load. If the file doesn't exist, it will be created.

  • Scan - Scans for Help files which contain a prefix match or exact match of the keyword selected.

  • Default - Displays the Default Help dialog. See Default Help Dialog below.

  • Show keywords - Displays a list of keywords that are in the selected Help file.

Default Help Dialog

To access this dialog, click the Default button on the F1 Index File options screen (Tools → Options → Help Options → F1 Index File ). See F1 Index Help for more information.

The Default Help dialog is typically used to interface with Microsoft Visual C++ MVB files. However, you could turn off the Use DDE option and configure the Program text box to run a program like Microsoft 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 Command text boxes specify DDE XTYP_REQUEST parameters and are used only if the Use DDE option is selected.

Options History

The Options History node in the Options dialog (Tools → Options → Options History ) is used to see changed options. From the drop-down, select Anytime to see all options that have been changed from the default values since the editor was installed, or, choose to see only those options that were changed today, yesterday, or within the last week or month. Only the most recent date is shown for options that have been changed more than once.

Note

Options History only shows changes that were made through the Options dialog. Changes made by setting configuration variables, in macro code, or in other dialogs are not viewable in the Options History.

The results are displayed in the Options dialog in the results window, as shown in the following screen.

The number of results returned is displayed at the top right of the results window. The results are divided into columns showing the name of the option, the path to the option in the option tree, and the date it was last changed. Click on the column header to sort by any column. Double-click on an option to display that option panel in the dialog. For options changed on forms embedded in the Options dialog, the results show only the name of the form. For example, if you made a change to a color under Appearance → Colors on the Options dialog, the Options History results show "Colors" as the name of the option and "Appearance" as the path.

Export/Import Options

To export options, select Tools → Options → Export/Import Options . You can export all your options at once or you can export a designated group of them. To export all options click the Export All Options button. To export a particular set of options click the Setup Export Groups button. To import already exported options, click Import Options. See below for details of each operation.

Note

Moving options to a machine with a different operating system is not supported. Also, options should not be exported from one version of SlickEdit and then imported into another. While these operations may work for some options, we cannot predict when this will cause a problem.

Export All Options

To Export all of your options, click the Export All Options button. You will be asked to select a file where you want to save your export package. Exports are saved in packages with the extension ".zip." Once you have selected a file, click OK to begin the export. If there are any errors, you will be notified with a message. Individual errors will also be listed in the Message List.

Setup Export Groups

Export Groups allow you to export a specific set of options. Two default export groups have been created: Team and Personal. The Team Export Group contains settings which might be shared across a programming team, such as coding styles. The Personal Export Group contains settings which control how the editor looks and behaves. You can change these groups or create new ones. To view or use an export group, select the group from the combo box found at the top left corner of the Export Groups Editor dialog.

Add or remove options to include this group by checking or unchecking nodes in the hierarchy. To include all of the items in subtree, put a check in the box next to a parent. If you select specific items in a subtree, the parent node will be filled in with gray.

To create a new export group, click the New button next to the combo box containing the list of Export Groups. You can either create a blank group or copy an existing group. Then you can drill down to the property level to select which options to export. You can also select whole categories at a time if you wish. Once you are finished modifying your Export Groups, click "Save" to save your changes. You can also export the current group by clicking Export.

Importing Options

You can import options by clicking the Import Options button on Tools → Options → Export/Import Options . Then navigate to the location of the export package file.

Once the export package is read, a tree of the options within the package is displayed. You can choose which options to import. Once you have made your selections, click Import . The options will be imported and set. If there are any errors, you will be notified with a message. Individual errors will also be listed in the Message List.

Additional Options

Some settings are not configurable through the options dialog but are still available for export/import. These options can be found under the Additional Options node in the Setup Export Groups dialog. They are also included automatically if you export all options.

The options available for export/import under Additional Options are:

  • Menu Customizations - Exports any changes made to menus by adding, removing, or modifying individual menu items. For more information about customizing menus, see Menus.

  • Toolbar Customizations - Exports customizations made to any of the Toolbars, including added or removed buttons and changes to button behavior. For more information about customizing Toolbars, see Toolbar Options.

  • User-Recorded Macros - Exports any macros recorded by the user such that these macros can be shared with other users. To find out about recording macros, see Recorded Macros.

  • Beautifier Settings - Code beautifiers are used to reformat existing code and rely on formatting preferences set by the user. For more information about beautifiers, see Beautifying Code.

  • XML/HTML Formatting - Exports the schemes used to automatically format content in XML and HTML files. To learn more about this feature, see XML/HTML Formatting.

  • Templates - You can export and import your code templates, which are used to automate the creation of common code elements. For information about creating and using templates, see Code Templates.


Window

This section describes items on the Window menu and associated dialogs and tool windows. For more information about working with editor windows, see Files, Buffers, and Editor Windows.

Window Menu

The table below describes each item on the Window menu and its corresponding command.

Window Menu Item | Description | Command
Cascade | Cascades editor windows. | cascade_windows
Tile | Tiles editor windows. | tile_windows
Tile Horizontal | Tiles editor windows horizontally when there are three or less windows. | tile_windows h
Arrange Icons | Rearranges iconized windows. | arrange_icons
Next | Switches to next window. | next_window
Previous | Switches to previous window. | prev_window
Close | Closes the current window. | close_window
Font | Displays the Window Font dialog, which allows you to set/view fonts for the current editor window or all windows. See Window Font Dialog. | wfont
Split Horizontally | Splits the current window horizontally in half. | hsplit_window
Split Vertically | Splits the current window vertically in half. | vsplit_window
Zoom Toggle | Zooms or unzooms the current window. | zoom_window
One Window | Zooms the current window and deletes all other windows. | one_window
Duplicate | Creates another window linked to the current buffer. | duplicate_window
Link Window | Displays the Link Window dialog, which allows you to select a buffer to display in the current editor window. See Link Window Dialog. | link_window

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Window menu items.

Window Font Dialog

The Window Font dialog is used to set the font and font style of editor windows. For more information about setting fonts, see Fonts.

To access the Window Font dialog, click Window → Font , or use the wfont command.

The following options and settings are available:

  • Scope - Specifies the editor windows to affect.

    • Current window - Affects the current editor window only.

    • All windows and Default - Affects all open editor windows and all newly-created editor windows.

  • Font - Displays a selection list of the fonts installed on your computer.

  • Size - Displays a selection list of the sizes that are available for the selected font.

  • Style - Displays a selection list of common font style options such as bold, italic, etc.

  • Fixed Fonts Only - If selected, only fixed fonts that are installed on your computer are displayed in the Font list box.

  • Script - (Windows only) Displays a selection list of character language settings. Choose Default unless you are editing files that have characters not in the active code pages. Choose Western to use the typical English characters.

  • Sample - Displays a preview of the selected font and settings.

Link Window Dialog

The Link Window dialog is used to link files to editor windows, so that you can view more than one file in one editor window. For more information about working with editor windows, see Files, Buffers, and Editor Windows.

To access the Link Window dialog, click Window → Link Window , or use the link_window command.

The buttons are described as follows:

  • Link to Window - Changes the file that is displayed in the current window to be the selected file/buffer in the list box. Modifications made to the buffer that was previously displayed will not be lost.

  • Open File - Opens a file and displays it in the current window. No additional window is created.

  • Start Process - Starts a process buffer and displays it in the current window. If a process buffer has already been started, it is linked to the current window.


Help

This section describes items on the Help menu and associated dialogs and tool windows. For more information about how to use the Help system and how to obtain product support, see The Help System and Product Support. For advanced Help configuration topics, such as accessing multiple Help files and configuring F1 MSDN Help, see Advanced Help Configuration.

Help Menu

The table below describes each item on the Help menu and its corresponding command.

Help Menu Item | Description | Command
Contents | Displays the Help system open to the Table of Contents. See The Help System. | help -contents
Index | Displays the Help system open to the Index, where you can search for index items. See The Help System. | help -index
Search | Displays the Help system open to the Search tab, where you can search for any item. See The Help System. | help -search
New Features | Displays the Help system open to the New Features and Enhancements section. See New Features and Enhancements. | help new features
Cool Features | Displays the Cool Features dialog, which shows SlickEdit® feature tips. See Help Dialogs and Tool Windows. | cool_features
Quick Start | Displays the SlickEdit Quick Start documentation. See Quick Start. | help Quick Start
Keys Help | Displays the Help system open to the emulation key binding reference tables for the current emulation. See Emulation Tables. | help key bindings
What Is Key | Used to discover the command associated with a key binding. Opens the command line, prompting with the text What is key. See Determining the Command of a Key Binding. | what_is
Where Is Command | Used to discover the key binding associated with a command. Opens the command line, prompting with the text Where is command. See Determining the Key Binding of a Command. | where_is
Macro Functions by Category | Displays the Help system open to this topic, which shows a categorized list of macro functions. | help macro functions by category
Frequently Asked Questions | Invokes a Web browser which opens to the FAQs section of the SlickEdit Web site, which contains answers to common user questions. | goto_faq
F1 Index Help | Displays the Help Index dialog, where you can search the F1 index file for Help on a word. See Help Index Dialog. | help_index
Configure F1 Index File | Lets you view or modify the index file used by F1 Word Help. See F1 Index File Options. | configure_index_file
Configure F1 MSDN Help | Lets you activate and configure MSDN Library F1 Word Help. See Configuring F1 MSDN Help. | msdn_configure_collection
License Manager | Displays the SlickEdit License Manager for managing licenses. See Licensing. | lmw 1
Product Updates | Displays the Product Updates menu, from which you can install updates and hot fixes. See Help Menu. | N/A
Register Product | Displays the Register dialog, from which you can begin the SlickEdit on-line registration process. | online_registration
SlickEdit Support Web Site | Invokes a Web browser which opens to the SlickEdit Support Web site. See Product Support. | goto_slickedit
Contact Product Support | Used to invoke a Web browser which opens to a form on the SlickEdit Web site that you can use to contact Product Support. See Product Support. | do_webmail_support
Check Maintenance | Invokes a Web browser which opens to a SlickEdit Web page that shows the status of your Maintenance and Support Agreement. | check_maintenance
About SlickEdit | Displays a property sheet containing information about your product, such as serial and version numbers, as well as release notes and the license agreement. | version

Product Updates Menu

The table below describes each item on the Help → Product Updates menu and its corresponding command.

Product Updates Menu Item | Description | Command
New Updates | Checks for new updates to the product. | upcheck_display
Options | Displays the Update Manager Options dialog, used to set the frequency of automatic checking of new updates. See Update Manager Options Dialog. | upcheck_options
Load Hot Fix | Displays an Open-style dialog, to begin the process of installing a hot fix. See Applying Hot Fixes. | load_hotfix
List Installed Fixes | Displays a summary sheet of hot fixes that are installed on your computer. See Applying Hot Fixes. | list_hotfixes

Dialogs and Tool Windows

This section describes the dialogs and tool windows that are associated with the Help menu items.

Cool Features Dialog

The Cool Features dialog appears automatically after the product installation has completed, and by default, each time the editor is started. To access the dialog at any time, from the main menu, click Help → Cool Features , or use the cool_features command on the SlickEdit® command line.

The following options and buttons are available:

  • Options for Feature - Displays the dialog from which you can make settings for the selected feature.

  • Help on Feature - Displays the Help system open to the documentation for the selected feature.

  • View Demonstration - Invokes a Web browser which navigates to a SlickEdit Web page containing an audio/visual demonstration of the feature in action.

  • Topics - Displays a table of contents from which you can select a Cool Feature to learn more about. The previously viewed topic is remembered and displayed the next time the dialog is invoked.

  • Prev - Scrolls to the previous Cool Feature.

  • Next - Scrolls to the next Cool Feature.

  • Show on startup - If selected, prevents the Cool Features dialog from appearing each time the editor is started.

Help Index Dialog

The Help Index dialog scans a Help .idx file for Help files that contain a prefix match or exact match of the keyword under the cursor. To display this dialog, press F1 when the cursor is under a keyword, or click Help → F1 Index Help . The following options and buttons are available:

  • Help Keyword - Specifies the keyword to search for. Type directly into this field, or, if you are seeking Help for a keyword under the cursor, the keyword will be automatically filled in.

  • Help Files list box - Displays a list of the Help files in which the keyword was found. Select the Help file to use.

  • Close on choose - If selected, the dialog is closed when you click OK.

  • Exact match - If selected, only Help files which contain an exact match of the keyword specified are displayed.

  • Use default - If selected, no search is performed for a valid Help item. A DDE or shell command is performed to get help on the Help Keyword specified. The exact action here depends on the Default Help dialog (see Default Help Dialog). Visual C++ Help usually works without selecting this option.

  • Configure Index - Displays the F1 Index File options screen, which lets you specify the Help files to be used when searching for help. See F1 Index File Options for more information.

Update Manager Options Dialog

The Update Manager checks for new product updates. To set the frequency of automatic updates, use the Update Manager Options dialog (Help → Product Updates → Options ). Click Proxy Settings to display the Proxy Setting Options.


Menu Editing

For information about accessing menus in SlickEdit® and associated options, see Accessing Menus.

Creating and Editing Menus

Menus in SlickEdit are easily customized. SlickEdit provides a Menu Editor that allows you to add, delete, or change menu entries. Modifications made through this UI will be preserved when you upgrade to a newer version of SlickEdit.

Warning

Menus in SlickEdit are controlled by Slick-C macro files. You can customize menus by editing the corresponding Slick-C files. However any such modifications will be lost when you upgrade to a newer version of SlickEdit. Only modifications made through the Menu Editor will be preserved.

Menus can be managed using the Open Menu dialog. From this dialog, you can pick a menu to edit, create a new menu, run a menu as a pop-up. To access the dialog, from the main menu, click Macro → Menus (or use the open_menu command). The following buttons are available:

  • Open - Opens the menu specified in the combo box for editing with the Menu Editor. If the menu specified does not already exist, it is created.

  • New - Creates a new menu with a unique name for editing with the Menu Editor. The Menu Editor allows you to change the name of the menu.

  • Delete - Deletes the specified menu from 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.

You can use the Menu Editor to create a new menu, or modify the SlickEdit menu bar or an existing menu resource, which can be displayed as a pop-up or menu bar.

Creating a New Menu Resource

Use the Menu Editor to create a new menu resource. From the main menu, click Macro → Menus (or use the open_menu command), then click New on the Open Menu dialog. The Menu Editor is displayed. See Menu Editor Dialog for more information.

To create a command which runs a menu by displaying it as a pop-up, after creating a menu, while macro recording, click the Show button on the Open Menu dialog box. If you bind the recorded command to a left or right mouse button event, the menu will be displayed at the cursor position. You DO NOT need to specify key bindings for menu items because the Menu Editor automatically determines the key bindings for you. To choose between short and long key names, from the main menu click Tools → Options → Appearance → Advanced , then change the option Short key names.

See the Slick-C® Macro Programming Guide for information on creating forms with menu bars or advanced information.

Editing Menus

To select a menu for editing, from the main menu click Macro → Menus (or use the open_menu command). Select the menu to edit from the list, then click Open. The Menu Editor will be displayed. See Menu Editor Dialog for a list of the available options.

Defining Menu Item Aliases

The Menu Item Alias dialog box allows you to define aliases (which are similar commands) for the command that is being executed. This dialog box can be accessed by clicking the Alias button on the Menu Editor. 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 identical to the edit command except that it prompts the user with a dialog box, whereas the edit command prompts for files on the command line. These two examples illustrate the best reasons for using aliases.

Enabling/Disabling Menu Items

SlickEdit® has some enable or disable attributes for predefines which you can specify for any command. When these predefined auto-enabling attributes are not enough, you need to implement a callback which determines the enable or disable state of the command. See the Slick-C® Macro Programming Guide for information on enabling and disabling menu items with your own callback.

The Auto Enable Properties dialog box is used for these settings, and can be accessed from the main menu by clicking Macro → Menus . When the Open Menu dialog box is displayed, click New to display the Menu Editor. Click the Auto Enable button, and the Auto Enable Properties dialog is displayed.

For descriptions of the options on this dialog, see Auto Enable Properties Dialog .


Chapter 13. Appendix

This chapter contains the following topics:

  • Tutorials

  • Encoding

  • Environment Variables

  • Configuration Variables

  • Configuration Directories and Files

  • File Search Order

  • Advanced Help Configuration

  • VLX File and Color Coding

  • Editing the Key Binding Source

  • Using the ISPF and XEDIT Emulations

  • Emulation Tables

Tutorials

Tutorials in this section:

  • Hello World Tutorial (C/C++)

  • Hello World Tutorial (C#)

  • Hello World Tutorial (Java)

  • Vim Tutorial

  • Creating and Distributing Custom Toolbars

Hello World Tutorial (C/C++)

This tutorial outlines the steps to create, build, and run a sample Hello World program using the auto-build system for GNU C/C++ projects.

The sample C++ program prints the text hello world to the standard output on the Console view. Follow these steps to create a Hello World program using the GNU C/C++ wizard.

Create the Project Using the GNU C/C++ Wizard

  1. From the main menu, click Project → New .

  2. On the Project tab, click to expand C/C++, then click GNU C/C++ Wizard.

  3. Specify the Project name as HelloWorld. Change the location if you want.

  4. Click OK on New project dialog.

  5. Select the Project Type as Executable and the Source Type as C++.

  6. Click Next.

  7. For the Application Type, select A "Hello World" application.

  8. Click Next.

  9. Select Build without a makefile.

  10. Click Finish. A dialog is displayed, containing information about the new project. Click OK. The wizard constructs a workspace by the name of HelloWorld.vpw, a project called HelloWorld.vpj, and a program file called HelloWorld.cpp.

Build the Project

To build this project, from the main menu, select Build → Build .

Run the Program

To run the program, from the main menu, click Build → Execute . The application displays Hello World in the output window.

Comments

When creating a new project in a new workspace, a new workspace does not have to be explicitly created.

The workspace is created automatically when the project is created. The workspace will be given the same name as the project.

For large projects, multiple projects most likely will be created and the workspace name should be distinct from the project names for easier organization.

Hello World Tutorial (C#)

This tutorial describes how to build a simple C# console application with SlickEdit, no Visual Studio required. It assumes you have the .NET Framework 2.0 and the C# compiler (Csc.exe) installed under %WINDIR%\Microsoft.NET\Framework\v2.0.50727. The Windows SDK (v6.0 or later) or the full .NET Framework SDK is required if you want to interact with the managed code debugger (mdbg.exe).

Creating the Starter Project

Project Setup

Use the following steps to set up the starter project:

  1. From the main menu, click Project → New .

  2. Select the (Other) project type.

  3. In the Project name box, type SeHello.

  4. Select the Create project directory from project name option.

  5. Change the Location to the path where you want to store the project.

  6. Click OK.

  7. Close the Project Properties dialog that automatically appears.

Create and Add a File to the Project

Next, use the following steps to create and add a file to the project:

  1. From the main menu, click File → New Item from Template .

  2. In the Categories list, under Installed Templates, select CSharp.

  3. In the Templates list, select C# Main Entry Point.

  4. In the Name box, select the default or change the name based on your preference.

  5. Select the Add to current project option.

  6. Click Add.

  7. Click OK on the Parameter Entry dialog.

  8. The new file opens in the editor and also appears in the Source Files project folder. Use the Projects tool window to see project folders and their contents.

  9. Add the following code inside Main():

    #if DEBUG
Console.WriteLine("Hello World - Debug");
#else
Console.WriteLine("Hello World - Release");
#endif

  10. Save and close the file.

Set Environment Variables

Use the steps below to set variables for the workspace. A SlickEdit workspace (.vpw) is equivalent to a solution (.sln) in Visual Studio.

  1. From the main menu, click Project → Workspace Properties .

  2. Click the Environment button.

  3. Click Set Environment Variable.

  4. In the Name box, type DOTNETDIR.

  5. In the Value box, specify your .NET framework that you want to use for the C# compiler, for example, C:\Windows\Microsoft.NET\Framework\v2.0.50727. To use an existing environment variable in the definition of the workspace environment, use the %(VARIABLE) syntax, not the VARIABLE% syntax, for example, %(WINDIR)\Microsoft.NET\Framework\v2.0.50727. Be sure to select environment variable names that do not already exist.

  6. Optionally, create another variable named WINSDKDIR, and point it to the Windows SDK or .NET Framework SDK, for example, C:\Program Files\Microsoft SDKs\Windows\v6.0. This should be a directory where the mdbg.exe managed code debugger can be found.

  7. Click OK.

  8. Close and reopen the workspace to set the environment variables.

Setting Up the Release Build

Once you've set the environment variables, complete the following steps to configure the commands for building a release version:

  1. From the main menu, click Project → Properties .

  2. In the Settings for box, select Release.

  3. Click to display the Tools tab.

  4. In the Tool name box, remove both Compile and Rebuild by selecting them and clicking the red X button. The remaining tools are Build, Debug, and Execute.

  5. In the Tool name box, select the Build tool.

  6. In the Command line box, type the following, replacing SeHello.exe with your own executable name:

    %(DOTNETDIR)\csc.exe /warn:3 /target:exe /define:TRACE /debug- /out:%bdSeHello.exe %{*.cs}

    The %bd in the above command line is a variable that represents the build output directory, in this case Release\. The %{*.cs} construct specifies all project files that end with the .cs extension.

  7. Make sure the Run from dir box contains %rw, which specifies the build should run from the project's working directory.

  8. Make sure the Capture output and Output to build window options are selected, so the output is captured and displayed in the Build tool window.

  9. Back in the Tool name box, select the Execute tool.

  10. Change the command line to "SeHello.exe" (including quotes), replacing SeHello.exe with the name of the executable specified in Step 6 above.

  11. In the Run from dir box, change the option to %bd (which represents the build output directory).

  12. Make sure the Capture output and Output to build window options are selected.

  13. Click OK to save your settings and close the Project Properties dialog.

You can now execute a build and see the output of the C# compiler by clicking Build → Build from the main menu. Once successful, you can run the console program and display the "Hello World-Release" results by clicking Project → Execute from the main menu.

Setting Up the Debug Build

To configure commands for a debug build, complete the following steps:

  1. From the main menu, click Project → Project Properties .

  2. Click the Configurations button.

  3. Click New.

  4. In the New config name box, type Debug.

  5. In the Copy settings from box, make sure Release is selected.

  6. Click OK to create the Debug config, and dismiss all of the dialogs.

  7. On the Project Properties dialog, click to display the Tools tab.

  8. In the Settings for box, select Debug.

  9. In the Tool name box, select the Build tool.

  10. In the Command line box, type the following, replacing SeHello.exe with your own executable name:

    %(DOTNETDIR)\csc.exe /warn:3 /target:exe /define:DEBUG;TRACE /debug+ /out:%bdSeHello.exe %{*.cs}

    Adding the DEBUG define and changing /debug- to /debug+ are the only changes between the Release and Debug configuration command lines.

  11. In the Tool name box, select the Execute tool.

  12. Set up the Execute tool the same as you did in Step 9 for the Release configuration (see Setting Up the Release Build).

  13. Click OK to save your settings and close the Project Properties dialog.

  14. From the main menu, click Build → Set Active Configuration and select Debug.

You can now execute the build by clicking Build → Build from the main menu. Once successful, click Build → Execute to see the "Hello World - Debug" output in the Build tool window.

Handling Complex Build Commands

A small console application like this one doesn't have any extensive dependencies, and most of the default options for the C# compiler are fine. However, more complex projects will require many more options to be passed on the command line. For these cases, it can be useful to create an options file for all of the command line switches. To do this:

  1. From the main menu, click File → New to create a new text file and add it to the project. For this example, we are creating the command line options for the Debug build in a file called Debug.opts.

  2. Insert the following into the new file. This should match your first few options on the Debug build command line:

    /warn:3 /target:exe /define:DEBUG;TRACE /debug+

  3. From the main menu, click Project → Project Properties .

  4. Click to display the Tools tab.

  5. In the Settings for box, select the Debug configuration.

  6. In the Tool name box, select the Build tool.

  7. In the Command line box, type the following, where SeHello.exe is your own executable name:

    %(DOTNETDIR)\csc.exe @Debug.opts /out:%bdSeHello.exe %{*.cs}

  8. Close the Project Properties dialog.

  9. From the main menu, click Build → Build to make sure the options file was correctly read.

Setting Up the Console Debugger

Optionally, to set up the console debugger, complete the following steps. This demonstrates how to hook up an external tool, and how it can be used interactively inside the Build tool window.

  1. From the main menu, click Project → Project Properties .

  2. Click to display the Tools tab.

  3. In the Settings for box, select Debug.

  4. In the Tool name box, select the Debug tool.

  5. In the Command line box, type the following, where SeHello.exe is the name of your own executable:

    %(WINSDKDIR)\Bin\mdbg.exe SeHello.exe

  6. Make sure Run from dir is set to %bd.

  7. Make sure the Capture output and Output to build window options are selected.

  8. Click OK to save your settings and close the Project Properties dialog.

  9. From the main menu, click Build → Show Build . The Build tool window now has focus with a blinking cursor just after the first mdbg> prompt.

  10. In the Build window, type the following commands in order, pressing Enter after each one:

  • print args - To show the value of the args variable.

  • next - To do a step over.

  • go - To continue execution.

  • quit - To quit the debugger. The debugger must be stopped in order for SlickEdit to regain control of the Build window.

The entire debug session output should look similar to the following:

C:\Dev\Lab\TestProjects\SeHello\Debug

> C:\WinSDK\Bin\mdbg.exe SeHello.exe

MDbg (Managed debugger) v2.0.50727.312 (rtmLHS.050727-3100) started.
Copyright (C) Microsoft Corporation. All rights reserved.
For information about commands type "help";
to exit program type "quit".
run SeHello.exe
STOP: Breakpoint Hit
16: static void Main(string[] args) {
[p#:0, t#:0] mdbg> print args
args=array [0]
[p#:0, t#:0] mdbg> next
19: Console.WriteLine("Hello World - Debug");
[p#:0, t#:0] mdbg> go
Hello World - Debug
STOP: Process Exited
mdbg> quit
C:\Dev\Lab\TestProjects\SeHello\Debug
>

Hello World Tutorial (Java)

This tutorial outlines the steps to create, build, and run a sample Hello World program for Java projects. The sample Java program prints the text Hello World to the standard output.

Create the Project

  1. From the main menu, click Project → New .

  2. On the Project tab, click to expand Java, then select Java - Empty Project.

  3. Type the Project name, HelloWorld. If you already completed the C/C++ tutorial you will need to enter a different name, like HelloWorldJava.

This creates a workspace and project by the name HelloWorld at C:\HelloWorld.

Create the File

  1. From the main menu, click Project → New .

  2. Select the File tab.

  3. Select Java from the list and enter a Filename, HelloWorld.java. Be sure to type the file extension.

  4. Check the Add to Project check box or the file will be created but will not be able to be built.

By default the file is created in the directory created in the previous step.

Edit the File

Edit the file to enter a Hello World program, as shown in the following example:

public class HelloWorld {
    public static void main (String args[]) {
        System.out.println("hello world");
    }
}

Build the Project

From the main menu, select Build.

Run the Program

From the main menu, click Run → Execute . The words Hello World are displayed in the window.

Vim Tutorial

SlickEdit® provides an emulation mode for the Vim text editor. If you want to learn Vim, you can use the vimtutor command. Most Vim installations come with this command, which displays a special "learn-by-doing" practice file in the editor that you can actually edit as you learn how to use the Vim commands. This file has been customized for SlickEdit users.

To use the command, open the SlickEdit command line, then type the command and press Enter. The practice file is displayed in the editor. Each time you use the vimtutor command, SlickEdit creates a fresh copy of this file.

Tip

  • You will be prompted to switch to the Vim emulation when you invoke the command if the editor is set to a different emulation. See Changing Emulations for more information.

  • When in the Vim emulation, you can open the SlickEdit command line with Ctrl+A, or in any emulation, by clicking in the message area with the mouse. See Activating the Command Line for more information.

Creating and Distributing Custom Toolbars

Use the following steps to write a macro which will load a custom toolbar that you can easily distribute to other users:

  1. Create a new form by clicking Macro → New Form .

  2. Change the form's name by editing the name property. For this example, we will name the form "mytoolbar1". You will need to remember the name of the form.

  3. Save the new form by pressing Ctrl+S, or, right-click on the form and select Save Form.

  4. Close the form and its properties.

  5. Create a new toolbar. To do this, click View → Toolbars → Customize , then make sure the Toolbars tab is selected and click New. Enter a new toolbar name in the Tool Bar Name field. This is the caption that will be used on the title bar of your toolbar when it is floating (i.e. not docked). For this example, we will use "My Toolbar 1". Next, expand the dialog by clicking the Advanced button. In the Form Name box, enter the form name that you just created in Step 1, then click OK. The new toolbar is displayed as floating.

  6. Add buttons to the new toolbar by dragging and dropping them onto the new toolbar from the Categories tab of the Toolbars options page (Tools → Options → Appearance → Toolbars ).

  7. Activate the SlickEdit® command line (see Activating the Command Line) and run the save_config command.

  8. Open the file vusrobjs.e (this file resides in your SlickEdit config directory, which can be found by going to Help → About SlickEdit ). An example of this file is located in the docs/samples installation subdirectory.

  9. Copy all of the code which is related to your new toolbar as well as the defmain() function at the bottom of the file, and paste it into a new file with a .e extension. An example of this file is newToolbar.e, located in the docs/samples installation subdirectory.

  10. Add the following include statements to the very top of the file:

    #include 'slick.sh'
#include 'toolbar.sh'

    Be sure that slick.sh is included first.

  11. At the end of the defmain() method, add the following line directly below the call to _config_modify_flags (as seen in newToolbar.e):

    _tbAddForm("mytoolbar1", TBFLAG_NEW_TOOLBAR,false,0,true);
// Where mytoolbar1 is the name of your new form and _not_ the name of your toolbar.

    This will actually add the toolbar to SlickEdit and update the SlickEdit state file.

  12. Save the file.

  13. This macro (remember that it ends in .e) will not compile like standard macros because of the defmain() call. Therefore, activate the SlickEdit command line and enter the full path to the newly created macro file (in this case, newToolbar.e). This will load the macro and the new toolbar.

In order to share this toolbar, distribute the new macro file that you created in Step 10, and have each user run it on the SlickEdit command line as described in Step 14. The new toolbar can be displayed by clicking View → Toolbars → My Toolbar 1 .

Your final macro should look very similar to newToolbar.e. Of course you can add more than one toolbar to the macro file using the same steps.


Encoding

Encodings are used to convert a file to either SBCS/DBCS for the active code page or Unicode (more specifically UTF-8) data. By default, XML and Unicode files with signatures (UTF-8, UTF-16 and UTF-32) files are automatically loaded as Unicode UTF-8 data, while other more common program source files like .c, .java, and .cs source files are loaded as SBCS/DBCS active code page data.

All file data can be configured to Unicode UTF-8 data, but this would cause some problems. Loading files containing SBCS/DBCS data would take significantly longer, slowing down parsing by Context Tagging® and any other multi-file operations. In addition, Unicode editors cannot support all the features supported by SBCS/DBCS editors due to font limitations. For more information, see Unicode Limitations.

To provide better support for editing Unicode and non-Unicode files, two modes of editing exist: Unicode and SBCS/DBCS mode. Files that contain Unicode, XML, or code page data not compatible with the active code page should be opened as Unicode files.

The following are non-Unicode encodings and put the editor in SBCS/DBCS editing mode: Default, Text, SBCS/DBCS mode, Binary, SBCS/DBCS mode, and EBCDIC, SBCS/DBCS mode. In addition, the Auto Unicode, Auto Unicode2, Auto EBCDIC and Unicode, and Auto EBCDIC and Unicode2 encodings put the editor into SBCS/DBCS editing mode when the file is determined not to be Unicode. All other encodings put the editor in Unicode mode and require that the file data be converted to UTF-8.

There are many encodings available, including:

  • Auto XML - This encoding specifies that the file encoding be determined based on XML standards and that the file be loaded as Unicode data. The encoding is determined based on the encoding specified by the ?xml tag. If the encoding is not specified by the ?xml, the file data is assumed to be UTF-8 data which is consistent with XML standards. We applied some modifications to the standard XML encoding determination to allow for some user error. If the file has a standard Unicode signature, the Unicode signature is assumed to be correct and the encoding defined by the ?xml tag is ignored.

  • Auto Unicode - When this encoding is chosen and the file has a standard Unicode signature, the file is loaded as Unicode data. Otherwise the file is loaded as SBCS/DBCS data.

  • Auto Unicode2 - When this encoding is chosen and the file has a standard Unicode signature or looks like a Unicode file, the file is loaded as Unicode data. Otherwise the file is loaded as SBCS/DBCS data. This option is NOT fool-proof and may give incorrect results.

  • Auto EBCDIC - When this encoding is chosen and the file looks like an EBCDIC file, the file is loaded as Unicode data. Otherwise, the file is loaded as SBCS/DBCS data. This option is NOT fool-proof and may give incorrect results. The option does attempt to support binary EBCDIC files.

  • Auto EBCDIC and Unicode2 - This encoding is a combination of the Auto EBCDIC and Auto Unicode2 encodings described above.

Using Unicode

To use encodings in SlickEdit®, Unicode support is required (OEMs typically turn this feature off). Unicode is supported for the following list of features:

  • All Context Tagging® features.

  • Color Coding.

  • Level 1 regular expressions as defined by the Unicode consortium.

  • Multi-file search and replace.

  • Support for many encodings including UTF-8, UTF-16, UTF-32, and many code pages. Automatic encoding recognition for XML files. Configure encoding recognition per extension or globally. Optionally store signatures and specify little endian or big endian. Use the Save As or Write Selection dialog to convert data to a particular file encoding.

  • Support for converting Unicode to UNC data and visa versa. Supported UCN formats include \xHHHH, \x{HHHH}, \uHHHH, &xHHHH;, and &xDDDD;. This is useful for specifying Unicode character strings in SBCS/DBCS active code page source files. See Converting Unicode to UCN.

  • Multiple clipboards.

  • Sorting.

  • 3-Way Merge.

  • Support for composite and surrogate characters.

  • Support for storing up to 31-bit Unicode characters.

  • SmartPaste®.

  • Syntax Expansion and Syntax Indenting.

  • Code beautifiers.

  • Support for almost all of SlickEdit's SBCS/DBCS active code page features.

Unicode File Recognition

By default, XML and Unicode files with signatures (UTF-8, UTF-16 and UTF-32) files are automatically loaded as Unicode. If you have Unicode files that are not XML and do not have signatures, configure default options to get the best recognition possible. This is important because some features such as drag/drop files and DIFFzilla® do not prompt you for the file encoding.

Each extension may have its own encoding specification. If the extension-specific encoding is set to Default, then the global setting defined at Tools → Options → Languages → File Extension Manager is used. Both the extension-specific and global setting are overridden if you previously specified an encoding in the Open dialog. The encoding used to override default encoding settings is recorded. The setting is then reused the next time you open the same file. This provides you with per-file encoding support.

If you have non-XML UTF-16 files that have signatures, then try selecting Auto Unicode2 as an extension-specific or global encoding. Since there is no option for recognizing UTF-8 or UTF-32 files (other than Auto XML) by looking at the file contents, you will either need to set an extension-specific encoding, or specify the encoding in the Open dialog the first time you open the file.

Some compilers (such as Visual C++) let you specify the code page in the source file (in fact, more than one code page can be used in the file). This is not supported, so the assumption is that the file is SBCS/DBCS active code page data.

Opening Unicode Files

To open a Unicode file, complete the following steps:

  1. Use the Open dialog (File → Open ).

  2. Specify the encoding if necessary.

  3. Press Enter.

Surrogate Support

Unicode data is stored as UTF-8 and not UTF-16. Since the Windows Win32 calls are used to implement some Unicode features there are some issues. By default, Windows does not support surrogates. You must use the regedit program to turn on surrogate support.

To turn on surrogate support, run the regedit program and go to the following key location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack

Set the value for SURROGATE to 0x00000002.

Casing features (uppercase, lowercase, ignore case) do not support surrogates. Windows is used for casing support and Windows casing features do not support surrogates.

Converting Unicode to UCN

You can convert a selection from Unicode to UCN or vice-versa. SlickEdit® conversion features are located on the Edit → Other menu. The Edit → Other → Unicode to UCN conversion feature is most useful for specifying Unicode character strings in SBCS/DBCS active code page source files. For example, here are the steps to store some UCN in a Java source file:

  1. Open the Unicode file containing the Unicode characters or create a new Unicode file and enter the characters you want to convert.

  2. Select the Unicode characters you want to convert.

  3. Execute the Edit → Other → Copy Unicode As → Java/C# (UTF-16 \uHHHH) menu item.

  4. Open the Java source file and paste (Edit → Paste ) the UCN data into the file.

Unicode Limitations

The following is a list of Unicode limitations:

  • Bold and italics color-coding is not supported. Support for this will be added in a future version.

  • Tab character operations are not fully supported. Tab display, the Expand tabs to spaces save option (Tools → Options → File Options → Save ), and save with tabs (save +t) only work correctly if all the characters are below 128. The Expand tabs to spaces load option (Tools → Options → File Options → Load ) is ignored.

  • Column selections do not fully support Unicode. If all the characters are below 128 and the font is fixed then it works. Support for this will be added in a future version.

  • Word Wrap does not fully support Unicode. If all the characters are below 128 and the font is fixed, then it works. Support for this will be added in a future version.

  • The Unicode line end character 0x2048 is not supported.

  • Hex editing is not supported. The current character (Composite character) is displayed on the status line. Also, use the Open dialog with the Binary, SBCS/DBCS mode encoding to view a Unicode file in hexadecimal.

  • Casing features (uppercase, lowercase, ignore case) do not support surrogates. Windows is relied upon for casing support, and Windows casing features do not support surrogates. See Surrogate Support.

  • Vertical line column (Tools → Options → Appearance → General ) is not supported.

  • Truncation line length is not supported.

  • Record width on the File Open dialog is not supported.

  • DDE is not supported. Unicode DDE does not work with Internet Explorer or Netscape®. You can view files with Unicode data in Internet Explorer; however, this feature will fail if the file name contains characters not in the active code page.

  • Version control supports files containing Unicode data but does not support file names that contain characters not in the active code page.

  • Special character display is not supported for Unicode buffers.

  • The grew program does not support Unicode and can only be used on SBCS/DBCS active code page text.

  • If you load the same source file in Unicode and SBCS/DBCS mode, the Context Tagging® database will have incorrect seek positions. It is important to use the default load options and to always load source files in the same encoding so that the Context Tagging seek positions match the editor seek positions.

  • The install (setup.exe), unionist (uninstall.exe), and update (update.exe) programs are not Unicode applications so the installation directory must contain characters in the active code page.

Unicode Implementation

Native Unicode and SBCS/DBCS editing modes are supported. When you edit a SBCS/DBCS (active code page) file such as a .c, .h, or .java file, the data is loaded as SBCS/DBCS data and is not converted to Unicode. When you edit a Unicode file, such as an XML file, the data is converted to UTF-8 that is one of the standard formats for supporting Unicode files. There are several advantages to this implementation:

  • Since almost all source files for programming are stored as SBCS/DBCS, loading these files is significantly faster. This is very important to our customers who expect superior performance from SlickEdit®.

  • Unicode editing modes cannot support all the features you were used to when editing SBCS/DBCS files (see Unicode Limitations).

  • Macros can be written once to support both editing modes. This was very important to us because we wanted to reduce development time.

  • Since Unicode is stored as UTF-8, only one set of binaries is required. Most products that support SBCS/DBCS and Unicode (UTF-16), use preprocessing. This requires two sets of binaries.


Environment Variables

Below is a list of environment variables that can be used within SlickEdit®. Configuration environment variables are set in the operating system or in vslick.ini file. For more information see Setting Environment Variables in vslick.ini

You can also use the set command from the SlickEdit command line to temporarily change one of the configuration environment variables or any other environment variable. See Using the set Command for more information.

Caution

Do not set the SLICKEDITCONFIG environment variable in vslick.ini. SLICKEDITCONFIG determines where the editor looks for vslick.ini. When the editor starts up, it sets the value of environment variables specified in vslick.ini. For more information, see Setting Environment Variables in vslick.ini.

Environment Variable

Description

VSLICKRESTORE

Directory to store Auto Restore files.

SLICKEDITCONFIG

Directory where user's local configuration files are stored. Used in multi-user environments. Defaults to:

  • (Windows) .../My Documents/My SlickEdit Config/Editor_Version/

  • (Mac) $HOME/Library/Application Support/SlickEdit/Editor_Version/

  • (Linux, UNIX) $HOME/.slickedit/editor_version/

Note that VSLICKCONFIG and VSLICKCLASSICCONFIG are no longer supported. VSLICKCONFIG has been replaced with a new variable, SLICKEDITCONFIG.

VSLICK

Specifies additional command line arguments to editor as if you were typing them in when invoking the editor. See also Invocation Options.

VSLICKPATH

One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) where batch macros or executable files are searched.

VSLICKMACROS

One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain macro files (*.e). VSLICKPATH must also contain the directories listed here.

VSLICKBIN

One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain binary files. VSLICKPATH must also contain the directories listed here.

VSLICKBITMAPS

One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain bitmap files (*.bmp). VSLICKPATH must also contain the directories listed here.

VSLICKMISC

One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain miscellaneous 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 file names separated with a semicolon (;) (or a colon [:] on UNIX) that contain alias definitions.

VSLICKTAGS

Specifies global tag files. One or more file names separated with a semicolon (;) (or a colon [:] on UNIX) that contain tags. Do not put this environment variable in vslick.ini.

VSLICKBACKUP

Directory to place backup files. Affects +D (default) and -D backup configurations only.

VSLICKSAVE

Allows save options to be specified per drive.

VSLICKLOAD

Allows load options to be specified per drive.

VSLICK_XIM

Set this to VSLICK_XIM=scim to activate the Smart Common Input Method (SCIM) editor. XMODIFIERS (XMODIFIERS=@scim) is set by your operating system and you must enable SCIM support for this option to have any effect. (This may cause keyboard input instability.)

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

The License Manager handles system crashes better if each user sets the 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.

VSLICKXNOBLINK

Suppresses the blinking cursor.

VSLICKXNOPLUSNEWMSG

Suppresses a message when starting a second instance of SlickEdit.

Setting Environment Variables in vslick.ini

Along with whatever facilities are provided by your operating system to set environement variables, you can set configuration environment variables in the file vslick.ini. This file is located in the following default directory based on your platform (if it does not exist, it can be created manually):

  • Windows: .../My Documents/My SlickEdit Config/Editor_Version/

  • Mac: $HOME/Library/Application Support/SlickEdit/Editor_Version/

  • Linux and UNIX: $HOME/.slickedit/editor_version/

Below is text from a sample vslick.ini file with an environment section.

[Environment]
VSLICKPATH=c:\vslick\win;c:\vslick\macros;c:\vslick\bitmaps;c:\vmacros
VSLICKALIAS=c:\vmacros\alias.slk
VSLICKINCLUDE=c:\vslick\macros;c:\vmacros
VSLICKLOAD=a: +l b: +l
VSLICKSAVE=a: +o b: +o
MYPROJECTVERSION=c:\myprog4.2

When the editor starts, the following environment variables are created by the editor:

  • VSDRIVE - Drive letter followed by a colon (:) where editor executable resides.

  • VSDIR - Directory of editor executable with a trailing backslash (UNIX: slash).

Environment variables can be embedded in any line within a section by placing % characters around the environment variable.

Using the set Command

Change or view the environment while running using the set command on the SlickEdit command line. The operation of the built-in set command is almost identical to the DOS SET command. Use the set command to temporarily change one of the configuration environment variables or any other environment variable. For a complete listing of configuration environment variables, see 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. Specify 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 classpath=). The DOS command shell removes environment variables in this way also.

The following steps are a convenient way to change the PATH environment variable:

  1. Press Esc to toggle the cursor to the command line.

  2. Type set path and press Enter. This will place the current value of the PATH variable on the command line.

  3. Edit the current value and press Enter.

You can use the above steps 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 command line will give you a selection list of all of the environment variable names.


Configuration Variables

SlickEdit® has many behaviors that are controlled through properties not exposed in the options dialogs. They are set through global configuration macro variables in Slick-C®, using the set_var command. The most commonly used of these variables are listed in the table below.

Viewing Configuration Variables

To view the complete list of configuration variables, bring up the SlickEdit® command line and type set_var def- (note the hyphen). The completion list will provide the full list of available variables. Use the Help system to look up information on a variable by typing the name of the variable into the Index search field. You can also see a list of variables under Help → Macro Functions by Category → Configuration Variables .

Alternatively, you can use the Symbols Tool Window to find where the variable is defined in the Slick-C® code. Expand the Slick-C folder and then expand the Global Variables folder. If Slick-C hasn't already been tagged, type fp into the SlickEdit command line. This is an abbreviation of the find_proc command, which will trigger tagging if it hasn't already been done.

Setting/Changing Configuration Variables

There are two ways to set/change these macro variables:

  • From the SlickEdit® menu, click Macro → Set Macro Variable (or use the gui_set_var command) and enter the macro variable in the Variable field. The current value of the variable will be shown in the Value text box. Click Edit to edit this variable, then click OK to accept the change.

  • From the SlickEdit command line, invoke the set_var command with the macro variable name (for example, set_var def_auto_linecomment), then press Enter to view the current value. You can edit this value, then press Enter to accept the change.

See Programmable Macros for more information on loading macros and setting variables.

Table of Configuration Variables

The table below provides a list of the most commonly used configuration variables.

Configuration Variable

Description

def_auto_linecomment

Change to 0 to turn off automatic line comment insertion.

def_binary_ext

This variable is used by the editflst.e macro for the Brief emulation. When the editflst.e macro is loaded, the space-delimited extensions listed by this variable are filtered out by the edit command's completion. The default is .ex .obj .exe .lib.

def_buflist

Change this variable to find the initial file in Buffer List. The 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

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.

If you set this variable to 1, it will show the full path, which you can order according to path. The default (3) will show an alphabetical list of the files in the left column and the directories in the right column.

def_ctags_flags

This variable is a safeguard against parsing past the end of a proc when the braces mismatch. To have SlickEdit® recognize the second dd, set the value of this variable to 10.

def_debug_logging

If you change this value to 1, then run the integrated debugger and let it time out, a vs.log file will be created in your config directory.

def_deselect_copy

Set to 1 in Brief emulation to deselect after a copy.

def_do_block_mode_key

Set this variable's value equal to 0 to stop SlickEdit from inserting characters on every line of a block selection.

def_error_re2

Edit this variable to change from the SlickEdit regular expression used for compile/build errors.

def_fast_auto_readonly

When set to 1, this option speeds up the Auto read only feature by only checking the attribute on disk (not opening every file). See Load File Options for more information.

def_filelist_show_dotfiles

Controls the global Show files beginning with a dot option (Tools → Options → Appearance → General ). On Windows, the default value of this variable is 1; change to 0 to view Dot files. On UNIX platforms, the default value is 0; change to 1 to hide Dot files. (Dot files are files with names beginning with a dot character.)

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_linewrap

Default is set to 1. If you are at the end of a line that has whitespace only on the line below it (spaces or tabs) and you press Delete, this will bring the whitespace below it up to the end of the line that you are on. When the value is set to 0, if you press Delete while at the end of a line that has whitespace only on the line below it (spaces or tabs), the whitespace is removed entirely®acting as a line delete.

def_linux1_shell

To use an alternate shell, set this variable to the shell that you want to run (for example, /bin/bash -i). This will cause the editor to use your process shell.

def_max_filehist

Increases the number of files displayed in the file history of the File menu. Enter the number of files you want to see in the history.

def_max_mffind_output

This variable is set for performance reasons. You can increase the amount of information displayed in the Output tool window during a multi-file search by changing this to your desired setting.

def_max_workspace_hist

Increases the length of the Workspace history list in the Project menu. Enter the number of files you want to see in the history.

def_modal_paste

Default is 0. If non-zero, commands that insert a BLOCK-type clipboard will overwrite the destination text if the cursor is in Replace mode.

def_plusminus_blocks

When the value is set to 1, the plusminus command will try to find code blocks to expand or collapse if the cursor is on a line that does not have a Plus or Minus bitmap on it. The default is 1.

def_preplace

Default is 1. If the value is set to 0, the save command will NOT prompt you if you are inadvertently overwriting a file. For example, if you invoke the command savexyz, and 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_rwprompt

Default is 1. Change this to 0 to suppress the pop-up that asks: Do you want to update the read-only attribute of the file on disk?

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.

def_shift_updown_line_select

Set this value to 1 for Shift+Up or Shift+Down to select the current line.

def_show_makefile_target_menu

This variable can be set to decrease the time that it takes for menus to open. Set to 0 to disable all makefile submenus (such as the Build menu and the Projects tool window). Set to 1 to enable all makefile submenus (this is the default). Set to 2 to enable makefile submenus only in the Projects tool window (the Build menu makefile targets are disabled).

def_switchbuf_cd

Set this variable equal to 1 to change the current working directory to the file that currently has focus in the editor. This variable is on by default in the GNU Emacs emulation, and off in all other emulations.

def_top_bottom_push_bookmark

Set this variable to 1 to push a bookmark whenever you jump to the top or bottom of the buffer. Note that even when this variable is set, no bookmarks are pushed when using the current buffer as a build window (.process buffer). The default value is 0.

def_undo_with_cursor

Set this value to 1 to enable the undo of each cursor movement.

def_update_context_max_file_size

This variable increases the array size in bytes of a file that is too large. The default size of files that can be processed by Context Tagging® is 4 MB. The size can be lowered by changing this variable and setting it to equal the size that you want (in bytes).

def_vc_advanced_options

Set to this variable to 0 to remove advanced options that decrease performance when using ClearCase version control.

def_vtg_tornado

Set this variable value to 0 to prevent Context Tagging of Tornado files.

def_xml_no_schema_list

To prevent SlickEdit from accessing the Internet to validate and get color coding information from DTDs, add your XML extension to this variable. Set the value to a list of space-delimited extensions that you want excluded for actual schema validation. For example: .xml .xsl .xsd. This will prevent SlickEdit from attempting to connect to the Internet for these extensions.


Configuration Directories and Files

User Configuration Directory

Your SlickEdit® configuration directory contains configuration files representing the changes you have made through setting editor options, and it preserves the state of SlickEdit by using the state file, Table of User Configuration Files.

You should make periodic backups of your SlickEdit configuration directory. If you experience a problem in the editor, you can often solve it by using a saved config directory.

Configuration changes are saved when you exit the editor. Note that SlickEdit cannot save configuration changes when another instance is running. If you attempt to close an instance that contains configuration changes, while another instance is running, a Save failed message is displayed, then a prompt asks whether or not to exit anyway.

Configuration Directory Location

By default, the user configuration directory is in the following location, depending on the operating system you are using:

  • Windows: .../My Documents/My SlickEdit Config/Editor_Version/

  • Mac: $HOME/Library/Application Support/SlickEdit/Editor_Version/

  • Linux, UNIX: $HOME/.slickedit/editor_version/

SlickEdit® creates a versioned config subdirectory for each version of SlickEdit you run.

Tip

You can view the path to the config directory by clicking Help → About SlickEdit . When SlickEdit displays the config directory, it includes the versioned subdirectory. For example: C:\Documents and Settings\SlickEditUser\My Documents\My SlickEdit Config\13.0.0\.

If you want to use a different directory for your config files, set the SLICKEDITCONFIG environment variable (see Environment Variables), or specify the location by using the -sc invocation option on the command line (see Invocation Options). In both cases, SlickEdit will create a versioned subdirectory below the specified directory.

Resetting the Configuration Directory

For troubleshooting purposes, it is sometimes helpful to reset the configuration directory to the defaults. SlickEdit Product Support may also ask you to use a default configuration to help debug problems. To reset to the default configuration:

  1. Exit any instances of SlickEdit® that are running.

  2. Make a backup of the user config directory and store the backup in a safe location.

  3. Delete the contents of the versioned config directory (i.e. 13.0.0) but NOT the directory itself.

  4. Start SlickEdit.

After completing these steps, SlickEdit opens with the default configuration settings. Note that you will be prompted for all of the initial setup information just as if you were running SlickEdit for the first time (see Running SlickEdit).

Note

If, instead of deleting the contents of the directory, you delete the directory itself, SlickEdit will attempt to migrate your settings from a previous version.

Table of User Configuration Files

The table below provides a list of the user configuration files.

User Config File | Description
*.als | A text file that contains user-defined language-specific aliases.
alias.slk | A text file that contains user-defined global aliases (directory aliases).
ftp.ini (UNIX: uftp.ini) | A text file that contains user-defined FTP configurations.
project.vpe (UNIX: uproject.vpe) | A text file that contains user-defined language-specific projects.
ubox.ini | A text file that contains user-defined box and line comment styles.
uformat.ini | A text file that contains user-defined beautifier schemes.
uprint.ini | A text file that contains user-defined printing schemes.
uscheme.ini | A text file that contains user-defined color schemes.
user.vlx | A text file that contains color coding changes (keywords, etc.). This file is updated when you close the Color Coding dialog box.
usercpp.h | A text file that contains defines (default preprocessing) for Context Tagging® of C++ and C code.
uservc.slk | A text file that contains user-defined version control systems.
usrprjtemplates.vpt | A text file that contains user-defined project packages.
vrestore.slk | A text file that contains auto-restore information. The workspace files also contain auto-restore information, but only for the files/windows previously open.
vslick.ini | A text file that 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.
vslick.sta (UNIX: vslick.stu) | A binary file that contains dialog boxes, menus, macro pcode, key bindings, and all other configuration data not stored in one of the other configuration files. Both user and system configuration information is stored here.
vusrdefs.e (UNIX: vunxdefs.e) | A Slick-C® text file that contains the emulation setting, key bindings, color settings, language setup information, and some other miscellaneous options.
vusrobjs.e (UNIX: vunxobjs.e) | A text file that contains user-defined dialog boxes and menus in Slick-C syntax.
vusrs*.e (UNIX: vunxs*.e) | A text file that contains system modified dialog boxes and menus. These changes are NOT automatically transferred unless the version encoding matches. For example, vusrs10e.e.

System Configuration Files

System configuration files are located in the SlickEdit® installation directory.

Typically, these files are only modified by SlickEdit Inc. or OEM customers. OEM customers might want to modify one of these files to ship a customized version of SlickEdit.

Table of System Configuration Files

The table below provides a list of the system configuration files.

System Config File | Description
alias.slk | A text file that contains default global aliases (for example, directory aliases).
box.ini | A text file that contains default box and line comment styles. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
format.ini | A text file that contains default beautifier schemes.
print.ini | A text file that contains default printing schemes. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
prjtemplates.vpt | A text file that contains default project packages. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
syscpp.h (UNIX: usyscpp.h) | A text file that contains system-defined default preprocessing for Context Tagging® of C++ and C code.
vcsystem.slk (UNIX: uvcsys.slk) | A text file that contains default version control systems. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
vslick.ini | A text file that contains a few miscellaneous options. Some customizable environment variables for path searching for macros, bitmaps, and binary files are stored here as well. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
vslick.sta (UNIX: vslick.stu) | A binary file that contains default dialog boxes, menus, macro pcode, key bindings, and all other configuration data not stored in one of the other configuration files.
vslick.vlx | A text file that contains default color coding lexer definitions.
vsscheme.ini | A text file that contains default color schemes. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.


File Search Order

Search Order for Configuration Files

Several files are automatically searched 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, and vrestore.slk is:

  1. Configuration directory.

  2. Current directory.

  3. Paths specified in VSLICKPATH environment variable.

  4. Paths specified in PATH environment variable.

Search Order for Executable Files

The search order for executable files, batch macro programs, and miscellaneous files is:

  1. Current directory.

  2. Configuration directory.

  3. Paths specified in VSLICKPATH environment variable.

  4. Paths specified in PATH environment variable.


Advanced Help Configuration

This section outlines the ways that alternative and multiple Help file access can be configured.

F1 Index Help

F1 Help, also known as Word Help or SDK Help, searches external Help files for information about a symbol. For C++ compiler packages, this includes help on the Windows API, Standard C library, and Microsoft C Foundation Classes (if you have Microsoft Visual C++).

To use F1 Help, first configure the Help files to be used. You can also configure access to multiple Help files (such as MSDN Help). See Configuring Help Files.

After configuration, to search the Help files for the keyword at the cursor, use one of the following methods:

  • Press F1

  • Or, from the main menu, click Help → F1 Index Help

  • Or, on the SlickEdit command line, use the help_index command

  • Or, in any emulation, click the Question Mark button ( [image] ) located on the SlickEdit toolbar.

This will invoke the Help Index dialog box which scans a help .idx file for Help files that contain a prefix match or exact match of the Help keyword specified. You can specify other keywords by directly typing them into the Help Keyword field on this dialog.

UNIX, Linux, and Mac OS X F1 Help

UNIX, Linux, and Mac OS X users can get man page Help on the word at the cursor by pressing F1 (executes the wh command). When you are editing a Slick-C® macro, pressing F1 brings up macro language Help for the word at the cursor. You will find this especially useful for getting help on macro source generated during macro recordings. F1 works for the default CUA emulation and most other emulations as well.

Help Index Options

The options on the Help Index dialog are described in the topic Help Index Dialog.

Configuring Help Files

The Help system uses Help files to determine the Help information that is displayed. To add or remove Help files from SlickEdit®, from the main menu click Tools → Options → Help Options → F1 Index File . These options let you add an IDX file, which is typically used for providing Word Help on multiple Help files that 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) box on the General Help options screen (Tools → Options → Help Options → General ) specifies this file name.

Building the Help Index File vslick.idx

  1. From the main menu, click Tools → Options → Help Options → F1 Index File .

  2. Click Scan to automatically add Help files (.hlp) on the PATH. This should also find Microsoft Visual C++, C++ Builder, and Delphi Help files.

  3. If scanning did not pick up some Help files you want, add the other Help directories manually to the Help file path text box. Click Scan again.

  4. Click OKto build the vslick.idx file.

Usually, you only need one Help index file for all the compiler packages. However, you may prefer to separate the Help files into groups that you can access on different keys.

Changing the Default Word Help File(s)

To change the default Word Help file name(s) for Ctrl+F1 and Ctrl+F2 (wh and wh2 commands), complete the following steps:

  1. To set the Word Help file name, from the main menu, click Tools → Options → Help Options → General .

  2. In the Word help filename(s) box, specify the Help files for the wh command (Ctrl+F1), each separated with a plus sign. You can only specify one IDX or MVB file per command.

  3. 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.

  4. You can 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 or MVB file. For 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

Environment variables may be embedded in the Word Help file name(s) string by the following notation:

        %(
        envvar-name
        )

Configuring F1 MSDN Help

You can configure F1 Help to display information from Microsoft's MSDN Help system when searching for help in a Microsoft solution or project. Any MSDN library that is installed with Visual Studio 2003 and later installs this Help viewer. To set this configuration, from the main menu, click Tools → Options → Help Options → F1 MSDN Help , then select Use MSDN help for F1 help to enable the feature. Installed Collections is a list of the Help collections that are installed on your computer. By default, Help searches the collections with the word "combined" in the name, first. It searches in the index list as well as the keywords.


VLX File and Color Coding

For more basic information about using Color Coding, see Colors, Color Coding, and Symbol Colors.

To modify the color coding for VLX files, use one of the following methods:

  • Use the language-specific Color Coding options screen (see Language-Specific Color Coding Options).

  • Modify the vslick.vlx file.

  • Create a new VLX file.

The vslick.vlx file defines language-specific coloring support for the following languages:

  • Ada

  • Assembler

  • AWK

  • C

  • C++

  • CFScript

  • CICS

  • COBOL

  • dBASE

  • Delphi

  • Fortran

  • HTML

  • Java

  • Modula-2

  • Pascal

  • Perl

  • Python

  • REXX

  • Slick-C®

  • VHDL

  • Visual Basic .NET

Modifying the VLX File to Change a Color Definition

To modify an existing language-specific coloring definition, complete the following steps:

  1. Open vslick.vlx for editing.

  2. Search for one of the section names: CPP, Java, Delphi, Pascal, AWK, REXX, Perl, HTML, Modula-2, AWK, COBOL, Python, CICS, Fortran, Visual Basic .NET, Ada, or Slick-C®.

  3. Modify the definition. See below for information on the syntax of definitions.

  4. Invoke the cload command from the command line. If the current buffer has a .vlx extension, it will be loaded. Otherwise you will be prompted to specify a file name. Specify vslick.vlx including path as the file name.

Creating a Lexer Name and a New VLX File

To create a new lexer name (and thus a new section in the VLX file), first complete all of the preceding steps under Modifying the VLX File to Change a Color Definition, then complete the steps below.

  1. From the main menu, click Tools → Options → Languages , expand your language category and language, then select General.

  2. If this lexer definition is for a new extension, create the extension with the New button. Otherwise, choose the appropriate extension.

  3. Set the Lexer Name for the new lexer definition you created.

  4. Turn on the Language Specific check box.

  5. Click Update to commit the changes.

Files with a .vlx extension are text files that have a syntax similar to a .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 that look like name=value.

The table below shows the statements that can be used.

Statement | Description
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 that are the start of a valid identifier and additional valid characters that may follow. This statement must be the first or second statement within the section. You may use a dash (-) character to specify a range, for example, A-Z specifies uppercase letters. To specify a dash or backslash (\) character as a valid word character, place a backslash before the character.
styles= style | Defines zero or more styles. See Table of style Values below for a list of available styles.
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 followedbyidchars is used to require certain characters to follow start_symbol. You can use a dash (-) character to specify a range, such as A-Z, which specifies uppercase letters. To specify a dash (-) or backslash (\) character as a valid word character, place a backslash before the character. followedbyis ignored when the html style is specified. Currently, start_symbol and end_symbol may not be valid identifiers. No more than four 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 one 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 two multi-line comments may be defined.
mlckeywords= [ keyword ] [ keyword ] ... | Defines keywords for the last mlcomment statement. When one of these keywords follows 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 the 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 of 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 one 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 identifier. 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.

Table of Style Values

The table below describes the style values that can be used:

Value of style | Description
linenum | Line numbers may be found as the first non-blank symbol of a line like BASIC.
dqbackslash | Color double-quoted strings. Characters following a backslash in a double-quoted string are included in the string (like C).
dqbackslashml | Color double-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line (like C).
dqmultiline | Color double-quoted strings. String may span multiple lines.
dqdoubles | Color double-quoted strings. Two double quotes represent one double quote.
dqterminate | Do not color-code a double-quoted string until the string is terminated. This style does not support dqmultiline or dqbackslashml.
dqlen1 | Color double-quoted strings. Double-quoted strings contain exactly one character.
sqbackslash | Color single-quoted strings. Characters following a backslash in a single-quoted string are included in the string (like C).
sqbackslashml | Color single-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line.
sqmultiline | Color single-quoted strings. String may span multiple lines.
sqdoubles | Color single-quoted strings. Two consecutive single quotes represent one single quote (like Pascal).
sqterminate | Do not color-code a single-quoted 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 form0xhhhh (like C).
nonumbers | Do not 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 lowercase letter X. For example, '414141'X or 414141X are REXX-style hexadecimal strings that are both equivalent to the string AAA.
packageimport | Language has Java syntax package and import statement where non-quoted file name 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.
heredocument | Enables support for Heredocuments. Note that if you prefix the terminator with one of the lexer names, you will get embedded language color-coding.
perl | Adds support for Perl format statement and some other Perl-specific changes.
tcl | Special support for TCL language color-coding.
bquote | Perl- and Linux Shell-style backquote (subshell).
model204 | Special support for Model 204 language.
cics | Special support for CICS embedded in COBOL.
python | Special support for Python.


Editing the Key Binding Source

If you are creating a new emulation or if you change many key bindings, you might want to edit your key binding source instead of using the Key Binding Options screen. To create a Slick-C® batch macro containing your current key bindings, enter the command list_source on the command line. One of the files generated by this command is vusrdefs.e. It is placed in your configuration directory. If you open this file (Ctrl+O), the first part of the source code is your key binding, which looks like the following:

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 containing 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. The valid key names are listed in the Help system under Event Names. You can also list the key names of the keys through the Help by invoking the command help Event Names. To run this 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.


Using the ISPF and XEDIT Emulations

This section describes the features of the ISPF editor emulation and outlines some XEDIT line commands.

ISPF Options

The ISPF Emulation options screen is used to tune various ISPF emulation behaviors. To access these options, SlickEdit must be in ISPF emulation mode. Then, from the main menu, click Tools → Options , expand Keyboard, and select ISPF Emulation.

The following settings are available:

  • 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.

    Only the following line commands are allowed in read-only mode:

Command | Description
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 this check box is selected, the Enter key places the cursor in the prefix area of the next line. When this check box is cleared, the Enter key places the cursor in column 1 of the next line.

  • Right CTRL = Enter/Send - When this check box is selected, 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 this check box is cleared, 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 this check box is selected, 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 this check box is cleared, page up/down always scrolls one page.

  • END command saves the file - When this check box is selected, 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 this check box is selected, the prefix area will support XEDIT-style line commands.

  • Home places cursor on command line - When this check box is selected, 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.

More ISPF-related options are available on the language-specific General options screen (Tools → Options → Languages → [Language Category] → [Language] → General ). These options include Auto CAPS mode and editing of boundaries and the truncation column. The Bounds setting is unique to ISPF. It controls column bounds for specific ISPF commands that operate on column ranges. See Language-Specific General Options for more information.

ISPF Primary Commands

The following table of standard ISPF primary commands are supported in the 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 press the Esc key, click on the message line, or use ispf_retrieve (F12). If configured to do so, 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

Some standard 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.

Command | Description
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 | Compare the file you are editing with another file.
ispf_copy | Insert 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 | Delete lines in the given line range, or the entire buffer.
ispf_edit | This command is identical to the built-in edit command.
ispf_end | Close the current file.
ispf_exclude | Hide (exclude) lines that match the given search string.
ispf_find | Find occurrences of the given search string in the current buffer.
ispf_flip | Reverse the exclude status of lines.
ispf_hex | Toggle 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 | Move the contents of a file or PDS member into the buffer.
ispf_nonumber | Turn off numbering mode.
ispf_number | Controls line numbering mode. Unlike ISPF, this command does affect how lines are inserted.
ispf_paste | Copy lines from the clipboard to the buffer.
ispf_preserve | Controls saving of trailing blanks.
ispf_rchange | Repeat the change requested by the most recent change command.
ispf_renumber | Immediately update the line numbers in a file.
ispf_replace | Save the contents of the current buffer to an existing file.
ispf_reset | Reset the contents of the line prefix area.
ispf_return | Close 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 | Sort lines of data in a specified order.
ispf_submit | Submit the contents of the current buffer for batch processing.
ispf_swap | Switch to the next buffer.
ispf_tabs | Define logical tab positions.
ispf_unnumber | Blank out the line numbers in a file.
ispf_undo | This command is identical to the undo command.

ISPF Line Commands

The table below shows ISPF edit line commands that 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, or move the cursor left or backspace 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. 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.

Command | Description
ISPF Line Labels | Define a label.
ISPF Line Command Shift | Shift data left or right.
ISPF Line Command A | Identify a line after which lines are to be inserted.
ISPF Line Command B | Identify a line before which lines are to be inserted.
ISPF Line Command BNDS | Insert a column boundary ruler line.
ISPF Line Command Copy S | Specify lines to be copied to another location.
ISPF Line Command COL | Insert a column ruler line.
ISPF Line Command Delete | Delete one or more lines.
ISPF Line Command First | Expose one or more lines at the beginning of a block of excluded lines.
ISPF Line CommandI | Insert one or more blank data entry lines.
ISPF Line Command Lowercase | Convert 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 | Display the contents of the mask used with the insert (I) and text entry (TE) line commands.
ISPF Line Command Make Data | Convert one or more no-save lines to data so that they may be saved when the buffer is saved.
ISPF Line Command Overlay | Identify one or more lines over which the copy or move block is to be overlaid.
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 left-most indentation level in a block of excluded lines.
ISPF Line Command TABS | Display the tab definition line.
ISPF Line Command TE | Insert one or more blank lines to allow power typing for text entry.
ISPF Line Command TF | Reflow paragraphs according to the current column boundary settings.
ISPF Line Command TJ | Join this line with the next line.
ISPF Line Command TS | Divide a line so that data can be added.
ISPF Line Command Uppercase | Convert all lowercase letter alphabetic characters in one or more lines to uppercase.
ISPF Line Command Exclude | Specify one or more lines to be hidden (excluded).
ISPF Line Command Select | Select a block of lines.

ISPF Line Command Documentation

ISPF Line Labels .label
Usage

.label, where label does not start with a 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 Shift Lines Left or Right
Usage

  • ( [ n ] - Shift the current line n columns left, default 2

  • (( [ n ] - Shift the block of lines n columns left, default 2

  • ) [ n ] - Shift the current line n columns right, default 2

  • )) [ n ] - 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

  • > [ n ] - Data shift the current line n columns right, default 2

  • >> [ n ] - Data shift the block of lines n columns right, default 2

Remarks

This set of commands is used for shifting data left or right. The versions using parenthesis shift text literally, while the other versions attempt 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 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 Insert Before B
Usage

B [ n ]

Remarks

Identifies a line before which copied or moved lines are to be inserted ntimes. 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 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 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 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 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 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 Insert Lines
Usage

I [ n ]

Remarks

Insert one or more blank data entry lines.

See Also

ispf_enter, ISPF Line Command TE

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 LCCor LCLC.

  • LCLC - Lowercase a block of lines, must match another LCCorLCLC.

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 (LCLCor 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 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 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 cannot 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 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 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 MDDor MDMD.

  • MDMD - Make a block of lines data, must match another MDDorMDMD.

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 (MDMDor 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 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 overlaid. Text is only overlaid 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 overlaid. The second (block) form (OO) is placed on the first and last lines of the block to be overlaid.

You are allowed to specify multiple A, B, or O line commands to have the same copy or move block inserted or overlaid 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 Repeat Lines
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 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 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 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 Insert Lines TF
Usage

TF

Remarks

Reflows paragraphs according to the current column boundary settings.

See Also

reflow_paragraph

ISPF Join Lines TJ
Usage

TJ

Remarks

Join this line with the next line.

See Also

ISPF Line Command TS, join_line

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 press Enter. This command does not support multiple lines.

See Also

ISPF Line Command TJ, split_insert_line

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 UCCor UCC.

  • UCUC - Uppercase a block of lines, must match another UCCorUCUC.

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 (UCUCor 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 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 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

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 (Tools → Options → ISPF Options ).

XEDIT | ISPF | Description
/ | R | Repeat the marked line.
F | A | Paste text following line.
A | I | Add (insert) line(s).
P | B | Paste text before line.
L | LC | Make line lowercase.
LL | LCC | Make block lowercase.
U | UC | Make line uppercase.
UU | UCC | Make block uppercase.

Note the following conflicts with standard ISPF edit line commands:

  • F conflicts with unexclude first (F).

  • A conflicts with paste after (A).

  • L conflicts with unexclude last (L).

  • LL conflicts with unexclude block (LL).

ISPF Unsupported Primary Commands

The table below shows ISPF primary commands that are not supported in the ISPF emulation mode. The unsupported commands fall into two categories. First, some ISPF commands are made obsolete by more powerful 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.

Unsupported Command | Description
autolist | Control 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 | Save the name of an initial macro in the edit profile.
level | Set the modification level number in PDF library statistics.
model | Copy a model into the buffer or defines a model class.
notes | Control whether the MODEL command display notes or not.
nulls | Control null spaces.
pack | Control whether data is to be stored compressed or not.
profile | Display edit profile.
recovery | Specify edit recovery options.
rmacro | Save a recovery macro in the edit profile.
setundo | Control the UNDO mode.
stats | Generate library statistics.
version | Set the version number in the PDF library statistics.
view | Save as browse command but prompts on save.

The following commands are supported in ISPF emulation mode.

Supported Command | Description
ispf_bottom | Move cursor to the end of the buffer.
ispf_down | Move cursor to next page of text.
ispf_enter | Handle the Enter key or Right Control key in ISPF emulation.
ispf_home | Place 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 | Move cursor up to the top of the buffer.
ispf_up | Move cursor up to the previous page of text.
ispf_do_lc | Immediately process all commands found in the line prefix area.


Emulation Tables

CUA Keys

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+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
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
Ctrl+X | Retrieve previous command
Ctrl+C | Retrieve next command
Ctrl+V | Start or extend char/stream selection
Ctrl+Shift+C | Start char/stream selection
Ctrl+Shift+X | Extend selection
Ctrl+Shift+V | Select word
Esc | Select line

CUA Files and Buffers

F2, Ctrl+S | Save current buffer
Ctrl+N | Next buffer
Ctrl+P | Previous 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+F7 | Move
Ctrl+F8 | Size
Ctrl+F9 | Minimize
Ctrl+F10 | Maximize

CUA Compiling and Programming Support

Alt+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+Dot | 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+Comma | Pop a pushed bookmark
Ctrl+G | Find next reference
Ctrl+Shift+G | Find previous reference
Ctrl+M | Build project
Ctrl+F5 | Execute project
F4, Ctrl+Shift+Down | Next error
Shift+F4, 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
Alt+F7 | Project properties

CUA Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

CUA Macros

Ctrl+F11 | Start/end macro recording
Ctrl+F12 | Terminate recording & run last recorded macro
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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
F10 | Menu bar
Ctrl+F1 | SDK Help on word at cursor
Alt+F4 | Safe exit
Ctrl+Shift+Comma | Complete previous word/variable
Ctrl+Shift+Dot | Complete next word/variable
Ctrl+Shift+Space | Complete more
Esc | Cancel or command line toggle
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+Shift+N | Activate Bookmarks tool window
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+F10 | Maximize MDI window

Visual C++ Keys

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+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
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+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Shift+Space, Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
F12, Ctrl+Dot | 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+Comma | Pop a pushed 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+Shift+G | Cursor to error/include file
Ctrl+F12 | Make and load current macro buffer
Ctrl+Shift+M | Start concurrent process

Visual C++ Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

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+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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

Ctrl+Shift+R | Help for mode or context
Ctrl+Shift+P | Menu bar
Ctrl+F12 | SDK Help on word at cursor
Ctrl+Break | Safe exit
Ctrl+Alt+Shift+F2 | Complete previous word/variable
Ctrl+Shift+Space | Complete next word/variable
Esc | Cancel or command line toggle
Ctrl+Shift+R | Undo
Ctrl+Shift+P | Redo
Ctrl+F12 | Hex display toggle
Ctrl+Break | Set bookmark 1..0
Alt+Shift+F2 | Activate Bookmarks tool window
Ctrl+Alt+Shift+F2 | Match parenthesis
Ctrl+Shift+Space | Expand alias at cursor
Ctrl+D | Activates search history
Alt+F5 | Restore MDI window
Alt+F7 | Project properties
Alt+F8 | Beautify selection
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

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
Ctrl+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Alt+N | Insert buffer name
Shift+Space | Insert a space (no syntax expansion)
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 and replace (Supports command line replace command only)
Ctrl+X Ctrl+R | Reverse incremental search
Ctrl+Alt+Shift+F2 | Stop search or search and 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 | Uppercase selection
Ctrl+F4 | Lowercase 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 enabled. (Tools > Options > 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

SlickEdit® 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+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+H, Ctrl+Dot | 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+Comma | Pop a pushed bookmark
Ctrl+F | Find next reference
Ctrl+Shift+F | Find previous reference
Ctrl+Space | Complete symbol
Ctrl+X 'M' | Build project
Ctrl+F5 | Execute 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® Debugging

Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

SlickEdit® Macros

Ctrl+R | Start/end macro recording
Ctrl+T | Terminate recording & run last recorded macro
Ctrl+Shift+T,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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+Comma | Complete previous word/variable
Ctrl+Shift+Dot | 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
Ctrl+Shift+N | Activate Bookmarks tool window
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

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
Ctrl+Enter | No split insert line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Alt+Q | Quote next character typed
Ctrl+A | Insert buffer name

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 expression 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 enabled (Tools > Options > 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

Brief 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+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Dot | 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+Comma | Pop a pushed 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 Debugging

Ctrl+F9 | Toggle breakpoint enable
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

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+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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+Comma | Complete previous word/variable
Ctrl+Shift+Dot | 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
Alt+Shift+J | Activate Bookmarks tool window
Ctrl+Q | Fundamental mode for next key press
Ctrl+Shift+O | Expand alias at cursor
Alt+/ | Alias change directory

Epsilon Keys

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+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
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+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+X 'M' | Build project
Ctrl+F5 | Execute 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 Comma, Ctrl+Dot | Push a bookmark and go to the definition of the symbol at cursor
Ctrl+X Ctrl+H, Ctrl+Comma | Pop a pushed bookmark
Ctrl+X Dot | Go to definition
Ctrl+X Alt+Comma | Context Tagging® - 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 Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

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+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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 enabled (Tools > Options > 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

Epsilon 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)
F2, Alt+X | Complete and enter argument (cmdline only)
Ctrl+D | Start or extend char/stream selection
Ctrl+H, Backspace | Start char/stream selection
Tab, Ctrl+I | Extend selection
Ctrl+J, Enter, Ctrl+M | Select word
Space | 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+Comma | Complete previous word/variable
Ctrl+Shift+Dot | 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
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

Epsilon 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

Vim Keys

Vim 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
Vim Cursor Movement - Command Mode Only
gj | Down screen line (different when lines wrap)
gk | Up screen line (different when lines wrap)
- | Begin previous line
^ | Begin text
0 | Begin line
$ | End line
G, gg | Go to line
| | Go to column
w | Next word
W | Next non-white space word
b | Previous word
B | Previous non-white space word
ge | Backward to end of word
gE | Backward to end of 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
N % | Move N % down a buffer
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
gm | Move to middle of window on the current line
Vim Cursor Movement - Visual Mode Only
aw | Select a word
iw | Select inner word
aW | Select |WORD|
iW | Select inner |WORD|
as | Select a sentence
is | Select inner sentence
ap | Select a paragraph
ip | Select inner paragraph
ab | Select a block
ib | Select inner block
aB | Select a Block
iB | Select inner Block

Vim Inserting Text

Ctrl+V | Quote next character typed
Ctrl+X Tab | Move text tab
Alt+N | Insert buffer name
Ins | Insert/overwrite toggle
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Vim Inserting Text - 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

Vim Deleting Text

Del | Delete character under cursor
Ctrl+E | Cut to end line
Ctrl+Backspace | Cut line
Alt+J | Join line to cursor
Vim Deleting Text - Command Mode Only
x | Delete character under cursor
(visual) x | Delete selection
X | Delete character before cursor
(visual) d | Delete selection
d | Delete text
D | Delete to end of line

Vim 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
Vim Searching - Command Mode Only
/ | Search forward (accommodates multipliers)
? | Search backward (accommodates multipliers)
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
Semicolon (;) | Repeat character search
Comma (,) | Reverse repeat character search
m | Set bookmark

Vim 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
Vim Selection - Command Mode Only
v | Character visual mode
V | Line visual mode
Ctrl+V | Block visual mode
o | Move cursor to beginning (or end) of selection

Vim 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
Vim Clipboard - Command Mode Only
p | Paste text after cursor
]p | Paste text after cursor (adjust indent)
gp | Paste text after cursor (leave cursor after new text)
(visual) p | Paste clipboard contents over selection
P | Paste text before cursor
[p | Paste text before cursor (adjust indent)
gP | Paste text before cursor (leave cursor after new text)
y | Copy text to clipboard
(visual) y | Copy selection to clipboard
Y | Copy line to clipboard

Vim 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 enabled (Tools > Options > 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
Vim Command Line and Text Box Editing - Command Mode Only
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+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 the alias command to define aliases or the 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

Vim 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
Vim Files and Buffers - Command Mode Only
:w | Save current buffer
:q | Quit current buffer
:wq | Save and quit current buffer
:q! | Quit current buffer without saving
:wa[ll] | Write all buffers
:qa[ll] | Quit all buffers
:wqa[ll] | Write and quit all buffers
:qa[ll]! | Quit all buffers without saving
:xa[ll]! | Write all changed buffers and exit

Vim Windowing

Ctrl+X '2' | Split window horizontally
Ctrl+Tab | Next window
Ctrl+Z | Zoom window toggle
Ctrl+X '1' | One window
Vim Windowing - Command Mode Only
:split | Split window horizontally
:vsplit | Split window vertically
Ctrl+w ] | Split window and jump to symbol under cursor
Ctrl+w f | Split window and edit file name under the cursor
Ctrl+w n | Split window with empty new window
Ctrl+w o | Make current window the only visible window
Ctrl+w j | Move cursor to window below
Ctrl+w k | Move cursor to window above
Ctrl+w Ctrl+w | Move cursor to window below (wrap)
Ctrl+w W | Move cursor to window above (wrap)
Ctrl+w t | Move cursor to top window
Ctrl+w b | Move cursor to bottom window

Vim Compiling and Programming Support

Alt+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+], Ctrl+Dot | 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+Comma | Pop a pushed bookmark
Ctrl+X M, Ctrl+F5 | Build project
Ctrl+X Ctrl+N, Alt+F10 | Next error
Ctrl+X N | Set next error
Ctrl+F5 | Execute project
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

Vim Debugging

Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

Vim Macros

Ctrl+F11 | Start/end macro recording
Ctrl+X Ctrl+L | Make and load current macro buffer
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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 editing dialog box or macro, load and run dialog box/macro.
Ctrl+X ( | Start recording macro
Ctrl+X ) | End recording macro
Vim Macros - Command Mode Only

Dot

Repeat last insert or delete

Vim 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+Comma | Complete previous word/variable
Ctrl+Shift+Dot | 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
Vim Miscellaneous - Command Mode Only
u | Full undo
(visual) u | Change selected text to lowercase
U | Undo with cursor motion grouping
(visual) U | Change selected text to uppercase
~ | Toggle the case of current character
(visual) ~ | Toggle the case of the selected text
c | Change text
C | Change to end of line
(visual) c, C | Change text in selection
r | Overstrike character(s)
(visual) r | Replace text in selection
R | Overstrike text
s | Substitute character(s)
S | Substitute line
< | Shift text left
> | Shift text right
J | Join line (insert spaces)
(visual) J | Join the selected lines (insert spaces)
(visual) gJ | Join the selected lines (no spaces)
: | EX command mode
Q | EX editor mode
& | Repeat last SUBSTITUTE
Esc, Ctrl+[ | Command mode

GNU Emacs Keys

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+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
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+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+X 'M' | Build project
Ctrl+F5 | Execute 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 Comma, Ctrl+Dot | Push a bookmark and go to the definition of the symbol at cursor
Ctrl+X Ctrl+H, Ctrl+Comma | Pop a pushed bookmark
Ctrl+X Dot | Go to definition
Ctrl+X Alt+Dot | Make tag file
Ctrl+X Alt+Comma | 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 Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

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+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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 will not close. If editing dialog box or macro, load and run the 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 enabled (Tools > Options > 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

GNU Emacs 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+Comma | Select from cursor to beginning of buffer
Ctrl+Shift+Dot | 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
Ctrl+Shift+F2 | Activate Bookmarks tool window
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
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

GNU Emacs 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

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

ISPF 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+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ctrl+Q | Quote next character typed

ISPF Inserting Text - 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
d [n] | Delete n lines
dd | Delete a block of lines

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

ISPF Deleting Text - 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

ISPF Selection - 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

ISPF Clipboard - 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+F7 | Move
Ctrl+F8 | Size
Ctrl+F9 | Minimize
Ctrl+F10 | Maximize

ISPF Compiling and Programming Support

Alt+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+Dot | 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+Comma | Pop a pushed bookmark
Ctrl+G | Find next reference
Ctrl+Shift+G | Find previous reference
Ctrl+M | Build project
Ctrl+F5 | Execute 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 Debugging

Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

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+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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 will not close. If editing a dialog box or macro, load and run the dialog box/macro.

ISPF Selective Display

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+Comma | Complete previous word/variable
Ctrl+Shift+Dot | 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+Shift+N | Activate Bookmarks tool window
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+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

ISPF Miscellaneous - 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

CodeWarrior Keys

CodeWarrior 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

CodeWarrior Inserting Text

Ins | Insert/overwrite toggle
Enter | Insert a line
Ctrl+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ctrl+Q | Quote next character typed

CodeWarrior 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

CodeWarrior Searching

Alt+F4, Ctrl+F | Find
Ctrl+R, Ctrl+= | 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

CodeWarrior Selection

Ctrl+A | Select all
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

CodeWarrior 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

CodeWarrior 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

CodeWarrior 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

CodeWarrior 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
Ctrl+F7 | Move
Ctrl+F8 | Size
Ctrl+F9 | Minimize
Ctrl+F10 | Maximize

CodeWarrior Compiling and Programming Support

Alt+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+Dot | 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+Comma | Pop a pushed bookmark
F3 | Find next reference
Shift+F3 | Find previous reference
Ctrl+M | Build project
Ctrl+F5 | Execute project
Ctrl+Shift+Down | Next error
Ctrl+Shift+Up | Previous error
Ctrl+Shift+S | Set next error
Ctrl+Shift+E | List errors
Ctrl+F7 | Compile current buffer
Alt+1, Ctrl+D | 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

CodeWarrior Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
F9 | Toggle breakpoint
Ctrl+F9 | Toggle breakpoint enable
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Ctrl+F10 | Run to cursor
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

CodeWarrior Macros

Ctrl+F11 | Start/end macro recording
Ctrl+F12 | Terminate recording & run last recorded macro
F12 | Make and load current macro buffer
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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 editing dialog box or macro, load and run dialog box/macro.

CodeWarrior Miscellaneous

F1 | Help for mode or context
F10 | Menu bar
Ctrl+F1 | SDK Help on word at cursor
Alt+F4 | Safe exit
Ctrl+Shift+Comma | Complete previous word/variable
Ctrl+Shift+Dot | Complete next word/variable
Ctrl+Shift+Space | Complete more
Esc | Cancel or command line toggle
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+Shift+T | Activate Bookmarks tool window
Ctrl+B | Match parenthesis
Ctrl+Shift+O | Expand alias at cursor
Alt+F5 | Restore MDI window
Alt+F7 | Move MDI window
Alt+F8 | Size MDI window
Alt+F10 | Maximize MDI window

CodeWright Keys

CodeWright 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 | Page left
Ctrl+PgDn | Page right
Tab | Indent to next tab stop
Shift+Tab | Back indent text to previous tab stop
Ctrl+J | Go to line

CodeWright Inserting Text

Ins | Insert/overwrite toggle
Enter | Insert a line
Ctrl+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ctrl+Q | Quote next character typed

CodeWright Deleting Text

Del | Delete char under cursor
Backspace | Delete char before cursor
Ctrl+Backspace | Delete previous word
Ctrl+Del | Delete to end of line
Shift+Backspace | Delete word

CodeWright Searching

Ctrl+F | Find
Ctrl+H | Replace
Ctrl+Shift+S, Ctrl+G | Find next occurrence
Ctrl+Shift+Q | Quick search
Ctrl+I | Incremental search
Ctrl+Shift+R | Repeat last replace
Ctrl+Shift+I | Reverse incremental search
Ctrl+Alt+Shift+F2 | Stop search or search & replace

CodeWright Selection

Ctrl+A | Select all
Ctrl+B | Select block/column
Ctrl+L | Select line
Ctrl+I | Inclusive character
Ctrl+M | Non-inclusive character selection
Ctrl+W | Save selection
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

CodeWright 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+X, Shift+Del | Cut selection

CodeWright 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+V | List clipboards and optionally paste one
F9 | Toggle command line
Space | Complete argument
? | List arguments
Ctrl+Left | Previous word
Ctrl+Right | Next word
Ctrl+Shift+U | Upcase word
Ctrl+Shift+D | Lowcase word
Ctrl+Del | Delete to end of line
Shift+Backspace | Delete word
Ctrl+Backspace | Delete previous word
Ctrl+D | Delete 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

CodeWright Files and Buffers

F2, Ctrl+S | Save current buffer
Ctrl+Shift+N | Next buffer
Ctrl+Shift+P | Previous buffer
Ctrl+O | Edit a file or find buffer
F6 | File compare
Shift+F6 | Resync after compare mismatch
Ctrl+N | Open new file or create new project
Ctrl+Shift+F | Insert file at cursor

CodeWright Windowing

Ctrl+Tab, Ctrl+F6 | Next window
Ctrl+Shift+Tab, Ctrl+Shift+F6 | Previous window
Ctrl+Shift+Z, Alt+F2 | Zoom window toggle
Ctrl+F4 | Close window
Alt+F3 | Create window edge
Ctrl+F7 | Move
Ctrl+F8 | Size

CodeWright Compiling and Programming Support

Alt+Dot | List symbols
Alt+Comma, Alt+F1 | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Shift+PgDn | page up/down in comment
Ctrl+Space | Complete symbol
Ctrl+Dot | 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+Comma | Pop a pushed bookmark
Ctrl+G, Ctrl+Shift+S | Find next reference
Ctrl+F9, Ctrl+M | Build project
Ctrl+F10, Shift+F10 | Compile current buffer
Ctrl+F5 | Execute project
Ctrl+Shift+Down | Next error
Ctrl+Shift+Up | Previous error
Ctrl+Shift+S | Set next error
Ctrl+Shift+E | List errors
Alt+1 | Cursor to error/include file
F12 | Make and load current macro buffer
Ctrl+Shift+M | Start concurrent process

CodeWright Debugging

F5 | Start/continue debugging
Shift+F5 | Stop debugging
Ctrl+Shift+F5 | Restart debugging
Ctrl+Shift+F9 | Clear all breakpoints
F10 | Step over
F11 | Step into
Alt+Pad-Star | Show next statement
Ctrl+Alt+B, Alt+F9 | Activate breakpoints window
Alt+3, Ctrl+Alt+W | Activate watch window
Alt+4, Ctrl+Alt+V | Activate variables window
Alt+7, Ctrl+Alt+C | Activate call stack
Ctrl+Alt+H | Activate threads window

CodeWright Macros

F7, Ctrl+F11 | Start/end macro recording
F8, Ctrl+F12 | Terminate recording & run last recorded macro
F12 | Make and load current macro buffer
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
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.

CodeWright Miscellaneous

F1 | Help for mode or context
Ctrl+F1 | SDK Help on word at cursor
Alt+Shift+Left | Back (like web browser)
Alt+Shift+Right | Forward (like web browser)
Alt+F4 | Safe exit
Ctrl+Shift+Comma | Complete previous word/variable
Ctrl+Shift+Dot | Complete next word/variable
Ctrl+Shift+Space | Complete more
Esc | Cancel
Ctrl+T | Line to top
F9 | Line toggle
Ctrl+Shift+G | Show functions headings
Ctrl+U, Ctrl+Z | Undo
Shift+F9 | Undo with cursor motion grouping
Ctrl+Y, Alt+Ins | Redo
Ctrl+Shift+H | Hex display toggle
Ctrl+Shift+U | Upcase word
Ctrl+Shift+D | Lowcase word
Ctrl+Shift+J | Set bookmark
Ctrl+1..Ctrl+0 | Set bookmark 1..0
Ctrl+Shift+B | Activate Bookmarks tool window
Ctrl+] | Find matching parenthesis
Ctrl+Shift+K | Show matching parenthesis
Alt+F5 | Restore MDI window
Alt+F7 | Move MDI window
Alt+F8 | Size MDI window
Alt+F10 | Maximize MDI window

Xcode Keys

Xcode Cursor Movement

Shift + Tab | Back indent text to previous tab stop
Command+Left arrow | Begin line
Command+Down arrow | Bottom of buffer
Ctrl+PgDn | Bottom of window
Down arrow | Cursor down
Left arrow | Cursor left
Right arrow | Cursor right
Up arrow | Cursor up
End | End line
Command+L | Go to lineI
Tab | Indent to next tab stop
Alt+Right | Next word
PgDn | Page down
PgUp | Page up
Alt+Left | Previous word
Command+Down arrow | Top of buffer
Ctrl+PgUp | Top of window

Xcode Inserting Text

Enter | Insert a line
Ctrl+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ins | Insert/overwrite toggle
Ctrl+Q | Quote next character types

Xcode Deleting Text

Ctrl+Backspace | Cut line
Ctrl+Shift+K | Cut word
Backspace | Delete char before cursor
Del | Delete char under cursor

Xcode Selection

Ctrl+Shift+Right+Click | Copy selection to cursor
Command+X | Cut selection
Backspace, Del | Delete selection
Ctrl+U | Deselect
Command+= | Execute commands in selection
Shift+Click | Extend selection
Tab | Indent selection
Ctrl+Right-Click | Move selection to cursor
Command+A | Select all
F8 | Select character/stream
Ctrl+L | Select line
Triple-Click | Select line
Double-Click | Select word
Shift+F7 | Shift selection left
Shift+F8 | Shift selection right
Right-Click & Drag | Start block/column selection
Click & Drag | Start char/stream selection
Shift+<Cursor keys> | Start or extend char/stream selection
Shift+Tab | Unindent selection

Xcode Searching

Command+F | Find
Alt+Command+F | Find in files
Command+G | Find next occurrence
Command+Shift+G | Find previous occurrence
Ctrl+R | Replace

Xcode Command Line and Text Box Editing

Ctrl+Shift+X | Append cut selection
Ctrl+Shift+C | Append selection to clipboard
Space | Complete argument
F3, Command+C | Copy selection to clipboard
Ctrl+K | Copy word to clipboard
Esc | Cursor to command line toggle
Ctrl+Backspace | Cut line
Command+X | Cut selection
Ctrl+Shift+K | Cut word
Shift+Click | Extend selection
Ins | Insert/overwrite toggle
? | List arguments
Ctrl+Shift+V | List clipboards, optionally paste one
Ctrl+Shift+L | Lowcase word
Alt+Right | Next word
Command+V | Paste
Alt+Left | Previous word
Ctrl+Q | Quote next character
Down arrow | Retrieve next command
Up arrow | Retrieve previous command
Triple-Click | Select line
Double-Click | Select word
Command+E | Set search string
Click & Drag | Start char/stream selection
Ctrl+Shift+U | Upcase word

Xcode Files and Buffers

F7, Command+O | Edit a file or find buffer
F6 | File compare
Ctrl+Shift+B | List buffers
Alt+Command+Right arrow | Next Buffer
Command+N | New File
Alt+Command+Up arrow | Open associated file
Alt+Command+Left arrow | Previous buffer
Shift+F6 | Resync after compare mismatch
F4 | Save and quit current buffer
F2, Command+S | Save current buffer

Xcode Clipboard

Ctrl+Shift+X | Append cut selection
Ctrl+Shift+C | Append selection to clipboard
Command+C | Copy selection to clipboard
Ctrl+K | Copy word to clipboard
Ctrl+Backspace | Cut line
Command+X, Shift+Del | Cut selection
Ctrl+Shift+K | Select next condition
Ctrl+Shift+V | List clipboards, optionally paste one
Command+V | Paste

Xcode Windowing

Alt+F1

API Apprentice on current word

Xcode Macros

Ctrl+Shift+Space | Edit current dialog box if running a dialog box. Close dialog box that won't close. Load and run dialog box/macro if editing dialog box or macro.
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
Ctrl+Break | Halt Slick-C® macro prompting for a key with get_event()
Ctrl+Alt+Shift+F2 | Halt Slick-C macro that is executing. Terminate infinite loops.
F12 | Make and load current macro buffer
Ctrl+F11 | Start/end macro recording
Ctrl+F12 | Terminate recording, run last recorded macro

Xcode Miscellaneous

Esc | Cancel or command line toggle
Ctrl+Shift+Space | Complete more
Ctrl+Shift+Dot | Complete next word/variable
Ctrl+Shift+ | Complete previous word/variable
Ctrl+Shift+O | Expand alias at cursor
Command+D | Go to bookmark
Ctrl+Shift+D | Activate Bookmarks tool window
F1 | Help for mode or context
Ctrl+Shift+H | Hex display toggle
Ctrl+Shift+L | Lowcase word
Ctrl-] | Match parenthesis
Command+F10 | Maximize MDI window
Command+F7 | Move MDI window
Command+Shift+Z | Redo
Command+F5 | Restore MDI window
Command+Q | Safe exit
Command+F1 | SDK Help on word at cursor
Ctrl+1..Ctrl+0 | Set bookmark 1..0
Alt+F8 | Size MDI window
Command+Z, Alt+Backspace | Undo
Shift+F9 | Undo with cursor motion grouping
Ctrl+Shift+U | Upcase word
Command+F7 | Move MDI window

BBEdit Keys

BBEdit Cursor Movement

Shift+Tab | Back indent text to previous tab stop
Command+Left arrow | Begin line
Command+Down arrow | Bottom of buffer
Down arrow | Cursor down
Ctrl+PgDn | Bottom of window
Left arrow | Cursor left
Right arrow | Cursor right
Up arrow | Cursor up
End | End line
Command+J | Go to line
Tab | Indent to next tab stop
Alt+Right | Next word
PgDn | Page down
PgUp | Page up
Alt+Left | Previous word
Command+Down arrow | Top of buffer
Ctrl+PgUp | Top of window

BBEdit Inserting Text

Enter | Insert a line
Ctrl+Enter | Open a new line below current line
Ctrl+Shift+Enter | Open a new line above current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ins | Insert/overwrite toggle
Ctrl+Q | Quote next character typed

BBEdit Deleting Text

Ctrl+Backspace | Cut line
Ctrl+Shift+K | Cut word
Backspace | Delete char before cursor
Del | Delete char under cursor

BBEdit Selection

Ctrl+Shift+Right-Click | Copy selection to cursor
Command+X | Cut selection
Backspace, Del | Delete selection
Command+Shift+A | Deselect
Command+= | Execute commands in selection
Shift+Click | Extend selection
Tab | Indent selection
Ctrl+Right-Click | Move selection to cursor
Command+A | Select all
F8 | Select character/stream
Command+L | Select line
Triple-Click | Select line
Command+Shift+L | Select paragraph
Double-Click | Select word
Shift+F7 | Shift selection left
Shift+F8 | Shift selection right
Right-Click & Drag | Start block/column selection
Click & Drag | Start char/stream selection C
Shift+<Cursor keys> selection | Start or extend char/stream
Shift+Tab | Unindent selection

BBEdit Searching

Command+F | Find
Alt+Command+F | Find in files
Command+G | Find in next occurrence
Command+Shift+G | Find previous occurrence
Ctrl+R | Replace

BBEdit Command Line and Text Box Editing

Ctrl+Shift+X | Append cut selection
Ctrl+Shift+C | Append selection to clipboard
Space | Complete argument
F3, Command+C | Copy selection to clipboard
Ctrl+K | Copy word to clipboard
Esc | Cursor to command line toggle
Ctrl+Backspace | Cut line
Command+X | Cut selection
Ctrl+Shift+K | Cut word
Shift+Click | Extend selection
Ins | Insert/overwrite toggle
? | List arguments
Ctrl+Shift+V | List clipboards, optionally paste one
Ctrl+Shift+L | Lowcase word
Alt+Right | Next word
Command+V | Paste
Command+Shift+V | Paste previous clipboard
Alt+Left | Previous word
Ctrl+Q | Quote next character
Down arrow | Retrieve next command
Up arrow | Retrieve previous command
Triple-Click | Select line
Double-Click | Select word
Command+E | Set search string
Click & Drag | Start char/stream selection
Shift+<Cursor keys> selection | Start or extend char/stream selection
Ctrl+Shift+U | Upcase word

BBEdit Files and Buffers

F7, Command+O | Edit a file or find buffer
F6 | File compare
Ctrl+Shift+B | List buffers
Alt+Command+Right arrow | Next buffer
Command+N | New file
Alt+Command+Shift+N | New file from clipboard
Command+Shift+N | New file from selection
Ctrl+Tab | Open associated file
Alt+Command+Left arrow | Previous buffer
Shift+F6 | Resync after compare mismatch
F4 | Save and quit current buffer
F2, Command+S | Save current buffer

BBEdit Clipboard

Ctrl+Shift+X | Append cut selection
Ctrl+Shift+C | Append selection to clipboard
Command+C | Copy selection to clipboard
Ctrl+K | Copy word to clipboard
Ctrl+Backspace | Cut line
Command+X, Shift+Del | Cut selection
Ctrl+Shift+K | Cut word
Ctrl+Shift+V | List clipboards, optionally paste one
Command+V | Paste

BBEdit Windowing

Alt+F1 | API Apprentice on current word
Command+W, Ctrl+F4 | Close window
Alt+Command+W | Close All Windows
Command+F10 | Maximize
Command+M | Minimize
Command+F2 | Move window edge
Ctrl+F6 | Next window
Ctrl+Shift+F6 | Previous window
Command+F8 | Size
Command+Shift+® | Split window horizontally
Command+/ | Zoom window toggle

BBEdit Compiling and Programming Support

Ctrl+M | Build project
Shift+F10 | Compile current buffer
Ctrl+Dot, F5, Alt+Esc | Complete symbol
Commad+D | Cursor to error/include file
Ctrl+F5 | Execute project
Ctrl+Shift+P | Expand extension specific alias
Ctrl+Shift+O | Expand global alias
Command+G | Find next reference
Command+Shift+G | Find previous reference
Ctrl+Shift+E | List errors
Command+Dot | List symbols
Ctrl+PgUp/Ctrl+PgDn | For next/previous definition
Shift+PgUp/Shift+PgDn | To page up/down in comment
F12 | Make and load current macro buffer
Alt+Command+Down arrow | Next error
Alt+Comma | Parameter Info
Ctrl+PgUp/Ctrl+PgDn | next/previous definition
Shift+PgUp/Ctrl+PgDn | page up/down in comment
Command+Comma | Pop a pushed bookmark
Alt+Command+Up arrow | Previous error
Command+Dot | Push a bookmark, go to definition of symbol at cursor
Shift+Command+/ | Push a bookmark, go to first reference to symbol at cursor
Ctrl+Shift+S | Set next error
Ctrl+Shift+M | Start concurrent process

BBEdit Debugging

Alt+Command+B | Activate breakpoints window
Command+7, Ctrl+Alt+C | Activate call stack
Ctrl+Command+H | Activate threads window
Command+4 | Activate variables window
Command+3, Ctrl+Alt+W | Activate watch window
Ctrl+Shift+F9 | Clear all breakpoints
Ctrl+Shift+F5 | Restart debugging
Ctrl+F10 | Run to cursor
Command+Pad-Star | Show next statement
F5 | Start/continue debugging
Command+Shift+I | Step into
Command+Shift+T | Step out
Command+Shift+O | Step over
Shift+F5 | Stop debugging
Alt+Command+/ | Toggle breakpoint enable
Command+/ | Toggle breakpoint

BBEdit Macros

Ctrl+Shift+Space | Edit current dialog box if running a dialog box. Close dialog box that won't close. Load and run dialog box/macro if editing dialog box or macro.
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).
Ctrl+Break | Halt Slick-C® macro prompting for a key with get_event()
Ctrl+Alt+Shift+F2 | Halt Slick-C macro that is executing. Terminate infinite loops.
F12 | Make and load current macro buffer
Ctrl+F11 | Start/end macro recording
Ctrl+F12 | Terminate recording, run last recorded macro

BBEdit Miscellaneous

Esc | Cancel or command line toggle
Ctrl+Shift+Space | Complete more
Ctrl+Shift+Dot | Complete next word/variable
Ctrl+Shift+Comma | Complete previous word/variable
Ctrl+Shift+O | Expand alias at cursor
Command+D | Go to bookmark
F1 | Help for mode or context
Ctrl+Shift+H | Hex display toggle
Ctrl+Shift+L | Lowcase word
Ctrl+B | Match parenthesis
Command+F10 | Maximize MDI window
Command+F7 | Move MDI window
Command+Shift+Z | Redo
Command+F5 | Restore MDI window
Command+Q | Safe exit
Command+F1 | SDK Help on word at cursor
Ctrl+1..Ctrl+0 | Set bookmark 1..0
Alt+F8 | Size MDI window
Command+Z, Alt+Backspace | Undo
Shift+F9 | Undo with cursor motion grouping
Ctrl+Shift+U | Upcase word

Visual Studio Default Keys

Ctrl+Enter | Open a new line above current line
Ctrl+Shift+Enter | Open a new line below current line
Shift+Enter | Insert a line (no syntax expansion)
Shift+Space | Insert a space (no syntax expansion)
Ctrl+Alt+W,[1-4] | Activate Watch tool window
Ctrl+Alt+G | Activate Registers tool window
Ctrl+Alt+M,[1-4] | Activate Memory tool window
Ctrl+Alt+C | Activate Call Stack tool window
Ctrl+Alt+V,A or Ctrl+Alt+V,a | Activate Autos tool window
Ctrl+Alt+V,L or Ctrl+Alt+V,l | Activate Locals tool window
Ctrl+Alt+V,T or Ctrl+Alt+V,t | Activate Members tool window
Ctrl+Alt+B | Activate Breakpoints tool window
Ctrl+Alt+H | Activate Threads tool window
F3 | Find Next Occurrence
Shift+F3 | Find Previous Occurrence
Ctrl+T | Transpose Adjacent Characters
Ctrl+Shift+T | Transpose Adjacent Words
Alt+Shift+T | Transpose Adjacent Lines
Alt+F3,B or Alt+F3,b | Toggle Search Option: Search Backwards
Alt+F3,C or Alt+F3,c | Toggle Search Option: Match Case
Alt+F3,R or Alt+F3,r | Toggle Search Option: Use Regex
Alt+F3,W or Alt+F3,w | Toggle Search Option: Match Whole Word
Ctrl+F | Find
Ctrl+Shift+F | Find in Files
Ctrl+H | Replace
Ctrl+Shift+H | Replace in Files
Shift+Alt+Enter | Fullscreen Mode
Ctrl+K, Ctrl+N | Goto Next Bookmark
Ctrl+K, Ctrl+P | Goto Previous Bookmark
Ctrl+K, Ctrl+L | Clear All Bookmarks
Ctrl+M, Ctrl+P | Show All
Ctrl+M, Ctrl+U | Show Selection
Ctrl+M, Ctrl+H | Hide Selection
Ctrl+K, Ctrl+U | Remove Comment
Ctrl+R, Ctrl+W | Toggle Viewing of Whitespace
Ctrl+K, Ctrl+K | Toggle Bookmark
Ctrl+K, Ctrl+W | Activate Bookmarks tool window
Ctrl+NumpadMinus | Goto Previous Document
Ctrl+Shift+NumpadMinus | Goto Next Document
Ctrl+F12 | Goto Definition
Ctrl+Alt+J | Activate Symbols tool window
Ctrl+Alt+A | Activate Build tool window
Ctrl+Alt+O | Activate Output tool window
Ctrl+Alt+R | Goto URL
Ctrl+Alt+L | Activate Projects tool window
Shift+Alt+A | Add File to Project
Ctrl+Shift+N | Create New Workspace
Ctrl+Shift+O | Open Existing Workspace
Ctrl+Shift+] | Find Matching Parenthesis
Ctrl+Shift+F12,<key> | Stops macro recording and binds macro to <key> (which can be 0-9, A-Z, or F1-F12).


Chapter 14. Slick-C® Macro Programming Guide

This guide contains the following topics:

  • Introduction

  • Differences Between Slick-C® and C++

  • Four Ways to Use Slick-C®

  • Language Constructs

  • Types

  • Mathematical Operators

  • Declarations

  • Statements

  • Functions

  • Preprocessing

  • Defining Controls

  • Defining Events and Event Tables

  • Event-Driven Dialog Boxes

  • Module Initializations

  • Compiling and Loading Macros

  • Debugging Macros

  • Error Handling and the rc Variable

  • Dialog Editor

  • Creating Dialog Boxes

  • Clipboard Inheritance®

  • Objects and Instances

  • Using Functions as Methods

  • Built-in Controls

  • Menus

  • Common Macro Dialog Boxes

  • String Functions

  • Search Functions

  • Selection Functions

  • Writing Selection Filters

  • Unicode and SBCS or DBCS Macro Programming

  • Shelling Programs from a Slick-C® Macro

  • Interfacing With Other Languages (DLL)

  • Command Line Interface

  • Hooking Startup and Exit

  • State File Caching

  • Windows Data Structure

  • Tutorials

  • Events

Introduction

Slick-C® is a macro programming language that blends object-oriented features from C++, Java, and Python. Much of the code in the SlickEdit® editor is written in Slick-C, which covers many of the actions normally performed in a code editor including navigation and buffer modification. The Slick-C source is provided when SlickEdit is installed. You can use Slick-C to modify the look and feel of the editor, write macros to perform custom operations, add new language support, and essentially extend the editor's functionality until it is completely customized according to your preferences.

Working with the Slick-C® Source Code

After SlickEdit® is installed, the Slick-C macro files are located in the macros subdirectory of your installation directory.

Slick-C macros are stored in files ending in the .e extension. The Slick-C macro translator compiles these files to byte code which is saved in a corresponding file with the .ex extension.

Slick-C follows a C-style linking model with the distinction that macros can be loaded and reloaded dynamically. Compiled macros and dialog box templates are stored in the state file vslick.sta (UNIX®: vslick.stu), which is located in your configuration directory.

Slick-C is preprocessed like C. Slick-C header files use the .sh extension. All Slick-C source files #include slick.sh.

Slick-C® Naming Conventions

The table below outlines Slick-C naming conventions.

Type | Example Name | Details
Namespaces | se.example | Lowercase, with an underscore or dot to separate multiple words.
Classes | ExampleName | Mixed case, first letter must be capitalized, all caps only acceptable for acronyms like "FTP".
Interfaces | IExampleName | Like class names, but with "I" prefix.
Enums | ExampleName | Like class names (idea of "E" prefix rejected).
Enum Flags | ExampleFlags | Like enums, but ends with "Flags" (idea of "F" prefix rejected).
Member Funcs | exampleName | Mixed case with the first letter lowercase.
Member Vars | m_exampleName | Mixed case, first letter lowercase, and an "m_" prefix.
Properties | m_exampleName | Same as member variables (should not distinguish from var).
Class Vars | s_exampleName | Mixed case, first letter lowercase, and an "s_" prefix.
Namespace Vars | g_exampleName | Like member vars except with a "g_" prefix.
Namespace Funcs | example_name | Lowercase with words separated with underscores.
Global Vars | <anything> | No rules.
Global funcs | <anything> | No rules.
Typedefs | <anything> | No rules.


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 that contain variable size data. However, even other types are sometimes stored elsewhere.

  • There is not a sizeof function that tells you the size of a structure in bytes.

Arrays

  • Space for array elements is allocated when you index into the array.

  • You cannot use pointer variables to traverse array elements.

  • You cannot 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 that returns a copy of an array.

  • There is not a sizeof function that tells you the size of the array in bytes. There is a _length method that 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 that is similar to the array operator [] except that hash tables are indexed with a string type or by class objects. See 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 can use string and floating point expressions.

switch Statement

The switch statement supports string expressions and integer expressions.

Labeled Loops

The break and continue statements accept an optional label parameter so that you can break a specific loop (like Java).

Example:

outerlabel:
       for (;;) {
          for (;;) {
             if () break outerlabel;
             if () continue outerlabel;
          }
       }

Variable Argument Functions

An arg function allows you to define functions that accept a variable number of arguments. The arg function can be used on the left side of an assignment statement.

Example:

 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 that does not exist on a dialog box before you execute the code.

Clipboard Inheritance®

Clipboard Inheritance provides inheritance specifically for dialog boxes. This feature enables the copying of parts of existing dialog boxes to the clipboard and pasting them elsewhere, and the original code still runs. New code can be attached to the new controls without affecting the original controls, and to affect both instances of the controls (inheritance). Creating inheritance for parts of dialog boxes is very natural because the Slick-C® language has been designed for this feature. See Clipboard Inheritance® for more information.

End of Statement Semicolon

Slick-C® assumes that the 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, and expressions in parentheses may extend across line boundaries.

Type Checking

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 require prototypes. However, when a prototype is given, strict type checking is enforced like you would expect. A #pragma option to require prototypes will eventually be added.

Capability not Supported by Slick-C®

  • You cannot define your own classes, methods, or inheritance. The class, public, private, and new keywords are not supported. 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 supported. This limitation is necessary for container variables because the compiler does not know the type of the variable.

  • char and short types are not available.

  • Template classes are not supported. Container variables are sometimes a more powerful mechanism for accomplishing much of what is done with template classes. However, container variables lack the speed and additional type checking of template classes.

  • Function overloading is not supported.

  • enum is not supported.

  • Slick-C only supports the less ambiguous C-style type casting.

  • Because Slick-C does not allow low level manipulation of memory, you cannot do things like type cast an int * to a long *.

  • There are no character constants defined using single quote characters. Slick-C currently allows the use of single quotes to define strings. Single quoted strings are much more readable for file names or regular expressions that require the use of backslashes.

  • goto is not supported. (Slick-C supports labeled loops.)


Four Ways to Use Slick-C®

There are four ways to extend the SlickEdit® code editor using Slick-C:

  • Recording Slick-C® Macros

  • Key Bindable Command

  • Event-Driven Dialog Boxes

  • Batch Macros

Recording Slick-C® Macros

When using macro recording, Slick-C source code is created for a key bindable command. To create a recorded macro, complete the following steps:

  1. From the main menu, select Macro → Record Macro .

  2. Perform the actions that you want the macro to repeat.

  3. When finished, select Macro → Stop Recording .

The macro is saved as Slick-C source code and you can edit the recorded macro through the user interface. Recorded macros are saved in the vusrmacs.e file in the user configuration directory.

Key Bindable Command

A key bindable command is the most common way to extend the editor. Command macros can be bound to keys or invoked from a menu. To create a Slick-C® command named hello, complete the following steps:

  1. Place the macro code below into a new file named test.e:

    _command void hello()
{
    message("Hello World");
}

  2. With the file still open, press F12 or use the load command to compile and load the macro. Or, from the main menu, click Macro → Load Module , then browse and select the macro to load.

Now you can type hello in the command line and the message Hello World is displayed.

The hello command can be bound to a key. To bind the hello command to Alt +5 , complete the following steps:

  1. From the main menu, click Tools → Options → Keyboard and Mouse → Key Bindings.

  2. In the Search by command combo box, type hello.

  3. Click Add.

  4. Press Alt+5.

  5. Click Bind.

  6. Click OK on the Options dialog.

  7. Now press Alt+5. The message Hello World is displayed.

Event-Driven Dialog Boxes

Slick-C® includes a dialog editor that allows you to create event-driven forms using a predefined set of controls.

This section describes:

  • Creating a Simple Event-Driven Dialog Box

  • Loading Code and Displaying Dialog Boxes

  • Binding Commands to Keys for Dialog Box Display

For more information, see also Creating Dialog Boxes.

Creating a Simple Event-Driven Dialog Box

To create a simple event-driven dialog box, complete the following steps:

  1. From the main menu, select Macro → New Form .

  2. In the dialog editor Properties dialog box, double-click Insert Button Control.

  3. Double-click Insert Text Cox Control in the dialog editor Properties dialog box.

  4. Move the command button or the text box so that they do not overlap. Click on the object with the left mouse button, hold it, and drag to move the object.

  5. 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 appears with lbutton_up displayed in the combo box.

  6. Press Enter to select the event.

  7. The Open dialog box is displayed for a new file that is to contain the source code for this dialog box. Type form1.e and press Enter. A file is displayed named form1.e with the following lines of code:

    #include "slick.sh"

defeventtab form1;
void ctlcommand1.lbutton_up()
{

}

  8. If the previous lines of code are not displayed, then a form1.e file might already exist. If so, modify the existing form1.e file to contain the previous lines of code.

  9. Modify the code to add the following statement: ctltext1.p_text="Hello World";

    Example:

    #include "slick.sh"

defeventtab form1;
void ctlcommand1.lbutton_up()
{
    // Set the p_text property of the text box control
    ctltext1.p_text="Hello World";
}

  10. From the main menu, select Macro → Load Module .

Loading Code and Displaying Dialog Boxes

To load the dialog box, and then display it, complete the following steps:

  1. Right-click on the form and select Load and Run Form.

  2. Click ctlcommand1. Hello World is displayed in the text box.

  3. To close the Form1 dialog box, press Esc.

  4. Type show form1 to display this dialog box from the command line.

  5. To display the dialog box modally, type show -modal form1 on the command line.

The dialog source is saved in the vuserdefs.e file in the user configuration directory, My SlickEdit Config. Press Ctrl+Shift+Space while any dialog box is running to edit it (including the Properties dialog box).

Binding Commands to Keys for Dialog Box Display

To bind a command to a key that displays a dialog box, use the following example to write the necessary command:

#include "slick.sh"
_command void run_form1()
{
    show("-modal form1");
}

See Key Bindable Command for more information about binding a command to a key.

Batch Macros

Slick-C® allows you to write batch macros. Batch macros are macros that can be run, much like shell scripts, from within the editor. They do not need to be loaded, and they do not remain resident in the editor after they have been run.

Use a batch macro when working with Slick-C® primitives that you want to share among multiple users. Batch macros cannot be bound to a key; however, you can execute a batch macro from the command line or a menu item.

  1. Open an empty buffer and type the following code:

    #include "slick.sh"
void defmain()
{
     message("Hello World");
}

  2. Save the file as hellow.e, then press Esc to open the SlickEdit® command line.

  3. Type hellow, and press Enter.

  4. The status line displays the message Hello World is displayed.

Batch programs must be saved before they are executed so that the macro can compile. Also, batch programs are automatically compiled if there is no corresponding .ex file, or if the date of the source file is newer than the date of the .ex file.


Language Constructs

The Slick-C® language is rooted in the C language. Slick-C contains some constructs from REXX and a dialog system usually found only in languages such as Microsoft® Visual Basic®. Slick-C also blends in object-oriented features from C++, Java, and Python.

Topics in this section:

  • Identifiers

  • Reserved Words and Keywords

  • Comments

  • String Literals

  • Numeric Literals

  • Defining Constants Using #define

  • Namespaces

Identifiers

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_$".

Reserved Words and Keywords

The following keywords are reserved in the Slick-C® language:

  • _command

  • _notinit

  • _reinit

  • _str

  • arg

  • auto

  • boolean

  • break

  • case

  • class

  • const

  • continue

  • default

  • defexit

  • defined

  • definit

  • defload

  • defmain

  • do

  • double

  • else

  • enum

  • enum_flags

  • extern

  • false

  • for

  • foreach

  • if

  • in

  • instanceof

  • int

  • intdiv

  • interface

  • long

  • loop

  • namespace

  • no_code_swapping

  • null

  • parse

  • private

  • protected

  • public

  • return

  • short

  • static

  • struct

  • switch

  • this

  • true

  • typedef

  • typeless

  • union

  • using

  • var

  • void

  • while

  • with

The following keywords are reserved for built-in functions:

  • _a2e

  • _asc

  • _assert

  • _callmethod

  • _callmethod

  • _chr

  • _construct

  • _delete_unused

  • _deleteel

  • _dllexport

  • _dllload

  • _e2a

  • _el

  • _fieldindex

  • _fieldindex

  • _fieldname

  • _fieldname

  • _findmethod

  • _findmethod

  • _get_var

  • _getfield

  • _getfield

  • _indexin

  • _insertel

  • _instanceof

  • _instanceof

  • _isempty

  • _isfunptr

  • _length

  • _length

  • _load

  • _load_template

  • _make

  • _makeempty

  • _maybe_e2a

  • _nextel

  • _set_var

  • _setfield

  • _setfield

  • _sort

  • _typename

  • _typename

  • _update_template

  • _varformat

  • _write_state

  • call

  • call_event

  • call_index

  • call_key

  • center

  • delete_name

  • dsay

  • env_match

  • error_pos

  • event2index

  • event2name

  • eventtab_index

  • eventtab_inherit

  • exit

  • file_match

  • find_index

  • get_env

  • index_callable

  • index2event

  • insert_name

  • isinteger

  • isnumber

  • keyin

  • last_index

  • lastpos

  • length

  • list_bindings

  • lowcase

  • name_index2funptr

  • name_info

  • name_match

  • name_name

  • name_type

  • name2event

  • nls

  • pos

  • pow

  • prev_index

  • replace_name

  • say

  • set_env

  • set_eventtab_index

  • set_name_info

  • signal_handler

  • stop

  • stranslate

  • strappend

  • strcmp

  • stricmp

  • strieq

  • strip

  • strrev

  • substr

  • togglecase

  • trace

  • translate

  • upcase

  • verify

The following keywords are reserved for future use:

  • catch

  • finally

  • throw

  • try

The following keywords are reserved, but deprecated. Avoid using them.

  • _notinit

  • bigint

  • bigfloat

  • bigstring

The following keywords are reserved and used for event, dialog, and menu programming.

  • _check_box

  • _combo_box

  • _command_button

  • _control

  • _editor

  • _form

  • _frame

  • _gauge

  • _hscroll_bar

  • _image

  • _inherit

  • _label

  • _list_box

  • _menu

  • _minihtml

  • _nocheck

  • _picture_box

  • _print_preview

  • _radio_button

  • _spin

  • _sstab

  • _sstab_container

  • _text_box

  • _tree_view

  • _vscroll_bar

  • def

  • defeventtab

  • endsubmenu

  • submenu

All identifiers starting with p_ are reserved to be used as Slick-C property names. SlickEdit® reserves all identifiers starting with an underscore (_) for internal use.

Comments

Slick-C® supports both of the C++ comment styles.

  • Use // to declare that the rest of the line is a comment

  • Use /* to open a block comment and */ to close a block comment.

  • Block comments can be nested.

Example:

i=1; //this is a comment
/* this is a /* nested */ comment */

String Literals

Strings can be surrounded with single or double quotes. Double-quoted strings are identical to C++ string literals.

A backslash followed by a character has special meaning, as outlined in the table below.

Characters | Meaning
\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 | Vertical tab character (11)
\? | Question mark character
\' | Single quote character
\" | Double quote character
\\ | Backslash character
\x hh | Hexadecimal character code
\ ooo | Octal character code

If single quotes are used, two single quotes consecutively represent 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 an operator ==. However, this operator strips leading and trailing spaces and tabs from both operands.

Examples:

"abc" :== 'abc'
"Can't find file" :== 'Can''t find file'
"\t" :== _chr(9)
\t :== _chr(9)
" spaces " == "spaces"

A backslash (not inside quotation marks) followed by a character or a number has the special meaning, as shown in the table below.

Characters | Meaning
\a | Bell character (7)
\b | Backspace character (8)
\f | Form feed character(12)
\n | New line (10)
\r | Carriage return (13)
\t | Tab character (9)
\v | Vertical tab character (11)
\x dd | Hexadecimal character code dd
\ ddd | Decimal character code ddd

Caution

Using the above feature is not recommended. Use a quoted string.

Numeric Literals

The Slick-C® language supports integer constants in both decimal and hexadecimal formats. Hexadecimal numbers are defined using 0x[hexdigits] just like they are in C.

The Slick-C language supports floating point numbers. The mantissa is limited to 32 digits and the exponent is limited to nine 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]

There may be blank spaces before and after the leading sign.

Example:

        4.04
        4e2
        4e2
        4E-2
        4E-2

Defining Constants Using #define

Slick-C® supports the #define preprocessor directive. The #define directive is for defining constants or in-line functions. Use the following syntax to define the constant or in-line function:

    #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.

Caution

When value represents an expression, place parentheses around it to make sure that 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=MAXLINES;
    y=MAXLINESP1;
    a=max(x,y);
}

Defining Constants Using const

A const declaration is used to define a constant. A constant can be scoped within a class, namespace, or globally. The advantage to using const instead of #define is that const constants are pure constants and can be introspected using find_index() and name_info(), but a #define is just a lexical substitution. For consistency, we recommend that constants use all uppercase identifiers, optionally using underscores to separate words.

Examples:

const MAXLINES = 15;
const MAXLINESP1 = (MAXLINES+1);
const SEARCHKEY = "<Search>";

A few notes about constants:

  • The const declaration works with Slick-C classes and namespaces.

  • Constants support type inference so that the compiler can tell ints from booleans from strings.

  • Constant names and values are stored in the state file in order to allow introspection.

  • Context Tagging® recognizes the const declaration correctly.

Defining Constants Using Enumerators

Slick-C® also allows you to define constants using enumerators. Enumerated types share the advantages of const declarations. They are discussed in more detail in the section Enumerated Types.

Namespaces

Slick-C® supports namespaces which allow you to partition functions and classes into independent areas in order to organize your code better, and to better isolate your code from name conflicts. Slick-C namespaces use "." instead of "::". Slick-C does not allow un-named namespace declarations. Slick-C supports two types of namespace declarations, as shown in the following code:

    // Module-wide (like Java).
    namespace slickedit.tagging;

    // Scoped namespace declaration (like C++ and C#).
    namespace slickedit.search {
       . . .
    }

Namespace imports use the C++-style using syntax:

    // Pull all symbols from slickedit.tagging into current scope.
    using namespace slickedit.tagging;

    // Pull one symbol from slickedit.search into scope.
    using slickedit.search.Regex;

    // Qualified access to a symbol in the namespace.
    slickedit.diff.Diff( f1, f2 );

Slick-C includes the default; namespace, which will return you to the "default" global namespace.


Types

Slick-C® types are similar to the types in C. The following types are available in Slick-C:

  • Strings - Slick-C has a built-in string type _str.

  • Enumerated Types

  • Arrays - Array types are declared like C arrays, but cannot have a size limit. Array elements are always dynamically allocated.

  • Hash Tables - Slick-C provides a :[] hash table operator which is similar to the array operator [], except that hash tables are indexed with a string type.

  • Structs and Unions - Slick-C supports C-style structs and unions. Static structure members are not supported.

  • Interfaces

  • Classes

  • Pointers - Slick-C provides pointer and reference types in the same manner as in the C language.

  • Typeless - Typeless variables are declared using the typeless type. A typeless variable can be assigned to or from any type, including structs, arrays, and hash tables.

  • Numeric types - The numeric types are int, long, and double. All numeric types are signed. Slick-C does not support char, short, or float types.

  • Boolean type - The built-in Slick-C Boolean type is boolean.

  • Void type - void is only permitted as the return type of a function.

  • Typedefs - Slick-C supports C-style typedef type declaration statements.

Strings

String variables are declared using the _str type. You can get the length of the string using the length built-in.

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.

See also Implicit Conversion to Strings.

Enumerated Types

Slick-C® enumerated types are very much like C enumerated types, with the exception of having relaxed type checking with respect to arithmetic and bit operations.

    enum BasicOptions {
        OPTION1=1,
        OPTION2,
        OPTION3,
     };

In addition, Slick-C enumerated types introduce enumerated type flags, a convenient way to create a set of bit flags.

    enum_flags OptionFlags {
        FLAG1=0x4,
        FLAG2, // 0x8
        FLAG3, // 0x10
        FLAGS_ALL=FLAG1|FLAG2|FLAG3
    };

Arrays

Array types are declared like C arrays, but cannot have a size limit. Array elements are always dynamically allocated.

Use array variables to keep a list of items. To define an array variable, use the following syntax:

    [static] TypeName variable1[][={e1 ,e2 , ...}] , variable2[][={e1 ,e2 , ...}] ...;

The first element of an array starts at 0. Use more than one set of brackets ([]) for multi-dimensional arrays. Do not define the maximum number of elements in the array, because array elements are allocated when you access them. The maximum number of elements that can be placed in an array is approximately 2 billion. Use the _length() method to determine the number of elements in an array. The syntax for using this method is variable._length().

To empty an array, use the following statements:

    array._makeempty();        // Empty the array.
    array=null;                // Empty the array. Same as above.

You can delete and insert items into an array using the _deleteel() and _insertel() built-in methods, respectively.

A Slick-C® class instance can be indexed using array syntax provided that the class implements the sc.lang.IIndexable interface. This is similar to overloading operator [] in C++.

Differences from C++

  • Space for array elements is allocated when you index into the array.

  • You cannot use pointer variables to traverse array elements.

  • You cannot 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 no 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.

  • Array initializers are not supported for local variables.

Example:

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]);
    }
}

Hash Tables

Hash tables are declared similar to array types and indexed with a string :[] operator. Use the following syntax to define a hash table variable:

    [static] TypeName variable1:[]
    [={s1=>e1, s2=>e2, ...}] , variable2:[][={s1=>e1,s2=>e2, ...}] ...;

A Slick-C® class instance can be indexed using hash table syntax provided that the class implements the sc.lang.IHashIndexable interface. This is somewhat similar to overloading operator [] in C++.

Hash tables support indexing by class objects. For example:

class FileName : sc.lang.IHashable { ... }

defmain() {
   boolean ht:[];
   Filename a("C:\\temp\\test.txt");
   Filename b("C:\\Program Files\\");
   Filename c("F:\\Public\\xkcd108.jpg");
   ht:[a] = true;
   ht:[b] = false;
   ht:[c] = true;
   Filename i;
   foreach ( i => auto v in ht ) {
      _assert(i instanceof Filename);
      say("i="i._hashKey()" v="v);
   }
}

You can delete an item from a hash table using _deleteel(). Hash table initializers are not supported for local variables.

See Overloading Array Index Operators for more examples of IHashable.

Structs

Structures (structs) are typically used to logically group data. For example, a record in a database might have a name, address, and phone number. This can be logically grouped into a ContactInfo structure which is more convenient to use than accessing the fields individually. Structures can also have the added effect of reducing the number of global variables.

Slick-C® supports C-style structs. Slick-C structs cannot have member functions.

For consistency, we recommend that structs use initial caps (camel case) identifiers.Use the following syntax for defining a struct:

    [static] struct StructName {
    member-variable-decl1;
    member-variable-decl2;
    } ([variable1[={e1,e2, ...}] , variable2[={e1,e2, ...}], ...];)

The struct declaration provides the option of defining your own type called StructName and 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 supported. Use the following syntax for accessing a member of a struct variable:

    variable.member_name

Example:

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);
    typeless 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]);
}

Slick-C structs support designated initializers:

struct PhoneRecord {
   _str name;
   _str phoneNumber;
};
PhoneRecord shouldHaveKnown = {
   .phoneNumber = "867-5309",
   .name="Jenny"
};
Differences from C++
  • There is no sizeof operator like in C++. Since the Slick-C® interpreter stores all types as container variables, the sizeof operator has no meaning.
  • Space for structure elements is allocated when you access the element.
  • Structure data is not contiguous. The Slick-C interpreter stores all types as container variables, including the members of a struct.

      Unions
Slick-C® supports C-style unions. Unions are typically used in place of a struct in the case where you have mutually exclusive member variables. In this case, a union requires less memory than a struct. Memory is only allocated for one member variable at a time. The syntax for defining a union is shown in the following example:

    [static] union [UnionName ] {
    member-variable-decl1;
    member-variable-decl2;
    } [variable1[={e1}] , variable2[={e1}], ...];

The union declaration provides the option to define your own type named UnionName and 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 supported. The syntax for accessing a member union variable is variable.member_name.
Example:
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 that is not named. 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=KIND_INT; x.i=1;
}

      Interfaces
Interfaces use Java-like syntax. They do not allow constructors, destructors,
      or member variables; only prototypes. Interfaces can inherit from other interfaces. All the
      prototypes in an interface are implicitly public.
Example:
    interface ICommunicationDevice {
        void talk();
        void hangup();
    };

      Classes
Classes use a Java-like syntax. For example:
class Phone : ICommunicationDevice {

   protected typeless m_dialer = null;
   private typeless m_line = null;
   private static typeless s_operator = null;

   Phone(_str number="") {
   }
   ~Phone() { }
   void talk() {
   }
   void hangup() {
   }
   static void getOperator() {
   }
};
For consistency, Slick-C® class names should be in camel case. Member variables within classes should start with "m_".  Static member variables should start with "s_".  Finally, methods should be lowercase. If a method name contains multiple words, the trailing words should be camel case.
A few notes about Slick-C classes:
  • A class can extend or inherit from only one other class.
  • A class can implement multiple interfaces.
  • Use the instanceof operator to test if a class instance derives from a specific class or interface.
  • Member variables can have constant initializer expressions.
  • All member variables must be initialized, either using initializers or in the class constructor.
  • All member variables must be declared before the constructor.
  • There are no extends or implements keywords.
  • Classes are not allowed to derive from struct types.
  • The default access level is public. There is a public keyword, but it essentially does nothing.
  • Class members support protected and private.
  • There is no concept of a package scope like there is in Java.
  • Member functions are virtual by default, except for static member functions.
  •
          static member variables may have initializers.
  •
          extern member function prototypes are implemented in a DLL.
  • A class is allowed one and only one constructor.
  • If a class constructor takes arguments, they must have defaults.
  • No explicit calls to new or delete (no new or delete keywords).
  • No function overloading.
  • No operator overloading.
  • No friend relationships.
  • No templates or generics.
  • No final and no const.
  • No C#-style properties or delegates.
  • No default root "object" class.
  • No static constructors.
The life-span of a Slick-C class instance is identical to that of a similar Slick-C struct. There are no new or delete operators.
    // Construct an instance of a class, like C++.
    C1 a;
    C1 b;

    // Assign a class instance to another (deep copy).
    a = b;

    // An array of class instances. Constructor not called here.
    C1 array[];
    // Constructor called with no args followed by deep copy.
    array[1] = a;
See the following topics in this section for more information:
  •
          Introspection

  •
          Implicit Conversion to Strings

  •
          Overloading Comparison and Assignment Operators

  •
          Overloading Array Index Operators

        Introspection
Slick-C® supports introspection of struct and class instances through the built-in functions shown below. In each of the functions, "index" can be either an integer index or a string containing the field or method name.
  •
            v._callmethod(index) - Call a class method.
  •
            v._construct() - Construct an instance of a class.
  •
            v._fieldindex(name) - Find the position of a class field.
  •
            v._fieldname(i) - Get the name of a class field.
  •
            v._findmethod(name) - Find a class method.
  •
            v._getfield(index) - Get a reference to a class field.
  •
            v._instanceof(name) - Return true if variable is instance of or derives from the given class.
  •
            v._length - Return the number of fields in a class.
  •
            v._setfield(index,value) - Modify a class field.
  •
            v._typename() - Return the name of variables type.
The C++ API for Slick-C includes the following functions:
  •
            vsHvarTypename(hvar)

  •
                vsHvarFieldIndex(hvar,name)

  •
                vsHvarFieldName(hvar,i)

  •
                vsHvarGetField(hvar,index)

  •
                vsHvarGetFieldByName(hvar,name)

  •
                vsHvarSetField(hvar,index,value)

  •
                vsHvarSetFieldByName(hvar,name,value)

  •
                vsHvarFindMethod(hvar,name)

  •
                vsHvarCallMethod(hvar,index,args)

  •
                vsHvarCallMethodByName(hvar,name,args)

  •
                vsHvarInstanceOf(hvar,name)

  •
                vsHvarConstruct(name,args)

        Implicit Conversion to Strings
Slick-C provides the interface IToString for implicit string conversion (see Strings). If a class implements sc.lang.IToString, then an instance of that class can be implicitly converted to a string, without explicitly  calling the toString() method.

        Overloading Comparison and Assignment Operators
By default, Slick-C® class instances are compared using a deep member-wise equality test. To override the default comparison methods for a class, Slick-C provides the interfaces sc.lang.IEquals and sc.lang.IComparable. If a class implements sc.lang.IEquals, an instance of that class can be compared to another instance using operator == or operator != as defined by the equals() method. If a class implements sc.lang.IComparable, then instances of the class can be compared using the standard comparison operators, as defined by the compare() method. If a class implements IComparable, it does not have to implement IEquals to support equality and inequality tests.

        Overloading Array Index Operators
Slick-C® supports the overloading of the [] and :[] operators. For more information, see Hash Tables.
Below is an example of IIndexable:
#import "sc/lang/IIndexable.e"

class PerfectSquares : sc.lang.IIndexable {
   typeless _array_el(int i) {
      return i*i;
   }
};

defmain()
{
   PerfectSquares ps;
   say("defmain: 3^2="ps[3]);
   say("defmain: 16^2="ps[16]);
}
Below is an example of IHashIndexable:
class PhoneBook : sc.lang.IHashIndexable {
   _str m_numbers:[];
   void loadNumbers() {
      m_numbers:["Brittany"] = "555-3825";
      m_numbers:["Vanessa"] = "555-1024";
   }
   typeless _hash_el(_str name) {
      return m_numbers:[name];
   }
};
defmain()
{
   PhoneBook pb;
   pb.loadNumbers();
   say("defmain:  Brittany's number is " pb:["Brittany"]);
   say("defmain:  Vanessa's number is " pb:["Vanessa"]);
}
Overloading Assignment/Copy Semantics
By default, Slick-C® class instances are copied using a deep, member-wise copy. To override this behavior, a class can implement the sc.lang.IAssignTo interface and implement a custom copy() method.
Overloading Iteration Semantics
A Slick-C® class can be customized to work seamlessly in a foreach loop by implementing the sc.lang.IIterable interface. The sc.lang.Range class, which is included in the Slick-C class library, is an excellent example of how to implement and use IIterable.
SlickEdit® Class Libraries
SlickEdit ships with a small but growing core of Slick-C® classes and interfaces to build upon. There are two top-level namespaces: sc (Slick-C) and se (SlickEdit). The sc namespace encompasses general purpose classes that support programming in Slick-C and are application-independent. It can be compared to java.lang and java.util in Java, the System namespace in C#, or the std namespace in C++ with respect to its purpose (not feature-by-feature). The se namespace includes the foundations and implementations of select features of the SlickEdit editor. Not all SlickEdit features use Slick-C classes.
Differences from C++ and Java
  • Slick-C® uses per-member access specifiers like Java rather than the grouping syntax employed by C++.
  • Slick-C supports destructors, just like C++ (Java does not have destructors).
  • Slick-C has no new or delete.
  • Slick-C does not support overloaded methods or const methods.
  • Like C++, Slick-C class instances are passed by value, unless you specifically pass them by pointer or reference.
  • Like Java, this is a reference to the current class instance, not a pointer as it is in C++.
Additionally:
  • No function overloading.
  • No operator overloading.
  • No friend relationships.
  • No templates or generics.
  • No final and no const.
  • No C#-style properties or delegates.
  • No default root "object" class.
  • No static constructors.

      Pointers

        Pointers to Variables
Pointer variables are declared using the following syntax:

    [static] TypeName *variable1[=&v1] , *variable2[=&v2] ...;

The unary & operator is used to return the address of a variable. The unary * operator is used to dereference a pointer. Use the operator -> (for example, p->m-variable) to access members of a pointer to a structure.
Caution
 When a module is reloaded, static variable addresses change. Make sure you reinitialize global pointer variables which point to static (module scope) variables.
Pointers to Functions
Function pointer variables are useful for callback functions. The syntax for function pointers is:

    [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 ampersand (&) operator is used to specify call by reference parameters. Call by reference array and hash table parameters require parentheses around the ampersand (&) and id.
The syntax for calling a pointer to function variable is:

    (*pfn)([e1, e2,...])

If accessing an invalid function pointer, the Slick-C® macro stops.
Caution
 When a module is reloaded, static function addresses change. Make sure you reinitialize global function pointer variables which point to static (module scope) functions.

      Typeless
A typeless variable can be assigned to or from any type, including structs, arrays, and hash tables.
Typeless container variables can be declared using the typeless type. A typeless container can be passed to a function using the var type. The container variable can store the contents of any typed variable. This is easy for the interpreter since all typed variables are stored as container variables. At run time, the interpreter must check the current type of the container variable (and sometimes convert it) to perform an operation.
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.
Note that there is no sizeof operator. Since the Slick-C interpreter currently stores all types as container variables, the sizeof operator has no meaning.
Example:
    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, 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]);
    }


Mathematical Operators

Slick-C® uses the operator precedence of C. The table below contains the unary operators that an expression can use.

Operator | Description
! e1 | Logical NOT. Result is 1 if e1 evaluates to 0. Otherwise the 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 in the table below. In addition to the operators listed in the previous table, string concatenation is implied. If a binary operator does not exist 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.

Operator | Description
= | Assign right operand to left operand.
:= | Declare new variable with type matching right operand and assign it the value of the right 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 OR 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 identical to the C strcmp function (see :== operator below). 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 == operator.
>= | Greater than or equal. Performs a numeric or string comparison depending on the operands. See == operator.
< | Less than. Performs a numeric or string comparison depending on the operands. See == operator.
<= | Less than or equal. Performs a numeric or string comparison depending on the operands. See == operator.
!= | Not equal. Performs a numeric or string comparison depending on the operands. See == 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.
instanceof | Can be used to test if a class instance derives from a specific class or interface. It can be used in two ways: x instanceof MYCLASS, or x instanceof "MYCLASS". "MYCLASS" does not need to be a constant string, and x may be a typeless container variable. Slick-C's instanceof is slightly more powerful than Java's, since the right operand can be a string value rather than just a class name. Otherwise, it is essentially the same concept.
:+ | Concatenation.
:+= | Append right operand (string) to the end of the left operand (string) and assign to the left operand. This is similar to the built-in strappend() function, but more convenient to use.
<< | Bitwise shift left.
>> | Bitwise shift right.
+ | Addition.
- | Subtraction.
/ | Division with possible floating point result.
intdiv | Division with integer result.
* | Multiplication.
% | Modulo (integer remainder).

Two sets of comparison operators exist. 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. Expressions may extend across line boundaries if the line ends in a binary operator or if the line ends with a backslash.

The table below shows examples of math operators in Slick-C.

Example | Operator
(1.0==1) | == true
(1e2==100) | == true
(1e2:==100) | == false
(" abc "=="abc") | == true
(" abc ":=="abc") | == false
(" abc ":!="abc") | == true
(" 1 "==1) | == true
(" 1 ":==1) | == false
("abc":<"def") | == true
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) | == false
(10:<7) | == true


Declarations

Variables and functions are declared in Slick-C® the same way they are defined in C.

This section contains the following topics:

  • Scoping and Declaring Variables

  • Simple Variables

  • Implicit Local Variables

  • Declaring Local Variables With :=

  • Declaring Variables With auto

Scoping and Declaring Variables

The Slick-C® language supports global, namespace, static (module), and local scope variables. Global variables can be accessed by any module. The scope of static and local variables are limited to the module in which they are defined. Variables are declared the same way that they are defined in C++. See Types for a list of types available in Slick-C.

Namespace level variables are visible within the current namespace but can be accessed from another namespace if they are qualified with the namespace name or imported with the using directive.

Simple Variables

The syntax for defining a simple variable is:

    [static] TypeName variable1[=expression1] , variable2[=expression2] ...;

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 should declare variables within the scope of a function to ensure that the variable will be local even if the name is declared elsewhere as a global or constant.

Example:

// 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="ess";
    // Declare a local string variable and initialize it to "ess".
    t=gi;
    // Copy gi into local container variable t.
    message("t="t"s="s);
}

Details About Variable Initializations

The following are some details about variable initializations:

  • Global and static numeric variables, which include boolean, int, long, double, and enumerated types, are initialized to 0 when there is no specified value provided. 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 there is no initialization value provided.

  • Global, static, and local variables declared as array, hash tables, and structure types are initialized as empty when there is no initialization value provided.

  • Global, static, and local variables of class type are initialized by running their constructor with default arguments. Global, static, and local variables of interface type are initialized to null.

  • Local numeric, string, enumerated, and typeless variables require initialization.

Example:

boolean     globalboolean=true;
int         globalint;
double      globaldouble;
defmain()
{
    // Will print message "globalboolean=1 globalint=0 globaldouble=0".
    message("boolean="globalboolean" "globalint" "globaldouble);
}

Type Casting

Slick-C® enforces string type checking on everything except typeless variables. However, there are times when you need to convert an expression from its actual type to another. Type casting helps communicate that to the compiler. Note that some type conversions can change the value of an expression. The syntax for type casting is as follows:

    (TypeName) expression

Some casts are not permitted in Slick-C. For example, you cannot cast a struct type to another struct type. Also, Slick-C does not support the C++ function style cast mechanism, and does not permit pointer types to be cast.

Example:

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
    boolean b;
    b= i!=0;  // Can't use cast here.
    i=(int)b; // Need cast here.
}

Implicit Local Variables

Local variables do not have to be declared. Using a variable not already declared as global or constant declares the variable to be a local typeless variable. However, you should declare variables within the scope of a function to ensure that the variable will be local even if the name is declared elsewhere as a global or constant. Turning on any of the compiler pragmas autodeclvars, strict, or pedantic will flag implicit local variables as errors.

Example:

_str cheese1 = "provolone";
_str cheese2 = "cheddar";
   temp = cheese2;  // Same as typeless temp = cheese2;
   cheese2 = cheese1;
   cheese1 = temp;

Declaring Local Variables With :=

Slick-C® supports type inference using the := operator, which both declares, and initializes a local variable with inferred type. This syntax provides you with the syntactic convenience of implicit local variables without sacrificing strong type checking.

In the following statement, id is declared as a local variable with the same type as expr:

    id := expr;

Examples:

b := false;                   // boolean b = false;
i := 0;                       // int i = 0;
j := i;                       // int j = i;
s := "test";                  // _str s = "test";
p := &s;                      // _str *p = &s;
c := _process_comment(line);  // COMMENT_TYPE c=_process_comment(line);
p := &obj;                    // Object *p = &obj;
fp := func;                   // int (*fp)() = func;
x := y := 0;                  // int x=0; int y=0;
for (a:=1; a<10; ++a);        // count to 10

Declaring Variables With auto

Slick-C® supports type inference using the auto keyword. The syntax for auto variable declarations is:

    [static] auto variable1[=expression1] , variable2[=expression2] ...;

Like the := operator, auto variable declarations use type inference to assign a type to the variable being declared and initializes the variable with the specified expression. Auto declarations are allowed in both local and global scopes, whereas := can only be used inside functions for local declarations.

Examples:

auto b=false;         // boolean b=false;
auto x=0, y=1;        // int x=0; int y=0;
auto i=x+1, s="test"; // int i=x+1; _str s="test";

You can also use auto to introduce a new local variable when calling a function that takes an "out" argument by reference, or with the parse statement. You can think of this identical to using implicitly declared variables, except that you prefix the variable with the auto keyword to introduce it. The type of the variable will be inferred from the point of use. In a parse statement, it will become a string type. In a function call, it will acquire the type of the formal argument from the function prototype. The advantage of using auto for output-only pass by reference variables is that, when coding a function call, you do not have to backtrack to declare the variable, you can just introduce it at its point of use and keep coding.

Examples:

struct Position {
   double x,y,z;
   // ...
};
struct SpaceTimeContinuem {
   _str timeVal;
   // ...
};
void getBent(SpaceTimeContinuem &stc)
{
   // ...
}
void travelFast(Position destinations[])
{
   getBent(auto stc);
   parse stc.timeVal with auto realPart'+'auto imaginaryPart;
   // ...
   foreach (auto p in destinations) {
      // ...
   }
}


Statements

Slick-C® statements are constructed in the same manner as the statements in the C language.

Topics in this section:

  • Assignment Operator

  • if Statement

  • Block Statement

  • Loops

  • parse Statement

  • switch Statement

Assignment Operator

The simple assignment statement has the syntax variable=expression. For example:

i=1;
i=i+1;

Assignment statements can be cascaded (x=y=z). Assignment statements within if and while conditions are not allowed. The compiler flags assignments within if and while statements as an error. See Declaring Local Variables With := for more information.

if Statement

The syntax for an if statement is the following:

    if (expression) statement [else statement]

statement can be a C-style statement block which contains multiple statements. For more information, see Block Statement.

Caution

CAUTION 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. Slick-C also considers an empty (=null) pointer variable or class instance as false.

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;
    }

Block Statement

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. A statement block has the following syntax, where statement may declare local variables:

    {
    statement1;
    statement2;
    ...
    }

Example:

int i=0;
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

Slick-C® supports C-style do, for, and while loops. In addition, Slick-C also supports Java/C#-style foreach loops and the Ada-style loop statement. You can use break and continue with all styles of loops.

do

The do loop executes statement first and then evaluates condition_exp. If expression is true (not the value 0), the statement continues to be executed until expression becomes false (0) or a break statement is reached.

Example:

    [label:] do statement while ( condition_exp );

for

The C-style for loop is 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 also. If condition_exp is true (not the value 0), the statement is executed. The statement continues 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 syntax of for is:

    [label:] for (b4e1 ,b4e2 ... .b4e3]; [condition_exp] ; {cont_e1,cont_e2 ... ,cont_e3]) statement

Examples:

// The following loops are equivalent.
loop1:
   for ( i=1;i<10;++i ) {
      messageNwait("i="i);
   }
loop2:
   i=1;
   for ( ;i<10; ) {
      messageNwait("i="i);
      ++i;
   }
loop3:
   for ( i=1;i<10;++i ) messageNwait("i="i);
loop4:
   i=1;
   while ( i <10 ) {
      messageNwait("i="i++);
   }
loop5:
   i=1;
   do {
      messageNwait("i="i);
   } while ( i<10 );

foreach

The foreach statement works with arrays, hash tables, strings (same as Bourne shell), structs (iterates over the fields of the struct), and classes (if instance of sc.lang.llterable, otherwise like structs). The syntax of foreach is:

    foreach ( [ k => ] v in a ) {
    statements;
    }

Example:

void printStats(int (&statistics):[])
{
   foreach (auto name => auto count in statistics) {
      say("testForeach: "name"="count);
   }
   int i,j=0;
   foreach (i in range(10, 20, 2)) {
      say("printStats: sequence["j++"]="i);
   }
}

There is an optional key which is useful for hash tables. The value can be omitted (key=> . in ht):

   foreach( key => value in ht ) {
      statements;
   }

Both value and index can be auto-declared using the auto keyword. If value is auto-declared, its type will be inferred from the type of the collection. The implementation uses _nextel().

loop

The generic loop statement is similar to that found in the Ada and D languages. The following statements are equivalent:

for(;;) { ... }
loop { ... }

Example:

status := search(":","@");
loop {
   if ( status ) break;
   get_line(line);
   messageNwait("found match line="line);
   status = repeat_search();
}

Another example:

defmain()
{
   i:=0;
   j:=0;
   loop {
      say("test, i="i);
      i++;
      if (i>1000) {
         break;
      }
      inner: loop {
         say("defmain: j="j);
         if (j++ > 750) break inner;
      }
      say("defmain: H1");
      if (i < 500) {
         continue;
      }
      say("defmain: H2");
   }
}

while

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.

Example:

    [label:] while (condition_exp) statement

break

Loops are exited with the break primitive. The break primitive supports an optional label argument (like Java™). If specified, the label must match the label of one of the loops that you are currently using.

continue

The continue primitive can be used to skip to the top of a loop. 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.

Loops can also be exited with the continue primitive. The continue primitive supports an optional label argument (like Java). If specified, the label must match the label of one of the loops that you are currently using.

Example:

outerloop:
   for ( i=1;i<3;++i ) {
      for ( j=1;;++j ) {
         if ( j==2 ) continue outerloop;  // Exit inner loop.
         if ( j==3 ) break outerloop;     // Exit both loops.
         messageNwait("i="i);
      }
   }

parse Statement

The syntax for parse is parse string with template. This statement parses string as specified by template.

The table below shows what template may contain.

Item

Description

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, B, I, and Y:

  • U specifies UNIX regular expressions.

  • R specifies SlickEdit regular expressions.

  • B specifies Brief regular expressions.

  • L specifies Perl regular expressions.

  • & specifices wildcard regular expressions.

  • I specifies a case insensitive search.

  • Y specifies a binary which search allows positions in the middle of a DBCS character (only affects Japanese operating systems).

See the topic "regular expressions" in the SlickEdit® Help system for more information.

(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.

The rules for parse column are:

  • 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.

The rules for setting output variables are:

  • 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 than 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.

Wildcard regular expressions are supported for parse. You can also use the auto keyword to auto-declare the output string variables in a parse statement. For example, the following statement declares "firstword" and "secondword" as strings:

 parse s with auto firstword auto secondword;

Examples of parse:

// Results are  a=='1', b=='2', c=='3'.
parse '1 2 3' with a b c;

// Results are  a=='1', b=='2', c=='3'. Note that tab and space characters are
// stripped.
parse '1 '\t' 2 '\t' 3' with a b c;

// Results are  a=='1', b=='3'.
parse '1 2 3' with a . b;

// Results are  a=='1', b=='2', c=='3', d=='4', e=='5'.
parse 'xxx1 2 3yyy 4 5' with 'xxx' a b c 'yyy' d e;

// Results are  a=='1 2 3', b==' 4 5'.
parse 'xxx1 2 3yyy 4 5' with 'xxx' a  'yyy' b;

// Results are  a=='xxx1 2 3', b=='yyy 4 5'.
parse 'xxx1 2 3yyy 4 5' with 'xxx' +0 a  'yyy' +0 b;

// Results are delim=='/', s1=='x', s2=='y', options==''.
parse 'c/x/y' with  2 delim +1 s1 (delim) s2 (delim) options;

switch Statement

Slick-C® supports the C switch statement. The Slick-C switch supports integers and string types. The switch statement uses the following syntax:

    switch (expression) {
    [ case expression:
    statements
    ]
    [ case expression:
    statements
    ]
    ...
    [ default:
    statements
    ]
    }

The switch expression is evaluated and compared against all the case expressions. After 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

A function can be called from the macro language. Slick-C® has five kinds of functions: procedures, commands, class methods, library functions, and built-ins. These are described in the following sections:

  • Defining a Procedure

  • Defining a Command

  • Class Methods

  • Function Prototypes

  • Differences Between Commands, Built-ins, and Defs

Defining a Procedure

Procedures and functions are the basic building blocks for most modern, imperative languages. Slick-C® procedures cannot be bound to keys. A procedure name must be a valid Slick-C identifier (same as C identifier). Use the following syntax to define a procedure:

    [static] [TypeName] id(TypeName1 [&] id1, TypeName2 [&] id2, ...])
    {
    statement1;
    statement2;
    ...
    }

TypeName specifies the return type of the function. For more information, see Types. If the return type is not specified, the function will return typeless. When the void type is used, a value cannot be specified to the return statement. The return statement is used to specify the result of the function call and exit the function.

The optional static keyword is used to limit the scope of a procedure to the module in which it is defined. By default, procedures are global and can be accessed by any module. Procedures are called by specifying the name followed by comma delimited arguments, if any, in parentheses.

    [ result =] id( expr1, expr2, ... );

In the above example, expr1 matches the type of id1 and expr2 matches the type of id2, etc.

Example:

int increment(int x)
{
   return x+1;
}
boolean proc(int &p1, _str p2, _str (&list)[], int (*pfn)(int))
{
   return(true)
}
void defmain()
{
   p1 := 0;
   p2 = "Hello world";
   if ( proc(p1, p2, auto list, increment) ) {
      // ...
   }
}

Note

The list and p1 parameters are call by reference parameters. Like C++, list parameter requires parentheses around the & reference operator and the name, because the [] operator would otherwise be processed first. The pfn parameter is a pointer to a function.

Argument Declarations

The syntax for an argument declaration is the same as for declaring a variable, except that the static keyword cannot be used. An ampersand (&) before the id declares a call by reference parameter. Call by reference array and hash table parameters require parentheses around the & and id.

The last argument in the declaration list may be an ellipsis 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. For more information, see Types. If the return type is not specified, the function will return typeless. When the void type is used, a value cannot be specified to the return statement. The return statement is used to specify the result of the function call and exit the function.

The optional static keyword is used to limit the scope of a procedure to the module in which it is defined. By default, procedures are global and can be accessed by any module. Procedures are called by specifying the name followed by comma delimited arguments, if any, in parentheses.

Example:

boolean proc(int &p1,_str p2,_str (&list)[],int (*&pfn)(int))
{
    return(true)
}

Note

The list, p1, and pfn parameters are call by reference parameters. Like C++, the list parameter requires parentheses around the & reference operator and the name, because the [] operator would otherwise be processed first. This avoids deviating much from C++ syntax. The command pfn is a reference to a pointer to a function.

Procedures can have up to 15 arguments defined. The procedure can be called with more arguments than defined by the procedure declaration. These extra arguments and the arguments defined in the procedure declaration can be retrieved by the arg function. Calling the arg function with no parameters returns the number of parameters with which the function was called. The minimum number of arguments with which the procedure may be called is defined by the procedure heading. A parameter of type var specifies a typeless variable passed by reference.

Default Arguments

Defining arguments with default values instead of using the arg function makes your code more understandable. 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 must always be specified in the function definition. Unlike C++, default arguments in prototypes do not have an 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();           // Use defaults ("beforeafter" ,2).
    proc("param1");   // Use the second default value.
    proc("param1",3); // Specify both values.
    proc(,3);         // This is not allowed.
}

Defining a Command

The _command primitive is used to define a new command with argument completion. A command can be invoked by typing its name on the SlickEdit® command line, selecting it from a menu item definition, pressing a key, calling it in a Slick-C® function, or typing its name followed by arguments in parentheses in a Slick-C expression. Command procedures always have global scope and can be bound to a key with the Key Bindings option screen (Tools → Options → Keyboard and Mouse → 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 Types). If TypeName or void is not specified, the return type is typeless. When the void type is used, a value cannot be specified to the return statement. The return statement is used to specify the result of the function call and exit the function.

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 parentheses around the & and the id. However, all typed or named arguments must have a default value.

The last argument in the declaration list can be an ellipsis 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, or a string constant of a length of one, such as "/". SlickEdit uses the slash to define a search command.

Example:

// Allow command in read only mode.
// Use ellipsis 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 receive 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 file1file2 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 the Help system for more information on parsing). When another macro calls a command, more than one argument string can be passed. Calling the arg function with no parameters returns the number of parameters with which the command or procedure was called.

name_info Attributes

The optional name_info expression is used to specify command argument completion rules and restricts when the command may be executed.

const_exp is a single constant 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 slick.sh file for constants that end in _ARG. const_exp may contain one or more of the _ARG constants. Separate each _ARG constant with a space. An asterisk (*) 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 or disabled. One or more of the flags in the table below can be specified and ORed together with the bitwise OR (|) operator.

Flag | Description
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 maybe because it opens a new file or uses _mdi object. Commands with this attribute are removed from pop-up menus in 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 spacebar key. If an asterisk (*) is appended to the end of 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.

OnUpdate Functions

A Slick-C® command can have a corresponding _OnUpdate_commandname function. This function is used to provide more precise control over the enabling and disabling of a command than the name_info command can provide.

Example:

int _OnUpdate_linehex(CMDUI &cmdui,int target_wid,_str  command)
{
    if ( !target_wid || !target_wid._isEditorCtl()) {
       return(MF_GRAYED);
    }
    if (p_UTF8) {
       return(MF_UNCHECKED|MF_GRAYED);
    }
    if (p_hex_mode==2) {
       return(MF_CHECKED|MF_ENABLED);
    }
    return(MF_UNCHECKED|MF_ENABLED);
}

Class Methods

Slick-C® classes can contain methods which implement the class behaviors. Slick-C supports static class methods. These methods may be called without having an instance of the class available. Like Java, all other Slick-C class methods are virtual. Unlike Java and C++, Slick-C class methods do not support overloading. A class method may have up to 14 arguments. Like Java and C++, the first argument is hidden and contains the class instance (this) for virtual methods.

Example:

namespace outer;

interface IShape {
   double area();
   void draw();
};
class Rectangle : IShape {
   int m_w=0;
   int m_h=0;
   double area() {
      return m_w*m_h;
   }
   void draw() {
      // Draw box.
   }
};
class Circle : IShape {
   int m_r=0;
   double area() {
      return m_r*m_r*3.1459;
   }
   void draw() {
      // Draw round thing.
   }
};
class Factory {
   static IShape makeShape(int x, int y, _str type, ...)
   {
      switch ( type ) {
      case "Rectangle":
         // ...
      case "Circle":
         // ...
      }
      return null;
   }
};
namespace default;
void draw_car()
{
   body := outer.Factory.makeShape(  0, 10, "Rectangle", 40, 10);
   cab  := outer.Factory.makeShape(10, 10, "Rectangle", 20, 10);
   axl1 := outer.Factory.makeShape( 5, 5, "Circle", 5);
   axl2 := outer.Factory.makeShape(30, 5, "Circle", 5);

   outer.IShape car[];
   car[car._length()] = body;
   car[car._length()] = cab;
   car[car._length()] = axl1;
   car[car._length()] = axl2;
   double area = 0.0;
   foreach ( auto s in car ) {
      area += s.area();
   }
   foreach ( s in car ) {
      s.draw();
   }
}

Function Prototypes

Function prototypes provide the compiler with 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 recommends that you add a function prototype to your source so the compiler can find your error. You might 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 parentheses of the parameter list. Unlike C++, default arguments in prototypes have no effect on the compiled code. No code or name_info is given.

The need for function prototypes is also mitigated in Slick-C because of the #import directive which allows the compiler to import declarations from another Slick-C module. This is more convenient than C++, where you need to put declarations in a header file to support calling functions across modules. It is also more convenient that Java, because #import gets declarations directly from the source code, so the imported module does not need to be compiled to be imported. This simplifies compiling modules with circular dependencies.

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.
    }

Library Functions

A library function is a function that was implemented in a dynamically loaded library and was not written in the Slick-C® language. A library function must follow Slick-C calling conventions and be registered with the interpreter. Prototypes for library functions should use the extern keyword to indicate that they are implemented outside of Slick-C code.

Built-in Functions

A built-in function is a function that was implemented in the interpreter and was not written in the Slick-C® language.

Finding Functions

There are over 1200 documented functions and 200 properties. There are two ways to find the function that you seek. First, you can use the menu item Help → Macro Functions by Category , which displays smaller lists of these functions by category. Second, you can view source code for existing commands. If you do not know the name of the command but you do know the key that invokes the command, use the what_is command or Help → What is Key to find the name of the command that is executed. Then, use the find_proc command or Macro → Find Slick-C Proc to display the macro source code.

Differences Between Commands, Built-ins, and Defs

  • 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 always have global or namespace scope. Built-ins always have global scope. Procedures can have static (module), global scope, or namespace scope.

  • Commands can be bound to keys. Built-ins and procedures cannot.

  • Commands can be invoked from the command line or the execute function. Built-ins and procedures cannot.

  • 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 the commands have the same name as a built-in so you can call any command 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).

There are several differences between defining a procedure and defining a command with the _command primitive:

  • The scope of a procedure can be limited to a module.

  • Command functions are invoked by typing the name on the SlickEdit® command line, from a menu item definition, by using the execute function, or by typing the command name followed by arguments in parentheses in a Slick-C® expression. Procedures can only be called by the latter method and cannot be bound to keys.

  • A procedure name must be a valid Slick-C identifier (same as C identifier). The name of a command can be a string constant containing a single character such as "/" (SlickEdit uses the slash to define a search command).

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 can be invoked by typing the name (extension not required) followed by arguments on the SlickEdit® command line, quoting the name in a macro, or by using the execute function. If the batch macro needs to be recompiled, 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 is not invoked and an error will result. If you load a batch program that you do not want, use the unload command to unload it. When a batch program is executed, the defmain procedure is called after the procedure definit is called. For more information, see Module Initializations.

The syntax of the defmain function is:

    [TypeName | void] defmain()
    {
    statement
    statement
    ...
    }

TypeName specifies the return type of the function. If TypeName or void is not specified, the return type is typeless. 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.

Note

The execute function only supports returning an int type. 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 of the command line arguments will be in arg(1). Use the parse statement to easily parse multiple space delimited arguments.

The following example displays the arguments given to the macro on the SlickEdit message line. If you define a procedure in a batch program, use the static keyword to conserve memory. SlickEdit stores the names of global procedures and variables in a names table.

defmain()
{
    messageNwait("Arguments given: "arg(1));
    parse arg(1) with word1 word2 .;
    messageNwait("word1="word1" word2="word2);
    return(0);
}

Extending the editor with a batch macro has the advantage of conserving memory and reducing the size of the state file. Also, batch macros can be easily 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 command to bypass internal command searching. There are two ways to invoke a Slick-C batch macro:

  • Type the name of the module followed by arguments on the SlickEdit command line.

  • Type vs -p program at the shell prompt, where program is the name of the batch program and vs is the name of the editor. Alternatively, you may use the -r option to have SlickEdit remain resident after the batch program completes.

For the above methods, SlickEdit invokes the translator to compile the source code file if the source code file exists and its date is later than the date of the .ex file.


Preprocessing

Preprocessing in Slick-C® is identical to C/C++. Preprocessing allows you to conditionally compile source code or define textual replacements.

This chapter includes the following topics:

  • #if

  • #pragma

  • #region and #endregion

  • Including Header Files

  • Importing Slick-C Modules

#if

The syntax of the Slick-C® language conditional if block is any of the following examples:

    #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 permitted. The expression specified MUST be valid. To display an error message and end the compile, use the #error directive: #error expression.

Usually, preprocessing is used to write macros that operate on multiple operating systems or environments. The table below shows the constants that are automatically defined by the Slick-C translator.

Constant | Description
__PCDOS__ | Non-zero if the 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 Windows NT® compatible.
__VERSION__ | Version number of SlickEdit®.
__COLUMN__ | Number of characters from start of current line.
__FILE__ | Current file name.
__LINE__ | Current line number.
__PATH__ | Current file name and path.
__DATE__ | Current date.
__TIME__ | Current time.

Use the Slick-C translator -d option to define a constant for use by preprocessing. To test if 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

The #pragma preprocessor directive is used to change various options during the course of a compile. The syntax is:

    #pragma option(OptionName [, ( on | off ) ] )

Slick-C® options (OptionName) are shown in the table below.

Note

  • For each option, if the second argument is not given, the value is restored to the command line invocation value.

  • All #pragma options may be specified by command line compiler options. Run vst.exe (UNIX: vst) with no arguments to view compiler options. You can use the VST environment variable to specify compiler options for all of your macros.

OptionName

Default Value

Description

autodecl

On

Enables autodeclvars and autodeclctls. See those options for more information.

autodeclctls

On

When enabled, the compiler attempts to automatically declare control variables. This option is automatically enabled when autodecl, pedantic, strict, or strict2 is enabled.

autodeclvars

On

When enabled, the compiler attempts to automatically declare typeless variables when an assignment is made. This option is automatically enabled when autodecl is enabled. This option is automatically disabled when pedantic, strict, or strict2 is enabled.

deprecation

Off

Allows you to configure properties and built-in functions as deprecated. When enabled, the Slick-C compiler catches when a deprecated item is used and flags it as an error. A function is considered as deprecated if it has a Javadoc function comment containing the @deprecated tag. Deprecation is automatically enabled when pedantic is enabled. Note that using the deprecation pragma may result in your macro not loading when you upgrade to a new release of SlickEdit if the code calls a function that becomes deprecated.

pedantic

Off

Enabling this option automatically enables all existing and future strict syntax and type-checking options. Unlike other Slick-C pragmas, the meaning of pedantic could be augmented in future releases of SlickEdit. This means that if you use the pedantic pragma in your own macros, they may not load when you upgrade to a new release of SlickEdit if, for example, a function it is using becomes deprecated or stricter type checking reveals a problem.

redeclvars

Off

This is used to generate code for variables without having the type information. When enabled, any variable can be redeclared as a typeless variable.

strict

Off

This option is used to turn on a high level of type checking and syntax enforcement in the Slick-C translator. It automatically enables autodeclctls, autodeclvars, strictnumbers, strictparens, strictsemicolons, and strictstrings. We recommend using #pragma option(strict,on) in user-written macros because it gives the best combination of high level of error checking and forward compatibility.

strict2

Off

Second generation of strict Slick-C compilation checks. Automatically enables all options that strict enables, plus strictarglists, strictincludes, and twopass.

strictarglists

Off

When disabled, a function can have implicitly typeless arguments. When enabled, formal parameter lists for functions and prototypes must have types. The example illustrates an error case:

void first_char(s) {
   return substr(s,1,1);
}

This option is automatically enabled when pedantic or strict2 is enabled.

strictboolean

Off

When enabled, Slick-C variables with boolean types cannot be assigned to integers without using a cast. This means, for example, that the following would be flagged as an error:

boolean b = 0;

This option is automatically enabled within classes and namespaces.

strictellipsis

Off

When enabled, the ellipsis must be given as the last argument to a function or prototype for type checking to succeed when calling function with extra arguments. This option is automatically enabled when pedantic or strict2 is enabled.

strictincludes

Off

When enabled, verifies that all #import and #include statements precede any real code in the current module. This is required for twopass compilation. This option is automatically enabled when pedantic or strict2 is enabled.

strictnames

Off

When enabled, enforces naming conventions for symbols declared in Slick-C classes, namespaces, and enumerated types. See Slick-C® Naming Conventions for more information. This option is automatically enabled when pedantic is enabled.

strictnumbers

Off

When enabled, Slick-C numeric constants are treated strictly as integer or double precision floating point types, rather than than typeless variables. This makes it possible to use precise type inference with integer types, like i := 0;. This option is automatically enabled when pedantic is enabled. It is also automatically enabled within classes and namespaces.

strictparens

Off

Use this pragma for more readable code. When enabled, parentheses must be given on all built-in functions. This option is automatically enabled when pedantic, strict, or strict2 is enabled.

strictprotos

Off

When enabled, all function calls require the function to be previously declared or imported. When disabled, when the Slick-C compiler encounters a function call to a previously undefined function, it assumes that the function is a global function. The function call is resolved at link time, and an error will show up at run time if the function does not exist or is not provided enough parameters. This option is automatically enabled within classes and namespaces.

strictreturn

On

When enabled, and an explicit return type is given to a function, the compiler will flag an error if a return statement is potentially missing.

strictsemicolons

Off

Use this pragma so that smart editing features work, and to prevent compilation errors. When enabled, semicolons must terminate all statements. This option is automatically enabled when pedantic, strict, or strict2 is enabled.

strictstrings

Off

When enabled, Slick-C string constants are treated strictly as string types, rather than typeless variables. This means, for example, that you can no longer assign "0" to an integer variable. This option is automatically enabled when pedantic, strict, or strict2 is enabled.

twopass

Off

When enabled, the Slick-C compiler does a two-pass compilation. This allows the compiler to verify all function call signatures even for functions that are declared later in the file. This option is automatically enabled when pedantic or strict2 is enabled.

#region and #endregion

The #region directive lets you specify a block of code that you can expand or collapse when using Selective Display. The #endregion directive marks the end of a #region block. A #region block must be terminated with #endregion. The syntax of these directives is:

    #region name
    #endregion name

The name parameter (optional) is used to indicate the name of the region. This name is displayed in the editor window when the region is collapsed.

Example:

#region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#endregion Region_1

defmain()
{
}

Including Header Files

The syntax of the include statement is:

    #include string_constant

This statement 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 looks for the include file in the directories specified by the VSLICKINCLUDE and VSLICKPATH environment variables (see "environment variables" in Help → Index ). Include files may be nested.

Unlike C++, Slick-C header files do not require guards. Our preprocessor automatically guards against recursive header file inclusion, and will never include the same header file twice for a single module either.

Importing Slick-C Modules

#import is a preprocessing directive but it is more than a #include in that it does the following:

  • Imports all public declarations from a Slick-C® module.

  • Uses an implicit header guard to prevent recursive or multiple importation of the same module.

#imports are not recursive. If you #import a module (abc.e) that #imports another module (def.e), you will not get the declarations from def.e. This is an important consideration for compilation performance and to minimize inter-module dependencies.

#require is a preprocessing directive, like #import, but it is recursive. If you want a module to always pull in another required module when it is #imported, use the #require directive. For example, a class (Abc) that derives from another class (Def) should #require the parent class module (Def.e). That way when another module #imports Abc.e, it will also have the declaration for the parent class Abc. As a general rule, a module needs to use #require when its classes or function signatures use types that are declared in another module. Use #import when your code (within function bodies) needs to call functions or use classes and global variables from other modules.

When processing a #import, the following rules are in effect:

  • All function definitions are treated as prototypes.

  • Global variable definitions are treated as declarations.

  • Static globals are ignored.

  • Forms, menus, event tables, and event handlers are ignored.

  • #includes continue to be treated as part of the #import.

Examples:

    #import "stdcmds.e"
    #import "slickedit/stringutil.e"
    #import "slickedit/search.sh"


Defining Controls

Usually, you do not need to communicate with the compiler about a control to which you refer; however there are a couple of cases in which you must declare a control. This can happen when the compiler cannot safely assume that you are referring to a control, or when the compiler cannot find the location of the dialog box of the control that you are trying to access. 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 you can use:

    [_nocheck] _control ControlName;

ObjectName can be one of the following:

  • _check_box

  • _combo_box

  • _command_button

  • _gauge

  • _hscroll

  • _image

  • _label

  • _list_box

  • _picture_box

  • _radio_button

  • _text_box

  • _vscroll

The _nocheck keyword tells the compiler not to check if the control exists on the current dialog box.

The [_nocheck] ObjectNameControlName; declaration is only permitted outside the scope of a function. 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.
       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 are used for describing event or 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 there is no defeventtab declaration 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 command or by executing the module as a batch program. For more information on batch programs, see defmain: Writing Slick-C® Batch Files. Even though executing the module as a batch program unloads the module when the defmain function terminates, the event table changes remain present. The following syntax is used for defining a key:

    def {prefix_key} event [- event] [, event [- event]] ... = [command];

command can 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 may be any valid event name. Some event names do not need to be enclosed in 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 period (.) character. The period 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 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 for creating event-driven dialog boxes and inheritance. The event table definition code is automatically inserted by the dialog editor. To begin working with event tables, see Creating Dialog Boxes. 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 want to specify inheritance for an event table that is attached to a control.

Example:

    defeventtab form_name[.control_name] [_inherit [etab_name]];

Using the _inherit primitive, you can link one event table to another. This makes it possible to perform Clipboard Inheritance® (see Clipboard Inheritance®). If no name follows the _inherit keyword, the inheritance is unlinked. To add event handlers using the def primitive or by defining an event handler function, use the following syntax:

    [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 in the previous code can be any valid event name. Some event names do not need to be enclosed in quotes. It is a best practice to always enclose the event names in quotes.

The syntax for ArgDecls is the same as is the syntax for declaring a variable except that the static keyword may not be used. An ampersand (&) before the id declares a call by references parameter. Call by reference array and hash table parameters require parentheses around the ampersand and id.

The following is an example of a form with a 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, the
// 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 form1. A form1 event table is not created because an event handler for this event table was defined. When you save the 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 the two are present, the procedures definit and defload are called when a module is loaded. The definit module is called before defload. When the module is saved by the write_state command, the definit procedure is invoked each time the editor is invoked. This gives your module an opportunity to perform initializations such as creating a temporary file, or allocating a selection, or bookmark. The following syntax is used for defining the special functions definit and defload:

    definit()
    {
    statements
    }
    defload()
    {
    statements
    }

The return value of these functions is always void. You cannot specify an argument to the return statement. To enhance the performance of SlickEdit®, use the defload primitive instead of the definit primitive. 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 ("").

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 is 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 the mark needs 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 this 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);
}


Compiling and Loading Macros

The commands st and load are used to compile Slick-C® modules from within the editor. The st command translates the module specified into binary code. When a module is not specified, the current buffer is translated. The load command (F12 or Macro → Load Module ) translates the module specified if necessary, and loads the resulting byte code. When a module is not specified, the current buffer is saved, translated, and loaded. If a module is loaded that has already been loaded, it is replaced. Both the commands invoke the external program vstw.exe (UNIX: vstw) to translate the source module into byte code. DO NOT use the load command on batch programs. After doing so, you are no longer able to execute the batch program until you use the unload command (Macro → Unload Module ).

A module that is loaded with the load command can be unloaded using the unload command (Macro → Unload Module ). However, the symbol table or the names table still contains the names of globally scoped variables, procedures, and commands until you save the configuration. The configuration is automatically saved when you exit the editor. You can invoke the save_config command from the command line to save the configuration at any time.


Debugging Macros

The Slick-C® translator vstw.exe (UNIX: vstw) enables debug messages to be inserted into the code and compiled. Use the messageNwait function to display a message and wait until a key is pressed. The _message_box function can be used to display a dialog box with a message and wait until you press Enter to proceed. Useful defs tab .e extension aliases are listed in the table below.

Alias Name | Value
m | messageNwait(%\n: %\c);
mb | _message_box(%\n: %\c);

The following sections will help you debug and work on Slick-C macros:

  • Finding Procedures

  • Finding Run-Time Errors

  • Performance Profiling

  • Slick-C® Debugger

Finding Procedures

The find_proc command (Macro → Go to Slick-C Definition ) finds Slick-C® source code or Help for a Slick-C symbol name that you specify. Use this function if you are browsing a macro and you want to find out more about a function. You can find the procedure at the cursor by pressing Ctrl+Dot. The syntax of the find_proc command is:

    find_proc proc_name

Tip

Instead of find_proc, use the command fp, which is a shortcut. It functions exactly the same as find_proc.

The table below shows some examples of using find_proc on the command line.

Command | Description
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 Run-Time Errors

When a Slick-C® error occurs, a dialog box with the title "Slick-C Error" is displayed. Usually the Slick-C Stack tool window is displayed listing the call stack at the time of the error. Double-click in this tool window 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.

Performance Profiling

The Slick-C® interpreter supports performance profiling. This is useful to identify bottlenecks or other inefficiencies in Slick-C code. The profiler does not affect performance when it is inactive, and there is only a minimal effect on performance when it is collecting data.

To use this feature, invoke the profile command on the SlickEdit® command line with the following options:

  • profile on - Starts profiling data collection (also resets counters).

  • profile off - Stops profiling data collection.

  • profile view - Displays profiling data (also stops collection).

  • profile command args - Executes the specified Slick-C command with the specified arguments, then displays the profiling data. For example, to profile a CVS update, type profile cvs-gui-mfupdate.

  • profile save - Saves the profiling data for loading/viewing at a later time.

  • profile load - Loads previously saved profiling data for viewing.

Prior to displaying the profiling data, the applicable Slick-C source files are scanned in order to resolve the names of static functions. Then the Slick-C Profiler dialog is displayed showing the data in multi-column, non-modal tree format. Each line represents one function, which is either a Slick-C function or an exported DLL function, depending on what was called when the profiling data was collected. All times are displayed in milliseconds.

The profiling data can be sorted by clicking any sortable column. Double-click on any function to open the associated file in SlickEdit, with the cursor at the function location.

The Slick-C Profiler displays the following columns:

  • Function - Name of the function called.

  • Module - Name of the module from which the function comes.

  • Offset - The P-code offset of the function within the module.

  • Calls - Number of calls to the function.

  • F+D Time - Total time spent in the function and its descendants.

  • Percent - Percentage of the total time spent in the function and its descendants.

  • Avg F+D - Average time spent in the function and its descendants.

  • Min F+D - Minimum time spent in the function and its descendants.

  • Max F+D - Maximum time spent in the function and its descendants.

  • Func Time - Total time spent in the function only.

  • Percent - Percentage of the total time spent in the function.

  • Avg Time - Average time spent in the function.

  • Min Time - Minimum time spent in the function.

  • Max Time - Maximum time spent in the function.

Slick-C® Debugger

The Slick-C Debugger helps you trace Slick-C code. The debugger has no effect on performance when it is inactive, and only a minimal effect on performance when it is running.

To activate the Slick-C Debugger, from the main menu, click Macro → Start Slick-C® Debugger , or use the slickc_debug_start command on the SlickEdit® command line.

When you start the debugger, a separate instance of SlickEdit launches in debug mode (the "debugger instance") and attaches to the original instance of SlickEdit (the "debuggee"). In the debugger instance, you can set breakpoints, step through code, inspect globals and properties, and more.

Use the Debug menu items or key bindings to perform debug operations. See "debugging" in the Help system (Help → Index ) for more information about how to use the debugger in SlickEdit and other options that are available.

You can also use the slickc_debug command on the SlickEdit command line to perform various actions:

  • Step into commands - Use slickc_debug command, where command is the SlickEdit command you want to step into. The debugger terminates when the command completes. For example, use slickc_debug list_tags to launch the debugger and step into the list_tags command, which scans the current buffer for tags and displays them in a selection list.

  • Debug batch macros - Use slickc_debug PathToBatchMacro to activate the debugger for the specified batch macro. For example, use slickc_debug C:TEMP\bm164.e to open the batch macro file bm164.e in the editor and start the debug session.

  • Enable remote attachment - Use slickc_debug on to enable debugging so that someone else can attach to your instance of SlickEdit remotely. Use the slickc_debug off to disable debugging.

To stop the debugging session, from the debug instance main menu, click Debug → Stop Debugging . This detaches the debugger instance and closes it.

The debugger instance connects to the debuggee using a lightly extended version of JDWP (Java Debug Wire Protocol), although there is no JVM (Java Virtual Machine) involved. By default, it attaches to port 8003.

In order to run in a safe, clean environment, the Slick-C Debugger creates and uses its own configuration directory, named SCDebug, located in the user config. Additionally, an empty workspace is created and stored in the debug config which is used thereafter each time the debugger is run. This workspace, SCDebug.vpw, is used to store breakpoints that you set in the debug instance. It also stores the list of open files and watch expressions.

The Loaded Classes tool window is a useful tool for examining the state of the debuggee with respect to Slick-C. It shows all the loaded modules and loaded classes, all global variables, all MISC_TYPE variables, and loaded event tables. Many of these items are found under the imaginary "sc.lang.*" namespaces. The Loaded Classes tool window is not active by default in debugging mode. To display it, from the main menu, click Debug → Windows → Loaded Classes . See "Loaded Classes tool window" in the Help system (Help → Index ) for more information.


Error Handling and the rc Variable

The rc variable is a predefined global variable that is accessible from all loaded modules. The following functions require that you use the rc variable for error handling: buf_match and get_env.

By convention, functions that use integer error codes return negative error codes that correspond to the error codes in rc.sh. For these functions, 0 means success and positive codes means the error code is not in rc.sh.

Some functions display an error message on the message line. Use the clear_message function to clear the message.

Example:

    // Cause a message.
    _deselect();_copy_to_cursor();
    // Clear the message.
    clear_message();


Dialog Editor

The dialog editor is used to create dialog boxes: It provides controls to build the text boxes, combo boxes, radio buttons, image controls, menu items, and forms for a dialog box.

Microsoft Visual Basic and Slick-C®

Creating event-driven dialog boxes (see Event-Driven Dialog Boxes) in Slick-C is similar to Microsoft Visual Basic except that the language has C++-style syntax. The following list contains some of the differences between Slick-C and Microsoft 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 Microsoft Visual Basic. If a button control receives an event and executes a statement such as this: p_caption=New button caption, the caption on the button is changed and NOT the caption for the dialog box.

  • Built-in properties all start with the prefix p_ to avoid these keywords from conflicting with their own identifiers.

  • A more general method of object instance referencing is used.

  • Almost all properties that can be accessed at design time can 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. For more information, see Dialog Box Inheritance Order.

  • 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. For more information, see Clipboard Inheritance®.

  • Functions can be used as methods that operate on an instance of an object.


Creating Dialog Boxes

This chapter contains the following topics:

  • Dialog Editor Summary

  • Adding and Deleting Controls

  • Setting Properties

  • Aligning Controls

  • Sizing Controls

  • Moving Controls

  • Miscellaneous Assignments When the Form is Active

  • Miscellaneous Menu Items

  • Creating a Form

  • Saving a Form

  • Adding Event Handlers

  • Inherited Code Found Dialog Box

  • Loading and Running the Form

  • Modal and Modeless Dialog Boxes

  • Dialog Box Parent Window

Dialog Editor Summary

To edit a dialog box that is being run, press Ctrl+Shift+Space or right-click on the top of a form and select Edit. If you press Ctrl+Shift+Space while the Properties dialog box is active, you edit the Properties dialog box. Double-click the system menu to close the edited Properties form. Some UNIX window managers do not close windows when you double-click on the system menu.

Adding and Deleting Controls

The bitmaps on the left of the Properties dialog box are used to create controls. Hover over a bitmap to display the function of a bitmap. There are two methods for creating a control. The first method is to double-click the left mouse button on the bitmap of the control that you want to create. This places a new control in the middle of the selected form.

The Picture Box and Frame controls enable you to place controls inside of them. To do so, select Window → Properties or, use the show_properties command.

To use the other method for creating a control, complete the following steps:

  1. Single-click on the Text Box bitmap.

  2. Move your mouse so that it appears on top of the form that you are editing. If you cannot see the form that you are editing, display it by selecting Window → Selected Form .

  3. To create the text box control, click the left mouse button, and, while holding it down, move the mouse pointer to the right to create a dotted rectangle. When you release the mouse, the text box control is displayed within the rectangle.

To delete a control, select the control(s) to remove, then press Backspace or Delete.

Setting Properties

To set properties, complete the following steps:

  1. Select the control. Left-click the mouse button on the property in Properties list box.

  2. Type the new value in Properties combo box. Press Enter when the Properties list box is active to set the property.

  3. Select the control. 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 with which you want to align the other controls. 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 Enter on the value in the Properties combo box.

Sizing Controls

To size controls, use one of the following methods:

  • 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 to move the lower right corner of the selected controls by one pixel.

Moving Controls

To move controls, use one of the following methods:

  • Select the control(s), then click and drag with the left mouse button.

  • Select the control(s), then set the x or y property.

  • Select the control(s), then press the Left, Right, Up, or Down arrow key to move the selected controls by one pixel.

Miscellaneous Assignments When the Form is Active

The table below shows a list of miscellaneous button and key assignments that can be used when the form is active.

Assignment | Action
Right mouse click | 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 in 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 managers do not close windows when you double-click on the system menu.
Ctrl+S | Loads form and saves into state file. Under UNIX, this may just list source for the form that can be executed.
Ctrl+L | Loads form.
Ctrl+C | Copies selected controls.
Ctrl+V | Pastes controls from the clipboard.
Ctrl+X | Cuts selected controls.
Ctrl+A | Selects 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.
Left mouse click | Double-click (on control) displays Select an Event Function dialog box for adding or modifying event handlers.

Miscellaneous Menu Items

The table below shows the miscellaneous menu items.

Menu Item | Description
System Box of form, Show Properties | Display Properties dialog box.
Window → Properties | Display Properties dialog box.
Window → Selected Form | Display selected form (form being edited).
Macro → New Form | Creates a new dialog box with a default name.
Macro → Open Form | Open existing dialog box or create new dialog box.
Macro → Grid | Sets the distances between the dots on edited form.

Creating a Form

A form is the outer window of a dialog box. The objects within the dialog box are called controls. The form also refers to the entire dialog box. A new form can be created by using one of the following methods:

  • Use the New Form menu item (Macro → New Form ).

OR

  • Use the Open Form menu item (Macro → Open Form ) and specify the name of a new form.

Saving a Form

Click on the form being edited and press Ctrl+S.

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 are referenced in the code. Prefix your control names using the letters ctl so that they are easily recognizable. To add an event handler, complete the following steps:

  1. 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 is displayed.

  2. Select an event and click OK. 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.

  3. Type a unique file name. Usually this file name is derived from the name of the dialog box you are creating, such as form1.e.

After performing the above steps, the dialog editor inserts an event function definition into your source file and places your cursor in the function.

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, paste elsewhere and then double-click on the new instance of the control.

The following options are available on the dialog:

  • 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). This afffects 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.

Loading and Running the Form

To run the current dialog box that you are editing, click Macro → Load and Run Form or use the run_selected command. This loads the code, loads the dialog box, and runs the dialog box. To close the dialog box, double-click on the system menu (some UNIX window 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). Press Ctrl+Shift+Space when any dialog box is running to edit it (this includes the Properties dialog box).

Display the dialog box from the command line by typing show <FormName>. To display the dialog box modally enter show -modal <FormName> on the command line. For more information about this command, see Displaying Dialog Boxes. Dialog box templates and compiled macros are stored in the state file vslick.sta (UNIX: vslick.stu).

The example code below shows how to write a command that displays a dialog box. This is used when binding a command to a key that 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");
}

Adding a Cancel Button

To add a Cancel button, complete the following steps:

  1. Double-click Insert Button Control.

  2. Set the caption property to Cancel.

  3. Set the cancel property to TRUE by double-clicking the left mouse button on the cancel property in the Properties list box.

  4. Set the name property of a control (never the form) to "" if you are not going to reference the control by name.

  5. Clicking Cancel 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 must close the dialog box by typing the following in the command line: p_active_form._delete_window();

Adding an OK Button and Closing a Dialog Box

To add an OK button and close a dialog box, complete the following steps:

  1. Create a command button control by double-clicking Insert Button Control in the Properties dialog box.

  2. Set the caption property to OK, set the default property to TRUE, and set the name property to ctlok.

  3. 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 is displayed.

  4. Choose the lbutton_up event and click OK.

  5. If this is the first event handler for this dialog box, the Open dialog box for a new file to contain the source code for this dialog box is displayed. Type a unique file name. Usually this file name is derived from the name of the dialog box that you are creating, such as form1.e.

After completing the previous steps, the dialog editor inserts an event function definition into your source file and places your cursor in the function. Add the code as shown in the following example:

#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 "Displaying Dialog Boxes"  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.
}

Before closing a dialog box, review the following information:

  • First, if a modal dialog box returns a value, the value "" (zero length string) MUST be returned to indicate that 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.

  • 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

The show command is called in function-style syntax from within a macro. It can also be invoked from the command line or a menu item.

The command line call syntax is:

    show cmdline

The function call syntax is:

    show (cmdline [,arg1 [,arg2 ... [argN]]])

cmdline is a string in the format:

    [option] form_name

option can be one of the options in the table below.

Option | Description
-mdi | Keep the form on top of the MDI window.
-app | Keep the form on top of the 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. 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) This option causes the _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 does not work because the next time the form is used, the parent is not changed to the new parent specified.
-hideondel | (UNIX only) This option is the same as the -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

The array of args (arg1...argN) is passed to on_create.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 for non-string return types.

If the -modaloption 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="")
{
    _str tmpArg1 , tmpArg2;
   tmpArg1=arg(1);
   tmpArg2=arg(2);
   _message_box("arg1="arg1" arg2="arg2);
   _message_box("tmpArg1="tmpArg1" tmpArg2="tmpArg2);
}

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 -modaloption to the show command (see Displaying Dialog Boxes). 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 the previous example).

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);
}

If you need to display a status dialog box during processing, you might require a modeless dialog box so control is returned to you. However, it is a best practice to disable all other dialog boxes including the MDI window during 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 none 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 remains on top of the parent window. Use the show command and specify the -app option if you want to allow a modeless dialog box be displayed 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 Print and Spelling dialog boxes) to determine on which buffer to operate. This permits the 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. These dialog boxes only support certain parent windows. For example, the Print dialog box will not run correctly if the -app option of the show command is used.

Remembering a Dialog Box's Previous Position

The show command centers the dialog box to the current form or MDI window. Usually this is fine, but sometimes it is helpful for a dialog box to reappear in the same position that 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®

This section contains the following topics:

  • Clipboard Inheritance® Overview

  • Clipboard Inheritance® Example

  • Dialog Box Inheritance Order

Clipboard Inheritance® Overview

Clipboard Inheritance enables the transferring of objects from one place to another using the clipboard to create new instances that inherit the code of the original objects. Code for the new instances can be added that affects only the new instances, and code of the original instances can be modified, affecting both instances.

For example, you may want to create a group of controls that are needed by the SlickEdit® File Open dialog to allow the user to specify the various supported file formats. SlickEdit supports the following file formats:

  • 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.

  • Separator character - A single user-specified line separator character.

The following partial dialog box can be used to handle the file formats of SlickEdit.

Example:

// 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 user 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.
    }
}

Only the first radio button ctlopendos has an event handler defined. The other radio buttons use the form1.ctlopendos event table. This can be accomplished in the dialog editor using Clipboard Inheritance or, if the radio buttons are already created, you can set the p_eventtab property of the other radio buttons to form1.ctlopendos.

To use Clipboard Inheritance:

  1. Write the lbutton_up event code for the DOS radio button.

  2. Copy the DOS radio button to the clipboard.

  3. Paste it back onto the dialog box within the frame.

  4. Set the p_caption property for the new radio button to MAC.

Either of these methods can be used to fill an event table. When the ctlopendos.lbutton_up() function gets called, it gets and sets the properties of controls that exist on this dialog box.

Clipboard Inheritance® Example

For the Open dialog, Clipboard Inheritance® was created by copying controls to the clipboard and pasting them.

The Open File dialog box has the form name _edit_form. This dialog box is 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, the OK button code was replaced with new code. The Find File displays a dialog box which has all of the same advanced controls. The advanced controls were taken from the Open File dialog box (_edit_form) and all its related controls, and copied 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.

The following statement highlights 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 permits the modification of the event handlers for one specific instance of a control without affecting any other (except when Clipboard Inheritance® is used). The dialog editor automatically inserts the necessary function declaration code so that you need to only add statements within the function. After you write the event handler and load the new code, the p_eventtab property displayed in the Properties list box is 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.

SlickEdit® uses a pre-defined inheritance order called Dialog Box Inheritance Order. 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 SlickEdit® is searching for is a key event, check the dialog box user level 1 inheritance on the frame of the dialog box.

  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 the dialog box frame user level 1 inheritance.

  6. Check the dialog box frame 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.


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 image control, have a window id but do not allocate an operating system resource known as a window.

Topics in this section are:

  • Active Object

  • Active Form

  • Instance Expressions

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 the window id of another object. Accessing a property without specifying a control name or instance handle accesses the property of the active object and not the active form.

Note

Changing the active object does NOT change the focus. Use the _set_focus method to change the focus.

Active Form

Slick-C® has a p_active_form property that 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 is found by traversing through the parents (p_parent) of the active object until the form is reached.

Instance Expressions

The examples below display 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 space.
                        // This shows that multiple dots (".") may be used in an
                        // instance expression.
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 was 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 can be called as a method without any additional declaration data. The sample Slick-C® source below is an example of this feature.

#include "slick.sh"
defmain()
{
    // Call the tbupcase function as a method to operate on the SlickEdit
    // 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.
void 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);
}

The tbupcase is not defined to be a method of a particular class. This feature permits macros written in SlickEdit® text mode to be converted into SlickEdit macros and used as methods. Also, most functions are written to operate on the current object, meaning you have access to many methods. Using functions as methods is useful when writing dialog box event handlers. 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 ) can then be used to locate the source of the error.


Built-in Controls

Topics in this chapter:

  • 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

  • Scroll Bar Controls

  • Drive List Control

  • File List Box Control

  • Directory List Box Control

  • Picture Box Control

  • Gauge Control

  • Image Control

  • Adding Dialog Box Retrieval

Label Control

The label control is used to display text in any font. 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.

Labels can be aligned left or right, or centered horizontally and/or vertically. If you do not need to align the label, set the p_auto_size property to TRUE to ensure that the text fits inside the window. To center the label to a text box, select the label control and use the Up, Down, Left, and Right arrow keys.

On the Dialog Editor, click the Insert Label Control button [image] to place a label control on a form.

For a complete list of label control properties, methods, and events, from the main menu, select Help → Macro Functions by Category .

Spin Control

The most common use of a spin control is to increment or decrement a number displayed in a text box. This can be performed WITHOUT writing any code, by making the tab_index property of the text box one less than the tab_index property of the spin control. An error is displayed 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. To create a spin control, complete the following steps:

  1. Create the text box and then create the spin control.

  2. Turn off the auto_size property of the text box so you can make the height of the text box larger than the font.

  3. Use the spin control to increment or decrement the value in a gauge or scroll bar control or increment or decrement a hexadecimal number displayed in a text box. The default increment is 1. Set the increment property of the spin control to zero and process the on_spin_up and on_spin_down events. 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 an empty string ('') if you do not want to change the event.

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 of incrementing/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, from the main menu, select Help → Macro Functions by Category .

Text Box Control

The text box control enables the user to enter a single line of text. Editor control determines the number of lines that can be entered. Text boxes support completion with the spacebar and question mark keys. Set the completion property of the text box.The FILE_ARG completion type is the most common. It provides completion on file names. New commands can be written that 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 in the previous example to Alt+F12. This command works in all text boxes, edit windows, and editor controls. The key binding might not work in a text box if you bind the 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 → Options → Keyboard and Mouse → 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, from the main menu, select Help → Macro Functions by Category .

Editor Control

Editor control is used to enter multiple lines, view clipboards, to work with the calculator, and for version control comments. Almost all of the key bindings for an MDI edit window work in an editor control even when the emulation is changed. Use macro recording to write a new command that works in an edit window and editor control. Mark the Allow in non-MDI editor control check box when you finish recording the macro.

For a complete list of editor control properties, methods, and events, from the main menu, select Help → Macro Functions by Category .

Frame Control

Frame control is used to group a set of related controls. Radio buttons are placed inside of a frame control to indicate to 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 of a frame control:

  • Click the left mouse button on the bitmap in the Properties dialog box of the control that 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, from the main menu, select Help → Macro Functions by Category .

Command Button Control

The command button control is most typically used to create an OK, Cancel, or Help button.

For a complete list of command button control properties, methods, and events, from the menu, select Help → Macro Functions by Category .

Radio Button Control

Radio buttons must be grouped. When one radio button is enabled, the other radio buttons in the same group are not available. 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 display that the picture box control does not exist. Use one of the methods described under Frame Control to place a radio button inside a frame.

For a complete list of radio button control properties, methods, and events, from the main menu, select Help → Macro Functions by Category .

Check Box Control

A check box is used to set up a true or false option. Check boxes can be displayed to the left or right of the caption.

For a complete list of check box control properties, methods, and events, from the main menu, select Help → Macro Functions by Category .

List Box Control

A list box provides a way to select from a fixed set of items. Multiple items from the list can be selected at one time 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 _lbxxx functions cause an on_change event. Use the _find_longest_line() function to find the longest line in a list box.

The following 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.
       }
    }
}

The following 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 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.
    // 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();
}

The example below 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_xxx arguments are global variables defined in "slick.sh" which are
    // name table indexes to pictures. You can create and load your own pictures.
    // All the 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;
}

Finally, the example below 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, from the main menu, select Help → Macro Functions by Category .

Combo Box Control

A combo box is used in place of a text box for combo box retrieval, when only a fixed set of responses is permitted, or when a common set of responses are known and a different response may be typed in. Combo box retrieval is a mechanism in that the combo list box displays the previous responses entered in the text box of the combo box. The combo box has two style properties:

  • The PSCBO_NOEDIT style is used when only a fixed set of responses are allowed. Combo boxes support completion with the spacebar and question mark keys. Set the completion property of the combo box if there is an existing completion type that suits the needs.

  • The FILE_ARG completion type is the most common. It provides completion on file names.

The following example illustrates combo box retrieval. The example requires a form named "form1", an OK button named "ctlok", and combo box named "ctlcombo1":

defeventtab form1;
ctlok.lbutton_up()
{
    // When the OK button is pressed, you need 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 four 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.
vp_cb_picture.p_picture=_pic_cbdots;
}
ctlcombo1.lbutton_down()
{
    // Check if the left mouse button was clicked 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);
}

The following example requires a form named "form1", command button named "ctlok", 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 rather than 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.
    int 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 circumstances listed in the table below.

Reason | Description
CHANGE_OTHER | The p_text property changed, probably because of typing.
CHANGE_CLINE | The p_text property changed because selected line in list box changed and the list was visible.
CHANGE_CLINE_NOTVIS | The 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. 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 conditions listed in the table below.

Reason | Description
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 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, from the main menu, select Help → Macro Functions by Category .

Scroll Bar Controls

There are two scroll bar controls that operate similarly: vscroll and hscroll (vertical and horizontal, respectively). The scroll bar controls are used to provide the user an avenue for selecting an integer that has a fixed range or a way for displaying the completion status of a process. Set the min, max, small_change, and large_change properties to define the minimum integer value, maximum integer value, increment/decrement that occurs when arrows are pressed, and increment/decrement that occurs when you click the left button between the 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, from the main menu, select Help → Macro Functions by Category .

Drive List Control

The drive list is a combo box that 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, from the main menu, select Help → Macro Functions by Category .

File List Box Control

The file list box control displays a list of files. Multiple files can 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 circumstances listed in the table below.

Reason | Description
CHANGE_SELECTED | Occurs when items are selected or cleared because of a key press or mouse event. None of the _lb??? functions cause an on_change event.
CHANGE_FILENAME | The _filename() 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, from the main menu, select Help → Macro Functions by Category .

Directory List Box Control

The directory list box control displays a list of directories. A file list box receives an on_change event with one of the reason arguments listed in the table below.

Reason | Description
CHANGE_SELECTED | Occurs when items are selected or cleared because of a key press or mouse event. None of the_lb??? functions cause an on_change event.
CHANGE_PATH | The _dlfilename() function was called which changed the file names listed, the left mouse button was double-clicked, or Enter was pressed.

The following 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, from the main menu, select Help → Macro Functions by Category .

Picture Box Control

The picture box is 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. To display bitmaps and bitmap buttons, use the image control feature described in the topic Image Control.

For a complete list of picture box control properties, methods, and events, from the menu item select Help → Macro Functions by Category .

Gauge Control

Gauge control is typically used to indicate the completion status of a process.

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;
}

For a complete list of gauge control properties, methods, and events, from the main menu, select Help → Macro Functions by Category .

Image Control

Image control is for creating bitmap buttons or toolbar buttons. The image control performs a subset of the features of the picture box control.

Adding a Bitmap Command Button or Check Box

Perform the steps below to add a bitmap button to a dialog box. The same steps can also be used to add a check box.

  1. Create a new form for editing. From the main menu, select Macro → New .

  2. Create an image control. Double-click the Image Control bitmap.

  3. Set the p_picture property to bbfind.bmp. Make sure that you specify the full path (the default path used by the installation program is c:\vslick\bitmaps on Windows or /usr/lib/vslick/bitmaps on UNIX). In this step you enter the bbfind.bmp bitmap as an example.

  4. Set the p_command property to gui_find. 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.

Tip

The bb prefix indicates that this is a bitmap that can be used by a toolbar. You can edit the bbfind.bmp file with Paintbrush (pbrush.exe). Use bbblank.bmp as a template for creating your own bitmap buttons.

The following 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.bmp was not found");
       } else {
          _message_box("Error loading picture bbfind.bmp\n\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;
}

The following example illustrates 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.bmp was not found");
       } else {
          _message_box("Error loading picture bbfind.bmp\n\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) {
                p_value=1;    // Show the button pushed in.
             }
          } else {
             if (p_value) {
                p_value=0;    // Show the button up.
             }
          }
          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("");
}

Adding Dialog Box Retrieval

Dialog box retrieval enables previous responses for check boxes, radio buttons, spin boxes, text boxes, and combo boxes to be retrieved. Press F7 to retrieve the previous response, and F8 to retrieve the next response. For example, the Insert Literal dialog box contains a spin box that is used to enter the character code of the character to insert. If you use it to enter a Hex value of 0xAE (to insert a registered trademark symbol), then later use it to enter a Hex value of 0x99 (to insert an unregistered trademark symbol), the next time you use the dialog you can press F7 to retrieve the previous entry of 0xAE, and then F8 to retrieve the next entry of 0x99.

The responses to dialog boxes are saved for the next session when you exit the editor and auto-restore is enabled.

The example below 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);
}


Menus

You can create a new menu and change or add menu items by using the Menu Editor dialog box (Macro → Menus , select a menu to edit or click New). Or, to create a new menu, use the Open Menu dialog box (Macro → Menus ) and click New. 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, the Key Bindings option screen (Tools → Options → Keyboard and Mouse → Key Bindings ) is displayed which enables the binding of the new macro to a mouse click.

This section describes macro programming details about menus for advanced menu item enabling and for writing macros that manage menus. Topics are:

  • Menu Editor Dialog Box

  • Menu Item Alias Dialog Box

  • Auto Enable Properties Dialog Box

  • Creating and Editing Menu Resources

Menu Editor Dialog Box

The Menu Editor dialog is used for editing menu resources. Use the Menu Editor to modify the SlickEdit MDI menu bar or an existing menu resource which can be displayed as a pop-up or menu bar.

To access this dialog, from the main SlickEdit® menu, select Macro → Menus , then click Open to open a menu for editing, or New to create a new menu. 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 Advanced Appearance option screen (Tools → Options → Appearance → Advanced ) to choose between short and long key names.

For information about each field and option on the Menu Editor dialog, see "Menu Editor dialog" in the SlickEdit Help → Index . See Creating and Editing Menu Resources for information on creating forms with menu bars or advanced information.

Menu Item Alias Dialog Box

When you click the Alias button on the Menu Editor Dialog Box, the Menu Item Alias dialog is displayed. 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 is 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 identical to the edit command except that it prompts the user with a dialog box, whereas the edit command prompts for files on the command line. These two examples illustrate the best reasons for using aliases. See also "aliases" in the SlickEdit Help → Index for more information.

Auto Enable Properties Dialog Box

For convenience, SlickEdit® has some predefined 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 Creating and Editing Menu Resources for information on enabling and disabling menu items with your own callback. For information about each field and option on the dialog, see "Auto Enable Properties dialog" in the SlickEdit Help → Index .

Creating and Editing Menu Resources

Modified menus are stored in the state file vslick.sta (UNIX: vslick.stu) file. The easiest way to create or change a menu is to use the Open Menu dialog box (Macro → Menus ). After you select the menu, the Menu Editor Dialog Box is displayed and you can edit the menu resource. After the menu is created, use the show, mou_show_menu, or _menu_show function to run the menu by displaying it as a pop-up window. 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 the following topics:

  • Defining a Menu Resource

  • Predefined Attributes for Auto-Enabling Commands

  • Macro Callbacks for Enabling Commands

  • Placing a Menu Bar on a Form

  • Displaying a Menu as a Pop-Up

Defining a Menu Resource

Use the insert_object command to insert macro source code for a menu into the current buffer. Edit the resource properties and then run the macro to apply the resource changes. Ignore the message No main entry point if it is displayed. Changing a menu resource does not change any menu bars. Menu bars represent menu resources that have been loaded. 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
    }
    submenu
    }endsubmenu
    }

The table below contains the menu items and their definitions:

Menu item | Definition
menu_item | Menu item name in double quotes. Use & to choose selection character.
command | Any editor command. Places the cursor on the 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 | (pipe).
help_message | A single line message in double quotes displayed on message line.

Example of a menu definition:

_menu mymenu {
    submenu "&File", "Help file menu", "Displays File drop-down menu", "ncw" {
       "&New", "new", "ncw" , "help new", "Creates a new file to edit";
       "&Open\tCtrl+O", "gui_open", "help gui_open", "Open a file";
    }
    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

Predefined enabling or disabling attributes can be specified for any command. 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. The following command is disabled when there is no editor control on which to operate:

#include slick.sh
_command void top_of_buffer()
       name_info(',' VSARG2_READ_ONLY| VSARG2_REQUIRES_EDITORCTL)
{

}

Macro Callbacks for Enabling Commands

If the auto-enable attributes do not provide the features that you want, you can define the enable and disable callback for the command. The name of the callback function you define is based on the name of the command as shown in the following 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(R), 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 affects 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);
}

Placing a Menu Bar on a Form

The following sample code shows how to add 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 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 that are not allowed when there are 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 meets your needs, use one of them. The following sample code shows how to display a menu as a pop-up:

#include slick.sh
defmain()
{
    // Low-level code to display 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 Macro Dialog Boxes

There are several important macro dialog box forms and functions that you can use in your own macros. The table below lists the general purpose forms and dialog box functions.

Form | Description
_textbox_form | Displays a variable number of text boxes or combo boxes.
_sellist_form | Displays a list box, an optional combo box, and a variable number of command buttons.
_open_form | Used to open and save files that does not have the advanced controls.
_edit_form | Used to open and save files that has the advanced controls used for the File → Open dialog box.
_font_form | Used to prompt for a font.
_choose_font | (Non-UNIX platforms only) Dialog box built-in to operating system used to prompt for a font.
_printer_setup | (Non-UNIX platforms only) Dialog box built-in to operating system used for printer setup.

If a key displays a dialog box, you can find out the command the key executes by using the Key Bindings options screen (Tools → Options → Key Bindings ).


String Functions

The table below describes commonly used string functions. See Help → Macro Functions by Category → String Functions for a complete list.

See also documentation for the parse Statement.

Function | Description
_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.
_ 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 lowercase.
_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 | Breaks apart the expression expr given into variables that appear in template, and much more. See parse Statement for more information.
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 strieq(_str string1 ,_str string2 ) | Returns true if string1 matches string2 when case is ignored.
_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 length [,_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 uppercase.
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.


Search Functions

Two levels of search functions exist: high level functions that provide user interfacing and multiple file searching, and built-in functions that are used without affecting the high level search commands such as the find_next command. The built-in functions are not affected by the global editor search options.

The table below shows a list of commonly used search functions. For a complete list, see Help → Macro Functions by Category → Search Functions .

Function | Description
gui_find | Displays Find and Replace tool window open to the Find tab, and performs search using the find or _mffind functions.
gui_replace | Displays Find and Replace tool window open to the Replace tab, and performs search using gui_replace2 or _mfreplace functions.
gui_replace2 | Performs a 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 through the message line.
_mffind | Performs a multiple file and buffer search based on the arguments given.
_mfreplace | Performs a multiple file and buffer search based on the arguments given.
search | Performs a search, or search and replace, based on arguments given. Does not support wrapping to top or 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.

The following example searches for lines that 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;

}

The next 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);   // Insert a space at the beginning of the line

                               // because this will be inserted into a listbox.

       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",

              // Indicate next argument is view_id.

              SL_VIEWID|SL_SELECTCLINE,

              temp_view_id,

              "OK",

              "", // Help item.

              "", // Use default font.

              ""  // Call back function.

              );

    if (result) {

       message("Selection list cancelled");

    } else {

       message("Item selected is "result);

    }

}


Selection Functions

SlickEdit® supports multiple selections; however, only one selection can be active or visible. Selections are specified by handles. Most selection functions accept a selection handle. A handle of '' specifies the active selection or selection showing, that is always available.

The table below describes some common selection functions.

Function | Description
_alloc_selection | Returns a handle to a selection.
_free_selection | Frees a selection associated with the selection handle given. Note that it cannot free the active selection. To free the active selection, use _show_selection first.
_show_selection | Used to make another selection the active selection.
_duplicate_selection() | Returns the actual handle number of the active selection.

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(); // Save the selection id.
    old_active_mark_id= duplicate_selection();
    // 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));

For more information about selection functions, from the main menu, select Help → Macro Functions by Category , then click Selection Functions.


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.

The following 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"

_str hex_filt(string);

defmain()
{
    if (_select_type()=="" ) {
       message(get_message(TEXT_NOT_SELECTED_RC));
       return(TEXT_NOT_SELECTED_RC);
    }
    // Underscores 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);
}


Unicode and SBCS or DBCS Macro Programming

The following information applies for Unicode users only. When the code editor is running in UTF-8 mode (by default, vs.exe for Windows runs in this mode), buffers can contain either SBCS/DBCS data or UTF-8 data depending on how a buffer is loaded. To make it easier for macros to support these two buffer data formats, almost all macro functions accept and return UTF-8 strings. This allows most macros to automatically work. Macros that use or set column positions often do not work correctly for both buffer data formats. The solution is to call raw functions.

Example:

    // This will not work if the current buffer is an SBCS/DBCS buffer,
    // word is a UTF-8 string (that this example assumes), and word
    // contains characters above 127.
    p_col=p_col+length(word);
    // This will work.
    p_col=p_col+_rawLength(word);
    // This works too.
    word=_rawText(word);
    p_col=p_col+length(word);

Example:

    // This will not work if the current buffer is an SBCS/DBCS buffer and
    // the current line contains characters above 127.
    get_line(line);

    string=expand_tabs(line,p_col);
    // This works.
    get_line_raw(line);

    string=expand_tabs(line,p_col);
    // This works too, but is less efficient if all operations on line
    // can support raw data.
    get_line(line);
    string=expand_tabs(_rawText(line),p_col);

The _UTF8() macro function indicates if the code editor is in UTF-8 mode. The p_UTF8 property tells you whether the current buffer contains UTF-8 data. The p_encoding property indicates what format the buffer will be saved in by default.

Like typical programming languages (Java, C++), Slick-C® source files are code page dependant. Strings are converted from the current code page to UTF-8. This is important if you enter characters above 127. All of the macro functions and properties accept and return UTF-8. The Slick-C functions in the table below DO NOT accept or return UTF-8 data.

Function | Definition
_default_option(VSOPTIONZ_SPECIAL_CHAR_XLAT_TAB) | All other options for this function are UTF-8.
All seek functions: goto_point(), _QROffset(), _GoToROffset, _nrseek(), point(), and seek() | All seeking is done on raw data. Buffers need to be loaded in the same raw format so that seek functions work.
All _rawXXX() or XXX_raw() functions | Unlike the C API, the Slick-C functions get_text() and _expand_tabsc() return UTF-8 data.

The p_display_xlat Slick-C property DOES NOT accept or return UTF-8 data.

The following are the Slick-C raw functions:

  • _expand_tabsc_raw()

  • get_line_raw()

  • get_text_raw()

  • insert_line_raw()

  • _insert_text_raw()

  • replace_line_raw()

  • _rawLength()

  • _rawSubstr()

  • _rawText()

The table below shows the raw functions that optionally support raw data.

Function | Description
pos() | When p_rawpos appended to options argument.
lastpos() | When p_rawpos appended to options argument.
upcase() | When p_UTF8 property given as second argument.
lowcase() | When p_UTF8 property given as second argument.
parse | When p_rawpos appended to options of search argument.

The following are the Slick-C new UTF-8 functions:

  • _MultiByteToUTF8()

  • _UTF8()

  • _UTF8Asc()

  • _UTF8Chr()

  • _UTF8ToMultiByte()

The following C API functions DO NOT accept or return UTF-8 data:

  • The functions vsGetText(), vsGetRText(), vsExpandTabsC(), vsQSelectedTextLength(), vsGetSelectedText() - These functions always return raw data. Use the vsUTF8() function or check the VSP_XLAT property to determine if you need to translate the buffer data. Since these API functions assume that the maximum buffer length is the same as the read length, it would be useless for these functions to return translated data.

  • All seek functions (vsQOffset, vsQROffset, vsGoToPoint, and vsGoToROffset) - All seeking is done on raw data. Since the Context Tagging® database stores seek positions, buffers need to be loaded in the same raw format so that seek works.

  • All vsXXXRaw() functions.


Shelling Programs from a Slick-C® Macro

To execute another program from a Slick-C macro, use the shell built-in, the dos command, or the execute built-in. The latter method is similar to executing a command on the command line, and enables the creation of expressions that execute 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.

Example:

    // Capture the output of Slick GREP and process the error messages.
    dos("-e sgrep DEBUG *.c");
    // Redirect the output of sgrep to a file.
    shell("sgrep 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");


Interfacing With Other Languages (DLL)

SlickEdit products have a DLL interface for Windows. Use the Slick-C® macro language instead of the DLL interface except when you need an interface to the DLL in another program, when better speed is needed, or when the Slick-C macro language is missing a function that you want.

After a DLL function is added, call it from a Slick-C macro just like any other Slick-C function. DLL functions can be used for timer call backs and any place a Slick-C function is used.

To get started using the DLL interface, edit the simple.c file located in the samples\simple subdirectory of your installation directory. The VSAPI functions have the prefixvs.


Command Line Interface

This section describes how to write macros using the command line interface.

Command Line Arguments

When a command is invoked, the expression arg(1) contains the rest of the command line after the name with leading spaces removed. Alternatively, 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. When another macro calls a command, more than one argument string can be passed. Calling the arg function with no parameters returns the number of parameters with which the command or procedure was called.

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);
}

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.

get_string Procedure

The get_string procedure reads a single argument from the user.

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

Use the prompt procedure to write a command that 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, file execution does not continue.

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);
}


Hooking Startup and Exit

Invoking a Macro on Startup

To invoke any macro command defined by typing _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 start without changing any invocation options is to create a module with a definite entry point.

Invoking a Macro on Exit

If you want a function to be invoked when the editor exits, create a macro procedure with a name that has the prefix _exit_. To automatically invoke a macro when exiting SlickEdit®, use the following code:

_exit_cleanup_stuff()
{
    messageNwait("Got here");
}


State File Caching

By default, a module, event, dialog box template, or picture from vslick.sta (UNIX: vslick.stu) is not loaded until it is referenced. Using the definit primitive forces a module to be loaded when the editor is invoked. The default state file cache is about 200 K. You can set this size with the -st invocation option or with the Virtual Memory option screen (Tools → Options → Application Options → Virtual Memory ). 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 might have critical modules that you want permanently stored in memory. Place the no_code_swapping keyword at the top of the module to force the module to be loaded and permanently stored in memory on startup; then, if a critical disk failure occurs while reading the state file, the product is protected. A few modules that provide basic editing capabilities remain permanently in memory.


Windows Data Structure

The following diagram shows startup 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. If you attempt to leave the hidden window active, another window is 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.

A ring of buffers and a ring of windows are maintained, 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 tables in the following sections show some of the buffer and windowing built-ins that are available.

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. The command _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. The hidden window cannot be deleted.

A view holds the information necessary for the editor to remember the 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 do not use an option that overrides this), the active view information is saved in the non-active view of the buffer, and the buffer's new non-active view information is copied into the active view.

The following sections describe the contents of each structure.

Window Properties

Window Property | Description
p_window_x, p_window_y | Top left coordinates of window.
p_tile_id | Indicates that 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 (_next_window) | Window id of next window.
p_prev (_prev_window) | Window id of previous window.
p_child | Window id of child window.

View Properties

View Property | Description
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.

Buffer Properties

Buffer Property | Description
p_buf_name | Name of buffer.
p_buf_flags | Indicates whether a buffer is hidden and may specify other buffer options.
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.


Tutorials

This chapter contains the following sections:

  • Defining Stack Routines

  • Searching for a String Within a Current Function

  • Reading and Modifying Buffers

  • Working with Existing Macros

Defining Stack Routines

These examples show you what can be done in a language that supports typed variables and untyped container variables. The following example code shows how to define a set of stack routines in Slick-C® that 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.

}

The following example shows how a container variable can access structure members as an array:

/*

    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 were unable to come up with a

          // satisfactory function syntax so with went with a REXX-style syntax.

          // Place text up to but not including 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);

}

Searching for a String Within a Current Function

This macro can be used with many languages. It searches the current procedure or function for a specified string, with specified options. Use this macro in cases where references do not work, such as searching for a partial identifier name.

Several useful aspects of this macro, aspects that can be reused in other macros, are that it prompts the user for a string, it selects the current procedure, and it performs a search within the selection.

See the following sections:

  • Creating the Macro

  • Analyzing the Macro

  • Command Line Search Options

Creating the Macro

Complete the following steps:

  1. Enter the macro code below into a file called procsearch.e.

  2. To load the module, from the main menu, select Macro → Load Module .

  3. Bind the command proc_search to a key. To use the macro, press the appropriate key.

  4. In the Search string text box, enter the text to search for, and in the Options text box, enter the search options (see Command Line Search Options).

Contents of procsearch.e:

#include 'slick.sh'

_command int proc_search(...) name_info(','VSARG2_READ_ONLY|

                                 VSARG2_REQUIRES_EDITORCTL|

                                 VSARG2_MARK)

{

    // Save the original cursor position to restore later.

    typeless original_position;

    save_pos(original_position);

    // Prompt the user for a search string, and search options.

    _str result = show('-modal _textbox_form',

                    'Search Function',  // Dialog box caption.

                    TB_RETRIEVE_INIT,   // Flags.

                    '',                 // Use default text box width.

                    '',                 // Help item.

                    '',                 // Button list.

                    'procsearch',       // Retrieve name.

                    'Search string:',   // First prompt.

                    'Options:ixcs');    // Second prompt and default.

    if ( result=='' ) {

       // If the user clicked the Cancel button, just return.

       return(COMMAND_CANCELLED_RC);

    }

    // The results from the text boxes.

    _str search_string=_param1;

    _str search_options=_param2;

    int status=select_proc(); // Select the current proc.

    if ( status ) {

       // In rare cases select_proc can fail if a procedure is too complex.

       // If select_proc failed, show an error messages, return the cursor to the

       // original position, and return.

       _message_box(nls("select_proc failed"));

       restore_pos(original_position);

       message(get_message(status));

       return(status);

    }

    lock_selection();   // Lock the selection.

    begin_select();     // Move the cursor to the beginning of the selection.

    status=find(search_string,'m':+search_options);  // Find the text that the

                                                     // user specified using the

                                                     // options specified. We

                                                     // prepend the 'm' option

                                                     // since we know we are

                                                     // searching in a selection.

    if ( status ) {

       // If the search string was not found, deselect and return the cursor to

       // the original position.

       deselect();

       restore_pos(original_position);

    }

    // Just return the status. This will leave the proc selected so that

    // find_next works.

    return(status);

}

Analyzing the Macro

The save_pos() call at the beginning of the macro saves the current cursor position information. This function places the cursor in its original position if necessary.

The show() function launches a dialog box. In this case, the show() function launches a general purpose dialog box named _text box_form. The dialog box _text box_form prompts the user for one or more strings. After the first argument, the remaining arguments to show() pass to the on_create dialog box. In this case, there are several arguments.

The second argument to show() is the caption for the on_create dialog box.

The next argument is a set of flags. In this case, the only flag specified is TB_RETRIEVE_INIT. The TB_RETRIEVE_INIT flag tells the dialog box to initialize itself by retrieving the last values filled in for this dialog box.

Use the next three arguments to specify text box width, help, and a button list. These particular arguments are unused in this example, which is why they are shown here as ''.

The retrieve name is a unique name used to retrieve the values that were previously filled in for this dialog box. Any remaining arguments are interpreted as prompts for the user. Default values can be given by specifying the prompt as prompt:defaultvalue. The first prompt is the search string, and the second is for search options. The options have default ixcs, meaning case-insensitive, and exclude comments and strings. See the following section for a list of command line search options.

After the call to show, verify that the result is ''. If so, then the user clicked the Cancel button, so we return. Otherwise, SlickEdit® must obtain the values that the user provides. These values are returned in global variables _param1.._param N. In this case, our search string is returned in _param1, and the search options are in _param2. These are saved in local variables.

SlickEdit calls select_proc to select the current function. If select_proc returns a non-zero status, then it failed, so it is returned. In rare cases, select_proc can fail if a function is too long, or has preprocessing that keeps it from correctly identifying the end of the function.

Next, lock_selection() is called, and then begin_select() is called to move to the beginning of the selection.

Now, we can call find() with the search string and the search options from the user. Insert m at the beginning of the options string to specify search only in the selection.

Finally, check the status from find. If the string is not found, clear the function and restore the original cursor position.

Command Line Search Options

Command line search options include the characters listed in the table below.

Option | Description
+ | (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.
R | Search for SlickEdit® regular expression.
U | Interpret string as a UNIX regular expression.
B | Interpret string as a Brief regular expression.
N | (Default) Do not interpret search string as a regular search string.
@ | No error message.
W | Limits search to words such as variable names.
, | Delimiter to separate ambiguous options.

Reading and Modifying Buffers

Slick-C® includes the Slick-C API. The API covers many actions normally performed in a code editor, including navigating and modifying buffers.

Topics in this section:

  • Functions for Reading and Modifying Buffers

  • Common Functions for Navigating Buffers

  • Escape Backslashes Example

  • Comment Out Debug Print Lines Example

Functions for Reading and Modifying Buffers

The table below contains functions for reading and modifying buffers. This table focuses on one particular category of the API, those functions that allow you to programmatically traverse and modify buffers. These powerful functions enable you to take tasks that you can do manually, and create a macro to perform the same tasks in seconds.

Function | Action
_str cur_word( int & start_col [, _str from_cursor ]) | Gets the current word at cursor.
int delete_line() | Deletes the current line.
void _delete_text( int len ) | Delete len bytes starting from the cursor position.
void get_line( _str & line ) | Retrieves current line.
_str get_text([int count [,int seek_pos ]]) | Gets a stream of text starting at current line.
void keyin( _str string ) | Inserts string of characters as if typed from the keyboard.
void insert_line( _str line ) | Inserts line after current line.
void _insert_text( _str string ) | Inserts string at cursor position.
void replace_line( _str line ) | Replaces current line.

Common Functions for Navigating Buffers

The table below contains functions that can be used for navigating buffers.

Function | Action
int up( [int num ] ) | Moves cursor up num lines, or one line if no value passed in.
int down( [int num ] ) | Moves cursor down num lines, or one line if no value passed in.
void left() | Moves cursor one position to the left.
void right() | Moves cursor one position to the right.
void top() | Places cursor at first line and first column of buffer.
void bottom() | Places cursor at end of last line of buffer.
void _begin_line() | Places cursor at the beginning of the current line.
void _end_line() | Places cursor after the end of the current line.

Escape Backslashes Example

Escape backslashes if, for every slash in a directory name, you actually need two for the compiler to handle the directory name or string properly.

Example:

_command escape_slash(){

    _str myLine;

    get_line(myLine); // Set string szLine to the current line.

    myLine = stranslate(myLine, "\\\\", "\\"); // Replace slash with double

                                               // slashes.

    replace_line(myLine); // Replace the line in the buffer.

}

The above command accepts the following line of code:

myDirectory = "C:\Data\Corporate\Internal";

and replaces it with:

myDirectory = "C:\\Data\\Corporate\\Internal";

Comment Out Debug Print Lines Example

Print or debug statements can be used to debug. These statements need to have supporting comments or they must be deleted. The following example shows a simple function that loops through your entire file. It contains supporting comments for all of the lines that have a printf statement:

_command comment_printf(){

    _str curLine;

    top(); // Go to top of buffer

    up();  // Get to the top line

    while ( !down() ) {                    // Loop until end of file.

       get_line( curLine );                // Get the current line.

       if( pos( "printf", curLine ) ){     // Search for a printf.

          _begin_line();                   // If printf exists, move cursor to the

                                           // first column.

          _insert_text( // );              // Add a comment.

       }

    }

}

The function uses many of the buffer modifications and navigation macros. It loops line-by-line through the file, checks for a string, and adds a comment when necessary. Modify this macro to meet your needs. For example, if you want the lines deleted instead of commented, replace the _insert_text() call with delete_line(). Also, check to see if the comment characters already exist before you add the comment text. Instead of calling _begin_line, call begin_line_text_toggle'this places the cursor at the first non-space character of a line. Next, check if you are in a comment by calling _in_comment().

Working with Existing Macros

Every time you select a menu, click a button, or enter a key, a Slick-C® macro is called to perform an action. More than half of the code in SlickEdit products is written in Slick-C and this source is provided to you when you install, so you can tweak the product or use the Slick-C source as an example to help write your own macros. By default, the Slick-C source is located in the macros subdirectory of your SlickEdit® installation folder.

To make a macro change, or to recycle existing code, you need to know how to find a name to a particular command and how to find its location in the source code. These examples will walk you through the steps:

  • Example: Turning on Line Numbers for All Files

  • Example: Counting Lines of Code

Example: Turning on Line Numbers for All Files

SlickEdit® includes a line number toggle option to turn line numbers on and off for each edit window. This option is located on the View menu (View → Line Numbers ). By default, all files are displayed without line numbers. When you enable them, they are enabled throughout sessions until you disable them. SlickEdit also provides an option to enable line numbers on a language-specific basis (Tools → Options → Languages → [Language Category] → [Language] → General ).

To automatically turn on line numbers for all files that are opened or created in SlickEdit regardless of the language, you will need to write a macro, as outlined in the subsequent sections:

  • Find the Command Definition

  • Create the New Macro

  • Load the Macro

  • Results

Find the Command Definition

You need to find the command that is associated with View → Line Numbers in order to view its source code, so that you can obtain the function you®ll be using in your new macro.

To determine the command that is associated with View → Line Numbers :

  1. Close any open files.

  2. From the main menu, select Macro → Menus . The dialog box contains a list of all menus. To view the main menu, select _mdi_menu and click Open. The Menu Editor dialog is displayed.

  3. Navigate to View → Line Numbers . When you select Line Numbers, certain fields in the dialog box are populated. The Command field is populated with the Slick-C® command that is invoked when this menu item is selected. In this case, the command is view-line-numbers-toggle. Every time that you click View → Line Numbers from the main menu, view-line-numbers-toggle is called.

    To view the source code for the view-line-numbers-toggle command:

  4. From the main menu, click Macro → Go to Slick-C Definition .

  5. Start typing view, and select view_line_numbers_toggle() from the drop-down list, then click OK.

  6. By viewing the source, it is a simple "if on then off, else on" algorithm, using bitwise logic. Note that you will need to use p_LCBufFlags|=VSLCBUFFLAG_LINENUMBERS in your new macro to enable the display of line numbers.

Create the New Macro

  1. Create a new empty file named DisplayAllLines.e.

  2. Copy and paste or type the following code into the file:

#include "slick.sh"

void _buffer_add_ViewLineNumbers()

{

    p_LCBufFlags|=VSLCBUFFLAG_LINENUMBERS;

    p_line_numbers_len = _default_option(VSOPTION_LINE_NUMBERS_LEN);

}

Any Slick-C macro that starts with _buffer_add_ is called when a new edit window is displayed. To enable the numbers for every file, use the logic from Step 5 above.

Load the Macro

The new macro needs to be loaded. To load the macro, from the main menu, select Macro → Load Module → DisplayAllLines.e .

If the macro was loaded properly, the message Modules loaded is displayed in the SlickEdit® message line. If an error message is displayed, the macro did not load and the change did not take effect. Correct the error and load the macro again.

Results

Now every new file opened has line numbers. If any files were left open at the beginning, close and reopen them and they will all have line numbers.

To remove the functionality that turns on line numbers for all files, you need to unload DisplayAllLines.e: From the main menu select Macro > Unload Module. Select DisplayAllLines.ex from the list and click OK. The list shows a .ex extension on the module instead of a .e because you are actually compiling the source file into a binary file (.ex) and loading it, not the actual source code.

Example: Counting Lines of Code

The number of lines of code in your workspace, projects, or files is often used to measure and analyze performance, and can be determined by using a macro.

This example describes a macro, linecount.e, that loops through all projects in the current workspace and all files within each project in the current workspace, and then displays a report in a new editor window.

You can obtain linecount.e from the SlickEdit Web site at www.slickedit.com in the Slick-C® Documentation section. Line numbers referenced in the subsections below:

  • Gather Workspace, Project, and File Information

  • Loop and Count

  • Create the Report

  • Load the Macro

  • Run the Macro

Gather Workspace, Project, and File Information

Get a list of all projects and files in the workspace. _GetWorkspaceFiles() (Line 88) gets the list of all projects in a workspace and places the list in a temporary buffer. The loop following (Lines 93-95), parses through the buffer and stores the information in a temporary array for later reporting. This array, defined in Line 67, is a three-dimensional array to store multiple projects, and multiple files per project.

Loop through each project, starting at Line 98, and fill the array with all file names for each project. GetProjectFiles() does this by placing the list in a temporary buffer. Grab the names from the buffer and put them in the array (Lines 109-124).

Loop and Count

For each project, open up a temporary buffer for each file in the project. Think of it as an invisible buffer where you can move the cursor programmatically to check whether it is in a comment.

  • _open_temp_view (Line 139) opens it.

  • up() and top() (Line 158) places the cursor at the top to start.

  • down() (Line 161) will move the cursor down one line at a time.

Loop through the file to read one line at a time, as mentioned above (Lines 161-202). This validates whether the current line is in a comment (Line 171), and if not, it increments the counter. If the current line is in a comment, the next step is to jump to the end of the comment or comment block (Line 168). Another check is made to see if the current line is in a comment and count it if it is not a comment.

Create the Report

All of the information is now stored in an array, so the next task is to generate a report and loop thru the array to display the results. This is done in Lines 220-263.

The displayResultsInBuffer flag can be changed to false to only display the total lines in the entire workspace.

Now that you understand the macro, the next steps are to load and run it.

Load the Macro

To load linecount.e, be sure to save it to your local hard drive, then from the main menu, click Macros → Load Module . Find linecount.e and click Open.

Run the Macro

You can now run the macro. There are several ways to run macros: from the command line, through a menu item, or by using a keyboard shortcut.

To run the macro from the command line:

  1. Open the command line by pressing Esc or by clicking in the message line area.

  2. Type linecount and press Enter.

To associate the macro with a menu item:

  1. Select Macro → Menus , then select menu on which you want to add the macro. For example, to add the macro to the right-click context menu, select _ext_menu_default.

  2. Click Open.

  3. In the Menu Editor dialog, click Insert to add a new menu item.

  4. Type a new Caption, set the Command to linecount. Use the Up and Down buttons to move the new item to the desired location in the list. Type "Menu Editor dialog box" in the Help Index (Help → Index ) for more information about using the Menu Editor.

To associate the macro with a key or key sequence:

  1. From the main menu, click Tools → Options → Keyboard and Mouse → Key Bindings .

  2. Find a key sequence that is not used®do not bind keys that are bound. To determine if a key or key sequence is already in use, place the focus in the Search by key sequence field and press the key/key sequence you want to check. For example, press Enter and the table will be filtered to show all commands bound to the Enter key.

  3. After determining the key or key sequence you want to use for the new binding, close the Options dialog.

  4. From the main menu, click Macro → List Macros .

  5. Select linecount, then click Bind to Key. The Key Bindings option screen is displayed with linecount selected.

  6. Click Add and when the Bind Key dialog appears, type the key sequence to bind.

  7. Click Bind, then OK.


Events

This section contains the topics:

  • Event Names

  • Keys

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 an event handler function. An event name is a string literal of a length of one or more. An event name string of a length one specifies an ASCII character. To keep the macro source compatible, some event names do not have to be enclosed in quotes as long as the _ (underscore) character is used instead of the - (dash) character. The following sections list the acceptable constants.

Keys

This section contains the following topics:

  • ASCII Characters

  • Function Keys

  • Extended Keys

  • Miscellaneous Keys

  • Key Name Examples

  • Mouse Events

  • on Events

ASCII Characters

Acceptable ASCII characters are \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 following keys:

  • C-A

  • C-B..C-Z

  • C-[,C-\\,C-]

  • C-^

  • C-_

The ASCII keys \129..\255 are the same key binding as \128.

Function Keys

Acceptable function keys are F1, F2, and F12.

Extended Keys

Acceptable extended keys are the following:

  • Backspace

  • Delete

  • Down

  • End

  • Enter

  • Escape

  • Home

  • Insert

  • Left

  • Pad_5

  • Pad_Minus

  • Pad_Plus

  • Pad_Slash

  • Pad_Star

  • PageDown

  • PageUp

  • Right

  • Tab

  • Up

Miscellaneous Keys

Acceptable miscellaneous keys are

  • C-A-Enter

  • C-A-Tab

  • C-A-Esc

  • C-A-Backspace

  • C-PrtScn

  • C-Ctrl

  • A-Alt

Key Name Examples

The following are examples of uses for key names in the Slick-C® language:

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 lowercase.
{
}
void p()
{
   for (;;) {
      key=get_event();
if (key:==name2event("ESC") break;
      if (key:==name2event("UP")) {
          ...
      } else if (key:==name2event("DOWN") ) {
          ...
      }
   }
}

Mouse Events

The following are acceptable mouse events.

  • lbutton_double_click

  • lbutton_down

  • lbutton_triple_click

  • lbutton_up

  • mbutton_double_click

  • mbutton_down

  • mbutton_triple_click

  • mbutton_up

  • rbutton_double_click

  • rbutton_down

  • rbutton_triple_click

  • rbutton_up

on Events

Below is a list of the on events. The acronyms "hsb" and "vsb" stand for horizontal and vertical scroll bar, respectively. ]

  • 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_spin_down

  • on_spin_up

  • on_sscroll_lock

  • 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

Miscellaneous Events

on_select is an acceptable miscellaneous event.


Chapter 15. Glossary

3-Way Merge

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 takes both sets of changes and creates a new source file. A wizard lets you select the change desired in the output file. The output can be viewed side-by-side or interleaved.

API

Application Programming Interface. A functional interface that allows an application program written in a high-level language to use specific data or functions of the operating system or another program. An API is the set of programming language constructs or statements that can be coded in an application program to obtain the specific functions and services provided by an underlying operating system or service program.

Binding

The attachment of a command to a key.

Bookmark stack

An internal list of pushed bookmarks.

Breakpoint

A point designated in the code to break or stop during a debug. View a list of all breakpoints in the Task view.

Buffer

A file that has been loaded into the application. When a file is loaded, you can safely perform modifications to the buffer without modifying the file on disk until you save the buffer.

Class

A compiled Java source file.

Clipboard

A temporary storage area used to transfer text or dialog box controls from one place to another. Multiple text clipboards are available to store multiple instances of copied material.

Code block

A syntactical set of code that is delimited by a specific begin and end. These include if, for, function defines, areas between braces, etc.

Context Tagging®

A feature set that performs expression type, scope, and inheritance analysis as well as symbol look-up within the current context to help you navigate and write code. Context Tagging uses an engine that parses your code and builds a database of symbol definitions and declarations®commonly referred to as tags. Context Tagging features work with your source code, not just standard APIs (application program interfaces), and the features are dynamic, in the sense that symbols are updated immediately or in the background as you edit your source code.

CVS

An open-source, network-transparent version control system.

DIFFzilla®

Allows you to view and merge changes from one version of a file to another. Difference two files, two directories or two source trees. Provides the ability to view and merge differences for specific symbols such as functions or classes, or a specified range of lines, from two files or the same file.

Edit window

A rectangular viewing area used to display and edit buffers.

Emulation

The ability of a program or device to imitate another program or device. Change the keyboard bindings or shortcuts to emulate favorite shortcuts. Thirteen emulations available.

Enscript

Enscript is an external, command line program that prints a text file to a printer using PostScript, which allows for print formatting such as font, page layout, margins, colors, etc. Enscript is included in most Linux distributions. However, it is also shipped with SlickEdit® to ensure availability of the program.

FLEXnet® Publisher

Licensing option for multiple users on a server.

Function heading

A term that refers to both the function signature and the comment above it. A function signature is the first line (typically) of a function that contains the function name and the parameters. This can spread across multiple lines, but is still considered one Line of Code (LOC).

Hotkey

A keyboard shortcut that is bound to a menu item.

IDE

Integrated development environment. A set of software development tools such as editors, compilers, and debuggers, that are accessible from a single user interface.

Incremental search

Allows searching as letters are typed.

Key binding

A key or combination of keys that a user can press to perform an action that is available from a menu. Also known as a shortcut key.

List Members

A SlickEdit Context Tagging feature that automatically lists members when you type a member access operator. Also access this feature by pressing Alt+Dot.

List Parameters

A SlickEdit Context Tagging feature that displays a list of compatible variables and expressions for the current argument when you type a function operator. For performance reasons, not all possible variables and expressions are listed. Press Alt+Dot if the symbol you want is not listed. To access Auto List Parameters on demand, press Alt+Comma.

Parameter Info

Automatically displays the prototype for a function when you type a function operator, and highlights the current argument within the displayed prototype.

pcode

The binary result of a translation of Slick-C® source code. The translation is done to speed up the interpretation of source code.

Project

A group of folders, files, classes or packages.

Refactoring

A comprehensive code editing feature to help improve, stabilize, and maintain code. It allows a system-wide coding change without affecting the semantic behavior of the system.

Run-time

The time period that a computer program is executing. A run-time environment is an execution environment.

Schema

In database programming, the representation of a database that will be mapped.

Selection

A highlighted region of text typically operated by a command which affects only the region. In the dialog editor, the selection is indicated by eight square handles which surround the control.

Selective Display

A SlickEdit feature that allows you to select which lines are visible or hidden based on the content of the lines. Also known as code folding.

Slick-C®

The SlickEdit macro programming language.

SmartPaste®

Pasted or dropped source code is automatically re-indented to the correct indentation level.

Source folder

A folder that contains packages, classes, and files.

State file

A file that stores configuration information and allows quick state restoration in subsequent edit sessions.

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.

Workspace

A workspace defines a set of projects and retains the settings for an editing session.


Chapter 16. API Documentation

Macro Functions By Category

C Functions By Category


Welcome to SlickEdit 2010

SlickEdit Inc.
3000 Aerial Center Parkway Suite 120
Morrisville, NC 27560 USA

1.919.473.0070
1.800.934.EDIT (USA)
1.919.473.0080 fax

www.slickedit.com

Information in this documentation is subject to change without notice and does not represent a commitment on the part of SlickEdit Inc. The software described in this documentation is protected by U.S. and international copyright laws and by other applicable laws, and may be used or copied only in accordance with the terms of the license or nondisclosure agreement that accompanies the software. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement. No part of this documentation may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than the licensee's personal use, without the express written permission of SlickEdit Inc.

Copyright 1988-2010 SlickEdit Inc.

SlickEdit, Visual SlickEdit, Clipboard Inheritance, DIFFzilla, SmartPaste, Context Tagging, Slick-C, and Code Quick | Think Slick are registered trademarks of SlickEdit Inc. All other products or company names are used for identification purposes only and may be trademarks of their respective owners. Protected by U.S. Patent 5,710,926.

SE-1301-061108


0

_command void 0(_str LineNumber='')

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.

Parameters:

LineNumber -

Applies To:

Edit Window, Editor Control

Example:

Command Line Example

100
Moves cursor to line 100.

Category:

CursorMovement Functions

See Also:

goto_line, p_RLine, p_line, gui_goto_line


_a2e

_str _a2e(_str string)

Convert ASCII character to EBCDIC.

Parameters:

ASCII - character.

Returns: _str

EBCDIC character.

Category:

String Functions


_adjust_block_selection

int _adjust_block_selection(_str markid="")

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_alloc_selection

int _alloc_selection(_str option="")

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.

Parameters:

option -

Returns: int

A handle to a selection of a bookmark.

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);

Category:

Selection Functions

See Also:

_free_selection, _show_selection


_AllocColor

int _AllocColor(int fg=0x000000, int bg=0xffffff, int fontFlags=0, int parent_color=0)

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.

Parameters:

fg_color - foreground color (RGB)

bg_color - background color (RGB)

font_flags - is one of the following font flags:

  • F_BOLD
  • F_ITALIC
  • F_STRIKE_THRU
  • F_UNDERLINE
  • F_INHERIT_STYLE

parent_color - color to inherit attributes from

Example:

int gColorIndex;
definit()
{
     if (arg(1)=='L' && gColorIndex) return;
     gColorIndex=_AllocColor(0xffffff,0xFF0000);
     //_default_color(gColorIndex,0xffffff,0xFF0000);
}
defmain()
{
     // Change the color of 5 bytes of text starting from cursor
     _SetTextColor(gColorIndex,5);
}

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_FreeColor, _SetTextColor, _GetTextColor, _default_color, _rgb


_append_retrieve

void _append_retrieve(int ctl_wid, _str value, _str ctl_name='')

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.

Parameters:

ctl_wid - the window id (p_window_id) of the control. The default object_name is form_name.ctl_name.

value - the text of a combo box or text box. For a button control, value is 0 or 1.

ctl_name - an override name for the combo box

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();
}

Category:

Retrieve Functions


_arrange_icons

void _arrange_icons()

Arranges the iconized MDI edit windows.

Applies To:

MDI Window

Example:

  _mdi._arrange_icons();

Categories:

MDI Window Methods, Window Functions


_asc

int _asc(_str character)

Returns the ASCII code corresponding to the ASCII character given.

Parameters:

character - input character for which code is returned

Returns: int

the ASCII code corresponding to the specified character

Example:

_asc('A') :== 65

Category:

String Functions

See Also:

_chr


_assert

_str _assert(boolean condition, _str msg=null)

Tests the given condition and produces a Slick-C stack if the condition fails, reporting the message, if specified.

Example:

_assert(1+1==2);

Category:

Miscellaneous Functions

See Also:

_StackDump


_autoclipboard

void _autoclipboard()

If the def_autoclipboard variable is true and the current buffer has a selection, it is copied to the clipboard.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_b2k_bind

int _b2k_bind(_str command, _str key_sequence, _str effect_all_modes, _str options='')

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.

Parameters:

command -

key_sequence -

effect_all_modes -

Returns: int

Returns 0 if successful. Can fail if incorrect parameters given.

Applies To:

Edit Window, Editor Control

Category:

Keyboard Functions


_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

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.

Returns:

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.

Applies To:

Edit Window, Editor Control

Categories:

Forms, Keyboard Functions


_bas_extform

Displays Visual Basic Options dialog box which is used for modifying the extension specific options for the Microsoft Quick Basic language.

Category:

Forms


_bbhelp

void _bbhelp(_str option, int parent_wid=0, int x=0, int y=0, _str msg="", _str FontName="", int FontSizex10=0, int FontFlags=0, int rgbfg=0x80000000, int rgbbg=0x80000000, int padding=BBINDENT_X)

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.

Parameters:

option - options

parent_wid - parent window ID

x - x-position

y - y-position

msg - message to display

FontName - font to use

FontSizex10 - FontSizex10 is the size of the font in points multiple by 10 (ex. 100 specifies a 10 point font).

FontFlags - FontFlags is a combination of the following flag constants defined in "slick.sh":

  • F_BOLD
  • F_ITALIC
  • F_STRIKE_THRU
  • F_UNDERLINE

rgbfg - foreground color

rgbbg - background color

padding - extra padding on left and right

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


_beep

void _beep(int frequency=-1, int duration=-1)

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, the frequency and duration parameters are ignored.

Parameters:

frequency - frequency of tone in hertz

duration - duration of tone in milliseconds

Category:

Miscellaneous Functions


_begin_char

boolean _begin_char()

Places cursor at the beginning of the current character. This function supports DBCS and UTF-8 buffers with composite characters.

Returns: boolean

Returns true if the cursor moved.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


_begin_identifier

_str _begin_identifier()

Move the cursor to the beginning of the identifier under the cursor. Does not move the cursor if there is no identifier under the cursor, and returns '' in that case.

Returns: _str

Returns the current identifier.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_begin_line

void _begin_line()

Places cursor at column 1 of current line.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

_end_line


_begin_select

int _begin_select(_str markid="", boolean LockSelection=true, boolean RestoreScrollPos=true)

Places cursor on first character of selection specified. If the selection type is LINE, the cursor is moved to the first line of the selection and the column position is unchanged.

Parameters:

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.

LockSelection - When true, the selection is extended to the cursor and the select is locked (moving the cursor will no longer remove or extend the selection).

RestoreScrollPos - When true, the cursor y and left edge scroll positions are restored if possible (window size could be smaller and y be outsize window height).

Returns: int

Returns 0 if successful. Possible return values are TEXT_NOT_SELECTED_RC or INVALID_SELECTION_HANDLE_RC. On error, message is displayed.

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_begin_select_compare

int _begin_select_compare(_str markid="")

Compares current line position to first line of mark specified.

Parameters:

markid - 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.

Returns: int

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

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

_end_select_compare


_BookmarkAdd

void _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="")

Adds a new bookmark.

Parameters:

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.

Category:

Bookmark Functions

See Also:

_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkFind

int _BookmarkFind(_str BookmarkName, int vsbmflags=VSBMFLAG_STANDARD)

Finds bookmark index.

Parameters:

pszBookmarkName - Name of bookmark to find. vsbmflags One or more of these flags must be in the bookmark found.

Returns: int

Returns index of boomark 0..vsBookmarkQCount() or -1 to indicate the bookmark was not found.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


_BookmarkGetInfo

int _BookmarkGetInfo(int i, _str &BookmarkName=0, int &markid=0, int &vsbmflags=0, int &buf_id=0, int determineLineNumber=1, int &RealLineNumber=0, int &Col=0, long &BeginLineROffset=0, _str &LineData="", _str &Filename="", _str &DocumentName="")

Retrieves information for a bookmark.

Parameters:

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.

determineLineNumber -

RealLineNumber - Set to real line number of bookmark. Specify NULL if you don't need this value.

Col -

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.

Returns: int

Returns 0 or TEXT_NOT_SELECTED_RC if successful. TEXT_NOT_SELECTED_RC indicates that the bookmark is not active. This occurs when a buffer with bookmarks is closed.

Category:

Bookmark Functions

See Also:

_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkQCount

int _BookmarkQCount()

Counts the number of bookmarks.

Returns: int

Returns the number of bookmarks.

Category:

Bookmark Functions

See Also:

_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkRemove

void _BookmarkRemove(int i, int free_markid=1)

Deletes a bookmark.

Parameters:

i - Index of bookmark where 0<=i<_BookmarkQCount().

free_markid - When non-zero, _free_selection is called for the markid belonging to this bookmark.

Category:

Bookmark Functions

See Also:

_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkRestore

void _BookmarkRestore(int vsbmflags=-1)

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.

Parameters:

vsbmflags - One or more of these flags must be in the bookmark for the bookmark to be restored.

Category:

Bookmark Functions

See Also:

_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_bottom_height

int _bottom_height()

Returns height in p_xyscale_mode of the bottom border of the window.

Returns: int

the height of the window

Applies To:

Form

Categories:

Form Methods, Miscellaneous Functions

See Also:

_top_height


_buf_transfer

int _buf_transfer(int src_buf_id, int start_linenum=1, int end_linenum=-1, int start_col=0, int end_col=0)

Copies specified area of source buffer to the current buffer. 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.

Parameters:

src_buf_id -

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.

Returns: int

Returns 0 if successful. Otherwise, message box error is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


_bufname2ext

_str _bufname2ext(_str buf_name)

Deprecated. Use _Filename2LangId()

Returns the canonical file extension for the given file.

If the file's actual extension extension matches an _[ext]_Filename2LangId() callback, it will first try the callback to see if the file, based on it's path or name should be referred to an alternate extension.

Otherwise, if the file's actual extension matches a suffix_[ext] callback, it will open the file in a temporary view and call _SetEditorLanguage to determine the file's actual language type.

Parameters:

buf_name - file name and path to test

Returns: _str

Returns referred extension for buffer name, using _Filename2LangId.

Category:

Miscellaneous Functions

See Also:

get_extension, _Filename2LangId, _Ext2LangId


_bufnameNmode2ext

_str _bufnameNmode2ext(_str file_name, _str buf_mode_name)

Deprecated. Use _Filename2LangId() or _Modename2LangId()

Returns the language that should be used to lookup language specific information for the mode buf_mode_name specified. If no language data has a mode name of buf_mode_name the language associated with the file_name specified is returned.

Many macros ignore the mode name property and use the extension on the buffer name to determine language specific options. It is more correct to use this function to determine the language ID to used to lookup language specific information.

Parameters:

file_name - File name (and path)

buf_mode_name - Expected mode name, see p_mode_name

Returns: _str

The language ID that should be used to lookup language specific information for the mode buf_mode_name specified. If no language data has a mode name of buf_mode_name the language associated with the file_name specified is returned.

Category:

Miscellaneous Functions


_BufSetFlags

void _BufSetFlags(int buf_id, int BufFlags)

Sets the buffer flags for the buffer specified.

Parameters:

buf_id - Buffer id

BufFlags - Flags (combination of VSWBUF

Category:

Buffer Functions


_cache_size

_str _cache_size(_str cmdline=null)

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, SlickEdit's cache is 3 times faster than the operating system cache. This means that you will want SlickEdit's buffer cache size small enough that the operating system does not swapping memory 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.

Parameters:

cmdline - is a string in the format: buffer_ksize [state_ksize ]

Returns: _str

A string of the current cache size values is returned. On error message, is displayed.

Category:

File Functions


_calc_form

Displays Calculator dialog box.

Example:

Syntax void show('_calc_form')

Category:

Miscellaneous Functions


_callmethod

typeless _callmethod(_str indexOrName, ...)

Call the given class method and return it's result.

Parameters:

indexOrName - Name or names table index of method to call.

argument1 - first argument for method

argument2 - second argument for method

Returns: typeless

Returns the return value of the given method.

Example:

class AAAA {
   void saySomething() {
      message("something");
   }
};
int testCallMethod() {
   AAAA a;
   a._callmethod("saySomething");
   index := a._findmethod("saySomething");
   if (index_callbale(index)) {
      a._callmethod(index);
   }
}

Category:

Miscellaneous Functions

See Also:

_findmethod, call_index


_cascade_windows

void _cascade_windows()

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();

Category:

MDI Window Methods


_cbi_search

int _cbi_search(_str case_sense='', _str search_string='')

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.

Parameters:

case_sense - 'e' for a case-sensitive search, 'i' for case-insensitive

search_string - pass '$' for an exact match

Returns: int

Returns 0 if text in combo box is found.

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();
     }
}

Applies To:

Combo Box

Category:

Combo Box Methods


_sddir_list.on_create

typeless _sddir_list.on_create(_str title="", boolean expand_alias_invisible=false, boolean process_chdir_invisible=false, boolean save_settings_invisible=false, boolean ShowRecursive=false, _str find_file="", _str find_path="", boolean path_must_exist=true, boolean allow_create_directory=false, boolean change_directory=true)

Category:

Forms


_center_window

void _center_window(typeless parent="")

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.

Applies To:

All Window Objects

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;

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


_change_all_wfonts

void _change_all_wfonts(_str font_name, _str font_size, int font_flags, int charset=VSCHARSET_DEFAULT, int cfg=CFG_SBCS_DBCS_SOURCE_WINDOW)

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

Parameters:

font_name -

font_size -

font_flags -

charset -

cfg -

Category:

Window Functions


_CheckLineLengths

boolean _CheckLineLengths(int AllowedLineLen, _str &LineNumbers, int FromCursor=0, int &MaxLineLen=0)

Parameters:

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.

FromCursor - (optional)

MaxLineLen - (optional)

Returns: boolean

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.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, File Functions


_CheckTimeout

int _CheckTimeout()

Check if a timeout set using _SetTimeout() has expired. This is a software timeout. Nothing will happen when the timeout passes, it's up to you to call _CheckTimeout() yourself and handle the situtation.

Returns: int

'true' if the timeout is expired.

Category:

Macro Programming Functions


_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

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

Returns: int

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.

Category:

File Functions


_choose_font

_str _choose_font(int cf_flags=CF_SCREENFONTS, _str font_string=",10,,")

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.

Parameters:

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

Returns: _str

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.

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);
    }
}

Category:

Miscellaneous Functions

See Also:

_font_form, _font_param


_ChooseDirDialog

_str _ChooseDirDialog(_str title="Choose Directory", _str find_path="", _str find_file="", int flags=CDN_PATH_MUST_EXIST)

Display a modal dialog for choosing a directory.

On Windows, this function will display the Windows "Browse for Folder" directory chooser form, unless file_file is specified, or the flags are not CDN_PATH_MUST_EXIST. Any other options specified require it to use _cd_form() to get the additional functionality.

Parameters:

title - title to display dialog using (default "Choose Directory") You can also use "" to get the default title.

find_path - path to initialize dialog to

find_file - name of specific file to find

flags - dialog options

  • CDN_SHOW_EXPAND_ALIAS -- show "Expand Alias" checkbox
  • CDN_SHOW_PROCESS_CHDIR -- show "Process chdir" checkbox
  • CDN_SHOW_SAVE_SETTINGS -- show "Save Settings" button
  • CDN_SHOW_RECURSIVE -- show "Recursive" checkbox
  • CDN_PATH_MUST_EXIST -- Selected path must exist
  • CDN_ALLOW_CREATE_DIR -- Allow them to create a new directory
  • CDN_CHANGE_DIRECTORY -- Change dir to 'find_path' on open
  • CDN_NO_SYS_DIR_CHOOSER -- Force us to use _cd_form

Returns: _str

Returns the selected directory. Return '' on cancel or error.

If the "Process chdir", "Expand alias", or "Recursive" check boxes are displayed, the selected options are prepended to the returned path as follows and the path is quoted if it contains spaces:

  • +p -- "Process chdir" was checked
  • -p -- "Process chdir" was not checked
  • +a -- "Expand alias" was checked
  • -a -- "Expand alias" was not checked
  • +r -- "Recursive" was checked.

Category:

Forms

See Also:

_OpenDialog, def_cd


_chr

_str _chr(int ascii_code)

Returns: _str

Returns the ASCII character corresponding to ascii_code.

Example:

_chr(65):== 'A'

Category:

String Functions

See Also:

_asc


_clex_find

int _clex_find(int clexflags, _str options="O")

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.

Parameters:

clexflags - Determines the language elements to search or to test for. May be one or more of the following flags, which are defined in "slick.sh." Use the OR operator to specify more than one flag.

  • OTHER_CLEXFLAG
  • KEYWORD_CLEXFLAG
  • NUMBER_CLEXFLAG
  • STRING_CLEXFLAG
  • COMMENT_CLEXFLAG
  • PPKEYWORD_CLEXFLAG
  • LINENUM_CLEXFLAG
  • SYMBOL1_CLEXFLAG
  • SYMBOL2_CLEXFLAG
  • SYMBOL3_CLEXFLAG
  • SYMBOL4_CLEXFLAG

options - 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
D
Return the detailed color constant (NOT CLEXFLAG) which corresponds to the symbol under the cursor. The clexflags argument is ignored. This option is very similar to the 'G' option above, except that it also recognizes the following specialized colors:
  • CFG_LINE_COMMENT
  • CFG_DOCUMENTATION
  • CFG_DOC_KEYWORD
  • CFG_DOC_PUNCTUATION
  • CFG_DOC_ATTRIBUTE
  • CFG_DOC_ATTR_VALUE
  • CFG_IDENTIFIER
  • CFG_FLOATING_NUMBER
  • CFG_HEX_NUMBER
  • CFG_SINGLEQUOTED_STRING
  • CFG_BACKQUOTED_STRING
  • CFG_UNTERMINATED_STRING
  • CFG_INACTIVE_CODE
  • CFG_INACTIVE_KEYWORD
  • CFG_INACTIVE_COMMENT
  • CFG_IMAGINARY_SPACE
E
Searches for embedded source. Returns 0 if succesful. Otherwise, STRING_NOT_FOUND_RC is returned. The clexflags argument is ignored.
S
Searches for non-embedded source. Returns 0 if succesful. Otherwise, STRING_NOT_FOUND_RC is returned. The clexflags argument is ignored.
M
Search only within the current selection

The option parameter may include a '-' (dash) character to enable the 'O' and 'N' options to search backwards.

Returns: int

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-");

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

_clex_load, p_color_flags, _clex_skip_blanks


_clex_identifier_chars

_str _clex_identifier_chars()

Returns: _str

Returns an expression containing all the identifier chars as specified by the color coding engine. The results of this function are intended to be a drop-in replacement for p_word_chars.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Methods, Edit Window Methods

See Also:

_clex_identifier_re(), _clex_identifier_notre(), _clex_is_identifier_char(), p_identifier_chars


_clex_identifier_notre

_str _clex_identifier_notre()

Returns: _str

Returns a SlickEdit regular expression for matching a character which is not part of an identifier, as specified by the color coding engine.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Methods, Edit Window Methods

See Also:

p_identifier_chars, _clex_identifier_chars(), _clex_identifier_re(), _clex_is_identifier_char()


_clex_identifier_re

_str _clex_identifier_re()

Returns: _str

Returns a SlickEdit regular expression for matching an identifier, as specified by the color coding engine.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Methods, Edit Window Methods

See Also:

p_identifier_chars, _clex_identifier_chars(), _clex_is_identifier_char()


_clex_is_identifier_char

boolean _clex_is_identifier_char(_str ch)

Parameters:

ch - character to test

Returns: boolean

Returns true if the given character is an identifier char as specified by the color coding engine.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Methods, Edit Window Methods


_clex_jspAddKeywordAttrs

void _clex_jspAddKeywordAttrs(_str tag_name, _str attr_list, ...)

Adds the tag and attributes specified to the XML color coding for the current buffer.

Parameters:

tag_name - JSP tag name.

attr_list - Space delimited list of attributes which belong to the tag_name specified.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clex_jspGetConfig

_str _clex_jspGetConfig()

Returns the tag filename for the current buffer used for JSP Context Tagging® and color coding.

Returns: _str

the tag filename

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clex_jspSetConfig

void _clex_jspSetConfig(boolean forceUpdate, _str pszTagFilename)

Sets the tag filename for the current buffer used for JSP Context Tagging® and may create or update an XML color coding lexer associated with this tag file.

Parameters:

ForceUpdate - Indicates whether to always update an existing XML color coding lexer for this TagFilename. This option is most useful for allowing DTD changes to be reapplied. It can also be useful if you have muliple buffers using the same tag file (same DTD).

TagFilename - Name of tag file.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clex_load

int _clex_load(_str filename)

Loads color lexer definition file specified. By convention, these files have the extension ".vlx". See Color Coding for information on syntax of lexer definitions.

Returns: int

Returns 0 if successful.

Category:

File Functions

See Also:

_clex_find, p_color_flags, _clex_skip_blanks


_clex_skip_blanks

int _clex_skip_blanks(_str options='')

Starts from cursor position and skips over spaces, tabs, and comments.

Parameters:

options - may contain one or more of the following option letters:

-
Search backwards
m
Search within selection
h
Search through hidden lines.
c
Skip spaces within comments
q
Quick mode -- does not check for embedded code

Returns: int

Returns 0 if non-blank character is found, nonzero otherwise. 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).

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

_clex_find, p_color_flags, _clex_load


_clex_xmlAddKeywordAttrs

void _clex_xmlAddKeywordAttrs(_str tag_name, _str attr_list, ...)

Adds the tag and attributes specified to the XML color coding for the current buffer.

Parameters:

tag_name - XML tag name.

attr_list - Space delimited list of attributes which belong to the tag_name specified.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clex_xmlGetConfig

_str _clex_xmlGetConfig()

Returns the tag filename for the current buffer used for XML Context Tagging® and color coding.

Returns: _str

the tag filename

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clex_xmlSetConfig

void _clex_xmlSetConfig(boolean forceUpdate, _str pszTagFilename)

Sets the tag filename for the current buffer used for XML Context Tagging® and may create or update an XML color coding lexer associated with this tag file.

Parameters:

ForceUpdate - Indicates whether to always update an existing XML color coding lexer for this TagFilename. This option is most useful for allowing DTD changes to be reapplied. It can also be useful if you have muliple buffers using the same tag file (same DTD).

TagFilename - Name of tag file.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Miscellaneous Functions


_clickLocation

int _clickLocation()

Operates on SSTab control.

Returns: int

Last click location of mouse in SSTab control.
10+tab-index for clicked on tab
1 for clicked on scroll button left,
2 for clicked on scroll button right,
3 for clicked on drop down list button,
0 for clicked on nothing and not processed.

Applies To:

SSTab

Category:

SSTab Methods


_clipboard_empty

int _clipboard_empty(boolean isClipboard=true)

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.

Parameters:

isClipboard - Indicates whether operation is performed for the clipboard or selection. Effects Unix only.

Returns: int

Returns non-zero value if the operating system clipboard is empty

Category:

Clipboard Functions


_clipboard_format

_str _clipboard_format(int format, boolean isClipboard=true)

Determines if a particular operating system clipboard format is available. Use the clipboard_itype function to determine the format of an internal TEXT clipboard.

Parameters:

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 SlickEdit TEXT format clipboard.
   CBF_VSCONTROLS
   There is a SlickEdit CONTROLS format clipboard.

isClipboard - Indicates whether operation is performed for the clipboard or selection. Effects Unix only.

Returns: _str

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.

Category:

Clipboard Functions


_cob_extform

Displays Cobol Options dialog box which is used for modifying the extension specific options for Cobol.

Example:

:

   Syntax  void show('_cob_extform')

Category:

Forms


_col_width

int _col_width(int column, int width=-3)

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.

Each line in the list box should separate each column with a tab character.

Parameters:

column - column is a number between 0 and 199.

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.

Returns: int

Returns width of column requested in the list box scale mode (p_scale_mode).

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();
   }

Applies To:

List Box, Tree View

Categories:

List Box Methods, Tree View Methods


_compare_selection

int _compare_selection(_str mark1_id, _str mark2_id)

Compare size and dimensions of selection handles. Used to compare duplicated selection handles for equality. mark1_id and mark2_id are a handle to a selection returned by one of the built-in _alloc_selection or _duplicate_selection.

Parameters:

mark1_id - selection handle

mark2_id - selection handle

Returns: int

0, if selections are equal

Category:

Selection Functions

See Also:

_alloc_selection, _duplicate_selection, _free_selection, _get_selinfo


_config_path

_str _config_path(_str options="")

Deprecated. Use _ConfigPath().

Parameters:

options - (optional, UNIX only) set to 'n' pre-6.0 style config dir. This option is essentially obsolete at this point.

Returns: _str

Returns the directory used to store miscellaneous configuration files such as "vslick.sta" (UNIX: "vslick.stu") and "alias.slk".

Category:

File Functions

See Also:

restore_path, _create_config_path, _macro_path


_ConfigEnvVar

int _ConfigEnvVar(_str envvar_name, _str new_value)

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.

Returns: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_ConfigPath

_str _ConfigPath()

Returns: _str

Return absolute path of user's local configuration directory with a trailing file separator.

Category:

File Functions


_const_value

typeless _const_value(_str const_name)

Parameters:

const_name - constant name

Returns: typeless

Return the value of the given constant declaration. Note the constant name needs to be qualified with namespace and class names as necessary.

Category:

Miscellaneous Functions


_construct

void _construct(_str className, ...)

Construct an instance of the specified type and pass the given arguments to it's constructor. Will make the instance 'null', like _makeempty(), if className is not a known Slick-C class type.

This class is useful for dynamically creating class instances. It does not actually allocate memory, it just initializes the variable it operates on. On account of this, Slick-C has no need for a "delete" or _destruct() operator.

Parameters:

className - Name of class to construct

argument1 - first argument for constructor

argument2 - second argument for constructor

Example:

class AAAA {
   int x; int y;
   AAAA(int ax=0, int ay=0) {
      x=ax;
      y=ay;
   }
};
AAAA AFactory(int x, int y) {
   AAAA r = null;
   r._construct("AAAA", x, y);
   return r;
}

Category:

Miscellaneous Functions

See Also:

_typename, _instanceof, _makeempty


_copy_color_coding_to_clipboard

int _copy_color_coding_to_clipboard(_str format, _str markid="")

Copies color formatted text selection to the operating system clipboard.

Parameters:

format - - currently available clipboard formats 'R' - 'RTF Format' (Windows format) 'H' - 'HTML Format' (Windows format)

markid - 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.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods

See Also:

copy_to_clipboard


_copy_from_clipboard

int _copy_from_clipboard(boolean isClipboard=true)

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 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.

Parameters:

isClipboard - Indicates whether operation is performed for the clipboard or selection. Effects Unix only.

Returns: int

Returns 0 if successful.

Applies To:

All Window Objects

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods

See Also:

_clipboard_format, _clipboard_empty


_copy_objects_to_clipboard

int _copy_objects_to_clipboard(boolean isClipboard=true)

Copies selected controls on a form to the clipboard. A selected control has a non-zero p_selected property.

Parameters:

isClipboard - Indicates whether operation is performed for the clipboard or selection. Effects Unix only.

Returns: int

Returns 0 if successful.

Applies To:

Form

Categories:

Clipboard Functions, Form Methods


_copy_to_clipboard

int _copy_to_clipboard(_str markid="", boolean isClipboard=true)

Copies text selection to the operating system clipboard.

Parameters:

markid - 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.

isClipboard - Indicates whether operation is performed for the clipboard or selection. Effects Unix only.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods

See Also:

copy_to_clipboard


_copy_to_cursor

int _copy_to_cursor(_str markid="", int MarkFlags=-1)

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_create_config_path

_str _create_config_path()

Creates the configuration directory if it does not already exist. The _config_path function is called to determine the configuration directory.

Returns: _str

Returns 0 if successful. On error, message box is displayed.

Category:

File Functions

See Also:

restore_path, _config_path


_create_temp_view

int _create_temp_view(int &temp_wid, _str load_options='', _str buf_name='', boolean doSelectEditorLanguage=false, int more_buf_flags=0)

Creates a temporary window, and buffer. This function is used to create lists or process files you any editing feature without the buffer being displayed.

Parameters:

temp_wid - Window id of file that is opened

load_options - may be "" or only may contain the following

  • +bi <buf_id>
  • +d
  • +b

buf_name - Specified buffer name for temp window/buffer.

doSelectEditorLanguage - When true, _SetEditorLanguage() is called to initialize the language setup for the buffer. In addition, build_load_options() to generate all default load options which typically turns on undo.

more_buf_flags - Allows more buffer flags (typically VSBUFFLAG_THROW_AWAY_CHANGES) to be added to buffers loaded from disk.

Returns: int

If successful, temp_wid is set to the window created, the new window is active, and the original window id is returned. On error, 0 is returned and message box is displayed.

Example:

#include "slick.sh"
defmain()
{
    orig_wid=_create_temp_view(temp_wid);
    if (orig_wid=='') return(1);
    // The buffer and window allocated by _create_temp_view are active
    _lbadd_item('a');
    _lbadd_item('b');
    _lbadd_item('c');
    //  The original window must be activated before showing the _sellist_form
    activate_window(orig_wid);
    result=show('_sellist_form -mdi -modal',
                "Sample Selection List",
                SL_VIEWID|SL_SELECTCLINE, // Indicate the next argument is a window id
                temp_wid,
                "OK",
                "",  // Help item
                '',  // Use default font
                ""      // Call back function
               );
      if (result) {
           message("Item selected is "result);
      } else {
           message("Selection list cancelled");
      }
}

Category:

Miscellaneous Functions

See Also:

_sellist_form, _delete_temp_view


_create_tile_id

int _create_tile_id()

Returns: int

Returns a unique tile id. SlickEdit uses tile ids to group and ungroup tiled windows.

Category:

Window Functions


_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)

Creates an object and returns an instance handle.

Parameters:

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 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 -

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

Returns: int

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;

Category:

Window Functions

See Also:

_top_height, _bottom_height


_CreateExtension

int _CreateExtension(_str extension, _str langId, _str encoding=null, _str openApplication=null, boolean useAssociation=false)

Creates file extension specific setup data which is used by the File Extension Manager options dialog. This procedure is typically used when associating a physical file extension with a specific language, or when setting up encoding and application preferences for a physical file extension.

Parameters:

extension - File extension to be configured.

langId - Language ID (see p_LangId For a list of language types, see the Language Options dialog ("Tools", "Options", "Language Setup...")

encoding - (optional) default file encoding

openApplication - (optional) path for external application used to open this type of file when double-clicked on in project file browser.

useAssociation - (optional, Windows only) use Windows file association to select application for opening this type of file when double-clicked on in the project file browser.

Returns: int

Returns the name index of the setup information created.

Example:

   _CreateExtension('ada', 'ada');
   _CreateExtension('ads', 'ada');

Category:

Miscellaneous Functions

See Also:

_CreateLanguage


_CreateLanguage

int _CreateLanguage(_str langId, _str mode_name='', _str setup_info='', _str compile_info='', _str syntax_info='', _str be_info='', _str include_info='', _str word_chars='', _str lexer_name='', _str color_flags='')

Creates language specific setup data which is used by the Language Options dialog box. This procedure is typically used when adding support for languages not already provided by SlickEdit's default configuration.

Parameters:

langId - Language ID (see p_LangId For a list of language types, see the Language Options dialog ("Tools", "Options", "Language Setup...")

mode_name - Name given to the language 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 example above.

compile_info - Language specific compile command.

syntax_info - A string of numbers separated by spaces.
The first number specifies "Syntax Indent".
The second number specifies syntax expansion on or off.
The the number specifies the minimum abbreviation for syntax expansion when pressing space.
The numbers that follow specify extension specific options.

be_info - String of "Begin/end pairs"

include_info - Default include path or copy book search path

word_chars - Set of characters used in identifiers/words

lexer_name - Name of lexer for Color Coding

color_flags - Color coding flags

Returns: int

Returns the name index of the setup information created.

Example:

   setup_info := 'MN=Modula,TABS=+3,MA=1 74 1,KEYTAB=mod-keys,WW=1,IWT=0,ST=0,';
   compile_info := '';
   syntax_info := '3 1 1 0 0 1 0';
   be_info := '(WITH),(IF),(BEGIN),(WHILE),(CASE),(FOR),(LOOP)(RECORD)|(END) (REPEAT)|(UNTIL)';
   index := _CreateLanguage('mod',MOD_MODE_NAME,setup_info,compile_info,syntax_info,be_info);

Category:

Miscellaneous Functions

See Also:

_CreateExtension, _ExtSetupToInfo


_CreateTempEditor2

int _CreateTempEditor2(int buf_id)

Creates a editor window and attaches the buffer corresponding to buffer ID.

Parameters:

buf_id - ID of the buffer

Returns: int

If successful returns the window ID. Otherwise a negative return code.

Category:

Buffer Functions


_cursor_move_deselects

boolean _cursor_move_deselects()

Returns: boolean

Returns true if moving the cursor will remove the active selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_cursor_move_extendssel

boolean _cursor_move_extendssel()

Returns: boolean

Returns true if moving the cursor will extent the active selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_cursor_shape

_str _cursor_shape(_str cmdline=null)

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.

Parameters:

cmdline - is a string in the format:

        [-v] ins_top ins_bot rep_top rep_bot vins_top vins_bot vrep_top vrep_bottom

Returns: _str

*/

Category:

Miscellaneous Functions


_date

_str _date(_str option='U')

Parameters:

option - return value format option, may be one of the following:

  • 'U' US format date mm/dd/yyyy.
  • 'L' Locale dependent date string. Under Windows, this uses the regional settings "Short date style". For other platforms, this option is still under development.

Returns: _str

Returns the system date.

Category:

Miscellaneous Functions

See Also:

_time(), _file_date()


_dbcs

int _dbcs()

Returns: int

Returns non-zero value if the active code page contains DBCS (double byte characters).

Category:

Miscellaneous Functions


_dbcsIsLeadByte

boolean _dbcsIsLeadByte(_str ch)

Returns: boolean

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
        }

Category:

String Functions

See Also:

_dbcs, _dbcsStartOfDBCS, _dbcsSubstr


_dbcsStartOfDBCS

boolean _dbcsStartOfDBCS(_str &string, int i)

Returns: boolean

Returns true if the character at Index in string is the start of a single or double byte character.

Category:

String Functions

See Also:

_dbcs, _dbcsIsLeadByte, _dbcsSubstr


_dbcsSubstr

_str _dbcsSubstr(_str string, int StartCol, typeless Width="")

Returns: _str

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)=='+') {
             ...
        }

Category:

String Functions

See Also:

_dbcs, _dbcsIsLeadByte, _dbcsStartOfDBCS


_ddecommand

int _ddecommand(_str server_name, _str command, _str topic="System", _str item="", int milli_timeout=15000)

Supported under Windows, Windows 95/98, and Windows NT only. Sends a system topic DDE command to the server specified.

Parameters:

server_name -

command -

topic -

item -

milli_timeout -

Returns: int

Example:

      // Invoke a second copy of 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 SlickEdit.
      _ddecommand("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 SlickEdit window to the
      // front to show the user.
      _set_foreground_window("SlickEdit");

      // Get help on MessageBox from Microsoft VC++
      _ddecommand("MSIN","KeywordLookup(`MessageBox')","vcbks40.mvb");

Category:

Miscellaneous Functions


_dderequest

int _dderequest(_str reserved, _str server_name, _str item, _str topic, int milli_timeout=15000)

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.

Parameters:

reserved - not used

server_name - server name

item - DDE item

topic - DDE topic

milli_timeout - timout in milliseconds

Returns: int

Example:

   // Create a temporary window and buffer hold results
   // of _dderequest
   orig_window_id=_create_temp_view(temp_window_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_window_id);
   activate_window(orig_window_id);

Category:

Miscellaneous Functions


_deblink_selected

void _deblink_selected()

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).

Applies To:

Form

Category:

Miscellaneous Functions


_decreate_mode

int _decreate_mode(int mode=-1)

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.

Category:

Miscellaneous Functions


_default_color

_str _default_color(int ColorIndex, int fg_color=-1, int bg_color=-1, int font_flags=-1, int ParentIndex=0)

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.

Parameters:

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

fg_color - foreground color (RGB)

bg_color - background color (RGB)

font_flags - is one of the following font flags:

  • F_BOLD
  • F_ITALIC
  • F_STRIKE_THRU
  • F_UNDERLINE
  • F_INHERIT_STYLE

ParentIndex - parent color index to inherit color or font attributes from.

Returns: _str

Returns the current foreground, background, and font flags setting for the field specified each separated with a space.

Category:

Miscellaneous Functions

See Also:

_AllocColor, _rgb


_default_font

_str _default_font(int fieldnum, _str font="")

Gets and optionally sets an editor default font.

Parameters:

fieldnum - 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

Returns: _str

Returns the current font string value in the same format as the font argument.

Example:

// Set the default command line.
font="Courier,10,"(F_BOLD|F_ITALIC)
_default_font(CFG_CMDLINE, font);

Category:

Miscellaneous Functions


_default_option

_str _default_option(_str option, _str newValue=null)

Gets and optionally sets an editor default option.

Parameters:

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 build window 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. This option is ignored.
VSOPTIONZ_SPECIAL_CHAR_XLAT_TAB
_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.

newValue -

Returns: _str

Returns the (possibly newly set) current value for corresponding option.

Category:

Miscellaneous Functions


_default_state_filename

_str _default_state_filename()

Returns: _str

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.

Category:

Miscellaneous Functions


_delete_buffer

void _delete_buffer()

Deletes the active buffer from the buffer ring even if the buffer is modified. The previous buffer's non-active cursor position information copied into the active cursor position making the previous buffer active.

Applies To:

Edit Window

Categories:

Buffer Functions, Edit Window Methods

See Also:

_next_buffer, _prev_buffer


_delete_char

void _delete_char()

Deletes character under text cursor.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


_delete_line

void _delete_line()

Deletes current line.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Edit Window Methods, Editor Control Methods

See Also:

cut_line


_delete_macro

int _delete_macro(_str macro_name)

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.

Returns: int

Returns 0 if successful.

Category:

Macro Programming Functions


_delete_retrieve_list

void _delete_retrieve_list(_str object_name='')

Delete 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.

Parameters:

cmdline - is a string in the format: form_name[.ctl_name]

Applies To:

Combo Box, List Box

Categories:

Combo Box Methods, List Box Methods

See Also:

_append_retrieve


_delete_selection

int _delete_selection(_str mark_id="")

Deletes the marked text specified. No clipboard is created.

Parameters:

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.

Returns: int

Returns 0 if successful. Otherwise TEXT_NOT_SELECTED_RC is returned. On error, message is displayed.

Category:

Selection Functions


_delete_temp_view

void _delete_temp_view(_str temp_wid='', boolean dodelete_buffer=true)

Deletes temp window and buffer corresponding to temp_wid.

Parameters:

temp_wid - should have been returned by the _create_temp_view function. If temp_wid is not given, current window and buffer are deleted.

dodelete_buffer - If false, the buffer attached to the window is not deleted.

Category:

Selection Functions


_delete_text

void _delete_text(int Nofbytes, _str option="")

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_delete_unused

void _delete_unused()

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.

Category:

Names Table Functions


_delete_window

int _delete_window(_str modalWaitResult="")

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();

}

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods, Window Functions


_deleteActive

void _deleteActive()

Deletes the active tab.

Applies To:

SSTab

Category:

SSTab Methods


_deleteel

void _deleteel(typeless index, int Nofitems=1)

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.

Parameters:

index - index / key corresponding to item to delete

Nofitems - number of items to delete

Example:

t[0]=1;
t[1]=2;
t[2]=3;
t._deleteel(1);   // Delete t[1].  t[1] will now contain 3
t:["a"]=1;
t._deleteel("a");  // Delete "a" element

Category:

Miscellaneous Functions

See Also:

_el, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


_DeleteExtension

void _DeleteExtension(_str extension)

Deletes a file extension mapping.

Parameters:

extension - File extension. For list of file extensions, use our Language Options dialog ("Tools", "Options...", "File Extension Manager").

Category:

Configuration Functions

See Also:

_CreateExtension, _DeleteLanguageOptions, _Filename2LangId, _Ext2LangId, setupext


_DeleteExtensionOptions

void _DeleteExtensionOptions(_str extension)

Deprecated. Use _DeleteExtension() or _DeleteLanguageOptions() instead.

Removes the language setup options for the specific file extension. If the given extension is just referred to another extension, then only remove the referral, not the entire language setup.

Parameters:

extension - File extension. For list of file extension types, use our Language Options dialog ("Tools", "Options","Language Setup...").

Category:

Configuration Functions

See Also:

_SetDefaultLanguageOptions, _GetDefaultLanguageOptions, _SetExtensionReferTo, _DeleteLanguageOptions, _Filename2LangId, _Ext2LangId, setupext


_DeleteLanguageOptions

void _DeleteLanguageOptions(_str lang)

Removes the language setup options for the specific language, as specified by the given language ID. Note that 'lang' must be a real language ID, not a referred file extension.

Parameters:

lang - Language ID (see p_LangId For list of languages, use our Language Options dialog ("Tools", "Options","Language Setup...").

Since:

13.0

Category:

Configuration Functions

See Also:

_SetDefaultLanguageOptions, _GetDefaultLanguageOptions, _SetExtensionReferTo, _DeleteExtensionOptions, _Filename2LangId, _Ext2LangId, setupext


_deselect

void _deselect(_str markid="")

Clears selection specified. mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.

Parameters:

mark_id - a value of '' or no mark_id parameter identifies the active selection.

Category:

Selection Functions


_dlge_form

Displays dialog editor Properties dialog box.

Category:

Forms


_dll_match

_str _dll_match(_str name, boolean find_first)

Parameters:

name - DLL name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


_dllexport

int _dllexport(_str FuncProto, _str NameInfo="", int arg2=0)

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.

Category:

Miscellaneous Functions


_dllload

int _dllload(_str DllFilename, _str option='L')

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.

Category:

Macro Programming Functions


_dlpath

_str _dlpath(_str newPath=null, boolean doRefresh=false, boolean show_dotfiles=true, boolean doCd=true)

Gets and optionally fills in the directory list control.

IMPORTANT:
Current window must be directory list control (e.g. list box, tree).

Parameters:

newPath - Directory to use when filling in the directory list control. If this is null, the current directory list settings are returned and the directory list is not changed.

doRefresh - Normally the directory list control is not updated when you specify the same directory. This option skips this check.

filter390 - Filter to used when listing OS/390 data sets.

doCd - Change the current working directory to the path given by newPath.

Returns: _str

current path

Applies To:

Directory List Box

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);
}

Category:

Directory List Box Methods


_dmless

void _dmless(_str moveRightEdge='', _str padAmount='')

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();
}

Applies To:

Command Button

Category:

Command Button Methods

See Also:

_dmmore, _dmmoreless


_dmmore

void _dmmore(_str moveRightEdge='', _str padAmount='')

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.
}

Applies To:

Command Button

Category:

Command Button Methods

See Also:

_dmmore, _dmmoreless


_dmmoreless

void _dmmoreless(_str moveRightEdge='', _str padAmount='')

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();
}

Applies To:

Command Button

Category:

Command Button Methods

See Also:

_dmmore, _dmless


_do_list_members

void _do_list_members(boolean OperatorTyped, boolean DisplayImmediate, _str(&syntaxExpansionWords)[]=null, _str expected_type=null, VS_TAG_RETURN_TYPE &rt=null, _str expected_name=null)

List the symbols visible in the current context in the list members window. Calls the extension specific hook function _[ext]_get_expression_info to get the basic information about the current context, then hands the information off to the list members hook _[ext]_insert_context_tags to populate the list symbol tree.

Parameters:

OperatorTyped -

DisplayImmediate -

syntaxExpansionWords -

expected_type -

rt -

Category:

Tagging Functions

See Also:

list_symbols


_dquote

_str _dquote(_str string)

Quotes input string quoted in C double-quoted string syntax. This function is intended to be used in macros which generate Slick-C® source code.

Parameters:

string - input string to quote

Returns: _str

double quoted string

Category:

Macro Programming Functions

See Also:

maybe_quote_filename, _quote


_draw_rect

void _draw_rect(int x1, int y1, int x2, int y2, int fgcolor=p_forecolor, int bgcolor=p_backcolor, _str options="N")

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 fgcolor.
PSDM_COPYPEN
Write rectangle border
p_forecolor
RGB Color of rectangle border. Ignored if fgcolor parameter specified. Use the _rgb function to create an RGB color.
p_backcolor
RGB Color of rectangle fill. Ignored if bgcolor parameter specified. Use the _rgb function to create an RGB color.
p_fill_style
Must be PSFS_TRANSPARENT.

Parameters:

x1 - x position

y1 - y position

x2 - rhs x position

y2 - bottom y position

fgcolor - Foreground color to draw rect border

bgcolor - Background color to fill rect

options - see above

Example:

#include 'slick.sh'
defmain()
{
    p_fill_style=PSFS_TRANSPARENT;
    p_draw_width=1;p_draw_style=PSDS_DOT;
    p_draw_mode= PSDM_COPYPEN;
    fgcolor=_rgb(0x80,0x80,0x80);  /* Gray */
    bgcolor=0;  /* Not used since p_fill_style=PSFS_TRANSPARENT */
    x1=10;y1=10;x2=200;y2=100;
    _draw_rect(x1,y1,x2,y2,fgcolor,bgcolor,'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
     fgcolor=_rgb(0x80,0x80,0x80);  /* Gray */
     bgcolor=0;  /* Not used since p_fill_style=PSFS_TRANSPARENT */

     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

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


_drive_type

int _drive_type(_str drive)

(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.

Parameters:

drive -

Returns: int

Example:

defmain()
{
     message("drive type of A: is "_drive_type("A:"));
}

Category:

File Functions


_dump_var

void _dump_var(var v, _str caption='', int dumpToScreen=1, int dumpToFile=0)

Dump the contents of the given Slick-C variable to the debug window, or the log file.

Parameters:

v - variable to display contents of

caption - caption to print out for variable

dumpToScreen - dump the stack to the debug window

dumpToFile - dump the stack the log file

Category:

Miscellaneous Functions


_duplicate_selection

int _duplicate_selection(_str markid=null)

Parameters:

markid -

Returns: int

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.

Category:

Selection Functions


_dvldrive

_str _dvldrive(...)

Returns: _str

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.

Applies To:

Drive List

Category:

Drive List Methods


_dx2lx

int _dx2lx(int scale, int x)

Returns: int

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".

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_dxy2lxy

void _dxy2lxy(int scale_mode, int &x, int &y)

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".

Parameters:

scale_mode - may be SM_PIXEL or SM_TWIP.

x - x coordinate

y - y coordinate

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_dy2ly

int _dy2ly(int scale, int y)

Returns: int

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".

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _map_xy


_e2a

_str _e2a(_str string)

Convert EBCDIC character to ASCII string.

Parameters:

EBCDIC - character.

Returns: _str

ASCII character.

Category:

String Functions


_edit_form

_open_form _edit_form

Displays the Open dialog box used for opening edit window files.

Syntax _str show('-modal _edit_form', title, initial_wildcards, file_type_list, ofn_flags, default_ext, initial_filename, initial_directory [,retrieve_name [,help_item]] )

Parameters:

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/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_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.

Returns: _open_form

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.

Example:

#include "slick.sh"
defmain()
{
      result=show("-modal _edit_form",
                            'Open", // title
                             "*.c;*.h",   // Initial wildcards
                             "C/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);
}

Category:

Forms

See Also:

_edit_form


_edit_window

int _edit_window()

If the current window is displaying a buffer, the current window id is returned. Otherwise, the active MDI edit window id is returned.

Applies To:

All Window Objects

Category:

Window Functions


_el

typeless& _el(typeless index)

Parameters:

index - index / key correspond to item to return.

Returns: typeless&

Returns a reference to an element in a hash table or array.

NOTE: For backwards compatibility, this function will also work for structs and class instances, returning a reference to the given field (specified by field index, see _fieldindex). This use of _el() is discouraged.

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));

Category:

Miscellaneous Functions

See Also:

_deleteel, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort, _length


_EmbeddedEnd

void _EmbeddedEnd(typeless orig_values)

Pop back out of embedded language mode into the previous language mode.

Parameters:

orig_values - Language settings to restore

Category:

Tagging Functions


_EmbeddedExtension

_str _EmbeddedExtension()

Deprecated. Use _GetEmbeddedLangId()

Returns: _str

Return the current language type, checking to see if we are in embedded code first.

Category:

Tagging Functions

See Also:

_do_list_members()


_EmbeddedStart

int _EmbeddedStart(typeless &orig_values, _str key="")

If the cursor is in an embedded language section switch to the language mode of the embedded code.

Parameters:

orig_values - (reference) stores the original language specific settings for the current file. This will be used to restore the language state when EmbeddedEnd is called.

key - name for new key table (no longer used)

Returns: int

  • Returns 0 if there is no embedded language
  • Return 1, indicates that the mode has been switched to the embedded language. Caller must call _EmbeddedEnd(orig_values)
  • Returns 2 to indicate that there is embedded language code, but in comment/in string like default processing should be performed.
  • Returns 3 if mode name for the embedded code is the same.

    • Category:

    Tagging Functions

    See Also:

    _EmbeddedEnd(), _GetEmbeddedLangId(), p_LangId, p_mode_name


_enable_non_modal_forms

_str _enable_non_modal_forms(boolean value, int skip_wid, _str wid_list='')

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.

Parameters:

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.

Returns: _str

'' 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;
}

Category:

Form Functions


_enabled

boolean _enabled()

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).

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

p_enabled, p_visible


_end_identifier

_str _end_identifier()

Move the cursor to the last character of the identifier under the cursor. Does not move the cursor if there is no identifier under the cursor, and returns '' in that case.

Returns: _str

Returns the current identifier.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_end_line

void _end_line()

Places cursor after end of current line.

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

_begin_line


_end_select

int _end_select(_str markid="", boolean LockSelection=true, boolean RestoreScrollPos=true)

Places cursor on last character of selection specified. If the selection type is LINE, the cursor is moved to the lasst line of the selection and the column position is unchanged.

Parameters:

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.

LockSelection - When true, the selection is extended to the cursor and the select is locked (moving the cursor will no longer remove or extend the selection).

RestoreScrollPos - When true, the cursor y and left edge scroll positions are restored if possible (window size could be smaller and y be outsize window height).

Returns: int

Returns 0 if successful. Possible return values are TEXT_NOT_SELECTED_RC or INVALID_SELECTION_HANDLE_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_end_select_compare

int _end_select_compare(_str markid="")

Compares current line position to last line of mark specified.

Parameters:

markid - 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.

Returns: int

0
Current line is on last line of mark
> 0
Current line is after last line of mark
< 0
Current line is before last line of mark
-1
Text is not marked or mark is not in current buffer

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

_begin_select_compare


_enum_name

_str _enum_name(_str enum_name, int value, boolean flags=false)

Parameters:

enum_name - enumerated type name

value - value to find

flags - true if enum_name is enum_flags

Returns: _str

Return the name(s) corresponding to the given value for the specified enumerated type.

Category:

Miscellaneous Functions


_enum_names

void _enum_names(_str enum_name, _str(&a)[])

Get all the enumerator constants for an enumerated type. Note the enumerator name needs to be qualified with namespace and class names as necessary. The enumerator constants will returned qualified with the same namespace and class as the enumerator.

Parameters:

enum_name - enumerator_name

a - (output) array of enumerator names

Category:

Miscellaneous Functions


_enum_value

typeless _enum_value(_str enum_name)

Parameters:

enum_name - enumerator name

Returns: typeless

Return the value of the given enumerator in an enumerated type. Note the enumerator name needs to be qualified with namespace and class names as necessary.

Category:

Miscellaneous Functions


_escape_re_chars

_str _escape_re_chars(_str filename, _str regex_type="")

Parameters:

filename - string to escape

regex_type - regular expression syntax type

Returns: _str

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. Specify the '&' option to escape a simple Wildcard expression.

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("+++") =="\+\+\+"

Categories:

Search Functions, String Functions


_executed_from_key_or_cmdline

boolean _executed_from_key_or_cmdline(_str cmdname)

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.

Categories:

Command Line Functions, Keyboard Functions


_expand_tabsc

_str _expand_tabsc(int start=1, int count=-1, _str option="E")

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.

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

_text_colc, text_col, expand_tabs


_expand_tabsc_raw

int _expand_tabsc_raw(int start=1, int count=-1, _str option="E")

This function is identical to the _expand_tabsc function, except that the resulting string is always in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS Macro Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions


_Ext2LangId

_str _Ext2LangId(_str ext)

Find the language type that the given file extension is mapped to. This will first check if there is a language-to-extension mapping for 'ext', then it will check for language setup information 'ext'. Failing that, it will attempt to do a case-insensitive search for a language mapping, if the default operating system file system is case-insensitive.

Parameters:

ext - file name extension

Returns: _str

Returns the language ID for the language mode associated with the given file extension. Returns '' if no match is found.

Category:

Miscellaneous Functions


_ext2modename

_str _ext2modename(_str ext, int &setup_index)

Deprecated. Use _LangId2Modename()

Converts a file extension to the mode name corresponding to the language language referred to by the given file extension.

Parameters:

ext - File extension.

setup_index - Set to names table index for def-language-lang (canonical extension)

Returns: _str

The mode name for the language.

Category:

Miscellaneous Functions

See Also:

_Modename2LangId, _Filename2LangId, _Ext2LangId


_ext2modename2

_str _ext2modename2(_str ext, int &setup_index)

Deprecated. Use _LangId2Modename()

Converts a file extension to the mode name corresponding to the language language referred to by the given file extension.

Parameters:

ext - File extension.

setup_index - Set to names table index for def-language-lang (canonical extension)

Returns: _str

The mode name for the language.

Category:

Miscellaneous Functions

See Also:

_Modename2LangId, _Filename2LangId, _Ext2LangId


_ext2wildcards

_str _ext2wildcards(_str lang)

Deprecated. Use _GetWildcardsForLanguage()

Find all the file name extensions associated with the given language and create a file name wildcard expression for those file types.

Parameters:

lang - source language ID

Returns: _str

List of wildcards, separated by semicolons corresponding to the file name extensions associated with the given language mode.

Category:

Miscellaneous Functions


_ext_codehelp_flags

int _ext_codehelp_flags(_str lang='')

Deprecated. Use _GetCodehelpFlags()

Get the codehelp options wich are a bitset of VSCODEHELPFLAG_*.

The options are stored per extension type. If the options are not yet defined for an extension, then use def_codehelp_flags as the default.

Parameters:

lang - language ID

Returns: int

bitset of VSCODEHELPFLAG_* options.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


_ext_commentwrap_flags

typeless _ext_commentwrap_flags(int commentWrapOption, _str lang='')

Deprecated. Use _GetCommentWrapFlags().

Get the comment wrap flags.

The options are stored per extension type. If the options are not yet defined for an extension, then use CFcommentWrapDefaults as the default.

Parameters:

lang - language ID

Returns: typeless

structure of type CommentWrapSettings_t.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_ext_surround_flags

int _ext_surround_flags(_str lang='')

Deprecated. Use _GetSurroundModeFlags()

Get the extension specific surround options.

The options are stored per extension type. If the options are not yet defined for an extension, then use def_surround_mode_options as the default.

Parameters:

lang - language ID (p_LangId)

Returns: int

bitset of VS_SURROUND_MODE_* options.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


_ExtGetSetup

int _ExtGetSetup(_str lang, VS_LANGUAGE_SETUP_OPTIONS &setup)

Deprecated. Use _GetLanguageSetupOptions().

Retrieve the basic options for the given language. This applies only to the options stored in the def-language-[lang] variable.

Parameters:

lang - Language ID, see p_LangId

setup - Struct containing all language setup options

Category:

Miscellaneous Functions

See Also:

_SetLanguageSetupOptions(), _GetDefaultLanguageOptions(), _SetDefaultLanguageOptions()


_ExtSetSetup

void _ExtSetSetup(_str lang, VS_LANGUAGE_SETUP_OPTIONS &setup)

Deprecated. Use _SetLanguageSetupOptions().

Store the basic options for the given language. This applies only to the options stored in the def-language-[lang] variable.

Parameters:

lang - Language ID, see p_LangId

setup - Struct containing all language setup options

Category:

Miscellaneous Functions

See Also:

_GetLanguageSetupOptions(), _GetDefaultLanguageOptions(), _SetDefaultLanguageOptions()


_ExtSetupToInfo

_str _ExtSetupToInfo(VS_LANGUAGE_SETUP_OPTIONS &setup)

Deprecated. Use _LanguageSetupToInfo().

Convert language specific options information to the string format which is stored in def-language-[lang].

Category:

Miscellaneous Functions


_fieldindex

int _fieldindex(_str fieldName)

Parameters:

fieldName - Name of field to look up.

Returns: int

Returns the index of the given given class field. Indexes start at zero for the first field of the base (least derived) class.

Example:

class AAAA { int x; int y; };
class BBBB : AAAA { int z; };
void testFieldIndex() {
   BBBB b;
   say("x is at position "b._fieldindex("x"));  // 0
   say("y is at position "b._fieldindex("y"));  // 1
   say("z is at position "b._fieldindex("z"));  // 2
}

Category:

Miscellaneous Functions

See Also:

_getfield, _fieldindex, _length, _setfield


_fieldname

_str _fieldname(int index)

Parameters:

index - position of field to look up.

Returns: _str

Returns the name of the given given class field. Indexes start at zero for the first field of the base (least derived) class.

Example:

class AAAA { int x; int y; };
class BBBB : AAAA { int z; };
void testFieldName() {
   BBBB b;
   say("field 0 is named "b._fieldname(0));  // x
   say("field 1 is named "b._fieldname(1));  // y
   say("field 2 is named "b._fieldname(2));  // z
}

Category:

Miscellaneous Functions

See Also:

_getfield, _fieldindex, _length, _setfield


_file_case

_str _file_case(_str a)

Parameters:

filename - File path to convert.

Returns: _str

Returns filename in operating system specific case. For DOS and Windows NT, file names are case-insensitive, so they are converted to lower case. This is useful for storing filenames in a case-agnostic manner.

_file_case() should be used under rare cirumstances. It is preferrable to use file_eq() to compare files without modifying their case.

Category:

File Functions


_file_date

_str _file_date(_str filename, _str option)

Parameters:

filename - file to retrieve date of

option - 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.

Returns: _str

Returns date of filename.

Category:

File Functions

See Also:

_file_time, file_date


_file_path

_str _file_path(_str filename)

Returns the path from filename. Just slightly easier than calling strip_filename.

Parameters:

filename - Filename to return path from.

Returns: _str

Returns directory name that filename is in

Category:

File Functions


_file_size

int _file_size(_str filename)

Parameters:

filename - file to retrieve size of

Returns: int

Returns the size of filename

Category:

File Functions


_file_time

_str _file_time(_str filename, _str option)

The option defaults to 'U' -US, 'L' localte, 'M' military

Category:

File Functions


_Filename2LangId

_str _Filename2LangId(_str file_name='', boolean currentObjectIsBuffer=false, boolean setAutoSelectLanguage=false)

Returns the language mode associated with the given file.

The Language Options dialog box allows you to map an extension that to a language mode. This function performs that translation, and will also use the [optional] buffer name to determine the language mode.

If the file's actual extension matches a _[ext]_Filename2LangId() callback, it will first try the callback to see if the file, based on it's path or name should be referred to an alternate language.

Otherwise, if the file's actual extension matches a suffix_[ext] callback, it will open the file in a temporary view and try the callback to determine the file's actual language type.

Parameters:

file_name - source file name with path

currentObjectIsBuffer - pass 'true' if if the current object is an editor control containing the file in question

setAutoSelectLanguage - if 'true' set p_AutoSelectLanguage

Returns: _str

Returns the language ID for the given file.

Category:

Miscellaneous Functions

See Also:

get_extension, _Ext2LangId


_FileQType

int _FileQType(_str filename)

Determines the file type given the absolute (make sure the filename is absolute) filename specified. This function is needed because SlickEdit has some NFS-like features for handling some special files. These special files may have performance limitations or other limitations. This function lets you check the type and special case operations. For example, the filename "c:\java\src.zip\java\lang\Object.java" is a special file type because Visual SlickEdit will treat "src.zip" like a directory so that files can be loaded out of a zip (or jar) file without requiring much special code. Currently, SlickEdit's NFS-like layer does not support writing to zip or jar files.

Returns: int

Returns one of the VSFILETYPE_* constants defined in "slick.sh."

Category:

File Functions

See Also:

gui_fill_selection


_fill_selection

int _fill_selection(_str ch, _str mark_id="")

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.

Returns: int

Returns 0 if successful. Otherwise, TEXT_NOT_SELECTED_RC is returned.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_find_and_delete_temp_view

void _find_and_delete_temp_view(_str buf_name)

Deletes the temp window and buffer for the buffer name specified.

Parameters:

buf_name - Name of buffer to search for.

Returns: void

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window

Category:

Buffer Functions


_find_control

int _find_control(_str ctlName)

Parameters:

ctlName - name of control to search for

Returns: int

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), ctlName, 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");
       }
   }

Applies To:

All Window Objects

Category:

Form Methods


_find_file_form

Displays Find File dialog box used to search for open files.

Returns:

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))
}

Category:

Forms


_find_form_eventtab

_str _find_form_eventtab(_str form_name, boolean ReturnModuleFilename=false)

Find source code for form or event table specified. Cursor is placed on definition of event table.

Returns: _str

Returns 0 if successful. Otherwise, STRING_NOT_FOUND_RC or FILE_NOT_FOUND_RC is returned and message box is displayed.

Category:

Search Functions


_find_formobj

int _find_formobj(_str form_name, _str option='', int wid=0)

Parameters:

form_name - name of form to search for an instance of

option - 'N' or 'E', as described above

wid - (optional) last known window handle for form

Returns: int

Returns an instance handle (window id) to form form_name. Returns 0 if an instance 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.

Categories:

Form Functions, Search Functions

See Also:

_find_object, _find_control


_find_longest_line

int _find_longest_line()

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();
   }

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Methods, Editor Control Methods, List Box Methods


_find_object

int _find_object(_str name, _str option='', int wid=0)

Parameters:

object_name - is a string in the format: form_name [.control_name]

option - 'N' or 'E', as described above

wid - (optional) last known window handle for the object

Returns: int

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.
   }
}

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");
    }
}

Category:

Search Functions

See Also:

_find_formobj, _find_control


_find_or_add_picture

int _find_or_add_picture(_str filename)

Finds a picture in the names table. If the picture is not already in the names table, it is added.

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).

Returns: int

Returns the names table index of the 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.

Category:

Names Table Functions


_find_or_create_temp_view

int _find_or_create_temp_view(int &temp_wid, _str load_options='', _str buf_name='', boolean doSelectEditorLanguage=false, int more_buf_flags=0, boolean doClear=false)

Activates the temp window/buffer for buffer name specified. If the buffer does not exists, a temp window/buffer is created.

Parameters:

temp_wid -

load_options - Load options supported by _create_temp_view().

buf_name - Name of buffer to search for.

doSelectEditorLanguage - When true, _SetEditorLanguage() is called to initialize the language setup for the buffer. In addition, build_load_options() to generate all default load options which typically turns on undo.

more_buf_flags - Allows more buffer flags (typically VSBUFFLAG_THROW_AWAY_CHANGES) to be added to buffers loaded from disk.

doClear - Indicates whether the contents of the buffer should always be cleared.

Returns: int

Returns previously active window

Applies To:

Edit Window

Category:

Buffer Functions


_find_or_open_temp_view

int _find_or_open_temp_view(_str buf_name, int &temp_wid, int &orig_wid, _str load_options='', boolean &buffer_already_exists=false, boolean doClear=false, boolean doSelectEditorLanguage=false, int more_buf_flags=0, boolean doCreateIfNotFound=false)

Activates the temp window/buffer for buffer name specified. If the buffer does not exists, a temp window/buffer is created.

Parameters:

buf_name - Name of buffer to search for.

temp_wid - Window id of file that is opened

orig_wid - Original window id

load_options - Load options supported by _open_temp_view().

buffer_already_exists - Set to true if the buffer already existed.

doClear - Indicates whether the contents of the buffer should always be cleared.

doSelectEditorLanguage - When true, _SetEditorLanguage() is called to initialize the language setup for the buffer. In addition, build_load_options() to generate all default load options which typically turns on undo.

more_buf_flags - Allows more buffer flags (typically VSBUFFLAG_THROW_AWAY_CHANGES) to be added to buffers loaded from disk.

doCreateIfNotFound - When true, a file (not buffer) is specified, and the file is not found, a new files is created.

Returns: int

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window

Category:

Buffer Functions


_find_tile

int _find_tile(_str buf_name)

Searches for a window with the same tile id as the current window which is displaying the buffer, buffer_name.

Returns: int

Returns the window id, if successful. Otherwise, 0 is returned. If the current window is displaying buffer_name, the current window id is returned.

Applies To:

Edit Window

Categories:

Search Functions, Window Functions


_FindLanguageCallbackIndex

int _FindLanguageCallbackIndex(_str callback_name, _str lang=null)

This function is used to look up a language-specific callback function.

Return the names table index for the callback function for the current language, or a language we inherit behavior from. The current object should be an editor control.

Parameters:

callback_name - name of callback to look up, with a '%s' marker in place where the language ID would be normally located.

lang - current language ID (default=p_LangId)

Returns: int

Names table index for the callback. 0 if the callback is not found or not callable.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions

See Also:

_SetLanguageInheritsFrom, _LanguageInheritsFrom


_findmethod

int _findmethod(_str methodName)

Parameters:

methodName - name of the method to look up

Returns: int

Return the names table index of the given class method.

Example:

class AAAA {
   void saySomething() {
      message("something");
   }
};
int testFindMethod(_str name) {
   AAAA a;
   return a._findmethod(name);
}

Category:

Miscellaneous Functions

See Also:

_callmethod, find_index, index_callable


_flfilename

_str _flfilename(_str wildcards=null, _str dirpath='', boolean forceRefresh=false, boolean showDotFiles=true)

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.

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

Parameters:

wildcards - wildcards

dirpath - directory path

forceRefresh -

showDotFiles - if true, the file list shows UNIX-style dot files.

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);
}

Applies To:

File List Box

Category:

File List Box Methods


_FlushPendingKeys

void _FlushPendingKeys()

Remove all key events from input queue.

Category:

Keyboard Functions


_fm_copy

_str _fm_copy(_str cmdline, _str doPause=false)

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.

Parameters:

cmdline - is a string in the format: filename directory

Returns: _str

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.

Category:

File Functions


_fm_erase

_str _fm_erase(_str filename)

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.

Returns: _str

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.

Category:

File Functions


_fm_move

_str _fm_move(_str cmdline, _str doPause=false)

Moves the filename specified to the directory specified. directory is created if it does not exist. Used by fileman mode.

Parameters:

cmdline - is a string in the format: filename directory

Returns: _str

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.

Category:

File Functions


_fm_subcopy

_str _fm_subcopy(_str dest_path, _str doPause='')

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.

Returns: _str

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.

Category:

File Functions


_font_flags2props

void _font_flags2props(int font_flags)

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

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Frame Methods, Hscroll Bar Methods, Label Methods, List Box Methods, Radio Button Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_font_props2flags


_font_form

Displays the Font dialog box. The 'P' option specifies that printer fonts be listed. font specifies the initial font displayed in this dialog box.

Syntax _str show('-modal _font_form', options , font)

Parameters:

options - 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 - a string in the format: font_name, font_size, font_flags [,]

font_size - 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

Returns:

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','

Applies To:

All Window Objects

Category:

Forms

See Also:

_choose_font, _font_param


_font_param

_str _font_param(_str font_name, _str font_size, _str font_flags, _str rgb_color="")

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.

Returns: _str

Returns a string in the format: font_name, font_size, font_flags,

Category:

Miscellaneous Functions


_font_props2flags

typeless _font_props2flags()

Returns: typeless

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

Applies To:

All Window Objects, Form, Image, Picture Box, Gauge, Spin

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Frame Methods, Hscroll Bar Methods, Label Methods, List Box Methods, Radio Button Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_font_flags2props


_font_type

int _font_type(_str font_name, _str options="S")

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

Parameters:

options - 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.

Category:

Miscellaneous Functions

See Also:

_insert_font_list, _choose_font, _font_form, _isscalable_font


_for_each_control

_str _for_each_control(int wid, typeless callback, _str includeHiddenControls='', typeless arg4='', typeless arg5='', typeless arg6='', typeless arg7='')

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.

Returns: _str

Returns 0 if callback function always returns 0. Otherwise, the non-zero value (which can be anything) returned by the callback function is returned.

Category:

Miscellaneous Functions


_for_extform

Displays Fortran Options dialog box which is used for modifying the extension specific options for Fortran files.

Example:

void show('_for_extform')

Category:

Forms


_form_match

_str _form_match(_str name, boolean find_first)

Parameters:

name - form name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Form Functions


_form_parent

int _form_parent()

Returns: int

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.

Applies To:

All Window Objects

Category:

Form Functions


_free_selection

void _free_selection(_str markid)

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);

Category:

Selection Functions

See Also:

_alloc_selection


_FreeColor

void _FreeColor(int cfg)

Frees a color index returned by _AllocColor.

Parameters:

ColorIndex - index of color in color table

cfg - color index allocated using _AllocColor()

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_AllocColor, _SetTextColor, _GetTextColor, _default_color


_fselect_line

_str _fselect_line()

Replaces the first character of the current line with '>'. This function is used as input to the process_list procedure.

Returns: _str

Returns 0.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_get_child_extents

void _get_child_extents(int wid, int &w, int &h, boolean do_visible_controls)

Gets width, height in p_xyscale_mode of the all contained child controls.

Applies To:

Form

Categories:

Form Methods, Miscellaneous Functions


_get_cmdname

_str _get_cmdname(_str command)

Returns: _str

Returns the command name parsed from the front of the cmdline argument string.

Example:

_get_cmdname("/test")   =="/"
_get_cmdname("sb 1") =="sb"

Category:

Miscellaneous Functions


_get_focus

int _get_focus()

Returns: int

Returns the id of the window which currently has the focus. Zero is returned if a Slick-C® window does not have focus.

Category:

Miscellaneous Functions

See Also:

_set_focus


_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="")

This function is identical to the _menu_get_state function and is present only for backward compatibility with SlickEdit Version 1.0x.

Category:

Menu Functions


_get_reflow_pos

int _get_reflow_pos(int &Noflines_down, int &col)

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_get_sel

int _get_sel(int &start_pos=0, int &end_pos=0)

Returns: int

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".

Applies To:

Text Box, Combo Box

Categories:

Combo Box Methods, Text Box Methods

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="", int utf8=0, int encoding=0, int Noflines=0)

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.

Parameters:

start_col - start column

end_col - end column

buf_id - buffer id

mark_id - mark id

buf_name - buffer name

utf8 - utf8 property of buffer

encoding - encoding property of buffer (VSENCODING_...)

Noflines - number lines in selection (including NOSAVE,HIDDEN)

Returns: int

Returns 0 if successful. Otherwise, TEXT_NOT_SELECTED_RC is returned.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_get_var

typeless& _get_var(int index)

Parameters:

index - name table index of variable to get contents of.

Returns: typeless&

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));

Category:

Miscellaneous Functions

See Also:

_set_var, find_index, name_match


_get_window

void _get_window(int &x, int &y, int &width, int &height, _str option='C', int &icon_x=0, int &icon_y=0)

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).

Parameters:

x - (reference) x position

y - (reference) y-position

width - (reference) width

height - (reference) height

option - option, see above

icon_x - (reference) icon x-position

icon_y - (reference) icon y-position

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_move_window, p_x, p_y, p_width, p_height


_get_windows_directory

_str _get_windows_directory()

Returns: _str

Returns directory with trailing backslash which contains "system.ini".

Applies To:

All Window Objects

Category:

File Functions


_GetBufferContents

int _GetBufferContents(_str &text)

Get the contents of the current editor control buffer place it in the given string.

Parameters:

text - (reference) contents of file

Returns: int

0 on success, <0 on error, LINES_TRUNCATED_RC if the file is larger than the default Slick-C® string length

Categories:

String Functions, Edit Window Methods, Editor Control Methods

See Also:

_GetFileContents


_GetBufferInfoHt

typeless* _GetBufferInfoHt(_str key)

Retrieve a the per-file (per-buffer) data from a indexed by key.

Use _SetBufferInfoHt() to store data by hash table key.

Parameters:

key - A unique hash table key that represents a given item.

Returns: typeless*

Data found with hash table key.

Category:

Buffer Functions

See Also:

_SetBufferInfoHt, _GetBufferInfoHtPtr, _SetDialogInfoHt


_GetBufferInfoHtPtr

typeless* _GetBufferInfoHtPtr(_str key)

Retrieve a pointer to the per-file (per-buffer) data from a indexed by key.

Use _SetBufferInfoHt() to store data by hash table key.

Parameters:

key - A unique hash table key that represents a given item.

Returns: typeless*

Data found with hash table key.

Category:

Buffer Functions

See Also:

_SetBufferInfoHt, _GetBufferInfoHt, _SetDialogInfoHt


_GetButtonBar

int _GetButtonBar(int bbside)

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 if the following constants defined in "slick.sh":

Parameters:

bbside - one of the following:

  • BBSIDE_LEFT
  • BBSIDE_TOP
  • BBSIDE_RIGHT
  • BBSIDE_BOTTOM

Applies To:

MDI Window

Category:

MDI Window Methods

See Also:

_LoadButtonBar


_GetCaps

int _GetCaps()

Returns: int

Returns 1 if the file contains uppercase letters and no lowercase letters.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_GetCodehelpFlags

int _GetCodehelpFlags(_str lang='')

Get the codehelp options for the specified language. The options are a bitset of VSCODEHELPFLAG_*.

The options are stored per language. If the options are not yet defined for a language, then use def_codehelp_flags as the default.

Parameters:

lang - language ID, see p_LangId

Returns: int

bitset of VSCODEHELPFLAG_* options.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


_GetCommentEditingFlags

int _GetCommentEditingFlags(int mask=0, _str lang='')

Parameters:

mask - Mask for checking specific flags. Bitset of VS_COMMENT_EDITING_FLAG_

lang - Language to get flags for

Returns: int

Return the bitset of flags containing the language specific comment editing settings.

Category:

Miscellaneous Functions


_GetCommentWrapFlags

typeless _GetCommentWrapFlags(int commentWrapOption, _str lang='')

Get the comment wrap flags.

The options are stored per language. If the options are not yet defined for the specified language, then use CFcommentWrapDefaults as the default.

Parameters:

commentWrapOption - comment wrap option to extract

lang - language ID, see {@p_LangId}

Returns: typeless

structure of type CommentWrapSettings_t.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_GetDefaultExtensionOptions

int _GetDefaultExtensionOptions(_str extension, VS_LANGUAGE_OPTIONS &langOptions)

Deprecated. Use _GetDefaultLanguageOptions()

Gets language specific options for a specific file extension.

Parameters:

extension - File extension. For list of file extension types, use our File Extension Manager dialog ("Tools", "Options...", "File Extension Manager")

langOptions - Initialized to language specific options for extension.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

_SetDefaultExtensionOptions, _GetDefaultLanguageOptions, _SetDefaultLanguageOptions, _SetExtensionReferTo, _DeleteLanguageOptions


_GetDefaultLanguageOptions

int _GetDefaultLanguageOptions(_str lang, _str origExtension, VS_LANGUAGE_OPTIONS &langOptions)

Gets language specific options for a specific language type.

Parameters:

lang - Language ID (see p_LangId). For list of language types, use our Language Manager dialog ("Tools", "Options...", "Language Manager")

origExtension - File extension referred to this language. This is necessary for retrieving options which are genuinely per extension, such as encoding and associated open application.

langOptions - Initialized to language specific options for pszLangId.

Returns: int

Returns 0 if successful.

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

_SetDefaultLanguageOptions, _SetExtensionReferTo, _DeleteLanguageOptions, _SetDefaultLanguageOptions


_GetDialogInfo

typeless _GetDialogInfo(int index, int wid=0, boolean usePUser2=false)

Retrieve indexed data from a dialog. Use this instead of using multiple p_user variables for several controls.

Use _SetDialogInfo to store data to a dialog by index.

This function differs from _GetDialogInfoHt because it retrieves data from an array that is indexed by integer, rather than a hash table key. Use _SetDialogInfoHt, _GetDialogInfoHt to store/retrieve data to/from a dialog by hash table key.

Parameters:

index - A unique int that represents a given item. There should be a constant for this.

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, get the data from the p_user2 property

Returns: typeless

Data found with index.

Category:

Form Functions

See Also:

_SetDialogInfo, _SetDialogInfoHt, _GetDialogInfoHt


_GetDialogInfoHt

typeless _GetDialogInfoHt(_str key, int wid=0, boolean usePUser2=false)

Retrieve data from a dialog indexed by key. Use this instead of using multiple p_user variables for several controls.

Use _SetDialogInfoHt to store data to a dialog by hash table key.

This function differs from _GetDialogInfo because it retrieves data from a hash table that is indexed by string key, rather than an array. Use _SetDialogInfo, _GetDialogInfo to store/retrieve data to/from a dialog by integer index.

Parameters:

key - A unique hash table key that represents a given item.

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, get the items from the p_user2 property

Returns: typeless

Data found with hash table key.

Category:

Form Functions

See Also:

_SetDialogInfoHt, _SetDialogInfo, _GetDialogInfo


_GetDialogInfoHtPtr

typeless* _GetDialogInfoHtPtr(_str key, int wid=0, boolean usePUser2=false)

Retrieve a pointer to the data from a dialog indexed by key. Use this instead of using multiple p_user variables for several controls.

Use _SetDialogInfoHt to store data to a dialog by hash table key.

This function differs from _GetDialogInfo because it retrieves data from a hash table that is indexed by string key, rather than an array. Use _SetDialogInfo, _GetDialogInfo to store/retrieve data to/from a dialog by integer index.

Parameters:

key - A unique hash table key that represents a given item.

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, get the items from the p_user2 property

Returns: typeless*

Data found with hash table key.

Category:

Form Functions

See Also:

_SetDialogInfoHt, _SetDialogInfo, _GetDialogInfo


_GetDialogInfoPtr

typeless* _GetDialogInfoPtr(int index, int wid=0, boolean usePUser2=false)

Retrieve a pointer to indexed data from a dialog. Use this instead of using multiple p_user variables for several controls.

Use _SetDialogInfo to store data to a dialog by index.

This function differs from _GetDialogInfoHt because it retrieves data from an array that is indexed by integer, rather than a hash table key. Use _SetDialogInfoHt, _GetDialogInfoHt to store/retrieve data to/from a dialog by hash table key.

Parameters:

index - A unique int that represents a given item. There should be a constant for this.

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, get the data from the p_user2 property

Returns: typeless*

Data found with index.

Category:

Form Functions

See Also:

_SetDialogInfo, _SetDialogInfoHt, _GetDialogInfoHt


_GetDocCommentFlags

_str _GetDocCommentFlags(_str mask=DocCommentStyle1, _str lang='')

Parameters:

mask - Type of documention comment, on of DocComment

lang - Language to get options for

Returns: _str

Return a string of representing the types of documentation comments supported by the given language.

Since:

13.0

Category:

Miscellaneous Functions


_GetEmbeddedLangId

_str _GetEmbeddedLangId()

Returns: _str

Return the current language type, checking to see if we are in embedded code first.

Category:

Tagging Functions

See Also:

_do_list_members()


_getfield

typeless _getfield(_str indexOrName)

Parameters:

indexOrName - Name or position of field

Returns: typeless

Return a reference to the given class field. Fields may be specified either by name or by index (see _fieldindex). This function pays no attention to field visibility (private or protected).

Example:

class AAAA { int x; int y; };
class BBBB : AAAA { int z; };
void testGetField() {
   BBBB b;
   b.x = 0;
   b.y = 1;
   b.z = 2;
   int zero = b._getfield("x");
   int one  = b._getfield(1);
   int two  = b._getfield("z");
   b._getfield(0) = 10;
   int ten  = b._getfield("x");
}

Category:

Miscellaneous Functions

See Also:

_fieldindex, _fieldname, _length, _setfield


_GetFileContents

int _GetFileContents(_str filename, _str &text)

Get the contents of the given file and place it in the given string.

Parameters:

filename - file to open

text - (reference) contents of file

Returns: int

0 on success, <0 on error, LINES_TRUNCATED_RC if the file is larger than the default Slick-C® string length

Categories:

File Functions, String Functions


_GetFontCharSet

int _GetFontCharSet(_str FontName, _str FontSize, _str options="")

Parameters:

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.

Returns: int

Returns SHIFTJIS_CHARSET if the font specified contains Japanese characters.

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

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Frame Methods, Label Methods, List Box Methods, Radio Button Methods, Text Box Methods


_gethostname

_str _gethostname()

Returns: _str

Returns the host name of the current machine.

Category:

Miscellaneous Functions


_GetLanguageSetupOptions

int _GetLanguageSetupOptions(_str lang, VS_LANGUAGE_SETUP_OPTIONS &setup)

Retrieve the basic options for the given language. This applies only to the options stored in the def-language-[lang] variable.

Parameters:

lang - Language ID, see p_LangId

setup - Struct containing all language setup options

Category:

Miscellaneous Functions

See Also:

_SetLanguageSetupOptions(), _GetDefaultLanguageOptions(), _SetDefaultLanguageOptions()


_GetLanguageSpecificOption

typeless _GetLanguageSpecificOption(_str lang, _str fieldName, typeless defaultValue=null)

Get the specified option stored for the given language.

The options are stored per language mode. If the options are not yet defined for a language, then return defaultValue as the default.

Parameters:

lang - Language ID (see p_LangId For list of languages, use our Language Manager dialog ("Tools", "Options...", "Language Manager").

fieldName - may be one of the following:

p_mode_name or MN
Specifies mode name.
p_tabs or TABS
Specifies tab settings.
p_margins or MA
Specifies margins.
p_mode_eventtab or KEYTAB
Specifies mode event table.
p_word_wrap_style or WW
Specifies word wrap style.
p_indent_with_tabs or IWT
Specifies indent with tabs.
p_show_tabs or ST
Specifies to show tabs.
p_indent_style or IN
Specifies indent style.
p_word_chars or WC
Specifies word chaacters.
p_lexer_name or LN
Specifies lexer name.
p_color_flags or CF
Specifies color flags.
p_line_numbers_len or LNL
Specifies line number area size
p_softwrap or SW
Specifies soft wrap options
p_softwraponword or SOW
Specifies soft wrap on word

For the above options, value may not contain a comma character.

Additional field_name values:

LANGUAGE
General language setup data.
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
Language specific alias file
SMARTPASTE
Specifies Smart Paste(TM) options
SMARTTAB
Specifies tab expansion options
SMARTTAB
Set the smart tab value for this language, one of the following:
  • VSSMARTTAB_INDENT
  • VSSMARTTAB_MAYBE_REINDENT_STRICT
  • VSSMARTTAB_MAYBE_REINDENT
  • VSSMARTTAB_ALWAYS_REINDENT
BEGINEND
Specifies begin/end pairs
OPTIONS
Specifies extension specific options. We recommend that you use macro recording to correctly generate calls that set this option.
NUMBERING
Specifies line numbering options
SURROUND
Specifies dynamic surround flags
AUTOCOMPLETE
Specifies auto-complete flags
AUTOCOMPLETEMIN
Min word length for auto-complete
SYMBOLCOLORING
Symbol Coloring option flags/dd>
INDENT
Indentation options
CODEHELP
Context Tagging option flags
COMMENTEDITING
Comment editing option flags
DOCCOMMENT
Documentation comment options
COMMENT-WRAP
Specifies comment wrap options
XML-WRAP
Specifies XML wrap options
AUTOVALIDATE
Specifies XML validation options
INHERIT
Specifies parent language for tagging callback inheritance
ADAPTIVE-FLAGS
Specifies adaptive flags
ADAPTIVE-FORMATTING
Adaptive formatting flags

The following additional field_name options are actually stored per file extension rather than per language.

LANG-FOR-EXT
Maps file extension to language
ENCODING
Extension-specific encoding
ASSOCIATION
Extension-specific open application

defaultValue - Value to use if the option is not already set for this langauge.

Category:

Miscellaneous Functions

See Also:

_SetLanguageOption, _GetLanguageSetupOptions, _GetDefaultLanguageOptions


_GetListColCaption

_str _GetListColCaption(int index)

Returns the caption for corresponding to the column index specified.

Applies To:

Label

Category:

Label Methods

See Also:

_GetListColInfo, _SetListColCaption, _SetListColInfo


_GetListColInfo

void _GetListColInfo(int index, int &width, int &flags=0, int &state=0)

This method retrieves the column values set by the _SetListColInfo method.

Applies To:

Label

Category:

Label Methods

See Also:

_SetListColInfo, _SetListColCaption, _SetListColInfo


_GetSurroundModeFlags

int _GetSurroundModeFlags(_str lang='')

Get the language-specific surround options.

The options are stored per language. If the options are not yet defined for a language, then use def_surround_mode_options as the default.

Parameters:

lang - language ID (p_LangId)

Returns: int

bitset of VS_SURROUND_MODE_* options.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


_GetSymbolColoringOptions

int _GetSymbolColoringOptions(_str lang='')

Get the symbol coloring options which are a bitset of SYMBOL_COLOR_*.

The options are stored per extension type. If the options are not yet defined for an extension, then use SYMBOL_COLOR_BOLD_DEFINITIONS as the default.

Parameters:

lang - language ID -- see p_LangId

Returns: int

bitset of SYMBOL_COLOR_* options.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


_GetSymbolColoringSchemeName

_str _GetSymbolColoringSchemeName()

Returns: _str

Return the name of the symbol coloring scheme active for the current file.

Categories:

Edit Window Methods, Editor Control Methods


_GetSystemMetrics

int _GetSystemMetrics(int vsm_index)

Parameters:

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.

Returns: int

Returns operating system default value for specified constant.

Category:

Miscellaneous Functions


_getTabInfo

_str _getTabInfo(int ActiveTab)

Retrieves the tab information for the given tab.

Parameters:

ActiveTab -

Returns: _str

_str Returns a space-delimited string with the following info:

Active Enabled
Active tab order
Active picture
Partial Caption
Top-Left Corner
Bottom-Right Corner
First Activate
Tab Width: Picture Only
Tab Width: Picture and Normal Caption
Tab Width: Picture and Active (Bold) Caption
Active Caption
Active Help
Active Tooltip

Applies To:

SSTab

Category:

SSTab Methods


_GetTextColor

int _GetTextColor()

Returns the color index for the character at the cursor.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_FreeColor, _AllocColor, _SetTextColor, _default_color


_GetWildcardsForLanguage

_str _GetWildcardsForLanguage(_str lang)

Find all the file name extensions associated with the given language and create a file name wildcard expression for those file types.

Parameters:

lang - Language ID (see p_LangId For a list of language types, see the Language Options ("Tools", "Options", "Language Setup...")

Returns: _str

List of wildcards, separated by semicolons corresponding to the file name extensions associated with the given language mode.

Category:

Miscellaneous Functions

See Also:

_Ext2LangId(), p_LangId


_gl_extform

Displays GL Formatting Options dialog box which is used for modifying the extension specific options for the Progress 4GL language.

Category:

Forms


_GoToOldLineNumber

void _GoToOldLineNumber(int OldLineNumber)

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.

Parameters:

OldLineNumber -

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


_GoToROffset

int _GoToROffset(long offset)

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.

Parameters:

offset - offset to go to

Returns:

Returns 0 if offset is a valid offset. Otherwise an negative error code is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

goto_point, point, _QROffset, _GoToROffset


_grid_height

int _grid_height(int new_height=-1)

Returns: int

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).

Category:

Miscellaneous Functions

See Also:

gui_grid, _grid_width, grid


_grid_width

int _grid_width(int new_width=-1)

Returns: int

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).

Category:

Miscellaneous Functions

See Also:

gui_grid, grid, _grid_height


_hex_begin_line

void _hex_begin_line()

Moves the cursor to the beginning of a hex line when in hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_down

int _hex_down(boolean doScreenLines)

Moves the cursor down one hex line when in hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_end_line

void _hex_end_line()

Moves the cursor to the last bye in the current hex line.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_keyin

void _hex_keyin(_str string)

Inserts bytes or nibbles depending on whether cursor is in ASCII column or hex nibbles.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_left

void _hex_left()

Moves cursor left one byte or one nibble depending on whether cursor is in ASCII column or hex nibbles.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_pagedown

void _hex_pagedown()

Moves cursor down to next hex page.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_pageup

void _hex_pageup()

Moves cursor up to previous hex page.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_right

void _hex_right()

Moves cursor right one byte or one nibble depending on whether cursor is in ASCII column or hex nibbles.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_hex_up

int _hex_up(boolean doScreenLines)

Moves the cursor up one hex line when in hex mode.

Categories:

Edit Window Methods, Editor Control Methods


_hsb_thumb_pos

void _hsb_thumb_pos()

This function is executed when the on_hsb_thumb_pos event occurs to horizontally scroll the current window. This event occurs while the user drags the thumb (elevator). The hsb_pos argument is a number between 0 and 32000.

Category:

Miscellaneous Functions


_idle_time_elapsed

long _idle_time_elapsed()

Returns: long

Returns the time in milliseconds since the last key or mouse event.

Category:

Miscellaneous Functions


_in_comment

boolean _in_comment(boolean in_ml_comment=false)

Determines if the cursor is in a comment

Parameters:

in_ml_comment - If in_ml_comment is true, true is return only if the cursor is inside a multi-line comment. This is useful determining if after pressing ENTER (splitting the line at the cursor) the cursor will be inside a multi-line comment.

Returns: boolean

Returns true if cursor is within a comment and p_lexer_name is not "".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_in_string

boolean _in_string()

Determines if the cursor is in a string

Returns: boolean

Returns true if cursor is within a string and p_lexer_name is not "".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_inarray

boolean _inarray(_str string, _str(&array)[])

Is the given string in the given string array?

Parameters:

string - string to search for

array - array to search (case sensitive)

Returns: boolean

1 if string is an element in array.

Category:

Miscellaneous Functions


_indexin

typeless* _indexin(_str index)

Parameters:

index - index or key corresponding to item to look for

Returns: typeless*

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
}

Category:

Miscellaneous Functions

See Also:

_el, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


_InheritColor

int _InheritColor(int cfg, int parent_color=0)

If 'parent_color' is not specified, just return what color index 'cfg' inherits color or font attributes from. If 'parent_color' is given, set the parent for this color to the specified color.

Parameters:

cfg - color index (note you can not set the parent color for default CFG_* color constants, however, these all implicitly consider CFG_WINDOW_TEXT as their parent color.

parent_color - color index for 'cfg' to inherit from.

Returns: int

Returns the parent color index.

Categories:

Edit Window Methods, Editor Control Methods


_ini_delete_section

int _ini_delete_section(_str filename, _str section_name)

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: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions


_ini_delete_section2

int _ini_delete_section2(_str section_name)

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: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_ini_find_section

int _ini_find_section(_str section_name)

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: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_ini_get_hashtable_values

int _ini_get_hashtable_values(_str filename, _str section_name, _str(&fieldValueTable):[])

Gets all name=value pairs from a section and stores them in the hash table fieldValueTable as name=>value. The start of a section is identified by a section name in square brackets. All name=value pairs until the next section or end of file are copied.

If there is no value (i.e. no '=value' part) for a particular item in the section, then only the hash table key will be set and the hash table value will be null.

Parameters:

filename - ini file to get section from.

section_name - Section to load into data.

fieldValueTable - Hash table that will receive data from section specified in the ini file.

Returns: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions


_ini_get_section

int _ini_get_section(_str filename, _str section_name, int &temp_view_id)

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: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions


_ini_get_section_array

int _ini_get_section_array(_str filename, _str section_name, _str(&data)[])

Gets all lines from a section and stores them in the array data. 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.

This will not parse values, but get whole lines. It is well suited to grabbing lists of files (no '=value' to worry about).

Parameters:

filename - ini file to get section from.

section_name - Section to load into data.

data - Array that will receive data from section specified in the ini file.

Returns: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions


_ini_get_sections_list

int _ini_get_sections_list(_str filename, _str(&List)[], _str Prefix='')

11:35am 6/1/2000 Dan added this function so that we can get a list of ini sections in an array

Parameters:

filename - Name of the ini file.

List - Array to return section names in

Returns: int

returns 0 if successful. Otherwise probably FILE_NOT_FOUND_RC, or STRING_NOT_FOUND_RC.

Categories:

File Functions, Miscellaneous Functions


_ini_get_value

int _ini_get_value(_str filename, _str section_name, _str field_name, _str &result, _str default_value='', _str case_option=null)

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.

Parameters:

default_value - has no effect on ini file. It only affects return value when section name or field name does not exist.

   ".ini" File Syntax:
         [section1]
         field_name1=value1
         field_name2=value2
         ...
         [section2]
         field_name1=value1
         field_name2=value2
         ...

Returns: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions


_ini_get_value_expand_copy_from

int _ini_get_value_expand_copy_from(_str filename, _str section_name, _str field_name, _str &result, _str default_value="")

This is simply a wrapper for _ini_get_value() that supports expanding the 'copy_from' value in the prjpacks file

Categories:

File Functions, Miscellaneous Functions


_ini_list_sections

int _ini_list_sections(_str filename)

Returns: int

Returns 0 if successful. Creates a buffer and view in list box format of all section names in square brackets in filename.

     ".ini" File Syntax:
         [section1]
         field_name1=value1
         field_name2=value2
         ...
         [section2]
         field_name1=value1
         field_name2=value2
         ...

Categories:

File Functions, Miscellaneous Functions


_ini_parse_line

int _ini_parse_line(int ini_view, _str &field_name, _str &info, int first=0)

After a call to _ini_find_section, this function is called to parse each field_name=value line in the section.

Returns: int

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
         ...

Categories:

File Functions, Miscellaneous Functions


_ini_put_section

int _ini_put_section(_str filename, _str section_name, int temp_view_id)

Replaces all field_name=value lines in the section specified with the buffer text contained in temp_view_id.

Returns: int

zero if successful

     ".ini" File Syntax:
         [section1]
         field_name1=value1
         field_name2=value2
         ...
         [section2]
         field_name1=value1
         field_name2=value2
         ...

Categories:

File Functions, Miscellaneous Functions

See Also:

_ini_replace_section


_ini_replace_section

int _ini_replace_section(_str filename, _str section_name, int temp_view_id)

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.

Returns: int

0 if successful

     ".ini" File Syntax:
         [section1]
         field_name1=value1
         field_name2=value2
         ...
         [section2]
         field_name1=value1
         field_name2=value2
         ...

Categories:

File Functions, Miscellaneous Functions


_ini_set_hashtable_values

int _ini_set_hashtable_values(_str filename, _str section_name, _str(&fieldValueTable):[], _str case_option=null)

Sets values of a table full of fields and values (field name = key, value = value).

Parameters:

filename -

section_name -

fieldValueTable -

case_option -

Returns: int

0 if successful

Categories:

File Functions, Miscellaneous Functions


_ini_set_value

int _ini_set_value(_str filename, _str section_name, _str field_name, _str new_value, _str case_option=null)

Sets value of field_name defined within section of filename to value specified.

Returns: int

0 if successful

     ".ini" File Syntax:
         [section1]
         field_name1=value1
         field_name2=value2
         ...
         [section2]
         field_name1=value1
         field_name2=value2
         ...

Categories:

File Functions, Miscellaneous Functions


_insert.lbutton_up

typeless _insert.lbutton_up()

Displays Pascal Options dialog box which is used for modifying the extension specific options for the Pascal language.

Example:

void show('_pas_extform')

Category:

File Functions


_insert_drive_list

void _insert_drive_list()

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();
   }

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Methods, Editor Control Methods, File Functions, List Box Methods


_insert_font_list

int _insert_font_list(_str options="S", _str font_name="")

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.

Parameters:

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();
}

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Methods, Editor Control Methods, List Box Methods

See Also:

_font_type, _choose_font, _font_form, _isscalable_font


_insert_name_list

int _insert_name_list(int type_flag, _str name_prefix="")

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".

Category:

Names Table Functions


_insert_state

void _insert_state(_str mode="", _str set_default="")

Each text box has its own insert state. However, all edit windows and editor controls share the same insert state.

Returns: void

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');

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

_insert_toggle


_insert_text

void _insert_text(_str string, boolean binary=false, _str newlineChars="\r\n")

Parameters:

string - text to insert

binary - defaults to false.

NewLineChars - defaults to "\r\n". 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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_insert_text_raw

void _insert_text_raw(_str string, boolean binary=false, _str newlineChars="\r\n")

Parameters:

binary - defaults to false.

NewLineChars - defaults to "\r\n".

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_insert_toggle

void _insert_toggle()

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');

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

_insert_state


_insertel

void _insertel(typeless value, typeless index, int Nofitems=1)

Inserts an element into an array or hash table. This method is not necessary for hash tables, but very useful for inserting into an array and shifting the the array items correctly. It also allows you to specify a number of items, so you can use this method to effeciently initialize an array. Nofitems defaults to 1.

Parameters:

value - value to insert into the array

index - index / key corresponding to item to insert

Nofitems - number of items to insert (arrays only)

Example:

t[0]=1;
t[1]=2;
t[2]=3;
t._insertel(4,1,2);  // t = {1,4,4,2,3}

Category:

Miscellaneous Functions

See Also:

_el, _deleteel, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


_InsertSlickCProfilingData

void _InsertSlickCProfilingData(int wid)

Insert Slick-C® profiling data to the designated editor control. The data is inserted one line per function, and tab-separated. The columns are as follows:

  1. module name -- loaded module function comes from
  2. offset -- offset of function within module
  3. function name -- optional
  4. number of calls
  5. mininimum time in function and descendants
  6. maxinimum time in function and descendants
  7. total time in function and descendants
  8. mininimum time in function only
  9. maxinimum time in function only
  10. total time in function only
  11. future data

Parameters:

wid - Editor control to insert into.

Category:

Macro Programming Functions

See Also:

profile, _SlickCProfiling


_inslit.on_create

typeless _inslit.on_create()

Displays the Insert Literal dialog box.

Returns: typeless

Returns '' if the user cancelled. Otherwise, a 1 character length string is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_instanceof

boolean _instanceof(_str typeName)

Parameters:

typeName - String containing name of type to test.

Returns: boolean

Return true if the given class is an instance of the named class. Note that it is preferable to use the "instanceof" operator instead of this builtin wherever possible.

Example:

class AAAA { int x; int y; };
class BBBB : AAAA { int z; };
class CCCC { _str ch; };
void testInstanceOf() {
   AAAA a;
   BBBB b;
   CCCC c;
   true1  := b._instanceof("AAAA");  // BBBB inherits from AAAA
   true2  := b._instanceof("BBBB");  // b._typename() = BBBB
   false1 := b._instanceof("CCCC");  // no relation to CCCC
   false2 := b._instanceof("DDDD");  // no such class DDDD
}

Category:

Miscellaneous Functions

See Also:

_typename, _construct


_is_background_tagging_enabled

boolean _is_background_tagging_enabled(int option=0)

Parameters:

option -

  • AUTOTAG_WORKSPACE_NO_THREADS -- DO NOT use threads for building workspace tag file
  • AUTOTAG_BUFFERS_NO_THREADS -- DO NOT use thread for tagging buffer or save
  • AUTOTAG_FILES_NO_THREADS -- DO NOT use threads for tagging files
  • AUTOTAG_WORKSPACE_NO_THREADS -- DO NOT use threads for tagging workspace files
  • AUTOTAG_LANGUAGE_NO_THREADS -- DO NOT use threads for language support tag files
  • AUTOTAG_SILENT_THREADS -- Report background tagging activity on status bar

Returns: boolean

Returns 'true' if the given background tagging feature is enabled.

Categories:

Search Functions, Tagging Functions


_is_background_tagging_supported

boolean _is_background_tagging_supported(_str lang=null)

Parameters:

lang - language type to check

Returns: boolean

Returns non-zero value if the given language has support for asynchronous (background) tagging.

Categories:

Search Functions, Tagging Functions


_IsCodePageLoadedAsUTF8

boolean _IsCodePageLoadedAsUTF8(int encoding)

Returns: boolean

Returns true if the encoding will be loaded as UTF-8.

This function does not support any AUTO encoding such as "VSENCODING_AUTOUNICODE" which requires reading a files contents to determine if SlickEdit will load the file as UTF-8.

Category:

Keyboard Functions


_isempty

boolean _isempty()

Returns: boolean

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]);
}

Category:

Miscellaneous Functions

See Also:

Arrays, Hash Tables, _makeempty, _varformat


_IsEventPending

boolean _IsEventPending(int flags)

Test if a key or mouse event is available.

Parameters:

flags - One or more of EventPendingFlags.

Returns: boolean

true if event is available.

Category:

Keyboard Functions

See Also:

get_event, last_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


_isfunptr

boolean _isfunptr(typeless t)

Returns: boolean

Returns true if t is a valid pointer to a function that can be called in the Slick-C® syntax (*t)(...).

Category:

Miscellaneous Functions


_IsKeyDown

int _IsKeyDown(_str ShiftKeyEvent)

Returns: int

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);
           }

Category:

Keyboard Functions


_IsKeyPending

boolean _IsKeyPending(boolean mouse=true, boolean macro=false)

Test if a keyboard or mouse event is available.

This function does not check for MOUSE-MOVE events. If you want to check for mouse-move events, use _IsEventPending.

Parameters:

mouse - Set to false if you do not want to check for mouse events. Defaults to true.

macro - Set to true if you want to check for events from recorded macro playback. Defaults to false.

Returns: boolean

true if event is available.

Category:

Keyboard Functions

See Also:

_IsEventPending, get_event, last_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


_isloaded

int _isloaded(int form_index, _str options="")

Parameters:

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.

Returns: int

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.

Category:

Form Functions

See Also:

_find_object, _find_formobj, _find_control


_isno_name

boolean _isno_name(_str name)

Returns: boolean

Returns true if the string name starts with "no- name

Category:

Buffer Functions


_isnull_selection

boolean _isnull_selection(_str markid='')

Returns: boolean

Returns true if there is no selection or the selection is zero bytes in length. Otherwise, false is returned.

Category:

Selection Functions

See Also:

_select_type, select_active


_isscalable_font

int _isscalable_font(_str font_name, _str options="S")

Parameters:

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.

Returns: int

Returns non-zero value if the font_name given is a scalable font.

Category:

Miscellaneous Functions

See Also:

_insert_font_list, _choose_font, _font_form, _font_type


_istagging_supported

boolean _istagging_supported(_str lang=null)

Parameters:

lang - language type to check

Returns: boolean

Returns non-zero value if the given language has support for tagging available.

Categories:

Search Functions, Tagging Functions

See Also:

push_tag, gui_make_tags, make_tags


_iswindow_valid

boolean _iswindow_valid(int wid)

Returns: boolean

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);
}

Category:

Window Functions


_join_line

int _join_line()

Joins the next line to the end of the current line.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_JoinLineToCursor


_JoinLineToCursor

int _JoinLineToCursor()

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: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_join_line


_justifyok.on_create

typeless _justifyok.on_create(typeless word_wrap_style=0)

Displays Justification dialog box. See justify function for information on justify_option.

Returns: typeless

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_kbd_add_callback

void _kbd_add_callback(int callback_index, _str(&keyList)[], _str options=null)

Add an extensions specific keyboard callback

Parameters:

callback_index - Index into names table of command or function to call. Signature is boolean mycallback(). Return true if no further processing of this key is necessary.

keyList - Array of keys that may be handled by this callback. If all keys or huge list is required, specify null or a array of length 0 to request all keys.

options - options may contain one or more of the following option letters:

Applies To:

Edit Window, Editor Control

Example:

boolean _on_key_my_callback() {
    say('key='last_event());
    return(false);
}
// Note that these callbacks typically use the naming convention _on_key_<p_LangId>
_str keyList[];
keyList[0]='(';keyList[1]=')';
_kbd_add_callback(find_index("_on_key_my_callback",PROC_TYPE),keyList);

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_kbd_remove_callback, _kbd_try_callbacks


_kbd_remove_callback

void _kbd_remove_callback(int callback_index)

remove an extensions specific keyboard callback

Parameters:

callback_index - Index of callback function specified by _kbd_add_callback. Using callback_index == -1 will remove all callbacks.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_kbd_add_callback, _kbd_try_callbacks


_kbd_try_callbacks

void _kbd_try_callbacks()

Tries each extensions specific keyboard callback that supports this key. If one of the callbacks returns true, no further processing of the key is done.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_kbd_add_callback, _kbd_remove_callback


_keepquit_id

int _keepquit_id(int buf_id)

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.

Returns: int

Returns 0.

Applies To:

Edit Window

Category:

Buffer Functions


_key_for_display

_str _key_for_display(_str key)

Returns: _str

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'.

Category:

Keyboard Functions


_kill_timer

int _kill_timer(int timer_handle=-1)

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.

Category:

Miscellaneous Functions

See Also:

_set_timer


_lang_symbol_coloring_options

int _lang_symbol_coloring_options(_str langID, int value=null)

Gets/sets the symbol coloring options which are a bitset of SYMBOL_COLOR_*.

The options are stored per extension type. If the options are not yet defined for an extension, then use SYMBOL_COLOR_BOLD_DEFINITIONS as the default.

Parameters:

lang - language ID -- see p_LangId

value - the value you wish to set the symbol coloring options. Use null to retrieve the current options.

Returns: int

bitset of SYMBOL_COLOR_* options.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


_LangId2LexerName

_str _LangId2LexerName(_str lang)

Parameters:

lang - File language ID (see p_LangId). For list of language types, use our Language Options dialog ("Tools", "Options", "Language Setup...")

Returns: _str

Return the name of the color coding lexer for the given language ID.

Category:

Miscellaneous Functions

See Also:

_Ext2LangId, _Filename2LangId


_LangId2Modename

_str _LangId2Modename(_str lang)

Converts a language ID (canonical file extension) to the unique display name for a language.

Parameters:

lang - Language ID (see p_LangId

Returns: _str

The mode name for the language.

Category:

Miscellaneous Functions

See Also:

_Modename2LangId, _Filename2LangId, _Ext2LangId


_LanguageCallbackProcessBuffer

void _LanguageCallbackProcessBuffer(int reqFlags)

This function tells the language specific callbacks to be executed. The language specific callbacks start with the prefix _CBProcessBuffer_[lang]_, where [lang] is a language ID.

Parameters:

int - reqFlags

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


_LanguageInheritsFrom

boolean _LanguageInheritsFrom(_str parent, _str lang=null)

Does the current source language match or inherit from the given language?

If 'lang' is not specified, the current object must be an editor control.

Parameters:

parent - language ID to compare to

lang - current language ID (default=p_LangId)

Returns: boolean

'true' if the language matches, 'false' otherwise.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions

See Also:

_SetLanguageInheritsFrom, _FindLanguageCallbackIndex


_LanguageSetupToInfo

_str _LanguageSetupToInfo(VS_LANGUAGE_SETUP_OPTIONS &setup)

Convert language specific options information to the string format which is stored in def-language-[lang].

Example:

"MN=ModeName,TABS=[Tabs],...,SOW=SoftWrapOnWord"

Category:

Miscellaneous Functions


_last_window_id

int _last_window_id()

Returns: int

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)
}

Category:

Window Functions


_lastel

typeless& _lastel()

Returns: typeless&

Returns last element in an array. Equivalent to ar[ar._length() - 1].

Example:

t[0]=1;
t[1]=2;
t[2]=3;
i = t._lastel();   // returns t[2]

Category:

Miscellaneous Functions

See Also:

_deleteel, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort, _length


_lbadd_bounded

void _lbadd_bounded(_str text, int max_items=25)

Adds an item to the top of a list box. If the item is already in the list, just move it to the top. Limit the total number of items to 'max_items'. This function is useful for keeping a most-recently-used list of items, such as you would from a search drop-down.

Parameters:

text - The text of item to be added to the list box.

max_items - Maximum number of items to keep in list box.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbadd_item, _lbsearch, _lbget_item, _lbset_item


_lbadd_item

void _lbadd_item(_str text, _str indent="", _str picture_index="")

Adds an item to a list box after the current line.

Parameters:

item - The 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;
}

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbget_text, _lbget_seltext, _lbget_item, _lbset_item


_lbbottom

void _lbbottom()

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.

Applies To:

List Box

Category:

List Box Methods


_lbclear

void _lbclear()

Deletes all lines in a list box or buffer.

Applies To:

List Box

Category:

List Box Methods


_lbdelete_item

int _lbdelete_item()

Deletes the current item in a list box and decrements the p_Nofselected property if the current item was selected.

Applies To:

List Box

Category:

List Box Methods


_lbdeselect_all

void _lbdeselect_all()

Deselects all selected lines in a list box. The p_Nofselected property is set to 0.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbdeselect_line

void _lbdeselect_line()

Deselects the current item in the list box. The p_Nofselected property is decremented if the current item was selected.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbdown

_str _lbdown()

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.

Returns: _str

Returns non-zero value if the function is called when already on last item.

Applies To:

List Box

Category:

List Box Methods


_lbfind_selected

int _lbfind_selected(boolean find_first)

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).

Returns: int

Returns 0 if a selected item is found.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result


_lbget_item

void _lbget_item(_str &item, var indent, var pic_index)

Places the text, indent, and picture_index of the current item in the list box into the corresponding variables.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbget_text, _lbget_seltext, _lbset_item, _lbadd_item


_lbget_seltext

_str _lbget_seltext()

Returns: _str

Returns the text of current item in the list box. If the current item is not selected, '' is returned.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbget_text, _lbget_item


_lbget_text

_str _lbget_text()

Returns: _str

Returns the text of current item in the list box - regardless of what is selected

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbget_seltext, _lbget_item


_lbi_search

_str _lbi_search(_str &last_data, _str text, _str case_sense="", ...)

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.

Parameters:

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 SlickEdit regular expression.
U
Interpret text as a UNIX regular expression.
B
Interpret text as a Brief regular expression.

Returns: _str

Returns 0 if match is found

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbsearch


_lbinvert

void _lbinvert()

Select all lines in the list box which are currently not selected and deselects all lines which are selected.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbfind_selected, _lbmulti_select_result, _lbisline_selected


_lbisline_selected

_str _lbisline_selected()

Returns: _str

Returns non-zero value if the current line in the list box is selected.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbfind_selected, _lbmulti_select_result


_lbmulti_select_result

_str _lbmulti_select_result(_str always_create_list="", _str cwd="", typeless isfileman_list="")

Returns: _str

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.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbfind_selected


_lbsearch

_str _lbsearch(_str text, _str options="")

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.

Parameters:

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.

Returns: _str

Returns 0 if match is found

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbi_search


_lbselect_all

void _lbselect_all()

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.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbselect_line

void _lbselect_line()

Selects the current item in the list box. The p_Nofselected property is incremented if the current item was not selected.

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbdeselect_all, _lbselect_all, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbset_item

void _lbset_item(_str text, _str indent="", _str picture_index="")

Replaces the current item in a list box.

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;
}

Applies To:

List Box

Category:

List Box Methods

See Also:

_lbget_text, _lbget_seltext, _lbget_item, _lbadd_item


_lbsort

int _lbsort(_str options="", typeless start_point="", typeless end_point="")

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.

Parameters:

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.
}

Applies To:

List Box

Category:

List Box Methods


_lbtop

void _lbtop()

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.

Applies To:

List Box

Category:

List Box Methods


_lbup

_str _lbup()

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.

Returns: _str

Returns non-zero value call when on line 0 (p_line==0).

Applies To:

List Box

Category:

List Box Methods


_length

int _length()

Returns: int

Returns the number of elements in the given variable.

  • array -- the number of elements in the array
  • hash table -- the number of items in the hash table
  • struct or class instance -- the number of fields
  • string -- the length of the string

Example:

int a[];
a[0]=1;
a[1]=2;
messageNwait("Number of elements="a._length());

Category:

Miscellaneous Functions


_LexerName2LangId

_str _LexerName2LangId(_str lexer_name)

Locates the first language specification that uses the given lexer name. Note there is no guarantee that the mapping form lexer names to languages should be unique, so use this function sparingly, as it will *only* find the first match.

Parameters:

lexer_name - Language lexer name

Returns: _str

The language ID for the language corresponding to 'lexer_name'.

Category:

Miscellaneous Functions

See Also:

_LangId2LexerName, _Modename2LangId, _Filename2LangId, _Ext2LangId


_line_length

int _line_length(boolean includeNLChars=false)

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_lineflags

int _lineflags(int newflags=0, int mask=newflags)

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.

Returns: int

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");
   }

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


_LineMarkerAdd

int _LineMarkerAdd(int wid, int RealLineNum, boolean isRealLineNum, int NofLines, int BMIndex, int type, _str Message)

Adds a new line marker.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the marker type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled breakpoint.
_breakpn.bmp
Indicates a line with a disabled breakpoint.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.
_watchpt.bmp
Indicates a line with an enabled watchpoint.

type - Type allocated by _MarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

Returns: int

Returns index of new line marker.

Example:

// Add debug bitmap to give the visual effect of a
// break point.
int type=_MarkerTypeAlloc();
int LineMarkerIndex=_LineMarkerAdd(p_window_id,p_line,
      0,4, find_index("_breakpt.bmp", PICTURE_TYPE),
      type,"");

// Add a line marker which draws a box
int type=_MarkerTypeAlloc();
int LineMarkerIndex=_LineMarkerAdd(p_window_id,p_line,
      0,4,find_index('_edplus.bmp',PICTURE_TYPE),
      type,"line 1
line2");
_LineMarkerSetMousePointer(LineMarkerIndex,MP_CROSS);
_LineMarkerSetStyleColor(LineMarkerIndex,0xff0000);
_MarkerTypeSetFlags(type,VSMARKERTYPEFLAG_DRAW_BOX|VSMARKERTYPEFLAG_AUTO_
REMOVE);

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_LineMarkerAddB

int _LineMarkerAddB(_str pszBufName, int RealLineNum, int isRealLineNum, int NofLines, int BMIndex, int type, _str pszMessage)

Adds a new, potentially deferred, line marker.

Parameters:

pszBufName - Name of file to add the line marker to.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the marker type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled breakpoint.
_breakpn.bmp
Indicates a line with a disabled breakpoint.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.
_watchpt.bmp
Indicates a line with an enabled watchpoint.

type - Type allocated by _MarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

Returns: int

Returns index of new line marker.

Example:

// Add debug bitmap to give the visual effect of a
// break point.
int type=_MarkerTypeAlloc();
int LineMarkerIndex=_LineMarkerAddB(p_buf_name,p_l
      0,4, find_index("_breakpt.bmp", PICTURE_TYPE),
      type,"");

// Add a line marker which draws a box
int type=_MarkerTypeAlloc();
int LineMarkerIndex=_LineMarkerAddB(p_buf_name,p_li
      0,4,find_index('_edplus.bmp',PICTURE_TYPE),
      type,"line 1
line2");
_LineMarkerSetMousePointer(LineMarkerIndex,MP_CROSS);
_LineMarkerSetStyleColor(LineMarkerIndex,0xff0000);
_MarkerTypeSetFlags(type,VSMARKERTYPEFLAG_DRAW_BOX|VSMARKERTYPEFLAG_AUTO_
REMOVE);

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

_LineMarkerAdd


_LineMarkerFindList

void _LineMarkerFindList(int(&list)[], int wid, int LineNum, long LineOffset, boolean CheckNofLines)

Finds list of line markers which match.

Parameters:

list - Output. List of line marker indexes.

wid - Window id of editor control. 0 specifies the current object.

LineNum - Line number returned by vsPropGetI(wid,VSP_LINE)

LineOffset - Optional specifies offset to search for line markers which use MarkIds.

CheckNofLines - When on, only line markers which NofLines which include this line are returned.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_LineMarkerRemove

void _LineMarkerRemove(int LineMarkerIndex)

Removes line marker.

Parameters:

LineMarkerIndex - Index of line marker returned by a _LineMarkerAdd function.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_LineMarkerRemoveAllType

void _LineMarkerRemoveAllType(int type)

Removes all line markers that have the specified type.

Parameters:

type - Type of marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_LineMarkerRemoveType

void _LineMarkerRemoveType(int wid, int type)

Removes all line markers that have the specified type from window.

Parameters:

type - Type of stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_LineMarkerSetMousePointer

void _LineMarkerSetMousePointer(int LineMarkerIndex, int MousePointer)

Sets the mouse pointer for the line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

MousePointer - Index to mouse pointer. One of VSMP_ constants.

Applies To:

Edit Window, Editor Control

Categories:

Marker Functions, Mouse Functions


_LineMarkerSetStyleColor

void _LineMarkerSetStyleColor(int LineMarkerIndex, int RGBBoxColor)

Sets the RBG box color line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

RGBColor - RGB color.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_list_processes

int _list_processes

Get a list of active process on the current system.

Parameters:

process_list - array of process info to populate

Category:

Miscellaneous Functions


_load

int _load(_str modules, _str load_option="L")

Parameters:

load_option - may be 'L','R', or 'U'. Module name extensions are replaced with '.ex'.

Returns: int

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.

Category:

Macro Programming Functions

See Also:

unload, load, gui_load, gui_unload, load_all


_load_subform

int _load_subform(_str form_name, int parent_wid, _str options='')

Loads a form as a child into another form, without the form frame.

Parameters:

form_name - Form name to be loaded.

parent_wid - Parent window to insert form.

options - Load options.

''
Default.
'H'
Hidden.

Returns: int

window id of created subform

Applies To:

Form

Category:

Form Methods


_load_template

int _load_template(int index_or_wid, int parent, _str options, ...)

Load a Slick-C resource template by index.

Parameters:

index_or_wid - Resource template index or window id of already-created object. If 'W' or 'R' options are used, then it is the window id of the already-created object. Otherwise it is the resource template.

parent - Parent window id.

options - Load options.

  • 'H' = Load template hidden.
  • 'E' = Used internally by dialog editor. Load template in edit mode.
  • 'A' = Load template with ON_CREATE arguments passed on the interpreter stack. IMPORTANT: See VSLOAD_ARGPARAMS for more explanation before you attempt to use this option.
  • 'W' = Reload template with provided wid passed in index_or_wid parameter.
  • 'R' = Reinitialize template with provided wid passed in index_or_wid parameter. p_user, p_user2, * window geometry, default property values are reset.
  • 'C' = Do not call ON_CREATE events for loaded template. This includes ON_LOAD and ON_RESIZE. Use 'W' to call these events later.
  • 'P' = Load template as a child of parent wid.
  • 'N' = Load template as a child of parent wid and do not draw a border.
  • 'S' = Create children of parent. Parent wid must be a handle to the already created parent.
  • 'Y' = Load template with ON_CREATE arguments passed as an array. Next argument is the array of ON_CREATE arguments.
  • 'M' = Use MDI callbacks. Useful for setting status line text when window is not an MDI child.

Returns: int

Window id of loaded resource. Returns <0 on error.

Category:

Window Functions

See Also:

find_index


_LoadButtonBar

int _LoadButtonBar(int index, int bbside=BBSIDE_TOP)

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":

Parameters:

index - index of BB form to load

bbside - one of the following:

  • BBSIDE_LEFT
  • BBSIDE_TOP
  • BBSIDE_RIGHT
  • BBSIDE_BOTTOM

Applies To:

MDI Window

Category:

MDI Window Methods

See Also:

_GetButtonBar


_lx2dx

int _lx2dx(int scale, int x)

Returns: int

Returns the x coordinate which is the scale, scale_mode, converted to pixels. scale_mode may be SM_PIXEL or SM_TWIP.

Category:

Miscellaneous Functions

See Also:

_lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lx2lx

int _lx2lx(int in_scale, int out_scale, int x)

Returns: int

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.

Category:

Miscellaneous Functions

See Also:

_lx2dx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lxy2dxy

void _lxy2dxy(int scale_mode, int &x, int &y)

Converts the x and y variables which are in the scale, scale_mode, to pixels. scale_mode may be SM_PIXEL or SM_TWIP.

Parameters:

scale_mode - may be SM_PIXEL or SM_TWIP.

x - x coordinate

y - y coordinate

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lxy2lxy

void _lxy2lxy(int in_scale, int out_scale, int &x, int &y)

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.

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_ly2dy

int _ly2dy(int scale, int y)

Returns: int

Returns the y coordinate which is in the scale, scale_mode, converted to pixels. scale_mode may be SM_PIXEL or SM_TWIP.

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2ly, _dy2ly, _map_xy


_ly2ly

int _ly2ly(int in_scale, int out_scale, int y)

Returns: int

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.

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _dy2ly, _map_xy


_macro

typeless _macro(_str option='M', _str new_value=null)

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.

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.

Parameters:

option - 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. new_value optionally specifies a list of keys.

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.

new_value -

Returns: typeless

If 'S' is specified, this return an int. If 'KE' or 'KD' specified, this returns a list keys.

Applies To:

Edit Window

Category:

Macro Programming Functions

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)

If macro recording and output is on (_macro()!=0), the string argument specified is appended to the end of the macro being recorded.

Parameters:

string - text to append to macro definition.

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') ")" );

Category:

Macro Programming Functions


_macro_call

void _macro_call(_str proc_name, ...)

void _macro_call( _str proc_name [,_str arg1 [,_str arg2 .. ]] )

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.

Parameters:

proc_name - Slick-C® procedure to call

arg1 - (optional) first argument

arg2 - (optional) second argument

... - subsequent arguments

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') ")" );

Category:

Macro Programming Functions

See Also:

_macro, _macro_append, _macro_delete_line, _macro_get_line, _macro_replace_line, _macro_repeat


_macro_delete_line

void _macro_delete_line()

If macro recording and output is on (_macro()!=0), the last source line of recorded macro is deleted.

Category:

Macro Programming Functions

See Also:

_macro, _macro_append, _macro_get_line, _macro_replace_line, _macro_repeat, _macro_call


_macro_delete_show

void _macro_delete_show(_str form_name)

If macro recording and output is on (_macro()!=0), and the last source line is of the form:

    execute('show -modal <form_name>');
the last source line of recorded macro is deleted.

Parameters:

form_name - name of form to expect to see

Category:

Macro Programming Functions

See Also:

_macro, _macro_append, _macro_get_line, _macro_replace_line, _macro_repeat, _macro_call


_macro_get_line

_str _macro_get_line()

Returns: _str

If macro recording and output is on (_macro()!=0), the last source line of recorded macro is returned. Otherwise, '' is returned.

Category:

Macro Programming Functions

See Also:

_macro, _macro_append, _macro_delete_line, _macro_replace_line, _macro_repeat, _macro_call


_macro_path

_str _macro_path(...)

_str _macro_path( [_str try_first [, _str try_second ... ]])

Parameters:

try_first - first path to try

try_second - (optional) second path to try

... - subsequent paths to try

Returns: _str

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.

Categories:

File Functions, Macro Programming Functions

See Also:

restore_path, _create_config_path, _config_path


_macro_repeat

void _macro_repeat()

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.

Category:

Macro Programming Functions

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)

If macro recording and output is on (_macro()!=0), the last source line of the recorded macro is replaced with string.

Parameters:

string - text to replace last source line with

Category:

Macro Programming Functions

See Also:

_macro, _macro_append, _macro_delete_line, _macro_replace_line, _macro_call, _macro_get_line


_makeempty

void _makeempty()

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]);
}

Category:

Miscellaneous Functions

See Also:

Arrays, Hash Tables, _isempty, _varformat


_map_xy

void _map_xy(int from_wid, int to_wid, int &x, int &y=0, int scale_mode=SM_PIXEL)

Converts (maps) the x and y coordinates 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 mode for the x and y coordinates.

Parameters:

from_wid - Window to map coordinates from.

to_wid - Window to map coordinates to. 0 defaults to the desktop.

x - x-coordinate relative to from_wid.

y - y-coordinate relative to from_wid.

scale_mode - (optional). Scale mode of the from/to windows. May be SM_PIXEL or SM_TWIP. Defaults to SM_PIXEL.

Category:

Miscellaneous Functions

See Also:

_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly


_MarkerTypeAlloc

int _MarkerTypeAlloc()

Returns: int

Returns index of type. Once a type is allocated, various attributes of the type can be set.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_MarkerTypeFree

int _MarkerTypeFree(int type)

Frees marker type alloced by _MarkerTypeAlloc()

Parameters:

type - Must be a valid marker type index

Returns: int

Returns 0 on success, <0 on error.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

_MarkerTypeAlloc


_MarkerTypeGetFlags

int _MarkerTypeGetFlags(int type)

Parameters:

type - Index of marker type.

Returns: int

Returns the marker type flags for the marker type specified.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

_MarkerTypeSetFlags


_MarkerTypeGetPriority

int _MarkerTypeGetPriority(int type)

Parameters:

type - Index of marker type.

Returns: int

Returns the draw priority for the marker type specified. 0 is the default (and highest) priority. 255 is the lowest priority possible.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

_MarkerTypeSetFlags


_MarkerTypeSetCallbackMouseEvent

int _MarkerTypeSetCallbackMouseEvent(int type, _str event, typeless pfnCallback)

Parameters:

type - Index of marker type.

event - Mouse event constant. Only the constants LBUTTON_DOWN, LBUTTON_DOUBLE_CLICK, RBUTTON_DOWN are supported.

pfnCallback - Callback. Either index into names table of function or pointer to Slick-C® function. int (* pfnCallback)(int wid,int LineNum, int LineMarkerIndex,int BMIndex,int Type, const char *pszMessage, void *pUserData);

Returns: int

Returns 0 if successful. Sets the callback for the specified mouse event.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_MarkerTypeSetFlags

void _MarkerTypeSetFlags(int type, int MarkerTypeFlags)

Sets the marker type flags for the marker type specified.

Parameters:

type - Index of marker type.

MarkerTypeFlags - Marker flags may be one or more of the VSMARKERTYPEFLAG_* flags. See flags for details.

VSMARKERTYPEFLAG_AUTO_REMOVE
Specifies that the marker be removed when all marker text is deleted.
VSMARKERTYPEFLAG_DRAW_BOX
Specifies that a box be drawn around the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.
VSMARKERTYPEFLAG_DRAW_FOCUS_RECT
Specifies that a focus rectangle be drawn around the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.
VSMARKERTYPEFLAG_DRAW_SQUIGGLY
Specifies that a squiggly underline be drawn under the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_MarkerTypeSetPriority

int _MarkerTypeSetPriority(int type, int DrawPriority)

Sets the drawing priority for the marker type specified.

Parameters:

type - Index of marker type.

DrawPriority - Drawing priority for this marker type 0 is the default (and highest) priority. 255 is the lowest priority possible.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_maybe_e2a

_str _maybe_e2a(_str string)

Convert EBCDIC character to ASCII if the editor is compiled with EBCDIC support.

Parameters:

EBCDIC - character.

Returns: _str

ASCII character.

Category:

String Functions


_menu_add_filehist

void _menu_add_filehist(_str filename)

Adds file history to end of File menu on the SlickEdit MDI menu bar. The filename argument MUST be specified in absolute. Use the absolute function to do this. This requirement is imposed so that unnecessary disk reads (during auto restore) do not occur. Calling the absolute function for floppy drives is slow.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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)

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.

This function currently only supports add file history because file case matching is performed and file names are place in double quotes if the filename contains spaces.

Parameters:

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.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_workspace_hist, _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_workspace_hist

void _menu_add_workspace_hist(_str filename)

Remarks Adds project file history to end of Project menu on the SlickEdit MDI menu bar. The filename argument MUST be specified in absolute. Use the absolute function to do this.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_hist, _menu_add_filehist, _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)

Deletes a menu or menu item in a loaded menu or a menu resource.

Parameters:

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.

Returns: int

Returns 0 if successful.

Example:

#include "slick.sh"
defmain()
{
     status=_menu_find(_mdi.p_menu_handle,"M","help -using",mh,mpos);
     if (!status) _menu_delete(mh,mpos);
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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)

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.

Returns: int

Returns 0 if successful.

Categories:

Completion Functions, Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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


_ok.on_create

typeless _ok.on_create(_str menu_name="")

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 SlickEdit menu bar is edited.

Category:

Forms


_menu_find

int _menu_find(int menu_handle, _str command_or_category, int &output_menu_handle, int &output_menu_pos, _str option='C')

Finds menu or menu item with a specified command or category.

Parameters:

menu_handle - Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

command_or_category - or category of menu item to find. If a command is specified, the command must match exactly. See option parameter.

output_menu_handle - to loaded menu which contains menu item found.

output_menu_pos - 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 - 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.

Returns: int

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);
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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="")

Gets menu item values for the menu items which contain the command or category specified.

Parameters:

menu_handle - Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

command_or_category - 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'.

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.

Returns: int

Returns 0 if successful.

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);
         }
    }
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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, _str option="C")

Returns: int

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.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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="")

Inserts a menu or menu item into a loaded menu or a menu resource.

Parameters:

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.

Returns: int

Returns 0 if successful.

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');
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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 _menu_load(int menu_index, _str option='M')

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.

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.

Parameters:

menu_index - index to load menu at

option - load options

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 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.
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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, boolean find_first)

Parameters:

name - menu name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Categories:

Completion Functions, Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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_move

int _menu_move(int src_menu_index, int src_menu_pos, int dest_menu_index, int dest_menu_pos)

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.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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 _menu_set(int menu_handle)

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.

Parameters:

menu_handle - menu handle

Returns: int

Returns 0 if successful.

Example:

#include "slick.sh"
defmain()
{
    // Find index of 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.
}

Applies To:

MDI Window, Form

Categories:

Form Methods, MDI Window Methods, Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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="")

Sets menu item values for the menu items which contain the command or category specified.

Parameters:

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.

Returns: int

Returns 0 if successful.

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 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');
   }

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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)

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.

Parameters:

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.

Returns: int

Returns 0 if successful.

Example:

#include "slick.sh"
defmain()
{
   // Low-level code to display 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);
}

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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


_message_box

_str _message_box(_str string, _str title="SlickEdit", int mb_flags=MB_OK | MB_ICONEXCLAMATION)

Creates a modal dialog box and displays string message and various buttons.

Parameters:

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.

Returns: _str

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

Parammb_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.

Example:

result=_message_box("Save changes?", '', MB_YESNO|MB_ICONQUESTION);
if (result==IDYES) {
    // save the file
} else {
    // Don't save it
}

Category:

Miscellaneous Functions

See Also:

sticky_message, message


_mffind

int _mffind(_str search_string, _str options, _str files, _str notused_atbuflist, int mfflags=0, boolean searchProjectFiles=false, boolean searchWorkspaceFiles=false, _str wildcards='', _str file_exclude='', boolean files_delimited_with_pathsep=false, int grep_id=0)

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.

Parameters:

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 SlickEdit regular expression. See section SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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", "Options", "General...", select Search Tab).

Returns: int

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','');

Applies To:

Edit Window

Category:

Search Functions

See Also:

_mfreplace


_mfreplace

_str _mfreplace(_str search_string, _str replace_string, _str options, _str files, _str notused_atbuflist, boolean searchProjectFiles=false, boolean searchWorkspaceFiles=false, _str wildcards='', _str file_exclude='', boolean files_delimited_with_pathsep=false, int mfflags=0, int grep_id=0, boolean show_diff=false)

Performs a search and replace on the files and buffers specified.

Parameters:

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 SlickEdit regular expression. In addition, the characters \ and # take on new meaning in the replace string. See SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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", "Options", "General...", select Search Tab).

Returns: _str

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','');

Applies To:

Edit Window

Category:

Search Functions

See Also:

_mffind


_modal_wait

_str _modal_wait(int form_wid)

Returns: _str

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();
}

Category:

Form Functions


_modename2ext

_str _modename2ext(_str mode_name, int &setup_index, boolean doAutoLoadSupport=true)

Deprecated. Use _Modename2LangId().

Converts the unique display name for a language to it's language ID (canonical file extension).

Parameters:

mode_name - Display name for language type

setup_index - (reference) set to the 'def-language-[lang]' name info entry for the language

doAutoLoadSupport - Automatically load language support if not already loaded.

Returns: _str

The language ID for the language corresponding to 'mode_name'.

Category:

Miscellaneous Functions

See Also:

_Filename2LangId, _Ext2LangId


_Modename2LangId

_str _Modename2LangId(_str mode_name)

Converts the unique display name for a language to it's language ID (canonical file extension). This function will only search your current language setup. It will not attempt to autoload additional language features.

Parameters:

mode_name - Display name for language type

Returns: _str

The language ID for the language corresponding to 'mode_name'.

Category:

Miscellaneous Functions

See Also:

_LangId2Modename, _Filename2LangId, _Ext2LangId


_modename_eq

boolean _modename_eq(_str a, _str b)

Deprecated. Use _ModenameEQ() instead.

Compare two language mode names.

Category:

Miscellaneous Functions


_ModenameEQ

boolean _ModenameEQ(_str a, _str b)

Compare two language mode names. Language mode names are case-insensitive.

Category:

Miscellaneous Functions


_move_to_cursor

int _move_to_cursor(_str markid="")

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", "Options", "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).

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_move_window

void _move_window(int x, int y, int width, int height, _str option='C', int icon_x=MAXINT, int icon_y=MAXINT)

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.

Parameters:

x - x-position to move to

y - y-position to move to

width - width

height - height

option - option, see above

icon_x - icon x-positoin

icon_y - icon y-position

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods, Window Functions

See Also:

_get_window


_need_to_save

boolean _need_to_save()

Use this function if you only want to check for MDI buffers.

Returns: boolean

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 & (VSBUFFLAG_THROW_AWAY_CHANGES|VSBUFFLAG_HIDDEN)) 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.
}

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


_negative2dec

long _negative2dec(long result, int base, _str &msg)

Returns: long

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);
}

Category:

Buffer Functions


_next_buffer

void _next_buffer(_str options="")

Switches to the next buffer.

Parameters:

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 cursor position information.
'R'
Don't do any screen updating.

The active cursor position information is saved in the active buffer's non-active cursor position information unless the 'N' option is specified. Each buffer maintains ONE non-active 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 cursor position information is copied into the windows cursor position. Switching windows DOES NOT update the buffers non-active cursor position information.

The 'H' option determines whether buffers with (p_buf_flags&VSBUFFLAG_HIDDEN) true may be selected.

The 'R' options specifies that the screen should not be refreshed.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

_prev_buffer, _delete_buffer


_next_button_state

void _next_button_state()

Switches to the next check box button state by setting the p_value property. The next state depends on the p_style property.

Changes p_value to next value based on p_style and p_object Currently this function only supports p_object==OI_CHECK_BOX

Applies To:

Check Box

Category:

Check Box Methods


_next_control

void _next_control(_str direction="", int form_wid=0)

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.

Applies To:

Text Box, 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

Category:

Miscellaneous Functions

See Also:

_prev_control


_next_view

void _next_view()

Deprecated. Use _next_window()

This function has been deprecated. We recommend not calling it.

Category:

Window Functions


_next_window

void _next_window(_str option="")

Switches to the next window. By default, the next window is the window that was created after the current window.

Parameters:

option - String of zero or more of the following options:

H
Specifies that hidden windows should not be skipped. Used for debugging.
R
Specifies not to set the screen refresh flags and not to set the focus.
F
Specifies to not to set the focus.
M
Specifies to skip to the next MDI child window which may or may not have an editor control.

Category:

Window Functions

See Also:

get_window_id, activate_window, load_files, _next_window


_nextel

typeless& _nextel(typeless &index)

_nextel() is the Slick-C intrinsic function behind the Slick-C "foreach" statement.

Parameters:

index - index / key to find next duplicate of

Returns: typeless&

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.

For Slick-C classes that implement IIterable, _nextel() will call the class-specific _nextel() method.

For strings, _nextel() will parse out the next (possibly quoted) filename in the string, stripping whitespace. It will not strip quotes.

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]);
}
// Traverse the elements using 'foreach'
foreach (i => v in t) {
    messageNwait("index="i" value="v);
}

Category:

Miscellaneous Functions

See Also:

_el, _makeempty, _isempty, _deleteel, _varformat, _indexin, _sort


_no_child_windows

int _no_child_windows()

Returns: int

Returns non-zero value if there are no non-hidden MDI edit windows available.

Category:

Window Functions


_Nofbuffers

int _Nofbuffers(int maxcount=MAXINT)

Returns: int

Returns the number of non-hidden buffers. The active MDI edit window buffer is always counted even if it is hidden. This means this function will still return 1 for the number of buffers. Use _no_child_windows to check whether there are no child edit windows.

Category:

Buffer Functions


_nrseek

typeless _nrseek(...)

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 SlickEdit's implementation of line 0.

Returns: typeless

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.

Example:

          /* Get the current seek position. */
          p =_nrseek();
          /* Seek to offset 1000 */
          _nrseek(1000);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

goto_point, point, _GoToROffset, _QROffset


_ntBrowseForFolder

_str _ntBrowseForFolder(_str dir_from_dialog, _str title=null, int flags=0)

Show the standard Windows style directory browser dialog.

Parameters:

dir_from_dialog - directory to initialize dialog to

title - dialog caption (default "Select a directory")

flags - bitset

  • 0x1 -- show make new directory button
  • 0x2 -- validate that directory exists

Returns: _str

Returns the selected directory, or '' if cancelled.

Since:

13.0

Category:

File Functions


_object_match

_str _object_match(_str name, boolean find_first)

Parameters:

name - object name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next Slick-C® object name which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions

See Also:

c_match


_ok.lbutton_up

typeless _ok.lbutton_up()

Displays dBASE Options dialog box which is used for modifying the extension specific options for the dBASE language.

Example:

void show('_prg_extform')

Category:

Forms


_openfn.on_create

typeless _openfn.on_create(_str title, _str wildcards, _str filetypes, int flags, _str default_ext='', _str initial_filename='', _str initial_directory='', _str retrieve_name='', _str help_item='', typeless *open_item_callback=null)

Syntax _str show('-modal _open_form', title, initial_wildcards, file_type_list, ofn_flags, default_ext, initial_filename, initial_directory [,retrieve_name [,help_item] ] )

Parameters:

title - of dialog box.

initial_wildcards - 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 - 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/C++ Files (*.c;*.h)".

ofn_flags - 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_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 - '' is specified for this parameter. This extension is used if the file the user has selected does not have an extension.

initial_filename - that initially appears in the File Name combo box.

initial_directory - directory is switched to this directory when the dialog box is displayed.

retrieve_name - 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 - 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.

Displays the Open dialog box used for opening files other than for edit windows.

Returns: typeless

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.

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);
}

Category:

Forms

See Also:

_edit_form


_open_temp_view

int _open_temp_view(_str filename, int &temp_wid, int &orig_wid, _str load_options="", boolean &buffer_already_exists=true, boolean doClear=false, boolean doSelectEditorLanguage=false, int more_buf_flags=0, boolean doCreateIfNotFound=false, boolean doCallSelectEditModeLater=false)

Opens filename specified and creates a window and buffer to hold it. The VSBUFFLAG_HIDDEN 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_wid is set to the id of the new window created. orig_wid is set to the previously active window id. If load_options are specified, these options are used to load the file.

WARNING: If you specify the +b option, you can not specify other options.

Parameters:

filename - Name of file to open

temp_wid - Window id of file that is opened

orig_wid - Original window id

load_options - may be "" or only may contain the following

  • +bi <buf_id>
  • +d
  • +b

buffer_already_exists - Get set to true if the file was already open

doClear -

doSelectEditorLanguage - When true, _SetEditorLanguage() is called to initialize the language setup for the buffer. In addition, build_load_options() to generate all default load options which typically turns on undo.

more_buf_flags - Allows more buffer flags (typically VSBUFFLAG_THROW_AWAY_CHANGES) to be added to buffers loaded from disk.

doCreateIfNotFound - When true, a file (not buffer) is specified, and the file is not found, a new files is created.

doCallSelectEditModeLater - When true, only build_load_options is called. _SetEditorLanguage is not called and should be invoked by the caller if necessary. This has no effect unless doSelectEditorLanguage is true.

Returns: int

Returns 0 if successful.

Categories:

File Functions, Miscellaneous Functions

See Also:

load_files


_OpenDialog

_str _OpenDialog(_str ShowArgs, _str pszTitle="", _str pszInitialWildCards="", _str pszFileFilters="", int VSOFNFlags=0, _str pszDefaultExt="", _str pszInitialFilename="", _str pszInitialDirectory="", _str pszRetrieveName="", _str pszHelpName="", typeless *pfnItemCallback=null)

Runs either explorer open dialog or Slick-C® dialog for performing Open and Save As operations.

Parameters:

ShowArgs - This argument may be passed to the Slick-C® show() function. It must contain the -modal option and one of the forms _edit_form or _open_form.

pszTitle - Title of the dialog. Defaults to "Open" if "" is given.

pszInitialWildCards - Optional wildcards to start with. Must exists in pszFileFilters.

pszFileFilters - Comma delimited list of captions and wildcards in the Syntax shown below:

All Files (*.*),C/C++ Files (*.c;*.cpp;*.h),Java Files (*.java)

VSOFNFlags - 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_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.

pszDefaultExt - Usually '' is specified for this parameter. This extension is used if the file the user has selected does not have an extension.

pszInitialFilename - Filename that initially appears in the File Name combo box.

pszInitialDirectory - When not '', current directory is switched to this directory when the dialog box is displayed and then restored on exit.

pszRetrieveName - 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.

pszHelpName - 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.

pfnItemCallback - Callback that will be called with the name (including absolute path) of each item that will be displayed in the open dialog. This is used to prevent items from being included in the list. The callback function should take one parameter that is a _str type. This string will be the absolute filename of the item in question. The callback should return 1 if the item is to be included in the open dialog and 0 if not.

Returns: _str

Returns a string of one or more filenames. Filenames with spaces will be in double quotes. "" is returned if the user cancels the dialog.

Category:

Forms


_overlay_block_selection

int _overlay_block_selection(_str markid="")

Overwrites block selection specified at cursor position. No clipboard is created. Resulting selection is placed on inserted text.

Parameters:

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC. On error, message is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


_page_down

int _page_down()

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.

Returns: int

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));
          }

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

_page_up


_page_up

int _page_up()

Moves text under the cursor p_char_height - 1 lines down. The scroll style has no effect on this function.

Returns: int

If top of buffer is hit, TOP_OF_FILE_RC is returned. Otherwise, 0 is returned.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

page_down


_parent_path

_str _parent_path(_str Path)

Parameters:

Path - Must be a path. If this is a filename, we will only return the path.

Returns: _str

Returns the path from a path. Similar to _file_path(), but handles the trailing slash and slightly easier than calling strip_filename()

Category:

File Functions


_parse_line

_str _parse_line(_str &lines, _str parse_ch="")

Returns: _str

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, ',');
   if (item == '') break;
   messageNwait('item='item);
}
line="First\nSecond\nThird";
for(;;){
   item=_parse_line(line);
   if (item == '') break;
   messageNwait('item='item);
}

Category:

String Functions


_parse_project_command

_str _parse_project_command(_str command, _str buf_name, _str project_name, _str cword, _str argline='', _str ToolName='', _str ClassPath='', int *recursionStatus=null, _str(*recursionMonitorHash):[]=null, int handle=0, _str config='')

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:

%B
Configuration
%BD
Configuration build directory
%BN
Configuration name. Same as %B option except for Visual C++ configuration names where configuration names are of the form CFG="[ConfigName]" or [ConfigName]|[Platform].
%C
Current word
%CP
Java class path including -classpath.
%DEFD
Configuration defines with dashes. Example: %DEFD, project def = 'test' produces '"-Dtest"
%DEFS
Configuration defines with slashes. Example: %DEFS, project def = 'test' produces '"/Dtest"
%DM
The file name only of the current buffer.
%E
File extension with dot
%F
Absolute filename
%H
(Java only) Builds a temp HTML file to run the compiled applet, %H is replaced by the temp HTML file name.
%I
Absolute include directories (individually listed) including '-i'. Example: '-ic:\folder1 -ic:\folder2'
%IR
Relative include directories (to the project) including '-I', seperated by semicolons. Example: '-Ic:\folder1;c:\folder2'
%IN
Absolute include directories (individually listed) including '-i '. Example: '-i c:\folder1 -i c:\folder2'
%JBD
Java build directory including -d.
%LF
Current buffer name.
%LIBS
Libraries space delimited.
%M
Calls a macro function. Any return value is included in the build command. Must be terminated by a matching %. Example: %Mmy_function%, where my_function() is a macro function.
%N
Filename without extension or path
%O
Output filename. Currently only GNU projects have an output filename on the Link Tab.
%OBJS
Project objects (including libraries).
%OE
Output extension with dot
%ON
Output filename with no extension or path
%OP
Output path
%P
Path of current file
%Q#
The current file's path (no file name) starting with the folder item indicated by #. Example: %Q2, current file = 'c:\a\b\c\d\test.txt' produces '\b\c\d\'
%R
Absolute project name
%RE
Project extension
%RM
Project display name (for associated workspaces).
%RN
Project filename without extension or path
%RP
Project path
%RV
(Windows only) Project drive with :
%RW
Project working directory
%T
Project configuration target
%V
(Windows Only) Drive of current file with :
%W
Absolute workspace filename
%WE
Workspace extension with dot
%WN
Workspace filename with no extension or path
%WP
Workspace path
%WV or %WD
Workspace drive with :
%WX
The workspace folder name only. Example: %WX, workspace = 'c:\a\b\c\workspace.vpw' produces 'c'.
%XUP
Translate all back slashes that follow to forward slashes (UNIX file separator)
%XWP
Translate all forward slashes to back slashes (Windows file separator)
%-#
Removes the previous # characters.
%(envvar)
Value of environment variable envvar
%#
The # item in argline (items are seperated by spaces).
%{*.*}
A list of project files matching the pattern in braces.
%[regkey]
Value of Windows registry entry. example: %[HKLM:\Software\Microsoft\Communicator@InstallationDirectory]
%?
Prompts the user for a value. The user input is then included in the build command. Must be terminated by a matching %. Example: %?Prompt text%, would prompt the user with the text 'Prompt text'.
%%
Percent character

Returns: _str

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),'');
          }

Category:

Miscellaneous Functions


_pic_match

_str _pic_match(_str name, boolean find_first)

Parameters:

name - picture name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


_pixels_per_inch_x

int _pixels_per_inch_x()

Returns: int

Returns the number of pixels per inch in the x direction on the display.

Category:

Display Functions


_post_call

int _post_call(typeless pfnCallback, _str CallbackArgument=null)

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.

Parameters:

pfnCallback - pointer to function to call

CallbackArgument - argument to pass to function

Category:

Miscellaneous Functions


_post_paint

void _post_paint()

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.

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Methods, Editor Control Methods, List Box Methods


_prev_buffer

void _prev_buffer(_str options="")

Switches to the previous buffer.

Parameters:

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 cursor position information.
'R'
Don't do any screen updating.

The active cursor position information is saved in the active buffer's non-active cursor position information unless the 'N' option is specified. Each buffer maintains ONE non-active 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 cursor position information is copied into the windows cursor position. Switching windows DOES NOT update the buffers non-active cursor position.

The 'H' option determines whether buffers with (p_buf_flags&VSBUFFLAG_HIDDEN) true may be selected.

The 'R' options specifies that the screen should not be refreshed.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

_next_buffer, _delete_buffer


_prev_control

void _prev_control()

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.

Applies To:

Text Box, 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

Category:

Miscellaneous Functions

See Also:

_next_control


_prev_view

void _prev_view()

Deprecated. Use _prev_window()

This function has been deprecated. We recommend not calling it.

Category:

Window Functions


_prev_window

void _prev_window(_str option="")

Switches to the previous window. The hidden window is skipped unless the 'H' is specified for option (used for debugging).

Applies To:

Edit Window

Categories:

Window Functions, Edit Window Methods

See Also:

get_window_id, activate_window, load_files, _next_window


_print

int _print(_str sysmessage="", _str reserved="", void(*pfnCallback)(int reason, _str caption="")=0, _str font="", _str lheader="", _str lfooter="", _str options="", _str cheader="", _str cfooter="", _str rheader="", _str rfooter="")

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.

Parameters:

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 a pointer to a function or a 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.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Buffer Functions, Edit Window Methods


_print_cancel

void _print_cancel()

Cancels printing. This function is intended to be called during printing started with the _print function.

Category:

Miscellaneous Functions


_ok.on_create

void _ok.on_create()

Displays Print dialog box. This form is not supported by the UNIX version.

Returns: void

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

Category:

Buffer Functions


_printer_setup

int _printer_setup(_str input_option, _str option, _str output_options)

Runs the operating system Print Setup dialog box.

Returns: int

Returns 0 if successful.

Category:

Buffer Functions

See Also:

printer_setup


_process_cd

void _process_cd(_str param)

Changes current drive and directory in the build window (.process).

Category:

Miscellaneous Functions


_process_info

int _process_info(_str option="")

This function returns information about the process running depending upon the input given as follows:

""
Returns 1 if the build window (concurrent process buffer) 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 the build window. Otherwise 0 is returned.
'R'
Returns 1 if the build window is running. Otherwise 0 is returned. A delay is performed and pending build window output is read into the build window.
'X'
Returns 1 if the command shell running in the build window has exited. Otherwise 0 is returned. A delay is performed and pending build window output is read into the build window.

Category:

Miscellaneous Functions

See Also:

concur_shell, _stop_process


_project_command

int _project_command(_str field_name, _str buf_name, _str word, boolean AccumulateErrors=false, boolean AutoNextError=true, int ActionOverrideFlags=0, boolean buildFirstDone=false, _str debugStepType='go')

Executes project command.

Utility function called by project_compile() and _project_command2()

Parameters:

field_name - Target name (e.g. 'Compile', 'Execute', 'Debug').

buf_name - Parts of this buffer name may be used to fill in the command.

word - Parts of this word may be used to fill in the command.

AccumulateErrors - If redirecting errors, appends to the file rather than overwriting if not redirecting errors, no effect

AutoNextError - If redirecting errors, automatically to to first error if not redirecting errors, no effect

ActionOverrideFlags - One or more of bitwise flags OVERRIDE_*.

buildFirstDone - Set to true when build has already been done (e.g. a Build before a Debug).

debugStepType - Applies to debug commands (e.g. 'debug'). Valid values are 'go'=run to next breakpoint; 'into'=step into debugee; 'reload'=restart debugging (buf_name becomes significant).

Returns: int

0 on success, <0 on error.

Category:

Project Functions


_ok.on_create

void _ok.on_create(_str PropertiesForName='', int project_handle=-1, _str activetab='', boolean MakeCopyFirst=true, boolean doSaveIfNecessary=true, boolean IsProjectPackage=false)

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.

Returns: void

Returns '' if the dialog box is cancelled. Otherwise, 1 is returned.

Category:

Forms


_project_get_filename

_str _project_get_filename()

Returns: _str

Returns currently open project filename. If no project file is open, the extension specific project file "project.slk" (UNIX: "uproject.slk") is returned.

Category:

Project Functions

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, workspace_organize


_project_get_section

_str _project_get_section(_str default_value='')

Returns: _str

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.

Category:

Project Functions

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_organize


_ProjectWorkspaceFindFile

_str _ProjectWorkspaceFindFile(_str filename, boolean searchIncludes=true, boolean strict=false)

First searches the current project for filename, then the current workspace. If that fails, it reduces filename to it's basename and searches again. If that fails, it searches include paths as defined by the current project.

Parameters:

filename - path of file to search for

searchIncludes - search the project include paths

strict - search only for exact matches, do not strip path from filename

Returns: _str

'' if not found, otherwise, the absolute path to filename.

Category:

Project Functions


_push_button

boolean _push_button(typeless Nofstates='', typeless new_value='')

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.

Returns: boolean

Returns 1 if the button is pressed and released while the mouse pointer was within the window. Otherwise, 0 is returned.

Applies To:

Picture Box, Image

Categories:

Image Methods, Picture Box Methods


_QBinaryLoadTagsSupported

boolean _QBinaryLoadTagsSupported(_str filename=null)

Parameters:

filename - name of file to test, defaults to current file

Returns: boolean

Returns 'true' if the given file has support for a load-tags callback function, such as for loading symbols from a ZIP file or a DLL with metadata or a Java class file or JAR file.

Categories:

Search Functions, Tagging Functions

See Also:

push_tag, gui_make_tags, make_tags, _QTaggingSupported


_QReadOnly

boolean _QReadOnly()

Returns: boolean

Returns 0 if editing is allowed for this buffer.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly, vsQReadOnly


_QROffset

long _QROffset()

Returns: long

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

goto_point, point, _QROffset, _GoToROffset


_QSymbolColoringEnabled

boolean _QSymbolColoringEnabled(boolean ignorePerFileOption=false)

Returns: boolean

Return the name of the symbol coloring scheme active for the current file.

Categories:

Edit Window Methods, Editor Control Methods


_QSymbolColoringErrors

boolean _QSymbolColoringErrors(boolean ignorePerFileOption=false)

Returns: boolean

Return the name of the symbol coloring scheme active for the current file.

Categories:

Edit Window Methods, Editor Control Methods


_QSymbolColoringSupported

boolean _QSymbolColoringSupported(_str lang=null)

Parameters:

lang - current language ID (default=p_language_id)

Returns: boolean

Return 'true' if symbol coloring is supported for the given language.

Since:

14.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_QTaggingSupported

boolean _QTaggingSupported(int wid=0, _str lang=null)

Parameters:

wid - Window id of MDI frame window.

lang - current language ID (default=p_LangId)

Returns: boolean

Returns non-zero value if this editor controls language mode supports tag navigation commands include show_procs, list_tags, next_proc, prev_proc, find_tag, and push_tag.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


_quit_view

void _quit_view()

Deprecated. Use _delete_window()

This function has been deprecated. We recommend not calling it.

Category:

Window Functions


_quote

_str _quote(_str string)

Quotes input string quoted in Slick-C® syntax. This function is intended to be used in macros which generate Slick-C® source code.

Parameters:

string - input string to quote

Returns: _str

quoted string

Category:

Macro Programming Functions

See Also:

maybe_quote_filename, _dquote


_rawLength

int _rawLength(_str &text)

This function is identical to the length function, except that the input string is converted to the same format as the buffers raw data before the return result is computed. See "Unicode and SBCS/DBCS Macro Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions


_rawSubstr

_str _rawSubstr(_str &string, int StartCol, int Width=-1)

Returns: _str

Returns part of the input string starting from StartCol including the rest of the string or Width characters if specified. The input string is converted to the same format as the buffers raw data before the return result is computed. See "Unicode and SBCS/DBCS Macro Programming." This function is identical to the substr function except when a double byte or UTF-8 sequence is bisected, the remaining bisected characters are replaced with zeros. This function does not yet support the pad argument.

Example:

        // This will always mismatch if the character at index 5 is part of a
DBCS
        // or UTF-8 sequence.
        if (_rawSubstr(string,5,1)=='+') {
             ...
        }

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions


_rawText

_str _rawText(_str &text)

Returns: _str

Returns part of the input string converted to the same format as the buffers raw data. See "Unicode and SBCS/DBCS Macro Programming."

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, String Functions


_reflow_selection

int _reflow_selection(_str markid="")

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

_get_reflow_pos


_refresh_scroll

void _refresh_scroll()

Updates p_left_edge and p_cursor_y property to make sure the cursor is in view.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_remove_duplicates

void _remove_duplicates(_str ignore_case='', int start_line=0, int last_line=MAXINT)

Removes duplicate adjacent lines from the current buffer. Usually the buffer is sorted before calling this function.

Parameters:

ignore_case - 'i' for case sensitive

start_line - starting line (inclusive)

last_line - last line (inclusive)

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_mfmore.on_create

typeless _mfmore.on_create()

Displays the Replace dialog box.

Returns: typeless

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:

_str show('-modal _replace_form')

_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));
   }
}

Category:

Forms


_reset_retrieve

void _reset_retrieve()

Places the cursor at the end of the ".command" retrieve buffer.

Category:

Retrieve Functions


_restore_draw_setup

void _restore_draw_setup(typeless draw_setup)

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.

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_save_draw_setup


_restore_form_xy

int _restore_form_xy(boolean do_wh_only=false, _str form_name=null)

Restores x, y window position saved by the _save_form_xy function.

Parameters:

form_name - (optional) form name to use to store position data

Returns: int

Returns 0 if the old (x, y) position information is found.

Applies To:

Form

Category:

Form Methods


_restore_pos2

void _restore_pos2(typeless p)

Restores buffer position saved by _save_pos2 procedure.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

restore_pos, _save_pos2


_RestoreAnnotationsInFile

void _RestoreAnnotationsInFile(AnnotationSaveInfo(&annoSaves)[], int adjustLinesBy=0)

Restore saved annotations from the current file and relocate them if the annotation information includes relocation information.

Parameters:

annoSaves - Saved annotations

adjustLinesBy - Number of lines to adjust start line by

Category:

Annotation Functions

See Also:

_SaveAnnotationsInFile


_RestoreBookmarksInFile

void _RestoreBookmarksInFile(BookmarkSaveInfo(&bmSaves)[], int adjustLinesBy=0)

Restore saved bookmarks from the current file and relocate them if the bookmark information includes relocation information.

Parameters:

bmSaves - Saved bookmarks

adjustLinesBy - Number of lines to adjust start line by

Category:

Bookmark Functions

See Also:

_SaveBookmarksInFile, _BookmarkAdd


_RestoreBreakpointsInFile

void _RestoreBreakpointsInFile(BreakpointSaveInfo(&bpSaves)[], int adjustLinesBy=0)

Restore saved breakpoints from the current file and relocate them if the breakpoint information includes relocation information.

Parameters:

bmSaves - Saved breakpoints

adjustLinesBy - Number of lines to adjust start line by

Category:

Debugger Functions

See Also:

_SaveBreakpointsInFile


_resume

void _resume()

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();

Category:

Miscellaneous Functions

See Also:

_suspend


_retrieve_list

void _retrieve_list(_str object_name='')

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.

Parameters:

cmdline - is a string in the format: 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();
}

Applies To:

Combo Box, List Box

Categories:

Combo Box Methods, List Box Methods, Retrieve Functions

See Also:

_append_retrieve


_retrieve_next

void _retrieve_next()

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.

Applies To:

Command Line

Categories:

Command Line Methods, Retrieve Functions

See Also:

_retrieve_prev


_retrieve_next_form

int _retrieve_next_form(_str direction="", _str doSetSelect="")

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.

Applies To:

Form

Categories:

Form Methods, Retrieve Functions

See Also:

_retrieve_prev_form, _save_form_response


_retrieve_prev

void _retrieve_prev()

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.

Applies To:

Command Line

Categories:

Command Line Methods, Retrieve Functions

See Also:

_retrieve_next


_retrieve_prev_form

int _retrieve_prev_form()

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 F7.

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);
}

Applies To:

Form

Category:

Form Methods

See Also:

_retrieve_next_form, _save_form_response


_retrieve_value

typeless _retrieve_value(_str cmdline="")

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.

Parameters:

cmdline - is a string in the format: form_name[.ctl_name]

Returns: typeless

Returns the value placed into the p_text property.

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();
}

Category:

Retrieve Functions

See Also:

_append_retrieve


_rgb

int _rgb(int r, int g, int b)

Returns: int

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).

Category:

Miscellaneous Functions


_rubout

void _rubout()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


_safe_hidden_window

void _safe_hidden_window()

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.

Switching buffers while the hidden window is active can cause the following problems:

  • If a view other than the VSWID_HIDDEN is active, and the original buffer is not restored, a system macro may start modifying a buffer the user is editing.

  • If the hidden window already has a buffer that the user is editing active, the old buffer position information may get destroyed.

Category:

Miscellaneous Functions


_save_draw_setup

void _save_draw_setup(typeless &draw_setup)

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.

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

objects except Image control, _restore_draw_setup


_save_file

int _save_file(_str cmdline="")

Writes current buffer to file name specified. If no name is specified, the buffer name is used.

Parameters:

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. 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 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. This option is not supported for UTF-8 buffers.
+FTEXT
Saves file as SBCS/DBCS and converts buffer data to SBCS/DBCS if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF8
Saves file as UTF-8 without a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF8S
Saves file as UTF-8 with a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF16LE
Saves file as UTF-16 little endian without a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF16LES
Saves file as UTF-16 little endian with a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF16BE
Saves file as UTF-16 big endian without a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF16BES
Saves file as UTF-16 big endian with a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF32LE
Saves file as UTF-32 little endian without a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF32LES
Saves file as UTF-32 little endian with a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF32BE
Saves file as UTF-32 big endian without a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FUTF32BES
Saves file as UTF-32 big endian with a signature and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified.
+FCPddd
Saves file as SBCS/DBCS for the code page file specified by ddd and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified. Under windows, this can be any valid code page or one of the VSCP_* constants defined in "slick.sh."
+FACP
Saves file as SBCS/DBCS for the active code page and converts the buffer data to UTF-8 if necessary. This option is ignored if p_binary==true or +B option specified. Under windows, this can be any valid code page or one of the VSCP_ constants defined in "slick.sh."
+ 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 -P
Add saved file to current project. Default is off.
+ 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.

Returns: int

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');

Applies To:

Edit Window

Category:

File Functions


_save_form_response

void _save_form_response()

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);
}

Applies To:

Form

Category:

Form Methods

See Also:

_retrieve_next_form, _retrieve_prev_form


_save_form_xy

void _save_form_xy(_str form_name=null)

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.

Parameters:

form_name - (optional) form name to use to store position data

Applies To:

Form

Category:

Form Methods


_save_pos2

typeless _save_pos2(typeless &p)

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

restore_pos, save_pos, _restore_pos2


_SaveAnnotationsInFile

void _SaveAnnotationsInFile(AnnotationSaveInfo(&annoSaves)[], int startRLine=0, int endRLine=0, boolean relocatable=true)

Save the annotations in the current file, optionally restricting to a range of lines, and saving relocation information.

This function is used to save annotation information before we do something that heavily modifies a buffer, such as refactoring, beautification, or auto-reload. It uses the relocatable marker information to attempt to restore the annotations back to their original line, even if the actual line number has changed because lines were inserted or deleted.

Parameters:

annoSaves - Saved annotations

startRLine - First line in region to save

endRLine - Last line in region to save

relocatable - Save relocation marker information?

Category:

Annotation Functions

See Also:

_RestoreAnnotationsInFile


_SaveBookmarksInFile

void _SaveBookmarksInFile(BookmarkSaveInfo(&bmSaves)[], int startRLine=0, int endRLine=0, boolean relocatable=true)

Save the bookmarks both automatic (pushed) bookmarks and set bookmarks in the given file, optionally restricting the bookmarks to a range of lines, and optionally saving relocation information.

This function is used to save bookmark information before we do something that heavily modifies a buffer, such as refactoring, beautification, or auto-reload. It uses the relocatable marker information to attempt to restore the bookmarks back to their original line, even if the actual line number has changed because lines were inserted or deleted.

Parameters:

bmSaves - Saved bookmarks

startRLine - First line in region to save

endRLine - Last line in region to save

relocatable - Save relocation marker information?

Category:

Bookmark Functions

See Also:

_RestoreBookmarksInFile


_SaveBreakpointsInFile

void _SaveBreakpointsInFile(BreakpointSaveInfo(&bpSaves)[], int startRLine=0, int endRLine=0, boolean relocatable=true)

Save the breakpoints in the current file, optionally restricting to a range of lines, and saving relocation information.

This function is used to save breakpoint information before we do something that heavily modifies a buffer, such as refactoring, beautification, or auto-reload. It uses the relocatable marker information to attempt to restore the breakpoints back to their original line, even if the actual line number has changed because lines were inserted or deleted.

Parameters:

bpSaves - Saved breakpoints

startRLine - First line in region to save

endRLine - Last line in region to save

relocatable - Save relocation marker information?

Category:

Debugger Functions

See Also:

_RestoreBreakpointsInFile


_SccDisplayOutput

void _SccDisplayOutput(_str str, boolean clear_buffer=false, boolean strIsViewId=false, boolean doActivateOutput=true)

Append a line of information to the Output tool window.

Parameters:

str - message to append

clear_buffer - (default false) clear window before adding this message?

strIsViewId - (default false) 'str' is actually the view ID of a buffer to switch to

doActivateOutput - (default true) activate the Output tool window if it is not already up.

Category:

Miscellaneous Functions


_screen_height

int _screen_height()

Returns: int

Returns the pixel height of the display.

Category:

Display Functions


_screen_width

int _screen_width()

Returns: int

Returns the pixel width of the display.

Category:

Display Functions


_scroll_style

_str _scroll_style(_str newScrollStyle=null)

If the 'C' argument is specified the scroll style is set to center scrolling, both horizontally and vertically. The 'V' option specifies center scrolling vertically, and smooth scrolling horizontally. The 'H' option specifies center scrolling horizontally and smooth scrolling vertically. Otherwise, it is set to smooth scrolling in both directions.

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.

Parameters:

cmdline - is a string in the format: C | V | H | S [number]

Category:

CursorMovement Functions


_search_case

_str _search_case(_str option=null)

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.

Category:

Search Functions

See Also:

repeat_search, _select_match, match_length, search_replace, save_search, restore_search, search


_search_form_xy

void _search_form_xy(int form_wid, int buf_wid)

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.

Category:

Form Functions


_SearchInitSkipped

void _SearchInitSkipped(int zero_reserved)

When the p_TruncateLength is non-zero, replace operations are skipped if 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.

Applies To:

Edit Window

Category:

Search Functions


_SearchQNofSkipped

int _SearchQNofSkipped()

When the p_TruncateLength is non-zero, replace operations are skipped if 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: int

Returns the number of replace operations that were skipped.

Applies To:

Edit Window

Category:

Search Functions


_SearchQSkipped

_str _SearchQSkipped()

When the p_TruncateLength is non-zero, replace operations are skipped if 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: _str

Returns a space delimited list of line numbers where the replace operation that was skipped.

Applies To:

Edit Window

Category:

Search Functions


_seektext.on_create

typeless _seektext.on_create(long initial_value=0)

Displays the Seek dialog box which lets you specify a seek position to go to.

Returns: typeless

Returns '' if dialog box is cancelled. Otherwise, a decimal seek position is returned which may be used as input to the seek function.

Example:

_str show('-modal _seek_form')

Category:

Forms


_select_block

int _select_block(_str markid="", _str options='E')

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.

Parameters:

mark_id - 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 - 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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

_select_char, _select_line, _show_selection


_select_char

int _select_char(_str markid="", _str options='EN')

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.

Parameters:

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 - 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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

_select_block, _select_line, _show_selection


_select_line

int _select_line(_str markid="", _str options='E')

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

_select_block, _select_char, _show_selection


_select_match

void _select_match(_str markid="")

Uses the selection id specified to select the last string matched by one of the built-in functions search or repeat_search.

Parm:

mark_id 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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

match_length, search, repeat_search, search_replace, save_search, restore_search, _search_case


_select_type

int _select_type(_str markid="", _str option='T', _str newValue=null)

Parameters:

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.

Returns: int

Returns the type or style information about the selection specified.

Category:

Selection Functions


_sellist.on_create

typeless _sellist.on_create(_str title="", typeless flags="", typeless list_data="", _str buttons="", _str help_item="", _str font="", typeless callback="", _str separator="", _str retrieve="", _str completion="", typeless min_list="", typeless initial_value="", typeless SkipPrefixChars="")

Displays a selection list.

Parameters:

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 200characters, a "@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 the 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. Must be set if SL_BUTTON_SELECTALL is included in the buttons list
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 is given.
SL_DESELECTALL
Deselect all items in list box when initializing.
SL_SIZABLE
Dialog can be resized.

list_data -

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 if there positions are explicitly specified. 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.

help_item -

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 -

separator -

retrieve -

completion -

min_list -

initial_value - Initial value displayed in combo box. Useful only if combo box is displayed.

SkipPrefixChars -

Returns: typeless

Returns '' if the dialog box is cancelled. Otherwise, the selected item is returned or the value specified by the call back function is returned.

Example:

_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 ]]]]]]]]] )

Category:

Forms


_set_focus

void _set_focus()

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.

Category:

Miscellaneous Functions

See Also:

_get_focus


_set_foreground_syswindow

int _set_foreground_syswindow(_str class_name, _str title="")

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.

Returns: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_set_foreground_window

int _set_foreground_window(int reserved)

Brings a window to the top in the Z order and gives the window or a control wihin the window focus.

Category:

Miscellaneous Functions


_set_menu_state

int _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="")

This function is identical to the _menu_set_state function and is present only for backward compatibility with SlickEdit Version 1.0x.

Category:

Menu Functions


_set_sel

void _set_sel(int start_pos, int end_pos=start_pos)

Returns: void

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.

Applies To:

Text Box, Combo Box

Categories:

Combo Box Methods, Text Box Methods

See Also:

_get_sel, p_sel_start, p_sel_length


_set_timer

int _set_timer(int milli_interval, typeless pfnCallback=0, typeless callbackArgument=null)

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.

Returns: int

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();

Category:

Miscellaneous Functions

See Also:

_kill_timer


_set_var

void _set_var(int index, typeless value)

Sets the contents of the variable corresponding to the name table index to value.

Parameters:

index - index into the names table returned by one of the functions find_index or name_match.

value - value to set variable to.

Example:

// VAR_TYPE is defined in "slick.sh"
index=find_index("rc",VAR_TYPE)
_set_var(index,"anything");
message('rc='_get_var(index));

Categories:

Macro Programming Functions, Miscellaneous Functions

See Also:

_get_var, find_index, name_match


_ok.on_create

typeless _ok.on_create()

Displays Set Variable dialog box. This dialog box sets a global Slick-C® variable.

Example:

void show('_set_var_form')

Category:

Forms


_SetAllOldLineNumbers

void _SetAllOldLineNumbers()

Sets all old line numbers for the current buffer to the line number. Use the _GoToOldLineNumber method to go to an old line number. SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


_SetBufferInfoHt

typeless _SetBufferInfoHt(_str key, typeless value)

Store data to the current buffer indexed by the given key.

Use _GetBufferInfoHt() or _GetBufferInfoHtPtr() to retrieve data from a dialog by hash table key.

This function differs from _SetDialogInfoHt() because it stores data in a hash table per open file (buffer) rather than per-dialog.

IMPORTANT:
The old value stored by hash table key is returned. null is returned if there is no old value stored. You should initialize your key/value pairs if you want to safely take advantage of the return value.

Parameters:

key - A unique hash table key that represents a given item.

value - value to store in hash table

Returns: typeless

Old value stored by key. null is returned if there is no old value stored for that key.

Category:

Buffer Functions

See Also:

_GetBufferInfoHt, _GetBufferInfoHtPtr, _GetDialogInfoHt, _SetDialogInfoHt


_SetDefaultExtensionOptions

void _SetDefaultExtensionOptions(_str extension, VS_LANGUAGE_OPTIONS &langOptions, int reserved)

Deprecated. Use _SetDefaultLanguageOptions

Sets language specific options for a specific file extension.

Parameters:

extension - File extension. For list of file extension types, use our File Extension Manager dialog ("Tools", "Options...", "File Extension Manager")

langOptions - New language specific options for pszExtension. Since all options are must be set, use the vsGetDefaultExtensionOptions first to query the existing value before setting new values.

reserved - unused

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

_GetDefaultExtensionOptions, _SetDefaultLanguageOptions, _SetExtensionReferTo, _DeleteExtensionOptions, _DeleteLanguageOptions


_SetDefaultLanguageOptions

void _SetDefaultLanguageOptions(_str lang, _str origExtension, VS_LANGUAGE_OPTIONS &langOptions)

Sets language specific options for a specific language.

Parameters:

lang - File language ID (see p_LangId). For list of language types, use our Language Options dialog ("Tools", "Options...", "Language Manager")

origExtension - File extension referred to 'lang'. This is necessary for retrieving options which are genuinely per extension, such as encoding and associated open application.

langOptions - New language specific options for pszExtension. Since all options are must be set, use the vsGetDefaultLanguageOptions first to query the existing value before setting new values.

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

_SetExtensionReferTo, _DeleteLanguageOptions


_SetDialogInfo

void _SetDialogInfo(int index, typeless value, int wid=0, boolean usePUser2=false)

Store indexed data to a dialog. Use this instead of using multiple p_user variables for several controls.

Use _GetDialogInfo to retrieve data from a dialog by hash table key.

This function differs from _SetDialogInfoHt because it stores data in an array that is indexed by integer, rather than a hash table key. Use _SetDialogInfoHt, _GetDialogInfoHt to store/retrieve data to/from a dialog by hash table key.

Parameters:

index - A unique int that represents a given item. There should be a constant for this.

value -

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, store the data on the p_user2 property

Category:

Form Functions

See Also:

_GetDialogInfo, _SetDialogInfoHt, _GetDialogInfoHt


_SetDialogInfoHt

typeless _SetDialogInfoHt(_str key, typeless value, int wid=0, boolean usePUser2=false)

Store data to a dialog indexed by key. Use this instead of using multiple p_user variables for several controls.

Use _GetDialogInfoHt to retrieve data from a dialog by hash table key.

This function differs from _SetDialogInfo because it stores data in a hash table that is indexed by string key, rather than an array. Use _SetDialogInfo, _GetDialogInfo to store/retrieve data to/from a dialog by integer index.

IMPORTANT:
The old value stored by hash table key is returned. null is returned if there is no old value stored. You should initialize your key/value pairs (e.g. in an on_create event) if you want to safely take advantage of the return value.

Parameters:

key - A unique hash table key that represents a given item.

value -

wid - (optional). If specified, use this control's p_user instead of p_active_form. 0 specifies the active form. Defaults to 0.

usePUser2 - If true, store the data on the p_user2 property

Returns: typeless

Old value stored by key. null is returned if there is no old value stored for that key.

Category:

Form Functions

See Also:

_GetDialogInfoHt, _SetDialogInfo, _GetDialogInfo


_SetEditInPlaceCompletion

void _SetEditInPlaceCompletion(_str completion)

Sets p_completion on the EditInPlace text box of the active tree control if there is one

Parameters:

completion - The completion argument to use

Category:

Tree View Methods


_SetEditorLanguage

void _SetEditorLanguage(_str lang='', boolean bypass_buffer_setup=false, boolean map_xml_files=false, boolean called_from_mapxml_create_tagfile=false)

Sets the language specific information such as tabs, margins, color coding, etc. to the specified language options.

Parameters:

lang - Optional language ID (see p_LangId)

bypass_buffer_setup - If true, only set the language name and ID but do not copy in language specific settings, such as tabs, or indent.

map_xml_files - Attempt to map XML files and HTML/JSP files to locate DTD, Scheme, or JSP tag libraries in order to identify custom tags.

called_from_mapxml_create_tagfile - Specifies whether or not _SetEditorLanguage was called from mapxml_create_tagfile. This is for a specific "recursion too deep" error in Eclipse.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

p_LangId, p_mode_name


_setEnabled

void _setEnabled(int ActiveTab, boolean Enabled)

Enables a specific tab. Used this method instead of the p_ActiveEnabled property when setting enabled state of a non-active tab.

Applies To:

SSTab

Category:

SSTab Methods


_setext

int _setext(_str extension, _str field_name, typeless value)

Deprecated. Use _SetLanguageOption()

Sets default extension specific options. Use the _update_buffers function to change extension specific options for buffers already loaded.

Parameters:

field_name - 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 not contain a comma character.

Additional field_name 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.
SMARTTAB
Set the smart tab value for this extension, one of the following:
  • VSSMARTTAB_INDENT
  • VSSMARTTAB_MAYBE_REINDENT_STRICT
  • VSSMARTTAB_MAYBE_REINDENT
  • VSSMARTTAB_ALWAYS_REINDENT

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");
}

Category:

Buffer Functions

See Also:

_update_buffers


_SetExtensionReferTo

void _SetExtensionReferTo(_str extension, _str lang)

Allows you to specify that a file extension is associated with the specified language. This information is used to determine what language mode to choose when a file with the given extension is opened.

Parameters:

extension - File extension. For list of file extension types, use our Options dialog ("Tools", "Options...", "File Extension Manager").

lang - File language ID (see p_LangId). For list of language types, use our Language Options dialog ("Tools", "Options...", "Language Manager")

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

_SetDefaultLanguageOptions, _DeleteExtensionOptions, _DeleteLanguageOptions


_setfield

void _setfield(_str indexOrName, typeless value)

Set the value of a class field. Fields may be specified either by name or by index (see _fieldindex). This function pays no attention to field visibility (private or protected).

Parameters:

indexOrName - Name or position of field

value - value to set field to

Example:

class AAAA { int x; int y; };
class BBBB : AAAA { int z; };
void testSetField() {
   BBBB b;
   b._setfield("x", 0); // b.x = 0;
   b._setfield("y", 1); // b.y = 1;
   b._setfield(2, 2);   // b.z = 2;
}

Category:

Miscellaneous Functions

See Also:

_getfield, _fieldindex, _fieldname, _length


_SetLanguageInheritsFrom

void _SetLanguageInheritsFrom(_str lang, _str parent)

Allows you to create a language which has it's own set of options, but can inherit support callbacks from another language.

Parameters:

lang - Language ID (see p_LangId For list of language types, see the Language Options dialog ("Tools", "Options", "Language Setup...").

parent - lang is set to inherit language specific callbacks from the language specified by parent. If NULL, remove language inheritance for lang.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions

See Also:

_SetDefaultLanguageOptions, _DeleteLanguageOptions, _LanguageInheritsFrom, _FindLanguageCallbackIndex


_SetLanguageOption

int _SetLanguageOption(_str lang, _str field_name, typeless value)

Sets default language-specific options. Use the _update_buffers function to change language-specific options for files already loaded.

Parameters:

lang - Language ID (see p_LangId For list of languages, use our Language Manager dialog ("Tools", "Options...", "Language Manager").

field_name - may be one of the following:

p_mode_name or MN
Specifies mode name.
p_tabs or TABS
Specifies tab settings.
p_margins or MA
Specifies margins.
p_mode_eventtab or KEYTAB
Specifies mode event table.
p_word_wrap_style or WW
Specifies word wrap style.
p_indent_with_tabs or IWT
Specifies indent with tabs.
p_show_tabs or ST
Specifies to show tabs.
p_indent_style or IN
Specifies indent style.
p_word_chars or WC
Specifies word chaacters.
p_lexer_name or LN
Specifies lexer name.
p_color_flags or CF
Specifies color flags.
p_line_numbers_len or LNL
Specifies line number area size
p_softwrap or SW
Specifies soft wrap options
p_softwraponword or SOW
Specifies soft wrap on word

For the above options, value may not contain a comma character.

Additional field_name values:

LANGUAGE or SETUP
General language setup data.
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
Language specific alias file
SMARTPASTE
Specifies Smart Paste(TM) options
SMARTTAB
Specifies tab expansion options
SMARTTAB
Set the smart tab value for this language, one of the following:
  • VSSMARTTAB_INDENT
  • VSSMARTTAB_MAYBE_REINDENT_STRICT
  • VSSMARTTAB_MAYBE_REINDENT
  • VSSMARTTAB_ALWAYS_REINDENT
BEGINEND
Specifies begin/end pairs
OPTIONS
Specifies extension specific options. We recommend that you use macro recording to correctly generate calls that set this option.
NUMBERING
Specifies line numbering options
SURROUND
Specifies dynamic surround flags
AUTOCOMPLETE
Specifies auto-complete flags
AUTOCOMPLETEMIN
Min word length for auto-complete
SYMBOLCOLORING
Symbol Coloring option flags/dd>
INDENT
Indentation options
CODEHELP
Context Tagging option flags
COMMENTEDITING
Comment editing option flags
DOCCOMMENT
Documentation comment options
COMMENT-WRAP
Specifies comment wrap options
XML-WRAP
Specifies XML wrap options
AUTOVALIDATE
Specifies XML validation options
INHERIT
Specifies parent language for tagging callback inheritance
ADAPTIVE-FLAGS
Specifies adaptive flags
ADAPTIVE-FORMATTING
Adaptive formatting flags

The following additional field_name options are actually stored per file extension rather than per language.

LANG-FOR-EXT
Maps file extension to language
ENCODING
Extension-specific encoding
ASSOCIATION
Extension-specific open application

value - Value to set the option to. Note that some option values, as noted above, can not contain commas.

Example:

#include "slick.sh"
defmain()
{
   // Can specify "" instead of "fundamental" to refer to Plain Text mode
   // Change the default margins for fundamental mode.
    _SetLanguageOption("fundamental","p_margins","1 70 1");
   // Update buffers already being edited
    _update_buffers("fundamental","p_margins=1 70 1");
}

Category:

Miscellaneous Functions

See Also:

_GetLanguageSpecificOption, _GetLanguageSetupOptions, _GetDefaultLanguageOptions, _update_buffers


_SetLanguageSetupOptions

void _SetLanguageSetupOptions(_str extension, VS_LANGUAGE_SETUP_OPTIONS &setup)

Store the basic options for the given language. This applies only to the options stored in the def-language-[lang] variable.

Parameters:

lang - Language ID, see p_LangId

setup - Struct containing all language setup options

Category:

Miscellaneous Functions

See Also:

_GetLanguageSetupOptions(), _GetDefaultLanguageOptions(), _SetDefaultLanguageOptions()


_SetListColCaption

void _SetListColCaption(int index, _str caption)

This method along with the _SetListColInfo method allows you to create multiple labeled columns at the top of a list box and separate tabbed delimited list box data into columns.

Example:

   #include "slick.sh"

   defeventtab form1;
   void list1.on_change(int 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();
   }

Applies To:

Label

Category:

Label Methods

See Also:

_GetListColInfo, _GetListColCaption, _SetListColInfo


_SetListColInfo

void _SetListColInfo(int index, int width=0, int flags=0, int state=0)

This method along with the _SetListColCaption method allows you to create multiple labeled columns at the top of a list box and separate tabbed delimited list box data into columns.

Parameters:

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.).

width - is the width of the column in twips.

flags - 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.

state - 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(int 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();
   }

Applies To:

Label

Category:

Label Methods

See Also:

_GetListColInfo, _GetListColCaption, _SetListColCaption


_SetMultiLabelProp

void _SetMultiLabelProp(int index, _str caption, int styles, int min_width, int max_width, int alignment_flags)

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()
{

}

Applies To:

Label

Category:

Label Methods


_SetSymbolColoringEnabled

void _SetSymbolColoringEnabled(_str onoff="", boolean doUpdate=false)

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


_SetSymbolColoringErrors

void _SetSymbolColoringErrors(_str onoff="", boolean doUpdate=false)

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


_SetSymbolColoringOptions

void _SetSymbolColoringOptions(_str lang, int flags)

Set the symbol coloring options which are a bitset of SYMBOL_COLOR_*.

The options are stored per extension type using def_symbolcoloring_[ext].

Parameters:

lang - language ID -- see p_LangId

flags - bitset of SYMBOL_COLOR_* options

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


_SetSymbolColoringSchemeName

_command void _SetSymbolColoringSchemeName(_str name="", boolean doUpdate=false)

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


_SetTextColor

int _SetTextColor(int ColorIndex, int Nofbytes, boolean replacePreviousColor=true)

Sets the text color for the number of bytes specified starting from the cursor.

Parameters:

ColorIndex - index of color in color table

Nofbytes - number of bytes to color code

replacePreviousColor - When true, previous color is replaced with new color. When adding lots of color, this slows down adding color.

Returns: int

Applies To:

Edit Window, Editor Control

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);
}

Categories:

Edit Window Methods, Editor Control Methods

See Also:

_FreeColor, _AllocColor, _GetTextColor, _default_color


_SetTimeout

int _SetTimeout(int ms)

Set the timeout amount for performance critical functions. The timeout is not a strict timeout, it's a software timeout. Use _CheckTimeout() to test if the timeout is expired.

It is good practice to clear the timeout after you are done with it by calling _SetTimeout(0).

Parameters:

ms - number of milliseconds to time out after. use 0 to clear an existing timeout.

Returns: int

Normally will return 'ms', but if there is an existing earlier timeout, the earlier timeout will be returned.

Category:

Macro Programming Functions


_shift_selection_left

int _shift_selection_left(_str markid="")

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_shift_selection_right

int _shift_selection_right(_str markid="")

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_show_entire_form

void _show_entire_form()

Makes sure that the entire form can be seen on the display.

Applies To:

Form

Category:

Form Methods


_show_selection

int _show_selection(_str mark_id="")

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.

Returns: int

Returns 0 if successful. Otherwise INVALID_SELECTION_HANDLE_RC is returned. On error, message is displayed.

Category:

Selection Functions


_showbuf

typeless _showbuf(int buf_or_view_id, boolean isBuffer=true, _str show_options='-new -modal', _str dialog_caption='', _str save_button='', boolean read_only=false)

Displays the buffer id or the buffer attatched to the window 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.

Parameters:

buf_or_window_id - This paramater must be a valid buffer or view id

isBuffer - When true,buf_or_window_id is a buffer id.

show_options - Arguments that are given to the show command before the form name. Default is -new -modal. Specify '' for a modeless dialog

dialog_caption - Caption of hte dialog box

save_button - Specify 'S' to put a save button on this dialog

read_only - if true, buffer is treated as read only, and if there is a save button, it will do a "save as..."

Returns: typeless

the window id of the dialog. Returns 0 if dialog is modal

Category:

Miscellaneous Functions


_ShowWindow

int _ShowWindow(int sw=-1)

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

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

p_visible


_SlickCDebugging

boolean _SlickCDebugging(int on_off, _str port)

Start or stop the Slick-C debugging protocol. Slick-C implements a JDWP (Java Debug Wire Protocol) server that hooks into the interpreter loop when enabled. Turning on debugging will allow a JDWP enabled debugger (SlickEdit) to connect to us. Turning off debugging will terminate the debugger connection.

Parameters:

on_off - see SLICKC_DEBUG_* options above.

port - port number to connect to

Returns: boolean

'true' if Slick-C® debugging was originally enabled, 'false' otherwise.

Category:

Macro Programming Functions


_SlickCDebuggingEnabled

boolean _SlickCDebuggingEnabled()

Returns: boolean

Return 'true' if Slick-C debugging is currently enabled.

Category:

Macro Programming Functions


_SlickCDebugHandler

int _SlickCDebugHandler(int max_time=5000)

Poll for commands for the Slick-C® JDWP debugger server to handle and respond to. If debugging is not current enabled or connected, this function will do nothing.

Parameters:

max_time - maximum amount of time in ms to spend processing before returning control to SlickEdit.

Returns: int

0 on success, <0 on error.

Category:

Macro Programming Functions


_SlickCProfiling

boolean _SlickCProfiling(boolean on_off)

Start or stop Slick-C® profiling data collection. Turning on profiling will clear any currently collected profiling data.

Parameters:

on_off - 'true' to turn on profiling; 'false' to turn it off.

Returns: boolean

'true' if Slick-C® profiling was originally enabled, 'false' otherwise.

Category:

Macro Programming Functions

See Also:

profile, _InsertSlickCProfilingData


_sort

int _sort(_str options="", start=0, int Nofitems=-1)

Sorts an array.

Parameters:

options - 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.

start - array index to start sorting at

Nofitems - number of items to sort

Returns: int

int

Example:

a[0]="def";
a[1]="abc";
// Sort array of strings in ascending order.
a._sort();

Category:

Miscellaneous Functions

See Also:

_el, _makeempty, _isempty, _deleteel, _nextel, _indexin, _varformat


_sort_selection

int _sort_selection(_str cmdline="", _str markid="")

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.

Parameters:

cmdline - cmdline is a string in the format: [A | D] [E | I] [-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).
-N
Sort numbers
-F
Sort filenames

Returns: int

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.

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

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


_source_event_name

_str _source_event_name(int index)

Returns: _str

Returns the Slick-C® event name corresponding to event index index in a form that can be used for defined event handlers.

Category:

Miscellaneous Functions

See Also:

event2name, index2event, event2index


_spell_add

int _spell_add(_str word, int dictionaryNum)

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.

Returns: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_spell_add_hist

int _spell_add_hist(_str ignore_word, _str replace_word="")

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.

Returns: int

Returns 0 if successful.

Category:

Miscellaneous Functions


_spell_check

int _spell_check(_str &word, _str &replace_word, int &col, _str string="")

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.

Parameters:

word -

replace_word -

col -

string -

Returns: int

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

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods


_spell_check_area

int _spell_check_area(_str &word, _str &replace_word, int &col, int start_col, int width=-1)

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.

Parameters:

word -

replace_word -

col -

start_col -

width -

Returns: int

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

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods


_spell_clear

int _spell_clear(_str option)

Clears spelling data in memory.

Parameters:

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.

Category:

Miscellaneous Functions


_spell_delete

int _spell_delete(_str word, _str option)

Deletes a word from the history or a user dictionary.

Parameters:

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.

Category:

Miscellaneous Functions


_spell_insert_suglist

int _spell_insert_suglist(_str word="")

Inserts a suggestion list of possible correct spellings for word specified after the current line.

Parameters:

word - 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.

Applies To:

List Box

Category:

List Box Methods


_spell_option

_str _spell_option(_str option, _str newValue=null)

If newValue is not null, the corresponding option is set to vewValue.

Returns: _str

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.

Category:

Miscellaneous Functions


_spell_save

int _spell_save(_str user_dict1="", _str user_dict2="")

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.

Returns: int

Returns 0 if successful.

Category:

File Functions


_spill_file_path

_str _spill_file_path(_str path=null)

Returns: _str

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.

Category:

File Functions


_split_line

void _split_line(int col=1)

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


_StackDump

void _StackDump(int dumpToFile=0, int dumpToScreen=1, int ignoreNStackItems=0)

Dump the current interpreter stack to the debug window, or the log file.

Parameters:

dumpToFile - dump the stack the log file

dumpToScreen - dump the stack to the debug window

ignoreNStackItems - ignore 'n' items on top of stack

Category:

Miscellaneous Functions


_stdform

_str _stdform(_str name)

Returns: _str

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.

Category:

Miscellaneous Functions


_stop_process

void _stop_process()

Sends a Ctrl+Break signal to the build window created by the built-in function concur_shell.

Category:

Miscellaneous Functions

See Also:

concur_shell, _process_info


_strBeginChar

int _strBeginChar(_str string, int col, int &charLen=0, boolean beginComposite=true)

Parameters:

string - Input string to perform operation on. When SlickEdit is running in UTF-8 mode, this string is UTF-8. Otherwise, this string is SBCS/DBCS for the active code page.

col - Column position within string. 1..length(string)

CharLen - Set to length of entire character at position col.

BeginComposite - When true, column position returned is the beginning of a composite character (one or more UTF-8 sequences) sequence. Otherwise, of a UTF-8 character sequences is returned. This parameter is ignored when SlickEdit is not running in UTF-8 mode.

Returns: int

Returns the column position of the beginning of the character which contains the byte at column col.

Category:

String Functions


_StreamMarkerAdd

int _StreamMarkerAdd(int wid, long StartOffset, long Length, boolean isRealOffset, int BMIndex, int type, _str pszMessage)

Adds a new stream marker.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled breakpoint.
_breakpn.bmp
Indicates a line with a disabled breakpoint.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.
_watchpt.bmp
Indicates a line with an enabled watchpoint.

type - Type allocated by _MarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

Returns: int

Returns index of new stream marker.

Example:

// Add debug bitmap to give the visual effect of a
// break point.
int type=_MarkerTypeAlloc();
int StreamMarkerIndex=_StreamMarkerAdd(p_window_id,p_line,
      0,4, find_index("_breakpt.bmp", PICTURE_TYPE),
      type,"");

// Add a line marker which draws a box
int type=_MarkerTypeAlloc();
int  StreamMarkerIndex=_StreamMarkerAdd(p_window_id,p_line,
      0,4,find_index('_edplus.bmp',PICTURE_TYPE),
      type,"line 1
line2");
_MarkerSetMousePointer(LineMarkerIndex,MP_CROSS);
_LineMarkerSetStyleColor(LineMarkerIndex,0xff0000);
_MarkerTypeSetFlags(type,VSMARKERTYPEFLAG_DRAW_BOX|VSMARKERTYPEFLAG_AUTO_REMOVE);

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerAddB

int _StreamMarkerAddB(_str BufName, long StartOffset, long Length, boolean isRealOffset, int BMIndex, int type, _str pszMessage)

Adds a new stream marker.

Parameters:

BufName - Name of buffer to add marker to.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled breakpoint.
_breakpn.bmp
Indicates a line with a disabled breakpoint.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.
_watchpt.bmp
Indicates a line with an enabled watchpoint.

type - Type allocated by _MarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

Returns: int

Returns index of new stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

_StreamMarkerAdd


_StreamMarkerFindList

void _StreamMarkerFindList(int(&list)[], int wid, long StartOffset, long LineLen, long SearchStartOffset, int type)

Parameters:

list - Output. List of stream marker indexes

wid - Window id of editor control. 0 specifies the current object.

StartOffset - Stream markers that intersect with StartOffset,StartOffset+Length are listed.

Length - Stream markers that intersect with StartOffset,StartOffset+Length are listed.

SearchStartOffset - For performance reasons, only Stream markers that start after SearchStartOffset are listed. By default, StartOffset-8000 is used. If performance is not a problem, you can specify 0. However, if there are 1 million stream markers, then each call requires 1 million stream markers to be checked and this can be SLOW. This optimization works well since it is reasonable to assume that this is less than one stream marker per byte in the file.

Find - by type, or if 0

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerGet

int _StreamMarkerGet(int StreamMarkerIndex, VSSTREAMMARKERINFO &info)

Retrieve the details about the given stream marker.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

info - (reference) initialized with stream marker information.

Returns: int

0 if stream marker index is valid, <0 on error.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerRemove

void _StreamMarkerRemove(int StreamMarkerIndex)

Removes stream marker.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerRemoveAllType

void _StreamMarkerRemoveAllType(int type)

Removes all stream markers that have the specified type.

Parameters:

type - Type of stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerRemoveType

void _StreamMarkerRemoveType(int wid, int type)

Removes all stream markers that have the specified type from window.

Parameters:

type - Type of stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetLength

void _StreamMarkerSetLength(int StreamMarkerIndex, long Length)

Set length of the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

Length - New length.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetMessage

void _StreamMarkerSetMessage(int StreamMarkerIndex, _str pszMessage)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

message - Replace message.

Returns: void

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetStartOffset

void _StreamMarkerSetStartOffset(int StreamMarkerIndex, long StartOffset)

Set start offset for the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

StartOffset - New starting offset for the stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetStyleColor

void _StreamMarkerSetStyleColor(int StreamMarkerIndex, int RGBBoxColor)

Sets the RBG box color or squiggly line color for the stream marker specified..

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

RGBColor - RGB color

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetTextColor

void _StreamMarkerSetTextColor(int StreamMarkerIndex, int ColorIndex)

Sets the color index for the text in the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

ColorIndex - Index of color allocated by vsAllocColor(). Specify 0 for no color (null).

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_StreamMarkerSetType

void _StreamMarkerSetType(int StreamMarkerIndex, int type)

Sets the color index for the text in the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a _StreamMarkerAdd function.

type - Replace type of stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


_suspend

int _suspend()

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();

Category:

Miscellaneous Functions

See Also:

signal_handler, _resume


_syshelp

int _syshelp(_str filename, _str keyword, int help_option=-1)

Displays help. This function is not available in the UNIX version.

Parameters:

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.

Returns: int

Returns 0 if successful.

Example:

// Windows example.  Display help on SetFocus function.
_syshelp("win31wh.hlp+mscxx.hlp", "SetFocus");

Category:

Miscellaneous Functions

See Also:

wh, help


ctldone.on_create

typeless ctldone.on_create()

Displays Tag Files dialog box.

Returns: typeless

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.

Example:

_str show('-xy _tag_form')

Category:

Forms


_text_colc

int _text_colc(int column=0, _str option="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:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

expand_tabs, text_col


_text_height

int _text_height()

Returns: int

Returns the display height of the current font in the parent scale mode (p_xyscale_mode).

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, List Box Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_text_width


_text_width

int _text_width(_str string)

Returns: int

Returns the display width of string in the current font. Return value is in the parent scale mode (p_xyscale_mode).

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_text_height


_ok.on_create

void _ok.on_create(_str FormCaption, int Flags, _str TextBoxWidth, _str HelpItem, _str ButtonNCaptionList="", _str RetrieveName="", _str prompt1="", _str promptN="")

Displays one or more text boxes or combo boxes.

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 Visual 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 the index of the button pressed (e.g. for buttons in order OK, Cancel -- 1=OK, 2=Cancel), and the _param1.._paramN global variables are set to the responses to text1..textN respectively.

The limit on the number of prompts/values is 9.

Parameters:

FormCaption - 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. The input view has Name:[Initial_Value] pairs, one-per-line.
TB_VIEWID_OUTPUT
The return value will be a view id containing the responses. The output view has the Value of each item, one-per-line. IMPORTANT: The value of the button pressed (e.g. OK, Cancel, etc.) is not included in the output view. If you are including custom buttons, and you need to know which button was pressed by the user, then do NOT use the TB_VIEWID_OUTUT flag -- use _param1.._paramN global variables instead and check the return result for which button was pressed (1=first button, 2=second button, etc.).
TB_QUERY_COMPAT
The return value will be a view id containing the responses in the format of the QUERY.
Set to 0 for no flags.

TextBoxWidth - Specifies width of the text box in twips. 1440 twips is 1 inch on the display. Set to "" for the default text box width.

HelpItem - 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 help index item listed in "vslickindex.xml" In addition, you may specify a unique keyword for any windows .chm help file by specifying a string in the format: HelpIndexItem:help_filename. Set to "" for no help.

ButtonNCaptionList - ButtonNCaptionList in the following format:

ButtonList[\tCaption1[\nCaption2[\nCaptionN]]]
Where ButtonList is in the format:
<Caption[:controlName]>[,...]
Note:
If you supply a button list, it is up to you to make your own cancel and help buttons. If you have a button with the control name '_cancel', it will automatically be set up as the cancel button. A button with the control name '_help' will automatically be set up as the help button.

If the caption starts with "-html ", it will be rendered as sunken HTML text.

The same _ok.lbutton_up function will run for all the buttons when they are pressed, unless the control name is specified as _help or _cancel.

Specify "" for default OK, Cancel, Help buttons, and no captions. Defaults to "".

RetrieveName - Specify the name of the command that called this function or a name for what is being prompted for. Defaults to "".

prompt1 - You may specify 1 or more prompt string arguments.

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.
-checkbox
Prompt is a check box instead of a text box.
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.
If -checkbox option is used to create a checkbox, then valid initial values are:
0 (not checked), 1 (checked). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO2STATE style.
If -checkbox3 or -checkbox3a option is used, then valid initial values are:
0 (not checked), 1 (checked), 2 (grayed). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO3STATEA style where values cycle through: 0, 2, 1.
If checkbox3b option is used, then valid initial values are:
0 (not checked), 1 (checked), 2 (grayed). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO3STATEB style where values cycle through: 0, 1, 2.

promptN - Specify 1 or more prompt arguments. See prompt1.

Returns: void

"" if the dialog box is cancelled. If ButtonNCaptionList!="", then return value is the number of the button that was pressed. Button numbers start at 1.

Example:

 _str show("_textbox_form", title ,flags
           ,text_box_width , help_item [, ButtonNCaptionList
           [,retrieve_name
           [,prompt1 [,prompt2, ... promptN ]]]] )

   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
                 "",            // Buttons and captions
                 "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

Category:

Forms


_tile_windows

void _tile_windows(_str option='V')

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.

Applies To:

MDI Window

Categories:

MDI Window Methods, Window Functions

See Also:

_cascade_windows


_time

_str _time(_str option='T')

Parameters:

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.
'F'
Return time in the format YYYYMMDDhhmmssfff where YYYY is the year, MM is the month, DD is the day, hh is an hour between 0 and 23, mm is the minutes between 0 and 59, ss is the seconds between 0 and 59, and fff is the fractional second, in milliseconds.
'G'
Returns seconds elapsed since UNIX Epoch (Midnight of January 1, 1970). This value is always in UTC/GMT.

Returns: _str

Returns system time in the format specified.

Category:

Miscellaneous Functions

See Also:

_date(), _file_date()


_top_height

int _top_height()

Returns height in p_xyscale_mode of the top border of the window.

Applies To:

Form

Categories:

Form Methods, Miscellaneous Functions

See Also:

_bottom_height


_tprint

typeless _tprint(_str buf_name, typeless print_options, typeless print_cheader, typeless print_cfooter, typeless print_lheader, typeless print_lfooter, typeless print_rheader, typeless print_rfooter, typeless print_command, typeless print_device, typeless print_filter, ...)

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.

Parameters:

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 ('').

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Buffer Functions, Edit Window Methods

See Also:

_tprint_format


_tprint_format

void _tprint_format(int output_view_id, _str filename="", _str options="", _str print_cheader="", _str print_cfooter="", _str print_lheader="", _str print_lfooter="", _str print_rheader="", _str print_rfooter="")

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.

Parameters:

output_window_id - specifies the window/buffer to get the formatted text. Usually the _create_temp_view function is used to create an empty window/buffer.

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.

Returns: void

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Buffer Functions, Edit Window Methods

See Also:

_tprint


_tprint_selection

typeless _tprint_selection(...)

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.

Returns: typeless

Returns 0 if successful.

Category:

Selection Functions


_TreeAddItem

int _TreeAddItem(int ItemIndex, _str caption, int flags=0, int NonCurrentBMIndex=0, int CurrentBMIndex=0, int ShowChildren=TREE_NODE_EXPANDED, int moreFlags=0, typeless userInfo=0)

Adds a new sibling or child item.

Parameters:

ItemIndex - Specifies a tree item. The root of the tree can't be deleted and always has an item index of 0.

caption - caption to be used for new tree node.

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 - whether to show the children of this node. TREE_NODE_COLLAPSED specifies not to show the children. Specify TREE_NODE_EXPANDED to initially show children of this node. Set this to TREE_NODE_LEAF for leaf items.

moreFlags - you specify whether this item is hidden (TREENODE_HIDDEN).

userInfo - you to specify per-node user data. See _TreeSetUserInfo.

Returns: int

Returns the item index of the new item.

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);
   }
}

Applies To:

Tree View

Category:

Tree View Methods


_TreeAddListItem

int _TreeAddListItem(_str ItemText, int Flags=0, int Index=TREE_ROOT_INDEX, int ShowChildren=TREE_NODE_LEAF, typeless userInfo=null)

Used to a list style treeview(treeview control with column buttons turned on). Easier to use because index defaults to TREE_ROOT_INDEX, and TREE_ADD_AS_CHILD is always or'd into the flags.

Parameters:

ItemText - Text for this line. Use a tab character to start a new column.

Flags - Flags to add this item. TREE_ADD_AS_CHILD will always be or'd in.

Index - Index to add item under. Defaults to TREE_ROOT_NODE.

ShowChildren - This is the same as the ShowChildren state on _TreeAddItem. Set to 1 or 0 if you wish to have children show. It defaults to TREE_NODE_LEAF because you don't normally want children in this style of tree.

userInfo - Allows you to specify per-node user data. See _TreeSetUserInfo.

Returns: int

Returns the index of the new tree item.

Applies To:

Tree View

Category:

Tree View Methods


_TreeAdjustLastColButtonWidth

void _TreeAdjustLastColButtonWidth()

Adjust the width of the last item in the tree to span width of tree

Applies To:

Tree View

Category:

Tree View Methods


_TreeAppendColButtonInfo

void _TreeAppendColButtonInfo(boolean dockingSameAsFloating=false, _str controlName="")

Save the column widths and sorting options for the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeRetrieveColButtonInfo()


_TreeAppendColButtonSorting

void _TreeAppendColButtonSorting(boolean dockingSameAsFloating=false, _str controlName="")

Save the column number and direction for sorting the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeRetrieveColButtonSorting(), _TreeAppendColButtonInfo()


_TreeAppendColButtonWidths

void _TreeAppendColButtonWidths()

Save the column widths for the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeRetrieveColButtonWidths(), _TreeAppendColButtonInfo()


_TreeBeginUpdate

int _TreeBeginUpdate(int ItemIndex, _str options="")

Start effecient update of tree contents. Using this function saves time and reduces the amount of memory allocation and redraws that get triggered when the contents of a tree are updated.

Parameters:

ItemIndex - Specifies a tree item (parent node to update children of)

options - if 'T', update the node and all child nodes recursively

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeAddItem, _TreeEndUpdate


_TreeBottom

void _TreeBottom()

This method moves the cursor to the last line of the displayed tree.

Applies To:

Tree View

Category:

Tree View Methods


_TreeCopy

int _TreeCopy(int SrcIndexParent, int DestIndexParent, int SrcWID=-1, int DestWID=-1, boolean CopyUserInfo=false, boolean CopySibs=false)

Will copy all nodes under SrcIndex, and deposit under DestIndex

Parameters:

SrcIndex -

DestIndexParent -

SrcWID -

DestWID -

CopyUserInfo -

Returns: int

0 on success.

Applies To:

Tree View

Category:

Tree View Methods


_TreeCurIndex

int _TreeCurIndex()

Returns: int

Returns the current tree item index of the displayed tree.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCurIndex


_TreeCurLineNumber

int _TreeCurLineNumber(int lineNumber=-1)

Parameters:

lineNumber - If lineNumber>=0, the current node is set to the node corresponding to the line number specified.

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods


_TreeDelete

void _TreeDelete(int ItemIndex, _str option="")

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.

Parameters:

ItemIndex - Specifies a tree item.

option - may be "C" or "". When the "C" option is given, only the children of this tree item are deleted.

Applies To:

Tree View

Category:

Tree View Methods


_TreeDeleteColButton

void _TreeDeleteColButton(int ButtonIndex)

Delete a tree column from a multi-column tree control.

Parameters:

ButtonIndex - column index, 0 is the first column

Applies To:

Tree View

Category:

Tree View Methods


_TreeDeselectAll

void _TreeDeselectAll()

Deselects all then nodes in the tree.

Applies To:

Tree View

Category:

Tree View Methods


_TreeDeselectLine

void _TreeDeselectLine(int index)

Deselect the line specified by the given index. If the line is not currently selected, no change is made.

Parameters:

index - index of line to deselect

Applies To:

Tree View

Category:

Tree View Methods


_TreeDoesItemHaveChildren

boolean _TreeDoesItemHaveChildren(int index)

Returns whether the the tree item specified by index has any children.

Parameters:

index - tree node to check for children

Returns: boolean

whether node at index has any children

Applies To:

Tree View

Category:

Tree View Methods


_TreeDown

int _TreeDown()

Returns: int

This method is for moving the cursor down through the displayed tree. Retuns 0 if successful. Otherwise BOTTOM_OF_FILE_RC is returned.

Applies To:

Tree View

Category:

Tree View Methods


_TreeEndUpdate

int _TreeEndUpdate(int ItemIndex)

Finish effecient update of tree contents. This function will delete all tree nodes that were not recycled during the tree update.

Parameters:

ItemIndex - Specifies a tree item (parent node to update children of)

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeBeginUpdate, _TreeDelete


_TreeFindSelected

int _TreeFindSelected(boolean ff)

Finds the next selected tree item.

Parameters:

ff - true to find the first selected item

Returns: int

index of next selected tree item, -1 if none exists

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetCaption

_str _TreeGetCaption(int ItemIndex)

Returns the caption for the specified tree item.

Parameters:

ItemIndex - Specifies a tree item.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeGetColButtonInfo

void _TreeGetColButtonInfo(int ButtonIndex, int &ButtonWidth, int &ButtonFlags, int &State, _str &Caption)

Retrieve the column button info for a multi-column tree control.

Parameters:

ButtonIndex - column index, 0 is the first column

ButtonWidth - column width, in twips

ButtonFlags - button flags, bitset of TREE_BUTTON_

State - initial state of button, depressed or normal

Caption - Button caption

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetCurCaption

_str _TreeGetCurCaption()

Gets the caption of the currently selected item in the tree

Returns: _str

caption of currently selected item in tree

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetCurCoord

void _TreeGetCurCoord(int ItemIndex, int &x, int &y, int &HorizontalScrollPos, int &Height)

Retrieve the positional coordinates of the tree control

Parameters:

ItemIndex - Specifies a tree item

x - x position

y - y position

HorizontalScrollPos - horizontal scroll positoin

Height - height

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetDepth

int _TreeGetDepth(int ItemIndex)

Returns: int

Returns the depth of the specified tree item. The depth of the root tree item (ItemIndex=0) is 0.

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetFirstChildIndex

int _TreeGetFirstChildIndex(int ItemIndex)

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetParentIndex


_TreeGetIndexFromLineNumber

int _TreeGetIndexFromLineNumber(int LineNumber)

Parameters:

LineNumber - Specifies the line number of a tree node as if the tree we are list box.

Returns: int

Returns tree item index corresponding to LineNumber given.

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetIndexFromPoint

int _TreeGetIndexFromPoint(int mou_x, int mou_y, _str option="S")

Parameters:

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.

Returns: int

Returns tree item index under the mouse coordinates specified.

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetInfo

void _TreeGetInfo(int ItemIndex, int &ShowChildren, int &NonCurrentBMIndex=0, int &CurrentBMIndex=0, int &moreFlags=0, int &lineNumber)

Retrieves some tree item properties.

Parameters:

ItemIndex - Specifies a tree item. The root of the tree cannot be deleted and always has an item index of 0.

ShowChildren - whether children of this node are displayed. TREE_NODE_COLLAPSED indicates children are not displayed. TREE_NODE_EXPANDED indicates children of this node are displayed. TREE_NODE_LEAF 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 - 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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeGetNextIndex

int _TreeGetNextIndex(int ItemIndex)

Parameters:

ItemIndex - Specifies a tree item.

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetParentIndex, _TreeGetNextIndex, _TreeGetPrevIndex, _TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetNextSiblingIndex

int _TreeGetNextSiblingIndex(int ItemIndex)

Parameters:

ItemIndex - Specifies a tree item.

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetParentIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetNumChildren

int _TreeGetNumChildren(int ItemIndex, _str options="")

Parameters:

ItemIndex - Specifies a tree item.

options - If 'T', get the number of children recursively

Returns: int

Returns the number of children beneath the parent node specified.

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetNumColButtons

int _TreeGetNumColButtons()

How many columns does the tree control have?

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetParentIndex

int _TreeGetParentIndex(int ItemIndex)

Parameters:

ItemIndex - Specifies a tree item.

Returns: int

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).

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetPrevIndex

int _TreeGetPrevIndex(int ItemIndex)

Parameters:

ItemIndex - Specifies a tree item.

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetParentIndex, _TreeGetNextIndex, _TreeGetPrevIndex, _TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetPrevSiblingIndex

int _TreeGetPrevSiblingIndex(int ItemIndex)

Parameters:

ItemIndex - Specifies a tree item.

Returns: int

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetParentIndex, _TreeGetNextSiblingIndex, _TreeGetFirstChildIndex


_TreeGetSelInfo

void _TreeGetSelInfo(int &NofSelected, int &startSelectedItem=0, int &endSelectedItem=0)

Parameters:

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.

Returns: void

Returns information about the selected items in the tree. Only use this function if p_multi_select is set to MS_SIMPLE_LIST.

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetTextForCol

_str _TreeGetTextForCol(int index, int col)

Retrieves the text for a particular column of a particular tree item.

Parameters:

index - tree item

col - column in tree (0 - based)

Returns: _str

section of tree item's caption that is in that column

Applies To:

Tree View

Category:

Tree View Methods


_TreeGetUserInfo

typeless _TreeGetUserInfo(int ItemIndex)

Returns: typeless

Returns the user info value set by the _TreeSetUserInfo method for the specified tree item.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo


_TreeMoveDown

int _TreeMoveDown(int ItemIndex)

Move an item in the tree down one position.

Parameters:

ItemIndex - Specifies a tree item

Returns: int

0 on success.

Applies To:

Tree View

Category:

Tree View Methods


_TreeMoveUp

int _TreeMoveUp(int ItemIndex)

Move an item in the tree up one position.

Parameters:

ItemIndex - Specifies a tree item

Returns: int

0 on success.

Applies To:

Tree View

Category:

Tree View Methods


_TreePageDown

void _TreePageDown()

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.

Applies To:

Tree View

Category:

Tree View Methods


_TreePageUp

void _TreePageUp()

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.

Applies To:

Tree View

Category:

Tree View Methods


_TreeRefresh

void _TreeRefresh()

Force a tree redraw.

Applies To:

Tree View

Category:

Tree View Methods


_TreeRestoreNodes

void _TreeRestoreNodes(TREENODESTATE &state, int parent=-1)

Restore the specified node and all of it's children. This is used in conjunction with _TreeSaveNodes to save and restore the contents of a tree control to a Slick-C® data structure. This function will also restore the corresponding node as the current tree index.

Parameters:

state - (input) filled with state of specified tree node

index - (input) tree node to start from

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeCopy, _TreeSaveNodes


_TreeRetrieveColButtonInfo

void _TreeRetrieveColButtonInfo()

Restore the column widths and sorting options for the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeAppendColButtonInfo()


_TreeRetrieveColButtonSorting

void _TreeRetrieveColButtonSorting()

Restore the column number and direction for sorting the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeAppendColButtonSorting(), _TreeRetrieveColButtonInfo()


_TreeRetrieveColButtonWidths

void _TreeRetrieveColButtonWidths()

Restore the column widths for the current tree control.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeAppendColButtonWidths(), _TreeRetrieveColButtonInfo()


_TreeSaveNodes

void _TreeSaveNodes(TREENODESTATE &state, int index=TREE_ROOT_INDEX)

Save the specified node and all of it's children. This is used in conjunction with _TreeRestoreNodes to save and restore the contents of a tree control to a Slick-C® data structure.

Parameters:

state - (output) filled with state of specified tree node

index - (input) tree node to start from

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeCopy, _TreeRestoreNodes


_TreeScroll

int _TreeScroll(int lineNumber=-1)

Parameters:

NewScrollPos - If lineNumber>=0, then the first visible node is set to the node corresponding the line number specified.

Returns: int

Returns the line number of the first visible node is returned.

Applies To:

Tree View

Category:

Tree View Methods


_TreeSearch

int _TreeSearch(int ItemIndex, _str searchCaption, _str options="", _str searchUserInfo=null)

Searches a tree control.

Parameters:

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.
'H'
Search hidden nodes.

searchUserInfo - Option item user info to search for.

Returns: int

Returns the index of the tree item or -1 if the search fails.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSelectAll

void _TreeSelectAll(int index=TREE_ROOT_INDEX, boolean recursive=true)

Select all nodes in the tree that are children of the given node.

Parameters:

index - index of node whose children we are to select. Defaults to TREE_ROOT_INDEX

recursive - true to recursively select all dependents of the given node, false to select only direct children

Applies To:

Tree View

Category:

Tree View Methods


_TreeSelectLine

void _TreeSelectLine(int index, boolean DeselectAll=false)

Select the line specified by the given index.

Parameters:

index - index of line to select

DeselectAll - true to deselect all currently selected nodes before selecting new one

Applies To:

Tree View

Category:

Tree View Methods


_TreeSetAllFlags

void _TreeSetAllFlags(int flags, int Mask=flags)

Sets all node flags in the tree. Use this function only if p_multi_select is set to MS_SIMPLE_LIST.

Parameters:

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);

Applies To:

Tree View

Category:

Tree View Methods


_TreeSetCaption

void _TreeSetCaption(int ItemIndex, _str caption)

Sets the caption for the specified tree item.

Parameters:

ItemIndex - Specifies a tree item.

caption - Caption to set tree item to

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSetColButtonInfo

void _TreeSetColButtonInfo(int ButtonIndex, int ButtonWidth, int ButtonFlags=-1, int State=-1, _str Caption='')

Set up the column button info for a multi-column tree control. This is used to add headers and set sorting properties for the colunms.

Parameters:

ButtonIndex - column index, 0 is the first column

ButtonWidth - column width, in twips

ButtonFlags - button flags, bitset of TREE_BUTTON_

State - initial state of button, depressed or normal

Caption - Button caption

Applies To:

Tree View

Category:

Tree View Methods


_TreeSetCurIndex

void _TreeSetCurIndex(int ItemIndex)

Sets the current index in the display tree.

Parameters:

ItemIndex - Specifies a tree item.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeCurIndex


_TreeSetInfo

void _TreeSetInfo(int ItemIndex, int ShowChildren, int NonCurrentBMIndex=-1, int CurrentBMIndex=-1, int moreFlags=0)

Modifies some tree item properties.

Parameters:

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. TREE_NODE_COLLAPSED specifies not to show the children. Specify TREE_NODE_EXPANDED to initially show children of this node. Set this to TREE_NODE_LEAF 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).

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSetUserInfo

void _TreeSetUserInfo(int ItemIndex, typeless info)

Sets the user info value for the specified tree item.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo, _TreeAddItem


_TreeSortCaption

void _TreeSortCaption(int ItemIndex, _str PrimarySortOptions="", _str SecondarySortOptions="")

Sort children of node specified where caption is the primary key and optionally the user info is the secondary key.

Parameters:

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 >= 0.

SecondarySortOptions - String of sort options for secondary key. See PrimarySortOptions.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSortUserInfo


_TreeSortCol

void _TreeSortCol(int ButtonIndex=0, _str PrimarySortOptions="", _str SecondarySortOptions="")

Sort by a column of a multi-column tree control

Parameters:

ButtonIndex - column index, 0 is the first column. If not specified, find first column with TREEBUTTON_SORT flag on

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.

SecondarySortOptions - String of sort options for secondary key. See PrimarySortOptions.

Applies To:

Tree View

Category:

Tree View Methods


_TreeSortUserInfo

void _TreeSortUserInfo(int ItemIndex, _str PrimarySortOptions="", _str SecondarySortOptions="")

Sort children of node specified where caption is the primary key and optionally the user info is the secondary key.

Parameters:

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
I
Case insensitive sort. Sort is case sensitive 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.
=
Move parent nodes to the top but do not change sort order. Similar to 'P' option but parent nodes are not sorted.
2
Specialized filename sort. Sort case insensitive on name without path, then case sensitive on name without path, then case insensitive on path.

SecondarySortOptions - String of sort options for secondary key. See PrimarySortOptions.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSortUserInfo


_TreeTop

void _TreeTop()

This method moves the cursor to the first line of the displayed tree.

Applies To:

Tree View

Category:

Tree View Methods


_TreeUp

int _TreeUp()

Returns: int

This method is for moving the cursor up through the displayed tree. Retuns 0 if successful. Otherwise TOP_OF_FILE_RC is returned.

Applies To:

Tree View

Category:

Tree View Methods


_twips_per_pixel_x

int _twips_per_pixel_x()

Returns: int

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.

Category:

Display Functions

See Also:

_twips_per_pixel_y, _dx2lx


_twips_per_pixel_y

int _twips_per_pixel_y()

Returns: int

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.

Category:

Display Functions

See Also:

_twips_per_pixel_x, _dy2ly


_typename

_str _typename()

Returns: _str

For a given Slick-C variable, return the name of it's type, as currently seen by the interpreter.

This function works with Slick-C classes, arrays, hash tables, and strings. It is unable to distinguish between integers, booleans, and enumerated types.

Example:

class AAAA { int x; int y; };
void sayAAAA() {
   AAAA a;
   say(a._typename());
}

Category:

Miscellaneous Functions

See Also:

_instanceof, _construct


_undo

void _undo(_str option="U")

Undo the last operation performed by the editor control.

Parameters:

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.

Returns: void

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

undo_msg


_unique_name

void _unique_name(_str prefix="")

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.

Parameters:

prefix - prefix to assign to name

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Editor Control Methods, File List Box Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_unique_tab_index


_unique_tab_index

void _unique_tab_index()

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.

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Editor Control Methods, File List Box Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods

See Also:

_unique_name


_update_buffers

void _update_buffers(_str lang, typeless updates=null)

Updates language specific options you specify for all open files.

This function takes either a string or a hash table of field/value pairs. To use the old style string function, you can still call this function. The ability to use a hash table was added because of the desire to include commas in values, which is not possible in a comma-delimited string.

This function does not change the default language specific options. Use _SetLanguageOption, _SetLanguageSetupOptions, _SetDefaultLanguageOptions function, or the LanguageSettings API to change language specific defaults.

Parameters:

lang - Language ID (see p_LangId

updates - Either a hashtable of fieldName => values or a string of format "fieldName=value','...". Each field name corresponds to a buffer property which will be set with the associated value. Examples of field names are _UPDATE_KEY.

Example:

#include "slick.sh"
defmain()
{
   //Change the default margins for fundamental mode.
   LanguageSettings.setMargins("fundamental", "1 70 1");

   // Update buffers already being edited - using a string
    _update_buffers("fundamental", MARGINS_UPDATE_KEY"=1 70 1");

   // Update buffers using a hash table
   _str table:[];
   table:[MARGINS_UPDATE_KEY] = "1 70 1";
    _update_buffers("fundamental", table);
}

Category:

Buffer Functions

See Also:

_SetLanguageOption, _SetDefaultLanguageOptions, _SetLanguageSetupOptions


_update_buffers_for_ext

void _update_buffers_for_ext(_str ext, _str lang="")

Update the language mode for buffers with the given file extension. This function is used for updating buffers after changes have been made to the file extension mappings in the File Extension Manager.

Parameters:

ext - Physical file extension

lang - Language ID (see p_LangId

Category:

Buffer Functions

See Also:

_CreateExtension, _update_buffers


_update_buffers_from_table

void _update_buffers_from_table(_str lang, typeless(&updateTable):[]=null)

Updates language specific options you specify for all open files.

This function takes a hash table of field/value pairs. To use the old style string function, you can still call _update_buffers, which will in term call this function. This function was added because the desire to include commas in values, which is not possible in a comma-delimited string.

Parameters:

lang - Language ID (see p_LangId

updateTable - A hashtable of fieldName => values. Each field name corresponds to a buffer property which will be set with the associated value. Examples of field names are _UPDATE_KEY.

Category:

Buffer Functions

See Also:

_update_buffers


_update_picture

int _update_picture(int index, _str filename)

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.

Returns: int

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));

Category:

Names Table Functions


_update_template

int _update_template()

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.

Returns: int

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.

Applies To:

Form

Categories:

Form Methods, Names Table Functions


_UpdateShowMatchingParen

void _UpdateShowMatchingParen(boolean alwaysUpdate=false)

Update the set of highlighted parentheses, braces, brackets, or begin/end pairs under the cursor.

Parameters:

alwaysUpdate - Update immeidately, or only if idle

Category:

Miscellaneous Functions

See Also:

def_highlight_matching_parens, def_match_paren_idle


_use_edit_font

void _use_edit_font()

Sets the font properties to be the default font used by MDI edit windows.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods


_UTF8

boolean _UTF8()

Returns: boolean

Returns true if editor calls are in UTF-8 mode. UTF-8 mode allows the editor to support UNICODE.

Category:

Miscellaneous Functions

See Also:

_dbcsIsLeadByte, _dbcsStartOfDBCS, _dbcsSubstr


_UTF8Asc

int _UTF8Asc(_str UTF8Sequence)

Returns: int

Returns Unicode character index corresponding to the UTF-8 sequence given. If SlickEdit is not running in UTF-8 mode ( _UTF8()==0 ), this function operates identically to the _asc function.

Category:

Unicode Functions


_UTF8Chr

_str _UTF8Chr(int utf32)

Returns: _str

Returns UTF-8 string corresponding to the Unicode character index given. If SlickEdit is not running in UTF-8 mode ( _UTF8()==0 ), this function operates identically to the _chr function.

Category:

String Functions


_UTF8ToMultiByte

_str _UTF8ToMultiByte(_str string, int codePage=VSCP_ACTIVE_CODEPAGE)

Returns: _str

Converts the UTF-8 string given to the code page specified and returns the result. If SlickEdit is not running in UTF-8 mode ( _UTF8()==0 ), this function returns the input string unchanged.

Category:

Unicode Functions


_varformat

int _varformat()

Returns: int

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 SlickEdit and Slick-C®.

Example:

t=1;
messageNwait("varformat="t._varformat());

Category:

Miscellaneous Functions

See Also:

_el, _makeempty, _isempty, _deleteel, _nextel, _indexin, _sort


_okay.on_create

void _okay.on_create()

Displays Font dialog box which allows you to change the font for the current MDI edit window or all MDI edit windows.

Parameters:

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).

Example:

void show('_wfont_form', options , font)

Category:

Forms

See Also:

_choose_font, wfont


_win32s

int _win32s()

Returns: int

Returns 1 if running under WIN32s on Windows 3.x (no longer supported). Returns 2 if running under Windows 95/98. Otherwise 0 is returned.

Category:

Miscellaneous Functions

See Also:

machine


_WorkspaceFindAllProjectsWithFile

STRARRAY _WorkspaceFindAllProjectsWithFile(_str filename, _str workspaceName=_workspace_filename, boolean isAbsolute=false)

Search for a file in all projects in the specified workspace.

Parameters:

filename - File to search for

workspaceName - Workspace path

isAbsolute - T if the specified filename is an absolute path

Returns: STRARRAY

array of projects containing the given file

Category:

Project Functions


_WorkspaceFindProjectWithFile

_str _WorkspaceFindProjectWithFile(_str filename, _str workspaceName=_workspace_filename, boolean isAbsolute=false, boolean quiet=false)

Search for a file in any project in the specified workspace

Parameters:

filename - File to search for

workspaceName - Workspace path

isAbsolute - T if the specified filename is an absolute path

quiet - T if we should just take the first match

Returns: _str

Project containing the file if found

Category:

Project Functions


_write_state

int _write_state(_str path)

Write out the current state of the Slick-C interpreter to the given file path. The current state includes all global variables, names table entries, loaded modules, and loaded DLLs. It does not include the current function stack, locals, or user data stored in Slick-C dialogs and controls.

Parameters:

path - File to save state file to.

Returns: int

0 on success, <0 on error.

Category:

Names Table Functions


_xmlcfg_add

int _xmlcfg_add(int iHandle, int NodeIndex, _str NameOrValue, int NodeType, int iFlags)

Adds a element to an XML tree

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to a node

NameOrValue - Name or value of the element to be added. If the NodeType specified requires a name, this specifies the name. Otherwise, this specifies the value.

NodeType - One of the following:

VSXMLCFG_NODE_ELEMENT_START
Name contains name of element. Value is null.
VSXMLCFG_NODE_ELEMENT_START_END
Name contains name of element. Value is null.
VSXMLCFG_NODE_XML_DECLARATION
Name is set to "xml". Attributes are set. For compatibility with XPath, the _xmlcfg_find_XXX functions won't find these attributes.
VSXMLCFG_NODE_PROCESSING_INSTRUCTION
Name is set to the processor name (not including '?'). Value is set to all data after the processor name not including leading white space.
VSXMLCFG_NODE_COMMENT
Name is set to null. Value contains all data not including leading '!--' and trailing '--'.
VSXMLCFG_NODE_DOCTYPE
Name is set to "DOCTYPE". For convience, the DOCTYPE information is stored as attributes so it can be more easily identified an modified. A "root" attribute is set to the document root element specified. A "PUBLIC" attribute is set to the public literal specified. A "SYSTEM" attribute is set to the system literal. A "DTD" attribute is set to the internal DTD subset. For compatibility with XPath, the _xmlcfg_find_XXX functions won't find these attributes.
VSXMLCFG_NODE_ATTIRIBUTE
Name is set to attribute name. Value is set to value of attribute not including quotes.
VSXMLCFG_NODE_PCDATA>/DT>
Name is set to null. Value is set to the PCDATA text.
VSXMLCFG_NODE_CDATA
Name is set to null. Value is set to the CDATA text.

iFlags - Add flags. By default, a new sibling is created after NodeIndex. Use these flags to change the behavior.

  • VSXMLCFG_ADD_BEFORE
  • VSXMLCFG_ADD_AS_CHILD

Returns: int

Returns index to new node if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Category:

XMLCFG Functions


_xmlcfg_add_attribute

int _xmlcfg_add_attribute(int iHandle, int NodeIndex, _str AttrName, _str AttrValue, int iFlags=0)

Sets or adds an attribute value for the element node specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

NodeIndex - Index to a node

AttrName - Name of attribute.

AttrValue - New value for attribute.

iFlags - A combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

Returns: int

Returns node index of the new attribute if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Category:

XMLCFG Functions


_xmlcfg_buffer_is_valid

boolean _xmlcfg_buffer_is_valid()

Determines if the xml file found in the current buffer is valid xml.

Returns: boolean

true if the xml is valid, false otherwise

Category:

XMLCFG Functions


_xmlcfg_close

int _xmlcfg_close(int iHandle)

Decrements the open count and closes XMLCFG tree when the count reaches zero.

Parameters:

iHandle - Handle to tree to free

Returns: int

0 if successful

Category:

XMLCFG Functions


_xmlcfg_copy

int _xmlcfg_copy(int DestHandle, int DestNodeIndex, int SrcHandle, int iSrcNodeIndex, int flags)

Duplicates a tree

Parameters:

DestHandle - Handle of destination tree

DestNodeIndex - Index of destination node

SrcHandle - Handle to source tree

iSrcNodeIndex - Index of source node

flags - Specifies one of the following flags:

VSXMLCFG_COPY_CHILDREN
copy children of source as the last children of the dest
VSXMLCFG_COPY_AS_CHILD
copy the source as the last child of the dest
VSXMLCFG_COPY_BEFORE
copy the source as a sibling before the dest
Specify no flags to copy as a sibling after dest. Note that this function can not copy children as siblings. Use the _xmlcfg_copy_children_as_siblings() function to perform this operation.

Returns: int

Returns first node created or VSRC_XMLCFG_NO_CHILDREN_COPIED if successful. Otherwise, an negative error code other than VSRC_XMLCFG_NO_CHILDREN_COPIED is returned.

Example:

// Add tree as last child
_xmlcfg_copy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex,VSXMLCFG_COPY_A_CHILD);

// Add tree before dest node
_xmlcfg_copy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex,VSXMLCFG_COPY_BEFORE);

// Add tree after dest node
_xmlcfg_copy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex);

Category:

XMLCFG Functions


_xmlcfg_copy_children_as_siblings

void _xmlcfg_copy_children_as_siblings(int dest_handle, int dest_index, int src_handle, int src_index, boolean copyBefore=false)

Copies the subtree underneath an XML node to another location, where they are siblings of a destination node.

Parameters:

dest_handle - handle to destination tree

dest_index - index of destination node

src_handle - handle to source tree

src_index - index of source node (parent of subtree to copy)

copyBefore - true to copy the subtree before the dest_index, false to copy them after

Returns: void

Category:

XMLCFG Functions


_xmlcfg_create

int _xmlcfg_create(_str Filename, int iEncoding, int CreateOption=VSXMLCFG_CREATE_IF_EXISTS_CREATE)

Creates or opens an existing XMLCFG tree.

Parameters:

Filename - Name of XML file to create. No disk I/O occurs.

iEncoding - For standard XML files, this parameter should be VSENCODING_UTF8. For Visual Studio 2002/2003 project files, this parameter should be VSCP_ACTIVE_CODEPAGE. For Visual Studio 2005, use VSENCODING_UTF8. Do not use VSENCODING_AUTOXML for creating new documents. But VSENCODING_AUTOXML is valid when using VSXMLCFG_CREATE_IF_EXISTS_OPEN.

encoding may be one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_AUTOUNICODE
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE
VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE
VSENCODING_UTF32BE_WITH_SIGNATURE

CreateOption - One of the following options.

VSXMLCFG_CREATE_IF_EXISTS_CLEAR
If this XMLCFG tree already exists, clear the contents of the tree.
VSXMLCFG_CREATE_IF_EXISTS_OPEN
If this XMLCFG tree already exists, just return the existing handle.
VSXMLCFG_CREATE_IF_EXISTS_ERROR
If this XMLCFG tree already exists, return an error.
VSXMLCFG_CREATE_IF_EXISTS_CREATE
If this XMLCFG tree already exists, create a new tree with the same name.

Returns: int

Returns XMLCFG tree handle if successful. Otherwise a negative return code defined in "rc.sh" is returned

Category:

XMLCFG Functions


_xmlcfg_delete

int _xmlcfg_delete(int iHandle, int NodeIndex, boolean OnlyDeleteChildren=false)

Delete a node and its children from an XML tree.

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to delete

OnlyDeleteChildren - When true, only the children of the node specified are deleted.

Returns: int

0 if successful

Category:

XMLCFG Functions


_xmlcfg_delete_all_attributes

int _xmlcfg_delete_all_attributes(int handle, int elementNode)

Deletes all the attributes of a given node.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

elementNode - Node index of element to delete attributes of

Returns: int

0 on success, <0 on error.

Category:

XMLCFG Functions


_xmlcfg_delete_attribute

int _xmlcfg_delete_attribute(int iHandle, int NodeIndex, _str AttrName)

Deletes an attribute

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to node to delete attribute from

AttrName - Name of attribute to delete

Returns: int

Returns 0 if successful

Category:

XMLCFG Functions


_xmlcfg_delete_children_with_name

void _xmlcfg_delete_children_with_name(int handle, int ParentNode, _str name)

Deletes all children of ParentNodeIndex with the specified Name.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

ParentNode - Tree node index.

name - Name of elements to delete.

Category:

XMLCFG Functions


_xmlcfg_delete_first_n_children

int _xmlcfg_delete_first_n_children(int handle, int parent, int numToDelete)

Deletes the first n children from a node.

Parameters:

handle - handle to xml tree

parent - parent node of children to delete

numToDelete - number of children to delete. if this number is greater than the number of children that the node has, then all children are deleted

Returns: int

int 0 on success, < 0 on error

Category:

XMLCFG Functions


_xmlcfg_delete_last_n_children

int _xmlcfg_delete_last_n_children(int handle, int parent, int numToDelete)

Deletes the last n children from a node.

Parameters:

handle - handle to xml tree

parent - parent node of children to delete

numToDelete - number of children to delete. if this number is greater than the number of children that the node has, then all children are deleted

Returns: int

int 0 on success, < 0 on error

Category:

XMLCFG Functions


_xmlcfg_find_child_with_name

int _xmlcfg_find_child_with_name(int iHandle, int NodeIndex, _str name, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Finds a child index under NodeIndex with the name name

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to a node to search under

name - Name of node to find. This may be null.

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

index >=0 if successful. Otherwise, a negative error code.

Category:

XMLCFG Functions


_xmlcfg_find_simple

int _xmlcfg_find_simple(int iHandle, _str QueryStr, int NodeIndex=TREE_ROOT_INDEX)

Searches for the first occurrence of a node.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

QueryStr - This is a small subset of an XPath expression. Do not add white space since it is not fully supported. In the future, functions will be available which fully support XPath. The following forms of XPath are supported:

file
Find "file" element nodes that are children of the node specified.
@name
Find attribute nodes with name "name" that are children of the node specified.
//file
Find "file" element nodes that are anywhere beneath the node specified. For example, if the node specified is TREE_ROOT_INDEX ("/"), this matches "/project/file" and "/file".
/project/file
Find "file" element nodes under the "project" element nodes which are under the root. If NodeIndex is not the root or the tree, searching starts at the root.
/project//file
Find "file" element nodes anywhere (no just a child) under the "project" element nodes which are under the root. If NodeIndex is not the root or the tree, searching starts at the root.
/project/file[@name='main.c']
Find "file" element nodes with a "name" attribute value of "main.c" under "project" element nodes which are under the root. The expression between the square braces is called the predicate expression. It tests for a codition starting from the context node but does not change the context node.
/project/file[@name='main.c'][@option="debug"]
Find "file" element nodes with a "name" attribute value of "main.c" and option attribute value of "debug" under "project" element nodes which are under the root. This is a form of and expression. There is currently no way to perform an "OR" operation.
/project/file/@name[file-eq(.,'main.c')]
Find "name" attribute nodes of "file" element nodes with a "name" attribute value of "main.c" under "project" element nodes which are under the root. The file-eq() function (the only supported function) performs a case insensitive compare under file systems which are case insensitive. The first argument to the file-eq() function is a period. This specifies the value of the current node. Note that specifying "@name" as the first argument to the file-eq() function would not work because the context node is already on the "name" attribute node and there are no attributes below attribute nodes.
//file[contains(@config,'"WinDebug"','I')]/@name
Find "name" attribute nodes of "file" element nodes with a "config" attribute which contains "WinDebug" in any case. The third argument to contains() is optional and is a string of zero or more of the following option letters:
I
Specifies case insensitive search.
E
(default) Specifies case sensitive search. See Regular Expressions in the on-line help.
R
Specifies SlickEdit regular expression
U
Specifies Unix regular expression which is should be compatible with the XML spec.
B
Specifies Brief regular expression.
L
Specifies Perl regular expression.
We would have preferred not to extend the XML specification for the contains function but we needed case insensitive and regular expression searching which are not yet defined in the XML specification.
//@config[contains(.,"'WinDebug'", 'I')]
Find "config" attribute nodes with values that contain "WinDebug" of any case.
//file[not(@config)]/@name
Find "name" attribute nodes of "file" element nodes which do not have a config attribute. No other forms of the not() function are supported yet.

NodeIndex - Tree node index to start search from.

Returns: int

Returns node index (>=0) found if successful. Otherwise a negative error code is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c"
FileIndex=_xmlcfg_find_simple(handle,
    "/project/file[file-eq(@name,'main.c')]");

// Find the attribute node under /project/file with name equal
// to "main.c"
AttrIndex=_xmlcfg_find_simple(handle,
    "/project/file/@name[file-eq(.,'main.c')]");

Category:

XMLCFG Functions


_xmlcfg_find_simple_array

int _xmlcfg_find_simple_array(int iHandle, _str QueryStr, _str(&Array)[], int NodeIndex=TREE_ROOT_INDEX, int FindFlags=0)

Searches for nodes based on an subset XPath expression.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

QueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

Array - Set to node indexes or values found

NodeIndex - Tree node index to start search from.

FindFlags - Zero or more of the following flags:

VSXMLCFG_FIND_APPEND
When specified, items are append to the end of Array.
VSXMLCFG_FIND_VALUES
When specified, values are returned instead of node indexes.

Returns: int

Returns 0 if successful. Check the length (Array._length()) of the the array to see if any nodes were found. Otherwise a negative error code is returned.

Example:

// Find all file element nodes under /project
_xmlcfg_find_simple_array(handle,"/project/file");

// Find the "file" element nodes that are anywhere
// beneath the node specified.
_xmlcfg_find_simple_array(handle,"//file");

Category:

XMLCFG Functions


_xmlcfg_find_simple_insert

int _xmlcfg_find_simple_insert(int iHandle, _str QueryStr, int NodeIndex=TREE_ROOT_INDEX)

Searches for nodes based on an subset XPath expression and inserts the results into the current buffer.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

QueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

NodeIndex - Tree node index to start search from.

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Example:

// Find the value of all "name" attributes under
// "/project/file" element nodes.
_xmlcfg_find_simple_array(handle,"/project/file/@name");

Category:

XMLCFG Functions


_xmlcfg_get_attribute

typeless _xmlcfg_get_attribute(int iHandle, int NodeIndex, _str AttrName, _str DefaultValue='')

Gets the value of an attribute

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to get attribute from

AttrName - Name of attribute to retrieve the value for

DefaultValue - Value to return if attribute does not exist or an error occurs.

Returns: typeless

Returns value of attribute if successful. Otherwise DefaultValue is returned.

Category:

XMLCFG Functions


_xmlcfg_get_attribute_ht

int _xmlcfg_get_attribute_ht(int handle, int elementNode, _str(&ht):[], boolean append=false)

Create a hash table of attributes for the given element node.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

elementNode - Node index of element to create attribute hash table for.

ht - (output). Hash table of attribute string values. The hash table indices are the attribute names.

append - (optional). If true, then attributes retrieved will be added to, or replace existing, elements in the hash table.

Returns: int

0 on success, <0 on error.

Example:

// Hash table of attributes and values
_str ht:[];
int status;
int handle = _xmlcfg_open("project.xml",status);
// Find the first "file" element node under project element node which
// is under the root.
int elementNode = _xmlcfg_find_simple(handle,"/project/file");
status=_xmlcfg_get_attribute_ht(handle,elementNode,ht);
// Iterate through all attributes in the hash table
typeless i;
i._makeempty();
for( ;; ) {
   ht._nextel(i);
   if( i._isempty() ) break;
   say("Attribute: "i" = "ht:[i]);
}

Category:

XMLCFG Functions


_xmlcfg_get_depth

int _xmlcfg_get_depth(int iHandle, int NodeIndex)

Gets the depth of a node. Root node depth is 0

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to a node

Returns: int

Depth of the node. Root node depth is 0. Negative return value is an error.

Category:

XMLCFG Functions


_xmlcfg_get_filename

_str _xmlcfg_get_filename(int handle)

Gets the filename for the XMLCFG tree specified. This is the name specified in the _xmlcfg_open and _xmlcfg_create calls.

Parameters:

iHandle - XMLCFG tree handle returned from _xmlcfg_open, _xmlcfg_open_from_buffer, or _xmlcfg_create

Category:

XMLCFG Functions


_xmlcfg_get_first_child

int _xmlcfg_get_first_child(int iHandle, int NodeIndex, int NodeTypeFlags=~VSXMLCFG_NODE_ATTRIBUTE)

Gets the first child index from the specified index. The root index is always 0, or TREE_ROOT_INDEX, so to traverse the tree start there.

Parameters:

iHandle - Handle of tree to get index from

NodeIndex - Index of node to get child node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

If successful, returns index of first child. Otherwise a negative error is returned.

Category:

XMLCFG Functions


_xmlcfg_get_last_child

int _xmlcfg_get_last_child(int iHandle, int NodeIndex, int NodeTypeFlags=~VSXMLCFG_NODE_ATTRIBUTE)

Gets the last child index from the specified index.

Parameters:

iHandle - Handle of tree to get index from

NodeIndex - Index of node to get child node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

If successful, returns index of last child. Otherwise a negative error is returned.

Category:

XMLCFG Functions


_xmlcfg_get_modify

int _xmlcfg_get_modify(int handle)

Fetches the XML document modify state.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

Returns: int

Returns a non-zero value if the XML document has been modified.

Category:

XMLCFG Functions

See Also:

_xmlcfg_set_modify


_xmlcfg_get_name

_str _xmlcfg_get_name(int iHandle, int NodeIndex)

Gets the node name

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to set the name for

Returns: _str

Returns the name for the node specified. The name returned is null for comment, attribute, CDATA, and PCDATA nodes.

Category:

XMLCFG Functions


_xmlcfg_get_next_attribute

int _xmlcfg_get_next_attribute(int iHandle, int NodeIndex)

Gets the next attribute node index.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

NodeIndex - Tree node index. Specify an element node to find the first attribute (child of the element node). In subsequent calls, specified the previous value returned by this function to get the next attribute index.

Returns: int

Returns the next attribute node index if successful. Otherwise a negative error code is returned.

Example:

ProjectIndex=_xmlcfg_find_simple(handle,"/project");
for (AttrIndex=ProjectIndex;AttrIndex>0;) {
    AttrIndex=_xmlcfg_get_next_attribute(handle,AttrIndex);
    if (AttrIndex<0) break;
    say('Attribute name is '_xmlcfg_get_name(handle,AttrIndex));
}

Category:

XMLCFG Functions


_xmlcfg_get_next_sibling

int _xmlcfg_get_next_sibling(int iHandle, int NodeIndex, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Gets the next sibling child index from the specified index. The root index is always TREE_ROOT_INDEX, so to traverse the tree start there.

Parameters:

iHandle - Handle of tree to get index from

NodeIndex - Index of node to get sibling node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the next sibling of the node specified by NodeIndex. -1 is returned if the node specified has no next sibling.

Category:

XMLCFG Functions


_xmlcfg_get_num_children

int _xmlcfg_get_num_children(int handle, int parent)

Retrieves the number of children of a node. Function is not recursive, only determines the first level of elements underneath the current level.

Parameters:

handle - handle to xml tree

parent - parent to count children of

Returns: int

number of children of node

Category:

XMLCFG Functions


_xmlcfg_get_num_nodes

int _xmlcfg_get_num_nodes(int iHandle)

Returns the number of nodes in an XML tree

Parameters:

iHandle - Handle to an XML tree

Returns: int

Number of nodes in the tree. Negative return value is an error.

Category:

XMLCFG Functions


_xmlcfg_get_parent

int _xmlcfg_get_parent(int iHandle, int NodeIndex)

Gets the parent index from the specified index.

Parameters:

iHandle - Handle of tree to get index from

NodeIndex - Index of node to get parent node index for

Returns: int

If successful, returns index of parent. Otherwise a negative error is returned.

Category:

XMLCFG Functions


_xmlcfg_get_path

_str _xmlcfg_get_path(int iHandle, _str QueryStr, _str AttrName, _str DefaultValue='')

Gets the value of an attribute

Parameters:

iHandle - Handle to an XML tree

QueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

AttrName - Name of attribute to get value of.

DefaultValue - Value to return if attribute does not exist or an error occurs.

Returns: _str

Returns value of attribute if successful. Otherwise DefaultValue is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c" and get the "options" attribute value.
options=_xmlcfg_get_path(handle,
    "/project/file[file-eq(@name,'main.c')]",
    "options");

Category:

XMLCFG Functions


_xmlcfg_get_prev_sibling

int _xmlcfg_get_prev_sibling(int iHandle, int NodeIndex, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Gets the previous sibling child index from the specified index. The root index is always TREE_ROOT_INDEX, so to traverse the tree start there.

Parameters:

iHandle - Handle of tree to get index from

NodeIndex - Index of node to get sibling node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the previous sibling of the node specified by NodeIndex. -1 is returned if the node specified has no previous sibling.

Category:

XMLCFG Functions


_xmlcfg_get_type

int _xmlcfg_get_type(int iHandle, int NodeIndex)

Gets info about a node

Parameters:

iHandle - Handle for an XML tree

NodeIndex - Index of element

Returns: int

Returns the node type if successful (one of VSXMLCFG_NODE_* constants). Otherwise a negative return code is returned.

Category:

XMLCFG Functions


_xmlcfg_get_value

typeless _xmlcfg_get_value(int iHandle, int NodeIndex)

Gets the node value

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to set the name for

Returns: typeless

Returns the value for the node specified. The value returned is null except for comment, attribute, CDATA, and PCDATA nodes.

Category:

XMLCFG Functions


_xmlcfg_get_xpath_from_node

int _xmlcfg_get_xpath_from_node(int handle, int elementNode, _str &queryStr)

Construct an XPath query string for the element specified.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

elementNode - Node index of element to construct XPath query string for.

queryStr - (output). Query string for element node.

Returns: int

0 on success, <0 on error.

Example:

Element node:

  <file name="main.c" option="debug">

Resulting XPath expression:

  /file[@name='main.c'][@option='debug']

Category:

XMLCFG Functions


_xmlcfg_is_handle_valid

int _xmlcfg_is_handle_valid(int iHandle)

Determines if the given handle points to a valid xml tree.

Parameters:

iHandle - handle of xml tree

Returns: int

int true if the handle is a valid tree, false otherwise

Category:

XMLCFG Functions


_xmlcfg_is_node_valid

int _xmlcfg_is_node_valid(int iHandle, long iIndex)

Determines if the given index points to a valid node in the XML tree.

Parameters:

iHandle - handle of xml tree

iIndex - index to check

Returns: int

true if the index points to a valid node, false otherwise.

Category:

XMLCFG Functions


_xmlcfg_open

int _xmlcfg_open(_str Filename, int &status, int OpenFlags=0, int iEncoding=VSENCODING_AUTOXML)

Opens an XML file and loads it into a tree. returns a handle to the tree

Parameters:

Filename - Name of the XML file to open

status - Set to 0 if succesful. Otherwise this is set to negative error code.

OpenFlags - zero or more of the following flags:

VSXMLCFG_OPEN_ADD_PCDATA
When specified, PCDATA (text between tags including white space) nodes are added to tree. CDATA (<![CDATA[ ... ]]>) nodes are always added to the tree.
VSXMLCFG_OPEN_RETURN_TREE_ON_ERROR
When specified, a valid tree handle is returned even if the XML document is not well formed.

One useful purpose for this option is to determine the namespaces for the current element. Unless the VSRC_XMLCFG_INPUT_ENDED_BEFORE_ALL_TAGS_WERE_TERMINATED is returned, you can't be sure if the XML tree was parsed up to the the current element. Therefore, when determining the current namespaces, truncate the buffer before the '<' for the current element

If a unrecoverable error occurs like "out of memory", a negative error code is returned.

By default, negative error code is returned.

Note: this function DOES NOT perform a thorough well formness check.

VSXMLCFG_OPEN_REFCOUNT
When specified, a search is preformed in the XMLCFG open file cache for a filename which already has the name given to open. If it is found, the reference count is incremented and the same XMLCFG handle is returned. _xmlcfg_close always decrements the reference count and closes the file when the reference count is 0.

iEncoding - For standard XML files, this parameter should be VSENCODING_AUTOXML. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE.

encoding may be one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_AUTOUNICODE
VSENCODING_AUTOXML
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE

VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE
VSENCODING_UTF32BE_WITH_SIGNATURE

Returns: int

handle to the tree if succesful ( >=0 ). Otherwise a negative error code is returned.

Category:

XMLCFG Functions


_xmlcfg_open_from_buffer

int _xmlcfg_open_from_buffer(int wid, int &status, int OpenFlags=0, int StartRealSeekPos=0, long EndRealSeekPos=-1)

Opens and parses an XML file into a tree. The XMLCFG function are intended to be used on valid XML files for reading and writing various configuration information. The XMLCFG functions are not for validating or checking for well formedness.

Parameters:

wid - Window id of editor control.

status - (Output only) Set to 0 if successful. Otherwise a negative error code.

OpenFlags - zero or more of the following flags:

VSXMLCFG_OPEN_ADD_PCDATA
When specified, PCDATA (text between tags including white space) nodes are added to tree. CDATA (<![CDATA[ ... ]]>) nodes are always added to the tree.
VSXMLCFG_OPEN_RETURN_TREE_ON_ERROR
When specified, a valid tree handle is returned even if the XML document is not well formed.

One useful purpose for this option is to determine the namespaces for the current element. Unless the VSRC_XMLCFG_INPUT_ENDED_BEFORE_ALL_TAGS_WERE_TERMINATED is returned, you can't be sure if the XML tree was parsed up to the the current element. Therefore, when determining the current namespaces, truncate the buffer before the '<' for the current element

If a unrecoverable error occurs like "out of memory", a negative error code is returned.

By default, negative error code is returned.

Note: this function DOES NOT perform a thorough well formness check.

StartRealSeekPos - Start real seek position to start reading XML text.

EndRealSeekPos - End real seek position of XML text.

Returns: int

Returns XMLCFG tree handle if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


_xmlcfg_save

int _xmlcfg_save(int iHandle, int iIndentAmount, int iFlags, _str Filename=null, int encoding=-1, int NodeIndex=TREE_ROOT_INDEX)

Saves an XMLCFG tree to a XML file.

Parameters:

iHandle - Handle for tree to save

iIndentAmount - Amount to indent for each level. -1 to use tabs

iFlags - Formatting flags. flags may be zero or more of the following flags:

VSXMLCFG_SAVE_ALL_ON_ONE_LINE
Specifies that all attributes for a given element be written on the same line.
VSXMLCFG_SAVE_ONE_LINE_IF_ONE_ATTR
Specifies that attributes for a given element be written on the same line if there is only one attribute.
VSXMLCFG_SAVE_DOS_EOL
Specifies that carriage return and line feed characters separate each line. This is the default under Windows.
VSXMLCFG_SAVE_UNIX_EOL
Specifies that a line feed character separate each line. This is the default under UNIX.
VSXMLCFG_SAVE_SPACE_AROUND_EQUAL
Specifies that spaces be added before and after the '=' for attributes and their values.
VSXMLCFG_SAVE_CLOSE_BRACE_ON_SEPARATE_LINE
Specifies that the close brace be placed on a separate line.
VSXMLCFG_SAVE_PCDATA_INLINE
PCDATA will not be automatically indented on a new line. Ideal for cases like: Value

Filename - When given, specifies filename to write to. Otherwise, the filename used in the open or create call is used.

encoding - When -1 this parameter defaults to the value specified in the _xmlcfg_open() or _xmlcfg_create() call. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE. encoding may be one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE
VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE
VSENCODING_UTF32BE_WITH_SIGNATURE

NodeIndex - The children of this node are written.

Returns: int

Returns 0 if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Category:

XMLCFG Functions


_xmlcfg_save_to_buffer

int _xmlcfg_save_to_buffer(int wid, int iHandle, int iIndentAmount, int iFlags, int NodeIndex=TREE_ROOT_INDEX)

Saves an XMLCFG tree to the buffer specified by wid.

Parameters:

wid - Window which is viewing the output buffer.

iHandle - Handle for tree to save

iIndentAmount - Amount to indent for each level. -1 to use tabs

iFlags - Formatting flags. flags may be zero or more of the following flags:

VSXMLCFG_SAVE_ALL_ON_ONE_LINE
Specifies that all attributes for a given element be written on the same line.
VSXMLCFG_SAVE_ONE_LINE_IF_ONE_ATTR
Specifies that attributes for a given element be written on the same line if there is only one attribute.
VSXMLCFG_SAVE_DOS_EOL
Specifies that carriage return and line feed characters separate each line. This is the default under Windows.
VSXMLCFG_SAVE_UNIX_EOL
Specifies that a line feed character separate each line. This is the default under UNIX.
VSXMLCFG_SAVE_SPACE_AROUND_EQUAL
Specifies that spaces be added before and after the '=' for attributes and their values.
VSXMLCFG_SAVE_CLOSE_BRACE_ON_SEPARATE_LINE
Specifies that the close brace be placed on a separate line.

NodeIndex - The children of this node are written.

Returns: int

Returns 0 if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Category:

XMLCFG Functions


_xmlcfg_set_attribute

int _xmlcfg_set_attribute(int iHandle, int NodeIndex, _str AttrName, _str AttrValue, int iFlags=0)

Sets or adds an attribute value for the element node specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

NodeIndex - Index to a node

AttrName - Name of attribute.

AttrValue - New value for attribute.

iFlags - -1 indicates that an error should be returned if the attribute does not already exists. Otherwise, the _xmlcfg_add_attribute() function is called to add the attribute.

A combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

Returns: int

Returns 0 if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Category:

XMLCFG Functions


_xmlcfg_set_modify

void _xmlcfg_set_modify(int handle, int modify)

Sets XML document modify state.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

modify - New value for modify state

Category:

XMLCFG Functions

See Also:

_xmlcfg_get_modify


_xmlcfg_set_name

int _xmlcfg_set_name(int iHandle, int NodeIndex, _str name)

Sets the name for the node specified. The name should be null for comment, attribute, CDATA, and PCDATA nodes.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

NodeIndex - Tree node index.

name - New name for node.

Returns: int

Returns 0 if successful. Otherwise a negative return code is returned.

Category:

XMLCFG Functions


_xmlcfg_set_path

int _xmlcfg_set_path(int iHandle, _str QueryStr, _str AttrName=null, _str AttrValue=null, int iFlags=0)

Sets or adds an attribute value for the element node specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

QueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

AttrName - Name of attribute.

AttrValue - New value for attribute.

iFlags - -1 indicates that an error should be returned if the attribute does not already exists. Otherwise, the _xmlcfg_add_attribute() function is called to add the attribute.

A combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

Returns: int

Returns NodeIndex (>=0) for QueryStr (not attribute) if successful. Otherwise a negative return code defined in "rc.sh" is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c" and set the "options" attribute value.
_xmlcfg_set_path(handle,
    "/project/file[file-eq(@name,'main.c')]",
    "options","-Zi");

Category:

XMLCFG Functions


_xmlcfg_set_path2

int _xmlcfg_set_path2(int handle, _str QueryStr, _str element, _str AttrName, _str AttrValue)

another element with the attribute specified below QueryStr.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

QueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

element - Name of tag to add.

AttrName - Name of attribute to set value for ElementName

AttrValue - Value for attribute.

Returns: int

Returns index of element node if successful. Otherwise a negative error code is returned.

Example:

// Add another [Set] element under /Workspace/Environment
// and set the value.
Node=_xmlcfg_set_path2(handle,
    "/Workspace/Environment","Set",
    "Name",
    "VERSION"
    );
_xmlcfg_set_attribute(handle,Node,"Value","8.0");

Category:

XMLCFG Functions


_xmlcfg_set_value

int _xmlcfg_set_value(int iHandle, int NodeIndex, _str Value)

Sets the value for the node specified. The value returned is null except for comment, attribute, CDATA, and PCDATA nodes.

Parameters:

iHandle - Handle to an XMLCFG tree returned by _xmlcfg_open() ,_xmlcfg_create(), or _xmlcfg_open_from_buffer().

NodeIndex - Tree node index.

Value - New value for node.

Returns: int

Returns 0 if successful. Otherwise a negative return code is returned.

Category:

XMLCFG Functions


_xmlcfg_sort_on_attribute

void _xmlcfg_sort_on_attribute(int iHandle, int ParentNodeIndex, _str PrimaryAttrName, _str PrimaryOptions, _str PrimaryFolderElementName=null, _str SecondaryAttrName=null, _str SecondaryOptions=null)

Sorts nodes that are children of a specified node.

Parameters:

iHandle - XMLCFG tree handle returned from _xmlcfg_open, _xmlcfg_open_from_buffer, or _xmlcfg_create

ParentNodeIndex - Children of this node are sorted

PrimaryAttrName - Name of primary attribute to sort on.

PrimaryOptions - String of one or more of the following options:

F
Sort filenames
N
Sort numbers
I
Case insensitive sort. Sort is case sensitive if this option is not specified.
D
Descending. Sort is ascending if this option is not specified.
P
Place parent nodes at the top after sort. Here we consider a parent nodes with name PrimaryFolderElementName.
2
Specialized filename sort. Sort case insensitive on name without path, then case sensitive on name without path, then case insensitive on path.

PrimaryFolderElementName - Only used if P option specified in PrimaryOptions. Indicates the element of a folder.

SecondaryAttrName - Secondary attribute name to sort on

SecondaryOptions - Specifies secondary sort options. See primary options for more information.

Example:

// Sort the project files in the workspace

int ProjectsNode=_WorkspaceGet_ProjectsNode(handle);
if (ProjectsNode>=0) {
   _xmlcfg_sort_on_attribute(handle,ProjectsNode,'File','2');
}

// Sort a folder node and place sub folders at the top.
// Note that it is OK that  nodes have no "N"
// attribute but do have a "Name" attribute.
_xmlcfg_sort_on_attribute(handle,FolderNode,"N",
   "Folder",
   "Name",
   "2P");

Category:

XMLCFG Functions


_xmlcfg_trim_to_only_this_node

int _xmlcfg_trim_to_only_this_node(int handle, int indexToSave)

Removes all the nodes in the XML DOM that are not direct parents or children of the given node.

Parameters:

handle - Handle to an XMLCFG tree returned by _xmlcfg_open(), _xmlcfg_create(), or _xmlcfg_open_from_buffer().

indexToSave - Node index of element to save parents and children of

Returns: int

0 on success, <0 on error.

Category:

XMLCFG Functions


abort

_command void abort()

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.

Category:

Miscellaneous Functions


abs

typeless abs(typeless x)

Returns the absolute value of number. If number is negative, -number is returned. Otherwise number is returned unmodified.

Parameters:

x - Integer or float.

Returns: typeless

The absolute value of the number.

Category:

Miscellaneous Functions


absolute

_str absolute(_str filename, _str toDir=null)

Returns filename with exact path specification as if the current directory was toDir.

Parameters:

filename - The filename to build the path for.

toDir - The directory to use as the current working directory. If null, the current directory is used.

Returns: _str

A string containing the absolute path to the filename.

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'

Category:

File Functions

See Also:

relative


activate_view

void activate_view(int view_id)

Deprecated. Use activate_window().

This function has been deprecated. It has the same effect as calling activate_window().

Applies To:

All Window Objects

Category:

Window Functions


activate_window

void activate_window(int window_id)

Determines the current object/current window.

Parameters:

window_id - ID of window

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()
{
}

Applies To:

All Window Objects

Category:

Window Functions

See Also:

p_window_id, get_window_id, load_files, _next_window, _prev_window, _delete_window, _open_temp_view, _delete_temp_view, _create_window


add

_command void add()

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

select_char, select_line, select_block, math, mathx, matho, mathb


add_hotspot

void add_hotspot()

Add a hotspot at the current cursor location within the current buffer. The range of the hotspot is extended from the cursor location backwards to the first non-blank character and forward to the first non-blank character after the cursor.

Applies To:

Edit Window, Editor Control

Category:

Bookmark Functions


adjust_block_selection

_command typeless adjust_block_selection()

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


alias

_command int alias(_str params='')

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.

Use the "-e" argument to edit aliases for the current file. Use the "-surround" option to edit surround with aliases for the current file.

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.

Returns: int

Category:

Miscellaneous Functions


alias_cd

_command int alias_cd(_str msg='')

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. T he current directory in the build window is set as well if the build window is started.

Returns: int

0 if successful

Categories:

File Functions, Miscellaneous Functions

See Also:

alias, expand_alias, gui_cd, cd, cdd


alias_match

_str alias_match(_str name, int find_first)

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.

Returns: _str

The name of the alias matching the prefix specified by name.

Category:

Completion Functions

See Also:

alias, expand_alias


align_selection_center

_command typeless align_selection_center()

Centers text within a selection. Text must be selected with a select_block (Ctrl+B).

Displays message if text not marked.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

upcase_selection


align_selection_left

_command typeless align_selection_left()

Aligns text within a selection to the left. 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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

upcase_selection


align_selection_right

_command typeless align_selection_right()

Aligns text within a selection to the right. Text must be selected with a select_block (Ctrl+B).

Displays message if text not marked.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

upcase_selection


all

_command void all(...)

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.

Alternate command line syntax: all [~]/string[/options]

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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 allnot(...)

Hides lines containing the search string specified. The entire buffer is processed. See find command for information on options argument.

Alternate command line syntax: allnot /string[/options]

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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


alt_argument

_command void alt_argument()

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.

Applies To:

Edit Window, Editor Control

Categories:

Keyboard Functions, Miscellaneous Functions


alt_bookmark

_command void alt_bookmark()

Sets a bookmark identified by a letter or number corresponding to the key pressed which invoked this command.

This command should only be bound to the following groups of key combinations:

  • Alt+0-9
  • Alt+A-Z
  • Alt+F1-F12
  • Ctrl+0-9
  • Ctrl+A-Z
  • Ctrl+F1-F12
  • Ctrl+Alt+0-9
  • Ctrl+Alt+A-Z
  • Ctrl+Alt+F1-F12
  • Shift+F1-F12

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

set_bookmark, toggle_bookmark, goto_bookmark, next_bookmark, prev_bookmark, alt_gtbookmark


alt_gtbookmark

_command int alt_gtbookmark()

Goes to bookmark identified by a letter or number corresponding to the key pressed which invoked this command.

This command should only be bound to the following groups of key combinations:

  • Alt+0-9
  • Alt+A-Z
  • Alt+F1-F12
  • Ctrl+0-9
  • Ctrl+A-Z
  • Ctrl+F1-F12
  • Ctrl+Alt+0-9
  • Ctrl+Alt+A-Z
  • Ctrl+Alt+F1-F12
  • Shift+F1-F12

Returns: int

Returns the bookmark ID on success. <0 on error.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

set_bookmark, toggle_bookmark, goto_bookmark, next_bookmark, prev_bookmark, alt_bookmark


alt_menu

_command void alt_menu(_str yesno="")

Determines whether pressing and releasing the Alt key activates the menu bar. If no argument is specified, you are prompted for one.

Category:

Menu Functions


alt_prefix

_command typeless alt_prefix(...)

Defines an Alt prefix key. For example, after binding this command to the F1 key, pressing F1 'x' is identical to Alt+X.

Returns: typeless

Category:

Keyboard Functions

See Also:

shift_prefix, ctrl_prefix, esc_alt_prefix


Annotation Functions

_RestoreAnnotationsInFile
_SaveAnnotationsInFile


api_index

_command int api_index()

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.

Returns: int

0 if succesful

Category:

Miscellaneous Functions


append

_command typeless append(_str dest_filename="")

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: typeless

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.

Categories:

File Functions, Selection Functions

See Also:

select_char, select_line, select_block, get, put, gui_write_selection, gui_append_selection


append_clipboard_text

_str append_clipboard_text(_str text)

Appends text to clipboard in buffer.

Parameters:

text - The text to append.

Returns: _str

Returns 0 to indicate successful. No errors possible yet.

Categories:

Clipboard Functions, Selection Functions

See Also:

append_cut2, push_clipboard_itype


append_cut

_command void append_cut(_str name='')

Appends selected text to clipboard and deletes selected text.

Ctrl+Shift+X or "Edit", "Append Cut"

Parameters:

name - rg(1) = name of clipboard(if any)

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods, Selection Functions, Text Box Methods

See Also:

append_next_cut, append_to_clipboard, cut, paste, copy_word, cut_word, cut_line, cut_end_line, cut_prev_word


append_cut2

_str append_cut2(_str mark='', boolean doCopy=false, _str name='')

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.

Parameters:

mark -

doCopy -

name -

Returns: _str

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

Categories:

Edit Window Methods, Selection Functions

See Also:

append_clipboard_text, push_clipboard_itype


append_dir

_command typeless append_dir(_str path='')

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.

cmdline is a string in the format: [@]filespec [ [@]filespec ... ]

Returns: typeless

Category:

File Functions

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, boolean ReturnFirstOnly=false, _str separatorChar=',')

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.

Parameters:

key_binding_list -

ReturnFirstOnly -

Category:

Keyboard Functions


append_list

_command typeless append_list(_str path='', _str arg2='', _str arg3='', _str arg4='')

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.

Parameters:

cmdline - a string in the format: [@]filespec [[@]filespec ... ]

Returns: typeless

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.

Category:

File Functions

See Also:

dir, list, append_dir, append_list, fileman


append_next_cut

_command void append_next_cut()

Allows you to append the next clipboard command to the clipboard. Used by EMACS emulation.

Categories:

Clipboard Functions, Selection Functions

See Also:

append_cut, append_to_clipboard, cut, paste


append_retrieve_command

void append_retrieve_command(_str command, _str force_insert="")

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.

Category:

Retrieve Functions


append_to_clipboard

_command void append_to_clipboard(_str name='')

Appends the selected text to the clipboard.

Parameters:

name - name of clipboard(if any)

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Selection Functions, Text Box Methods

See Also:

append_next_cut, append_cut, cut, paste


appmenu

_command int appmenu(typeless arg1="")

This command is used to execute a menu item of another application.

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).

Returns: int

0 if succesful

Example:

syntax: appmenu [-a] [-c[p] classname] [-t[p] windowtitle] <menuspec>

If you use the -t option, don't forget to use '"' around titles with spaces

menuspec:
Separate with "|".
    Will translate the & characters that may be in the menus, not "...".
    Ex.:"File|Open..."
appmenu -a -cp Afx -tp "Microsoft Developer Studio" File|Open...
appmenu -a -t "Borland C++" File|Open...

Category:

Miscellaneous Functions


arg_shift_selection

_command void arg_shift_selection()

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


argument

_command void argument(...)

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.

Applies To:

Edit Window

Category:

Keyboard Functions


ArgumentCompletionUpdateTextBox

boolean ArgumentCompletionUpdateTextBox(_str completion_info='', _str history_prefix="")

Update the completion suggestions for a text box or combo box.

Returns: boolean

0 on success, <0 on error.

Applies To:

Text Box, Combo Box

Categories:

Completion Functions, Combo Box Methods, Text Box Methods

See Also:

autocomplete


arrange_icons

_command void arrange_icons()

Arranges the iconized editor windows.

Category:

Window Functions


asc

_command void asc(_str ch='')

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.

Category:

String Functions

See Also:

chr


ascii_table

_command typeless ascii_table()

Opens the file "asciitab" which contains a table of the ASCII characters with the corresponding hex and decimal character codes.

Returns: typeless

Returns 0 if successful

Category:

Miscellaneous Functions


asm_proc_search

_str asm_proc_search(_str &proc_name, int find_first)

Search for the next tag in Unix or Intel assembly code.

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.

Parameters:

proc_name - (reference) set to tag name, in the format: TAGNAME([CLASS:]TYPE) See tag_tree_compose_tag() for more details.

find_first - find first match or next match?

Returns: _str

0 on success, non-zero on error, STRING_NOT_FOUND_RC if there are no more tags found.

Category:

Search Functions


attr_case

_str attr_case(_str name)

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.

Parameters:

name - A string containing the attributes to convert.

Returns: _str

A string with the attributes converted to the proper case.

Category:

File Functions


auto_codehelp_key

_command void auto_codehelp_key()

Command normally bound to keystrokes that should initiate auto-list-members. For example, in C and C++, this could be ".", ":", or ">" (last char of "->").

Does not invoke function help if on command line or in a comment or string, or if auto function help is turned off.

Category:

Tagging Functions

See Also:

_do_list_members()


auto_restore

_command void auto_restore(_str onoff="")

The General Tab ("Tools", "Options", "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, 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 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 directory is pointed to by the SLICKEDITCONFIG environment variable.

Category:

Miscellaneous Functions


autocomplete

_command int autocomplete()

Update auto complete information on demand. Note that normally, invocation of auto complete mode happens automatically.

Automatic completion provides a comprehensive system to tie together many of the most important features of SlickEdit into one consistent framework. Automatic completion works by dynamically suggesting completion possibilities when they are discovered, and providing a one key solution for selecting to perform the auto-completion, when is then executed as if the specific command had actually been typed.

This frees the user from having to remember the key combination associated with various completion mechanisms, all they really need to remember is Space key. And if they are an advanced user, they also can use Ctrl+Shift+Space to incrementally pull in part of an auto completion.

The features pulled into this system include:

  • Language specific syntax expansion
  • Alias expansion
  • Symbol completion using tagging
  • Complete prev/next matches
  • Command line history
  • Command argument completion
  • Text box dialog completion

For the text box and combo box controls, this same system supplements the existing completion mechanisms by providing a dynamic system for displaying the matches, much like that used by the Windows file chooser.

For the SlickEdit command line, this system supplements command history as well as command argument completion using the same display mechanism.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Completion Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

c_space, expand_alias, codehelp_complete, complete_next, complete_prev, file_match, tag_match


autocomplete_space

_command void autocomplete_space()

SPACE BAR in auto complete mode

New binding of SPACE key when in auto complete mode. Executes the underlying binding for the space key.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


AutoCompleteGetMinimumLength

int AutoCompleteGetMinimumLength(_str lang)

Get the minimum length identifier prefix that will allow auto complete to be triggered. This is closely related to the mimimum expandable keyword length common to most language specific syntax expansion options.

This settings is stored per extension type. If the options are not yet defined for an extension, then use def_auto_complete_minimum_length as the default.

Parameters:

lang - language ID -- see p_LangId

Returns: int

minimum length setting

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


AutoCompleteGetOptions

int AutoCompleteGetOptions(_str lang='')

Get the auto complete options wich are a bitset of AUTO_COMPLETE_*.

The options are stored per extension type. If the options are not yet defined for an extension, then use def_auto_complete_options as the default.

Parameters:

lang - language ID -- see p_LangId

Returns: int

bitset of AUTO_COMPLETE_* options.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


AutoCompleteSetMinimumLength

void AutoCompleteSetMinimumLength(_str lang, int min)

Get the minimum length identifier prefix that will allow auto complete to be triggered. This is closely related to the mimimum expandable keyword length common to most language specific syntax expansion options.

This settings is stored per extension type. If the options are not yet defined for an extension, then use def_auto_complete_minimum_length as the default.

Parameters:

lang - language ID -- see p_LangId

min - minimum prefix length

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


AutoCompleteSetOptions

void AutoCompleteSetOptions(_str lang, int flags)

Set the auto complete options wich are a bitset of AUTO_COMPLETE_*.

The options are stored per extension type using def_autocomplete_[ext].

Parameters:

lang - language ID -- see p_LangId

flags - bitset of AUTO_COMPLETE_* options

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Category:

Completion Functions


AutoCompleteUpdateInfo

int AutoCompleteUpdateInfo(boolean alwaysUpdate=false, boolean forceUpdate=false)

Update the completion suggestions. This function is called from the auto-save timer, and synchronously from AutoCompleteDoKey() and the autocomplete command.

Parameters:

alwaysUpdate - Update now, do not wait for idle timer

forceUpdate - Force update, independent of auto complete options

Returns: int

0 on success, <0 on error.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Completion Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

autocomplete


b_match

_str b_match(_str name, boolean find_first)

Parameters:

name - buffer name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Categories:

Buffer Functions, Completion Functions

See Also:

f_match, dir_match


back

_command void back()

Go to the previously viewed file and cursor location like a web browser.

Category:

Edit Window Functions


backtab

void backtab()

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.

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

tab


backward_cut

void backward_cut(boolean push, _str mark='')

Appends selection specified by markid in front of the current clipboard. If push is true a new clipboard is created containing the selection specified.

Parameters:

push -

mark -

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


backward_down_sexp

_command int backward_down_sexp()

Moves backward and down into the preceeding S-expression starting from the cursor position. If the cursor is not on a close paren, bracket, or brace, it will behave just like prev_sexp.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, backward_up_sexp, forward_up_sexp, forward_down_sexp


backward_up_sexp

_command int backward_up_sexp()

Moves backwards up into the parent S-expression starting from the cursor position. If no parent S-expression is found, it will move the cursor to the beginning of the file.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, forward_up_sexp, backward_down_sexp, forward_down_sexp


batch_call_list

boolean batch_call_list(_str callback_name, typeless batch_arg=null, boolean forceCallbackOnTimer=false)

In a frequently called event handler, sometimes you will want to group events together and handle them all in one shot using a more general refresh function instead of a piecemeal handler for the specific event.

Call this function to schedule a one-shot timer to invoke a general refresh function. It only scedules the timer to call the refresh function after four singular events have passed. This way the simple, faster, piecemeal handler can be used for isolated events and you only go to the general, more expensive refresh handler for larger updates.

Parameters:

callback_name - name of general refresh callback to call_event

batch_arg - argument to pass to refresh callback

forceCallbackOnTimer - force callback, don't wait for threshold

Returns: boolean

The function returns 'true' if the threshold has been reached and the rest of the event handler callback should be ignored. Otherwise, it returns false, and the caller is responsible for handling the event handler callback itself.

Category:

Miscellaneous Functions

See Also:

call_list, close_all


begin_line

_command void begin_line()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

end_line


begin_line_text_toggle

_command void begin_line_text_toggle()

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. If the cursor is in a documentation comment or line comment, it is moved to the first non-blank character within the comment on the current line. If the cursor is before the first non-blank character, it is moved to the right of the comment delimeter. If the cursor is on the comment delimeter, it is moved to the left of the comment delimeter. Otherwise the cursor is moved to column one.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


begin_select

_command int begin_select(_str markid='', boolean LockSelection=true, boolean RestoreScrollPos=false)

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.

Parameters:

markid - a handle to a selection or bookmark returned by one of the built-ins _alloc_selection or _duplicate_selection * @param LockSelection

RestoreScrollPos -

Returns: int

0 if successful. Possible return values are TEXT_NOT_SELECTED_RC or INVALID_SELECTION_HANDLE_RC. On error, message is displayed.

Categories:

Edit Window Methods, Selection Functions


begin_statement

_command int begin_statement(_str quiet='')

Navigate to the beginning of the current statement under the cursor.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


begin_statement_block

_command int begin_statement_block(_str quiet='')

Navigate to the beginning of the current statement block.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


begin_window

_command typeless begin_window()

Places cursor at top left of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

end_window


begin_word

_command void begin_word()

Moves the cursor to the beginning of the current word. To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_word, prev_word, cur_word


binary_mode

_command void binary_mode()

Switches to binary mode key bindings, and switches to hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


bind_to_key

_command typeless bind_to_key(_str commandName='')

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.

Here 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.

Returns: typeless

Returns 0 if successful. Possible return values are 1 (command not found) and COMMAND_CANCELLED_RC. On error, message is displayed.

Applies To:

Edit Window

Example:

cmdline is a string in the format: [-max_keystrokes] [-r | -m] command

Category:

Keyboard Functions

See Also:

unbind_key, list_keydefs, create_prefix_key


block_insert_mode

_command void block_insert_mode()

Starts block/column insert mode. When in block/column insert mode, characters you type as well as other edits (backspace,delete) apply to the entire block/column selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, File Functions


block_was_read

int block_was_read(int newValue=-1)

Determines whether a block was read from a file. o 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.

Parameters:

newValue -

Returns: int

Returns a non-zero number if the editor has read a block from a file. Otherwise zero is returned. T

Applies To:

Edit Window, Editor Control

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();

Categories:

Edit Window Methods, Editor Control Methods, File Functions


bookmark_all_occurrences

int bookmark_all_occurrences(_str search_text, _str search_options)

Bookmark all matching occurences in a buffer.

Parameters:

search_text - String to search for.

search_options - Search options (@see find)

Returns: int

Number of occurrences

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

search


Bookmark Functions

_BookmarkAdd
_BookmarkFind
_BookmarkGetInfo
_BookmarkQCount
_BookmarkRemove
_BookmarkRestore
_RestoreBookmarksInFile
_SaveBookmarksInFile
add_hotspot
alt_bookmark
alt_gtbookmark
bookmark_stack
clear_bookmarks
clear_hotspots
delete_bookmark
delete_bookmark_from_tree
goto_bookmark
goto_bookmark_in_tree
gui_push_tag
next_bookmark
next_hotspot
old_goto_bookmark
pop_all_bookmarks
pop_bookmark
pop_destination
prev_bookmark
prev_hotspot
push_bookmark
push_destination
set_bookmark
toggle_bookmark
toggle_bookmarks


bookmark_stack

_command int bookmark_stack()

Displays a list of pushed bookmarks allowing you to navigate to a point higher up your bookmark stack without losing the existing contents of your bookmark stack.

The pushed bookmarks are listed from top to bottom, most recent to oldest.

When you select a bookmark, you are navigated to the location of the bookmark, however, your entire bookmark stack remains intact. A bookmark is pushed for your previous cursor location.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_bookmark, pop_bookmark, goto_bookmark


bottom

void bottom()

Places text cursor at end of last line of buffer.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

top


bottom_left_of_window

_command void bottom_left_of_window()

Places cursor at bottom right of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

top_of_window


bottom_of_buffer

_command void bottom_of_buffer()

Places text cursor at end of last line of buffer. If the "Preserve Column on Top/Bottom..." option ("Tools", "Options", "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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

top_of_buffer, def_top_bottom_push_bookmark, def_top_bottom_style


bottom_of_window

_command void bottom_of_window()

Places cursor at bottom of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

top_of_window


box

_command int box()

Converts selected text into box comment using the comment setup.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


brief_delete

_command typeless brief_delete()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


brief_end

_command typeless brief_end()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

brief_home


brief_home

_command typeless brief_home()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

brief_end


brief_iselect_char

_command typeless brief_iselect_char()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

brief_select_char, brief_select_line, brief_select_block


brief_paste

_command typeless brief_paste(_str name='')

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", "Options", "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.

Returns: typeless

Returns 0 if successful. Common return codes are 1 (Clipboard empty, or clipboard text too long for command line) TOO_MANY_MARKS_RC.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

list_clipboards, copy_to_clipboard, copy_word, cut_end_line, cut_line, cut, cut_word, cut_prev_word, paste


brief_save

_command typeless brief_save()

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.

Applies To:

Edit Window

Category:

Editor Control Methods


brief_select_block

_command typeless brief_select_block()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

brief_select_char, brief_select_line, brief_iselect_char


brief_select_char

_command typeless brief_select_char()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

brief_iselect_char, brief_select_line, brief_select_block


brief_select_line

_command typeless brief_select_line()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

brief_select_char, brief_select_line, brief_select_block


buf_match

_str buf_match(_str name_prefix, int find_first, _str options="")

Parameters:

name_prefix - Prefix to search for

find_first - A non-zero value for find_first begins a new search, otherwise, the next matching buffer is returned.

options_letters - A string of one or more of the following:

  • H -- Return buffers with (p_buf_flags & VSBUFFLAG_HIDDEN) 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.
  • I -- Return buffer ID only

Returns: _str

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.

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
   }

Category:

Buffer Functions

See Also:

find_index, name_match, file_match


Buffer Functions

_buf_transfer
_BufSetFlags
_CreateTempEditor2
_delete_buffer
_find_and_delete_temp_view
_find_or_create_temp_view
_find_or_open_temp_view
_GetBufferInfoHt
_GetBufferInfoHtPtr
_isno_name
_keepquit_id
_need_to_save
_negative2dec
_next_buffer
_Nofbuffers
_prev_buffer
_print
_printer_setup
_SetBufferInfoHt
_setext
_tprint
_tprint_format
_update_buffers
_update_buffers_for_ext
_update_buffers_from_table
b_match
buf_match
close_all
close_all_and_edit
close_buffer
close_others
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
diff_current_file
diff_with
find_buffer
find_view
for_each_buffer
get_window_id
last_buffer
list_buffers
list_clipboards
list_modified
load_files
make_buf_match
merge
name_file
new
new_file
next_buffer
next_doc
old_list_buffers
open_url_in_assoc_app
prev_buffer
prev_doc
print
printer_setup
project_compile
project_file_match
q
quit
quit_error_file
resync
sort_buffer
switch_buffer
toggle_files
toggle_filetabs
toggle_open
tprint
wkspace_file_match
workspace_new


build_load_options

_str build_load_options(_str filename)

Returns file load options string based on filename and global settings. The File Options dialog box ("Tools", "Options", "File Options...", select the Load tab) sets global file load options. The Extension Options dialog box allows the encoding to defined per extension. The option string returned by this function is valid input to the load_files() function. This function is used by the edit command.

Returns:

the file load optiosn string

Category:

File Functions


build_save_options

_str build_save_options(_str filename)

Returns file save options string based on filename and global settings. The File Options dialog box ("Tools", "Options", "File Options...", select the Save and Backup tabs) sets global file save options. The option string returned by this function is valid input to the _save_file() function. This function is used by the edit command.

Returns:

the file save options string

Example:

#stop_command ;c; ...

   See replace command.
#start

Category:

File Functions


c_asterisk

_command void c_asterisk()

If the user just typed /* to open a multiple line comment, complete the comment with */. Do not complete the comment if there is text after the cursor, since they are probably trying to surround something.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_begin

_command void c_begin()

(C mode only) '{'

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", "Options", "File Extension Setup...", select C extension, "Options:").

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_endbrace

_command void c_endbrace()

(C mode only) '}'

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",
"Options", "File Extension Setup...", select C extension, "Options:").

Applies To:
Edit Window, Editor Control

Categories:
Edit Window Methods, Editor Control Methods


c_enter

_command void c_enter()

(C mode only) ENTER

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", "Options", "File Extension Setup...",
select the Indent tab) to change syntax expansion/indenting options.

Applies To:
Edit Window, Editor Control

Categories:
Edit Window Methods, Editor Control Methods


c_format

_command int c_format(int in_wid=0, int start_indent=0, boolean use_form_options=false, boolean quiet=false)

Beautifies the current buffer using the current options. Use the C/C++/Java/JavaScript/C# Beautifier dialog box set beautifier options used by this command.

Parameters:

in_wid - Input window id to format. If 0, then current window is formatted. Defaults to 0.

start_indent - Starting indent for formatted lines. Defaults to 0.

use_form_options - Set to true to use globally stored options filled in on form by

quiet - (optional). Set to true if you do not want to see status messages or be prompted for options (e.g. tab mismatch). More serious errors (e.g. failed to save default options, etc.) will still be displayed loudly. Defaults to false.

Returns: int

a status value. Return value=2 means there was an error beautifying and calling function should get the error message with vscf_iserror().

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

gui_beautify, c_beautify_selection


c_format_selection

_command int c_format_selection(boolean use_form_options=false, boolean quiet=false)

Beautifies the current selection using the current options. If there is no current selection the entire buffer is beautified. Use the C/C++/Java/JavaScript/C# Beautifier dialog box set beautifier options used by this command.

Applies To:

Edit Window, Editor Control

Category:

Edit Window Methods

See Also:

gui_beautify, c_beautify


c_match

_str c_match(_str name, int find_first)

Parameters:

name - command name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


c_mode

_command void c_mode()

Activates C/C++ file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_paren

_command void c_paren()

(C mode only) Open Parenthesis

Handles syntax expansion or auto-function-help for C/C++ mode and several other C-like languages. Use the C Options dialog box ("Tools", "Options", "File Extension Setup...", select C extension, "Options...") to change the main style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_semicolon

_command void c_semicolon()

(C mode only) Semicolon

Handles syntax expansion for one-line if and while statements. Just type "if", then semicolon, and it expands to "if (<cursor here>) <next hotspot>

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_slash

_command void c_slash()

If they just typed /// to open a xmlDoc comment, and we are not already inside a xmlDoc comment, and the current scope is outside of a function, create a skeleton xmlDoc comment.

This feature is enabled for C# only

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

xmldoc_comment


c_space

_command void c_space()

(C mode only) SPACE BAR

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", "Options", "File Extension Setup...", select C extension, "Options...") to change the main style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


c_tab

_command void c_tab()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


cache_size

_command void cache_size(_str param="", ...)

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, SlickEdit's cache is 3 times faster than operating system cache. This means that you will want 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.

Parameters:

cmdline - is a string in the format: buffer_ksize [state_ksize ]

Category:

File Functions


calculator

_command void calculator()

Displays Calculator dialog box.

Category:

Miscellaneous Functions


call

void call(typeless t)

Deprecated.

The call function is just used to evaluate an expression and leaves the result in rc. It is unneccessary, and is no longer used in Slick-C.

Parameters:

t - expression to evaluate (usually a function call)

Category:

Miscellaneous Functions


call_event

typeless call_event(..., int wid_or_etab, _str event, option='W')

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

Parameters:

wid_or_etab - window id

event - event to call

option - see above ('W', 'E', or '2')

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);
}

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


call_index

typeless call_index(..., int index)

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.

Parameters:

index - name table index of function to call

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);
}

Category:

Names Table Functions

See Also:

index_callable, find_index


call_key

void call_key(_str key, _str continuation_message="\1", _str chOption="D")

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 and you want
     processing to call the original event. Specify 'S' for the third argument.
   --You have written an _on_hex() function and you want
     processing to call the original event. Specify 'E' for the third argument.
   --You have written buffer specific keyboard callback by using the _kbd_add_callback()
     function and you want processing to call the original event. Specify '1' for the third argument.
   --Specify 'L' if you have already processed _on_select, _on_hex, _on_key
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);

Category:

Keyboard Functions

See Also:

get_event, test_event, last_event, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


call_list

void call_list(_str prefix_name, ...)

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.

Category:

Miscellaneous Functions


call_root_key

void call_root_key(_str key)

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.

Category:

Keyboard Functions

See Also:

try_calling


cancel

void cancel()

Displays "Command cancelled" message.

Category:

Miscellaneous Functions


cancel_recording

_command void cancel_recording()

(when recording) ESC

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".

Category:

Macro Programming Functions


cap_selection

_command typeless cap_selection()

Capitalizes the first character of the current selection and the first character of each word in the current selection and leaves the cursor at its current location. If there is no current selection, then the command is identical to cap_word(). To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cap_word


cap_word

_command typeless cap_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Returns: typeless

0 if successful. Returns 1 if no word exists at cursor. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

lowcase_word, upcase_word


caps

_command void caps()

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.

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

See Also:

ISPF Line Command Uppercase, p_caps


cascade_windows

_command void cascade_windows()

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();

Applies To:

MDI Window

Category:

Window Functions


case_indirect

_command typeless case_indirect(_str key='')

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.

Returns: typeless

If key != '' translated key is returned. Otherwise '' is returned.

Category:

Keyboard Functions


case_toggle

_command void case_toggle()

Toggles case sensitive searching on/off. Effects command line style BRIEF emulation search commands. Used in BRIEF emulation.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

See Also:

re_toggle


cbacktab

_command void cbacktab()

Moves the cursor to the previous indent level or tab stop. To set the tab stops see help on gui_tabs or tabs command.

Applies To:

Text Box, Combo Box, Edit Window, Editor Control

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

ctab, move_text_tab, move_text_backtab


cd

_command typeless cd(_str cmdline="", _str quiet="")

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 build window. Use the Change Directory dialog box ("File", "Change Directory...") to change these defaults and press the save settings button.

Parameters:

cmdline - is a string in the format: [+p | -p] [+a | -a] driveNpath

 The options have the following meaning:
 +p      Change directory in the build window.
 -p      Don't change directory in the build window.
 +a      Support directory aliases for driveNpath.
 -a      Do not support directory aliases for driveNpath.

Returns: typeless

Returns 0 if successful. Common error code is PATH_NOT_FOUND_RC.

Category:

File Functions

See Also:

cdd, gui_cd, alias_cd


cdd

_command typeless cdd(_str param="")

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 build window if a path is given.

Returns: typeless

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 build window.

Category:

File Functions

See Also:

cd, gui_cd, alias_cd


center

_str center(_str string, int width, _str pad=" ")

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 "".

Parameters:

string -

width -

pad -

Returns: _str

the padded string

Example:

center("test",6)  :==" test "
center("test",6,"-") :=="-test-"
center("test",7,"-") :=="-test--"
center("test",3)  :=="tes"
center("test",2)  :=="es"

Category:

String Functions


center_line

_command void center_line()

Centers the current line in the middle of the active window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


center_region

void center_region(int start_line, int end_line)

Centers the current line in the middle of the active window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


center_within_margins

_command void center_within_margins()

Used in EMACS emulation. Centers the text on the current line within the margins.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


change_drive

_command typeless change_drive(_str drive_path='')

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.

Returns: typeless

Returns 0 if successful. Common error code is PATH_NOT_FOUND_RC.

Category:

File Functions


change_window

_command int change_window(typeless arg1="", typeless arg2="", typeless direction="")

Allows you to point with the cursor keys to the window you wish to change to.

Parameters:

direction - UP, DOWN, LEFT, or RIGHT

Returns: int

0 if successful. Otherwise 1 is returned indicating user cancelled or there is no window where the user pointed. On error, message is displayed.

Applies To:

Edit Window

Category:

Window Functions

See Also:

next_window, _prev_window, move_edge, window_left, window_right, window_above, window_below


chdir

int chdir(_str path, int changeDrive=0)

Changes to drive and directory specified. If changeDrive is non-zero the current working drive is changed to drive specified.

Returns: int

Returns 0 if successful. Common return code is PATH_NOT_FOUND_RC.

Category:

File Functions


check_and_load_mode_support

_str check_and_load_mode_support(_str mode_name)

If the language ID matches one of the builtin extensions supported by SlickEdit, this function will attempt to automaticaly load support for the language if it is not already loaded.

Parameters:

mode_name - Display name for language type

Returns: _str

The language ID for the language corresponding to 'mode_name'.

Category:

Miscellaneous Functions

See Also:

_Modename2LangId, _Filename2LangId, _Ext2LangId


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Check Box Properties

p_active_form
p_alignment
p_auto_select
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


check_links

_command void check_links(_str filename='')

Command used to look for unresolved links in a loaded Slick-C® module. Procedures that cannot be found are listed in the SlickEdit debug window.

Category:

Macro Programming Functions


checkin

_command int checkin(_str filename="")

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.

Returns: int

Returns 0 if successful.

Paraam:

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 .").

Example:

cmdline is a string in the format: [options] file1 file2 file3 ...

Category:

File Functions

See Also:

checkout


checkout

_command int checkout(_str filename="")

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.

Parameters:

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 .").

Returns: int

Returns 0 if successful.

Exmple:

cmdline is a string in the format: [options] file1 file2 file3 ...

Category:

File Functions

See Also:

checkin


chmod

_command typeless chmod(_str files='')

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

 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

Returns: typeless

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.

Category:

File Functions


chr

_command void chr(_str number='')

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.

Category:

Miscellaneous Functions


clear_bookmarks

_command typeless clear_bookmarks(_str quiet="")

Clears all the named bookmarks

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

toggle_bookmark, set_bookmark


clear_highlights

_command void clear_highlights()

Clear highlights created by find/replace with highlighting matches enabled.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

find, replace, gui_find, gui_replace


clear_hotspots

_command void clear_hotspots()

Clear all hotspot information.

Applies To:

Edit Window, Editor Control

Category:

Bookmark Functions

See Also:

expand_alias, add_hotspot, next_hotspot, prev_hotspot


clear_message

void clear_message()

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.

Category:

Miscellaneous Functions

See Also:

message, messageNwait, _message_box, popup_message, popup_imessage, sticky_message


clear_pbuffer

_command void clear_pbuffer()

Clears the contents of the build window (".process").

Category:

Miscellaneous Functions

See Also:

start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, next_error


Clipboard Functions

_clipboard_empty
_clipboard_format
_copy_color_coding_to_clipboard
_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_full_word
copy_selective_display
copy_subword
copy_to_clipboard
copy_ucn_as_unicode
copy_unicode_as_c
copy_unicode_as_java
copy_unicode_as_regex
copy_unicode_as_ucn
copy_unicode_as_xml
copy_unicode_as_xmldec
copy_word
cut
cut_end_line
cut_full_word
cut_line
cut_prev_word
cut_subword
cut_whole_word
cut_word
cut_word2
def_clipboards
delete_whole_word
goto_clipboard
old_list_clipboards
paste_next_clipboard
paste_prev_clipboard
paste_replace_word
push_clipboard_itype
reset_clipboards
write_clipboard


clipboard_iNoflines

int clipboard_iNoflines(int temp_view_id)

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.

Category:

Clipboard Functions


clipboard_itype

_str clipboard_itype(int temp_view_id)

Returns: _str

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.

Category:

Clipboard Functions


clipboards

_command void clipboards(_str maxClipboards='')

Sets the maximum number of clipboards saved. Clipboard text may be retrieved by the command paste (Ctrl+V) or list_clipboards (Ctrl+Shift+V).

Category:

Clipboard Functions


cload

_command _str cload(...)

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.

Returns: _str

Returns 0 if successful.

Category:

File Functions

See Also:

color_toggle, color_modified_toggle


close_all

_command int close_all()

Closes all MDI edit windows and buffers. You are prompted to save changes to modified files.

Returns: int

Returns 0 if successful. Otherwise, a non-zero number is returned.

Applies To:

Edit Window

Category:

Buffer Functions


close_all_and_edit

_command int close_all_and_edit(_str filenameArg='', typeless a2_flags='', _str auto_create_firstw_arg='')

Close all open files and edit the files given.

Returns: int

0 on success, <0 on error

Applies To:

Edit Window

Category:

Buffer Functions

See Also:

close_all, edit


close_buffer

_command int close_buffer(boolean saveBufferPos=true, boolean allowQuitIfHiddenWindowActive=false)

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.

Returns: int

Returns 0 if the buffer was deleted. Otherwise, a non-zero number is returned.

Applies To:

Edit Window

Category:

Buffer Functions


close_others

_command int close_others()

Closes all MDI edit windows and buffers except for the current one. You are prompted to save changes to modified files.

Returns: int

Returns 0 if successful. Otherwise, non-zero is returned.

Applies To:

Edit Window

Category:

Buffer Functions


close_window

_command int close_window(_str doDeleteBufferIf_1FPW='', boolean saveBufferPos=true, ...)

Closes the current window and optionally deletes the buffer. Prompts the user to save changes if the buffer is deleted.

Parameters:

doDeleteBufferIf_1FPW - Determines wheter buffer is deleted.
IF =='' AND one file per window, the buffer is deleted.
IF =='W' the buffer is deleted.
Otherwise the buffer is not deleted.

saveBufferPos - If true, the buffer position information is saved.

Returns: int

Returns 0 if successful.

Category:

Window Functions


cmdclear_message

_command void cmdclear_message()

Clears the message on the message line.

Category:

Miscellaneous Functions


cmdline_toggle

_command void cmdline_toggle()

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.

Applies To:

Edit Window, Command Line

Category:

Command Line Functions


codehelp_complete

_command void codehelp_complete()

Attempt to use Context Tagging® to complete the word under the cursor. If the word can not be completed, or tagging isn't supported, then try expanding aliases.

Category:

Tagging Functions

See Also:

expand_alias


collapse_to_definitions

_command typeless collapse_to_definitions()

Hides lines in the current buffer which are not part of a function definition heading. Also collapses comment blocks.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_col1, show_procs, show_all, _lineflags, selective_display, show_braces, show_indent, show_paragraphs, toggle_all_outlining


color

_command void color()

Displays the Color Settings dialog box ("Tools", "Options", "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 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.

Category:

Miscellaneous Functions


color_modified_toggle

_command typeless color_modified_toggle()

Toggles display of modified line coloring on/off.

Category:

Buffer Functions

See Also:

color_toggle, cload


color_toggle

_command typeless color_toggle()

Toggles coloring between current line, modified lines, and language specific. Only one coloring style is displayed at a time.

Category:

Buffer Functions

See Also:

color_modified_toggle, cload


column_math

_str column_math(_str default_operator)

Adds or multiplies the result of evaluating each sub line of a selected area of text.

Returns: _str

Returns 0 if successful. Otherwise 1 (syntax error) is returned.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


column_process_list

_str column_process_list(int first_col, int col_width, _str search_string, _str action_fun, _str search_opts='')

Generic column list processing function. 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.

Parameters:

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.

Returns: _str

Returns 0 if successful. Otherwise TOO_MANY_SELECTIONS_RC is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


Combo Box Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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_retrieve_list
_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
_rubout
_save_draw_setup
_set_sel
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
append_to_clipboard
ArgumentCompletionUpdateTextBox
autocomplete
AutoCompleteUpdateInfo
begin_line
begin_line_text_toggle
brief_delete
brief_end
brief_home
brief_paste
call_event
cap_selection
cap_word
cbacktab
command_state
copy_full_word
copy_subword
copy_to_clipboard
copy_word
ctab
cua_select
cursor_left
cursor_right
cut
cut_code_block
cut_end_line
cut_full_word
cut_line
cut_prev_word
cut_subword
cut_whole_word
cut_word
delete_code_block
delete_end_line
delete_full_word
delete_line
delete_prev_full_word
delete_prev_subword
delete_prev_word
delete_subword
delete_whole_word
delete_word
end_line
end_line_text_toggle
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
overlay_clipboard
paste
refresh
right
set_command
transpose_chars
transpose_lines
transpose_words


Combo Box Properties

p_active_form
p_after_pic_indent_x
p_backcolor
p_bbside
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_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_parent
p_Password
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


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
_dmmoreless
_draw_rect
_enabled
_font_flags2props
_font_props2flags
_get_window
_GetFontCharSet
_move_window
_restore_draw_setup
_save_draw_setup
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Command Button Properties

p_active_form
p_adefault
p_backcolor
p_bbside
p_cancel
p_caption
p_child
p_client_height
p_client_width
p_default
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


command_execute

void command_execute()

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.

Category:

Command Line Functions


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
nosplit_insert_line_above


command_put

void command_put(_str string)

Places string on the command line. Cursor is placed at end of string.

Category:

Command Line Functions


command_state

int command_state()

Returns: int

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('');
}

Applies To:

Text Box, Combo Box

Categories:

Combo Box Methods, Command Line Functions, Text Box Methods

See Also:

command_toggle, execute, set_command, get_command


command_toggle

void command_toggle()

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.

Applies To:

Edit Window, Command Line

Category:

Command Line Functions

See Also:

command_state, execute, set_command, get_command


comment

_command int comment()

Converts selected lines or block into line comments using the comment setup. If there is no active selection, it comments the current line.

Returns: int

int 0 on success, 1 on failure.

Applies To:

Edit Window, Editor Control

Category:

Edit Window Functions


comment_erase

_command int comment_erase()

Uncomments currently selected lines or block using the comment setup. If there is no active selection, it uncomments the current line.

Returns: int

int 0 on success, 1 on failure.

Applies To:

Edit Window, Editor Control

Category:

Edit Window Functions


comment_wrap

_command typeless comment_wrap(_str yesno="")

If yes, the editor attempts to automatically wrap block comments. To set the default comment wrap style for specific file extension, use the Extension Options dialog box (" Tools", " Configuration..", "File Extension Setup...", select the Comment Wrap tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

comment_wrap_toggle


comment_wrap_preserve_width

_command typeless comment_wrap_preserve_width(_str yesno="")

If yes, the editor uses the preserve width on existing comments option when performing comment wrapping. To set the comment wrap style for a specific file extension, use the Extension Options dialog box (" Tools", " Configuration..", "File Extension Setup...", select the Comment Wrap tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

comment_wrap_preserve_width_toggle


comment_wrap_preserve_width_toggle

_command void comment_wrap_preserve_width_toggle()

Toggles the comment wrap option to preserve width on existing comments on/off. See comment_wrap_preserve_width command for more information.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


comment_wrap_toggle

_command void comment_wrap_toggle()

Toggles comment wrap on/off. See comment wrap command for more information.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


compare

_command int compare()

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.

After a compare mismatch, you can use the resync command 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 command displays the Compare Options
dialog box to set various compare options.

In ISPF emulation, this command is not called when invoked from the command
line.  Instead ispf_compare is called.  At the moment, you can't
access the compare command when in ISPF emulation unless you bind
it to a key.

Applies To:

Edit Window

Categories:

Buffer Functions, File Functions

See Also:

compare_options, resync, ispf_compare, diff


compare_bottom

_command void compare_bottom()

Moves the cursor to bottom of buffer for both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_down

_command void compare_down()

Moves the cursor down in both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_left

_command void compare_left()

Moves the cursor left in both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_options

_command typeless compare_options(_str options='')

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.

Returns: typeless

Returns 0 if successful. Otherwise, COMMAND_CANCELLED_RC is returned.

Category:

Buffer Functions

See Also:

compare, resync


compare_page_down

_command void compare_page_down()

Moves the cursor to the next page of both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_page_up

_command void compare_page_up()

Moves the cursor to the previous page of both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_right

_command void compare_right()

Moves the cursor right in both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_top

_command void compare_top()

Moves the cursor to top of buffer for both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


compare_up

_command void compare_up()

Moves the cursor up in both buffers being compared. This command is typically used when comparing files with the compare command.

Applies To:

Edit Window

Category:

Buffer Functions


complete

void complete(...)

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".

Category:

Completion Functions


complete_list

_command typeless complete_list()

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_next, complete_next_match, complete_prev_match, complete_more


complete_more

_command typeless complete_more()

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_next, complete_list, complete_next_match, complete_prev_match, complete_prev


complete_next

_command void complete_next(_str exactMatch='')

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_list, complete_next_match, complete_prev_match, complete_more


complete_next_match

_command typeless complete_next_match()

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_list, complete_next, complete_prev_match, complete_more


complete_next_no_dup

_command typeless complete_next_no_dup()

Retrieves next word or variable which is a prefix match of the word at the cursor but skips duplicates - otherwise, this is the same as complete-next

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_next, complete_prev_no_dup, complete_list, complete_next_match, complete_prev_match, complete_more


complete_prev

_command void complete_prev(_str exactWord='')

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_next, complete_list, complete_next_match, complete_prev_match, complete_more


complete_prev_match

_command typeless complete_prev_match()

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.

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_list, complete_next, complete_next_match, complete_more


complete_prev_no_dup

_command typeless complete_prev_no_dup()

Retrieves previous word or variable which is a prefix match of the word at the cursor but skips duplicates- otherwise, this is the same as complete-prev

Categories:

Completion Functions, Edit Window Methods, Editor Control Methods

See Also:

complete_prev, complete_next, complete_next_no_dup, complete_list, complete_next_match, complete_prev_match, complete_more


Completion Functions

_dll_match
_GetSymbolColoringOptions
_lang_symbol_coloring_options
_menu_destroy
_menu_match
_object_match
_pic_match
_SetSymbolColoringOptions
alias_match
ArgumentCompletionUpdateTextBox
autocomplete
AutoCompleteGetMinimumLength
AutoCompleteGetOptions
AutoCompleteSetMinimumLength
AutoCompleteSetOptions
AutoCompleteUpdateInfo
b_match
c_match
complete
complete_list
complete_more
complete_next
complete_next_match
complete_next_no_dup
complete_prev
complete_prev_match
complete_prev_no_dup
dir_match
dirnew_match
dirnq_match
e_match
f_match
filenew_match
fnq_match
get_completion_info
hc_match
hNt_match
ht_match
k_match
last_macro
list_matches
m_match
maybe_complete
maybe_list_matches
mode_match
mt_match
pc_match
pcbt_match
project_file_match
semicolonfiles_match
v_match
w_match
wkspace_file_match


concur_command

_command typeless concur_command(_str command="", boolean leave_active=false, boolean quiet=false, boolean uniconize=true, boolean addErrorInfo=true)

Inserts command at end of ".process" buffer. If last line contains the read point, text after the read point is replaced with command. The build window is started if necessary.

Parameters:

command -

leave_active -

quiet -

uniconize -

addErrorInfo -

Returns: typeless

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 build window 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.

Category:

File Functions


concur_shell

int concur_shell(_str cmdline)

Creates a build window 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 SlickEdit can run one concurrent session.

Returns: int

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.

Category:

File Functions

See Also:

shell, xcom, dos


Configuration Functions

_DeleteExtension
_DeleteExtensionOptions
_DeleteLanguageOptions


Configuration Variables

def_actapp
def_adaptive_formatting_flags
def_adaptive_formatting_on
def_add_to_prj_dep_ext
def_add_to_project_save_as
def_advanced_select
def_alias_case
def_alt_menu
def_always_prompt_for_else_if
def_ansic_exts
def_ant_install_dir
def_antmake_display_imported_targets
def_antmake_filter_matches
def_antmake_identify
def_antmake_use_classpath
def_argument_completion_maximum
def_as_directory
def_as_flags
def_as_timer_amounts
def_auto_complete_block_comment
def_auto_complete_idle_time
def_auto_complete_max_symbols
def_auto_complete_max_words
def_auto_complete_minimum_length
def_auto_complete_options
def_auto_complete_timeout_time
def_auto_complete_update_idle_time
def_auto_doc_comment
def_auto_javadoc
def_auto_javadoc_comment
def_auto_linecomment
def_auto_reset
def_auto_restore
def_auto_string
def_auto_unsurround_block
def_auto_xmldoc_comment
def_autoclipboard
def_autoclose_flags
def_autotag_flags2
def_background_tagging_idle
def_background_tagging_threads
def_background_tagging_timeout
def_backupinfix
def_backuppostfix
def_backupprefix
def_batch_reload_files
def_bgtag_options
def_bm_max_id
def_bm_show_line
def_bm_show_picture
def_brief_paste_restore
def_brief_word
def_buffer_retag
def_buflist
def_build_errors_re
def_build_messages_limit
def_build_warnings_re
def_c_expand_include
def_c_replace_operators
def_cb_filter_by_types
def_cb_max_derived_class_depth
def_cb_max_references
def_cbrowser_flood_refresh
def_cbrowser_high_refresh
def_cbrowser_low_refresh
def_cc_print
def_cd
def_cde_workaround
def_cfgfiles
def_change_dir
def_class_flags
def_cleanup_pushed_bookmarks_on_quit
def_click_past_end
def_clipboard_formats
def_clipboards
def_clipboards_max_preview
def_close_build_window_on_exit
def_close_window_like_1fpw
def_cobol_copy_path
def_cobol_levels
def_code_block_view_delay
def_codehelp_idle
def_codehelp_key_idle
def_codehelp_max_comments
def_codehelp_max_params
def_color_print
def_color_scheme
def_color_scheme_version
def_compile_flags
def_complete_flags
def_complete_vars
def_context_toolbar_flags
def_copy_noselection
def_cpp_include_path_re
def_ctags_flags
def_cua_textbox
def_cursor_beginend_select
def_cursorwrap
def_cvs_flags
def_cvs_global_options
def_cvs_info
def_cvs_shell_options
def_cw_analyze_lines_max
def_CW_DoubleEnterEndsLineComments
def_CW_EnterEndsLineComments
def_cw_line_comment_min
def_CW_use_width_for_box
def_debug_auto_lines
def_debug_exe_extensions
def_debug_logging
def_debug_max_update_time
def_debug_message_duration
def_debug_min_update_time
def_debug_number_formats
def_debug_options
def_debug_timeout
def_debug_timer_delay
def_debug_vsdebugio_port
def_debug_watchpoint_type
def_delay_filelist
def_deltasave_flags
def_deltasave_versions
def_deselect_copy
def_deselect_copyto
def_deselect_paste
def_diff_edit_options
def_diff_options
def_disable_cpp_refactoring
def_disable_postbuild_error_markers
def_disable_replace_tooltip
def_do_block_mode_backspace
def_do_block_mode_del_key
def_do_block_mode_delete
def_do_block_mode_key
def_dock_channel_delay
def_dock_channel_options
def_dragdrop
def_eclipse_switchbuf
def_embedded_color_scheme
def_emulate_leading_tabs
def_emulation_was_selected
def_encoding
def_end_line_stop_at_vertical_line
def_enter_indent
def_err
def_error_info_commands_re
def_exit_file_list
def_exit_flags
def_exit_on_autosave
def_exit_process
def_expand_brace_syntax
def_expansion_overrides_locals
def_ext
def_extend_linecomment
def_fast_auto_readonly
def_fast_open
def_file_tabs_abbreviates_files
def_file_tabs_uses_pictures
def_file_types
def_filelist_show_dotfiles
def_filetouch_checking
def_find_close_on_default
def_find_file_attr_flags
def_find_hide_tabs
def_find_high_added_bookmarks
def_find_init_defaults
def_find_symbol_flags
def_find_tag_flags
def_focus_select
def_format_columns_flags
def_fortran_free_form_indent
def_forwardback_enabled
def_forwardback_max
def_from_cursor
def_fullscreen_maximize_mdi
def_fullscreen_show_mdimenu
def_gdb_proxy_port
def_gdb_use_proxy
def_gui
def_hack_tabs
def_hanging_statements_after_col
def_help_flags
def_hex_display_xlat2
def_hidetoolbars
def_highlight_matching_parens
def_highlight_paren_under_cursor
def_highlight_symbols_timeout_time
def_hotspot_navigation
def_import_file_types
def_indent_member_access_specifier
def_init_delay
def_initial_scope
def_ispf_autosave
def_ispf_flags
def_ispf_xedit
def_j2me_phone_types
def_java_live_errors_deprecation_warning
def_java_live_errors_enabled
def_java_live_errors_errored
def_java_live_errors_first
def_java_live_errors_incremental_compile
def_java_live_errors_init_heap_size
def_java_live_errors_jdk_6_dir
def_java_live_errors_jvm_lib
def_java_live_errors_max_heap_size
def_java_live_errors_no_asserts
def_java_live_errors_no_warnings
def_java_live_errors_other_options
def_java_live_errors_pedantic
def_java_live_errors_sleep_interval
def_java_live_errors_stack_size
def_javadoc_exceptionmax
def_javadoc_exceptionmin
def_javadoc_filter_flags
def_javadoc_format_flags
def_javadoc_keep_obsolete
def_javadoc_parammax
def_javadoc_parammin
def_jmp_on_tab
def_join_comments
def_jrefactor_add_blank_lines
def_jrefactor_auto_import
def_jrefactor_auto_import_jsp
def_jrefactor_auto_import_lowcase_identifiers
def_jrefactor_imports_per_package
def_jrefactor_prefix_list
def_jsellist_font
def_keydisp
def_keys
def_keys_version
def_leading_codes
def_leave_selected
def_line_insert
def_linewrap
def_load_options
def_localsta
def_long_month_names
def_long_weekday_names
def_macfiles
def_match_paren_idle
def_max_ant_file_size
def_max_bm_tags
def_max_bookmark_relocate_time
def_max_breakpoint_relocate_time
def_max_completion_items
def_max_doc_mode_mru
def_max_error_markers
def_max_filehist
def_max_loadall
def_max_mffind_output
def_max_proj_type_mru
def_max_RELOC_MARKER_time
def_max_windowhist
def_memberhelp_idle
def_mouse_create_window_modename
def_nant_install_dir
def_no_error_info_commands
def_no_error_info_commands2
def_one_file
def_perl_exe_path
def_php_exe_path
def_plusminus_blocks
def_pmatch_chars
def_postscript_print
def_print_device
def_proctree_flags
def_prompt_for_delete_code_block
def_prompt_for_unsurround_block
def_python_exe_path
def_qmark_complete
def_references_flags
def_restore_flags
def_scroll_speeds
def_search_incremental_highlight
def_search_result_push_bookmark
def_select_proc_flags
def_select_type_block
def_sellist_font
def_short_month_mames
def_short_weekday_names
def_show_all_proj_with_file
def_show_bm_tags
def_stop_process_noselection
def_style3_indent_all_braces
def_surround_mode_options
def_svn_global_options
def_switchbuf_cd
def_symbol_color_chunk_size
def_symbol_color_delay
def_symbol_color_off_page_lines
def_symbol_color_scheme
def_symbol_color_timeout
def_tagging_cache_max
def_tagging_cache_size
def_tagselect_flags
def_tagwin_flags
def_tbc_expand_all
def_tbc_expand_structs
def_tbc_filter_outside_wspace
def_tbc_organize_by_source
def_tbc_sort_by_name
def_tbc_sort_class_by_hierarchy
def_top_bottom_push_bookmark
def_top_bottom_style
def_tprint_device
def_trailing_codes
def_twoup_print
def_update_tagging_extra_idle
def_update_tagging_idle
def_uri_scheme_list
def_use_390_display_translations
def_use_old_goto_definition_dialog
def_use_timers
def_use_workspace_bm
def_use_xp_opendialog
def_vim_change_cursor
def_vim_esc_codehelp
def_warn_about_vslickconfig
def_warn_adaptive_formatting
def_xml_max_smart_editing
def_xml_messages_limit
def_xml_no_schema_list
def_xmldoc_filter_flags
def_xw_pre_tag_search_depth
VSArgumentCompletionFlags


convert_spaces2tabs

_command void convert_spaces2tabs()

Convert from spaces to tabs.

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, Selection Functions


convert_tabs2spaces

_command void convert_tabs2spaces()

Convert all tabs to spaces.

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, Selection Functions


copy_file

int copy_file(_str source_filename, _str dest_filename)

Copies the file source_name to dest_name.

Returns: int

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.

Category:

File Functions


copy_full_word

_command typeless copy_full_word()

Same as copy_word, except copies full word at cursor to the clipboard, ignoring def_subword_nav setting.

Returns: typeless

Returns 0 if word exists at cursor.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

copy_word, copy_subword


copy_lines_down

_command void copy_lines_down(boolean do_smart_paste=true)

Copies current line or current selection down line. If no selection is active, a LINE selection is created for the current line. If a selection is active, it is changed to LINE selection and locked.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


copy_lines_up

_command void copy_lines_up()

Copies current line or current selection up one line. If no selection is active, a LINE selection is created for the current line. If a selection is active, it is changed to LINE selection and locked.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


copy_region

_command typeless copy_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

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_selective_display

_command void copy_selective_display()

Copies currently visible lines only. Does not copy content of lines that are currently hidden by selective display.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Selective Display


copy_subword

_command typeless copy_subword()

Same as copy_word, except copies subword at cursor to the clipboard, ignoring def_subword_nav setting.

Returns: typeless

Returns 0 if word exists at cursor.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

copy_word, copy_full_word


copy_to_clipboard

_command int copy_to_clipboard(_str name='')

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.

NOTE: If there is no selection, the current line is copied.

NOTE: If the copy is done using Ctrl+C, the current window is the Build window, and there is no selection, then execute stop-build. This can be disabled by setting the configuration variable def_stop_process_noselection to false.

Returns: int

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut, list_clipboards, paste


copy_to_cursor

_command int copy_to_cursor(...)

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", "Options", "More Options...", "Line Insert Style"). By default line marks are inserted after the current line. Resulting selection is always on destination text.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC and SOURCE_DEST_CONFLICT_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


copy_to_file

_command typeless copy_to_file(_str line="")

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.

Returns: typeless

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.

Applies To:

Edit Window

Categories:

Editor Control Methods, File Functions

See Also:

save_as, save, name, gui_copy_to_file


copy_ucn_as_unicode

_command void copy_ucn_as_unicode(boolean doCopy=false)

Copies the selected text which contains various UCN forms (\uHHHH, \xHHHH) as Unicode text.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_c

_command void copy_unicode_as_c()

Copies the selected Unicode text as C++ UTF-16 \xHHHH notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_java

_command void copy_unicode_as_java()

Copies the selected Unicode text as Java/C# UTF-16 \uHHHH notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_regex

_command void copy_unicode_as_regex()

Copies the selected Unicode text as Regex UTF-32 \x{HHHH} notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_ucn

_command void copy_unicode_as_ucn()

Copies the selected Unicode text as UCN \uHHHH and \UHHHHHHHH UTF-32 notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_xml

_command void copy_unicode_as_xml()

Copies the selected Unicode text as SGML/XML hexadecimal UTF-32 &#xHHHH; notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_unicode_as_xmldec

_command void copy_unicode_as_xmldec()

Copies the selected Unicode text as SGML/XML decimal UTF-32 &#DDDD; notation.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


copy_word

_command typeless copy_word()

Ctrl+K or "Edit", "Copy Word"

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", "Options", "File Extension Setup...", select the Advanced tab).

Returns: typeless

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


count_lines

_command void count_lines()

Updates the Line status indicator and displays the number of lines in the current buffer on the message line.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


count_lines_in_selection

int count_lines_in_selection(_str markid='', boolean count_nosave_lines=false)

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.

Returns: int

If successful, returns number of lines or sub-lines within the selection. Otherwise, 0 is returned.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


C API Functions By Category

See Also Macro Functions by Category

We use the term method to indicate a function which takes a 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 Buffer Functions
C Check Box Methods
C Clipboard Functions
C Combo Box Methods
C Command Button Methods
C Configuration Functions
C CursorMovement Functions
C Debugger Functions
C Deprecated Breakpoint Functions
C Directory List Box Methods
C Drive List Methods
C Editor Control Functions
C Editor Control Callback Functions
C Editor Control Methods
C Edit Window Functions, Methods
C File Functions
C File List Box Methods
C Font Functions
C Form Functions, Methods
C Frame Methods
C Gauge Methods
C Marker Functions
C Hscroll Bar Methods
C Image Methods
C Keyboard Functions
C Label Methods
C List Box Methods
C Macro Programming Functions
C MDI Window Methods
C Menu Functions
C Miscellaneous Functions
C Miscellaneous Defines
C Mouse Functions
C Names Table Functions
C Picture Box Methods
C Project Functions
C Radio Button Methods
C Refactoring Functions
C Search Functions
C Selection Functions
C Selective Display Functions
C Spin Methods
C String Functions
C Tagging Functions
C Text Box Methods
C Tree View Methods
C Unicode Functions
C Version Control Functions
C Vscroll Bar Methods
C Window Functions
C XMLCFG Functions


C Bookmark Functions

vsBookmarkAdd
vsBookmarkFind
vsBookmarkGetInfo
vsBookmarkQCount
vsBookmarkRemove
vsBookmarkRestore


C Buffer Functions

quit
switch_buffer
vsBufCreate
vsBufCreateTempView
vsBufDeleteTempView
vsBufEdit
vsBufGetDocumentName
vsBufGetLineNumFromOffset
vsBufGetName
vsBufGetNofLines
vsBufGetNofNoSaveLines
vsBufName2Caption
vsBufQData
vsBufRefresh
vsBufSetData
vsCallbackAdd
vsCallbackRemove
vsCallbackSet
vsCommandName
vsCommandReplaceQNofChanges
vsCommandSave
vsCreateTempView
vsDeleteBuffer
vsDeleteTempView
vsLoadFiles
vsNextBuffer
vsOpenTempView
vsPrevBuffer


C Check Box Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Clipboard Functions

vsClipboardQNofInternal
vsHaveClipboard


C Combo Box Methods

vsBeginLine
vsDeleteChar
vsEndLine
vsKeyin
vsMoveWindow
vsQInsertState
vsQTextWidth
vsRefresh
vsRubout
vsSetFocus
vsSetFocus2
vsSetInsertState


C Command Button Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Configuration Functions

vsDeleteExtensionOptions
vsDeleteLanguageOptions


C CursorMovement Functions

vsBeginLine
vsBottom
vsDown
vsEndLine
vsGoToPoint
vsGoToROffset
vsRestorePos
vsRestorePos2
vsSavePos
vsSavePos2
vsTop
vsUp


C Debugger Functions

vsDebugFinalize
vsDebugInitialize


C Deprecated Breakpoint Functions

vsBPMAdd
vsBPMAddB
vsBPMClearAll
vsBPMClearAllBreakPoints
vsBPMGet
vsBPMNext
vsBPMQDefaultPicture
vsBPMQPicture
vsBPMQShowBreakPointsFor
vsBPMRemove
vsBPMSetAll
vsBPMSetPicture
vsBPMShowBreakPoints
vsBPMShowBreakPointsFor


C Directory List Box Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Drive List Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Edit Window Functions

vsBufCreate
vsBufEdit
vsGetDefaultColor
vsGetDefaultExtensionOptions
vsGetDefaultExtensionReferTo
vsGetDefaultFont
vsGetDefaultLanguageOptions
vsGetDefaultOptionZ
vsGetFontFlag
vsPrintGetConfig
vsPrintSetConfig
vsRestoreSearch
vsSaveSearch
vsSetDefaultColor
vsSetDefaultExtensionOptions
vsSetDefaultExtensionReferTo
vsSetDefaultFont
vsSetDefaultLanguageOptions
vsSetDefaultOption
vsSetDefaultOptionZ
vsUpdateExistingBufferExtensionOptions
vsUpdateExistingBufferLanguageOptions


C Edit Window Methods

vsAllocColor
vsBeginLine
vsBeginSelect
vsBeginSelectCompare
vsBottom
vsBufGetLineNumFromOffset
vsBufGetNofLines
vsBufGetNofNoSaveLines
vsBufName2Caption
vsCallbackActivate
vsCallbackAdd
vsCallbackRemove
vsCallbackSet
vsCallKey
vsCheckLineLengths
vsClexFind
vsClexSkipBlanks
vsCommandFind
vsCommandName
vsCommandReplace
vsCommandReplaceQNofChanges
vsCommandSave
vsCopyToCursor
vsCurWord
vsDeleteAll
vsDeleteBuffer
vsDeleteChar
vsDeleteLine
vsDeleteText
vsDeselect
vsDestroyEditorCtl
vsDown
vsDuplicateSelection
vsEndLine
vsEndSelect
vsEndSelectCompare
vsExpandTabs
vsExpandTabsC
vsFillSelection
vsFreeColor
vsGetLine
vsGetLineRaw
vsGetRText
vsGetSelectedText
vsGetSelInfo
vsGetSelLines
vsGetText
vsGoToLine
vsGoToOldLineNumber
vsGoToPoint
vsGoToROffset
vsHaveSelection
vsInsertLine
vsInsertLineRaw
vsInsertText
vsInsertTextRaw
vsInvalidateWindow
vsJoinLine
vsJoinLineToCursor
vsKeyin
vsLoadFiles
vsMoveWindow
vsNextBuffer
vsPrevBuffer
vsPropGetB
vsQInsertState
vsQLineFlags
vsQLineLength
vsQLineNumberFromOld
vsQLineNumberFromReal
vsQMaxTabCol
vsQOffset
vsQOldLineNumberFromLine
vsQPoint
vsQReadOnly
vsQRealLineNumberFromLine
vsQSelectedTextLength
vsQSelectType
vsQTextWidth
vsQUndoStatus
vsRedrawFrame
vsRefresh
vsRepeatSearch
vsReplaceLine
vsReplaceLineRaw
vsResetModifiedLineFlags
vsRubout
vsSaveFile
vsSavePos
vsSavePos2
vsSearch
vsSearchPromptReplace
vsSearchReplace
vsSelectBlock
vsSelectChar
vsSelectEditMode
vsSelectLine
vsSelectMatch
vsSetAllOldLineNumbers
vsSetEditorLanguage
vsSetFocus
vsSetFocus2
vsSetInsertState
vsSetLineFlags
vsSetSelectType
vsSetTextColor
vsShiftSelectionLeft
vsShiftSelectionRight
vsShowSelection
vsSortSelection
vsSplitLine
vsTestEvent
vsTextColC
vsTop
vsTruncQLineLength
vsUp
vsWinQData
vsWinSetData


C Editor Control Callback Functions

VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP
VSCALLBACK_APP_BREAKPOINT_LINE_DELETED
VSCALLBACK_APP_DELETE_WINDOW
VSCALLBACK_APP_DISPATCH_MESSAGE
VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ
VSCALLBACK_APP_MENU_ADD_FILE_HISTORY
VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY
VSCALLBACK_APP_MESSAGEBOX
VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB
VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE
VSCALLBACK_APP_MFFIND_QEDITOR_CTL_WID
VSCALLBACK_APP_MODAL_WAIT
VSCALLBACK_APP_POPUP_MENU
VSCALLBACK_APP_POPUP_MENU2
VSCALLBACK_APP_QUERY_END_SESSION
VSCALLBACK_APP_READ_ONLY_ERROR
VSCALLBACK_APP_REFRESH_BREAKPOINTS
VSCALLBACK_APP_TAG_FILE_ADD_REMOVE
VSCALLBACK_APP_TAG_FILE_MODIFIED
VSCALLBACK_APP_TAG_FILE_REFRESH
VSCALLBACK_AR_APP_ADD_BUFFER
VSCALLBACK_AR_APP_DELETE_BUFFER
VSCALLBACK_AR_APP_RENAME_BUFFER
VSCALLBACK_AR_APP_RENAME_DOCUMENT
VSCALLBACK_AR_APP_SELECT_MODE
VSCALLBACK_AR_BUF_DRAW_LINE
VSCALLBACK_AR_BUF_DRAW_LINE_START_FINISH
VSCALLBACK_AR_BUF_LINES_DELETED
VSCALLBACK_AR_BUF_LINES_DELETED2
VSCALLBACK_AR_BUF_LINES_INSERTED
VSCALLBACK_AR_BUF_LINES_INSERTED2
VSCALLBACK_AR_BUF_REPLACE_TEXT
VSCALLBACK_AR_BUF_TEXT_CHANGE
VSCALLBACK_BUF_QDEBUGBITMAP
VSCALLBACK_BUF_SET_LINE_COLOR
VSCALLBACK_WIN_CMDLINE_FUNCTIONS
VSCALLBACK_WIN_FONT_CHANGE
VSCALLBACK_WIN_GOTFOCUS
VSCALLBACK_WIN_LOSTFOCUS
VSCALLBACK_WIN_MESSAGE
VSCALLBACK_WIN_UPDATE_EDITOR_STATUS


C Editor Control Functions

vsBufCreate
vsBufEdit
vsCreateEditorCtl
vsGetDefaultColor
vsGetDefaultExtensionOptions
vsGetDefaultExtensionReferTo
vsGetDefaultFont
vsGetDefaultLanguageOptions
vsGetDefaultOptionZ
vsGetFontFlag
vsIsEditorCtl
vsPrintGetConfig
vsPrintSetConfig
vsRestoreSearch
vsSaveSearch
vsSetDefaultColor
vsSetDefaultExtensionOptions
vsSetDefaultExtensionReferTo
vsSetDefaultFont
vsSetDefaultLanguageOptions
vsSetDefaultOption
vsSetDefaultOptionZ
vsSetFocusToModalDialog
vsUpdateExistingBufferExtensionOptions
vsUpdateExistingBufferLanguageOptions


C Editor Control Methods

vsAllocColor
vsBeginLine
vsBeginSelect
vsBeginSelectCompare
vsBottom
vsBufGetLineNumFromOffset
vsBufGetNofLines
vsBufGetNofNoSaveLines
vsBufName2Caption
vsCallbackActivate
vsCallbackAdd
vsCallbackRemove
vsCallbackSet
vsCallKey
vsCheckLineLengths
vsClexFind
vsClexSkipBlanks
vsCommandFind
vsCommandName
vsCommandReplace
vsCommandReplaceQNofChanges
vsCommandSave
vsCopyToCursor
vsCurWord
vsDeleteAll
vsDeleteBuffer
vsDeleteChar
vsDeleteLine
vsDeleteText
vsDeselect
vsDestroyEditorCtl
vsDown
vsDuplicateSelection
vsEndLine
vsEndSelect
vsEndSelectCompare
vsExpandTabs
vsExpandTabsC
vsFillSelection
vsFreeColor
vsGetLine
vsGetLineRaw
vsGetRText
vsGetSelectedText
vsGetSelInfo
vsGetSelLines
vsGetText
vsGoToLine
vsGoToOldLineNumber
vsGoToPoint
vsGoToROffset
vsHaveSelection
vsInsertLine
vsInsertLineRaw
vsInsertText
vsInsertTextRaw
vsInvalidateWindow
vsJoinLine
vsJoinLineToCursor
vsKeyin
vsLoadFiles
vsMoveWindow
vsNextBuffer
vsPrevBuffer
vsPropGetB
vsQInsertState
vsQLineFlags
vsQLineLength
vsQLineNumberFromOld
vsQLineNumberFromReal
vsQMaxTabCol
vsQOffset
vsQOldLineNumberFromLine
vsQPoint
vsQReadOnly
vsQRealLineNumberFromLine
vsQROffset
vsQSelectedTextLength
vsQSelectType
vsQTextWidth
vsQUndoStatus
vsRedrawFrame
vsRefresh
vsRepeatSearch
vsReplaceLine
vsReplaceLineRaw
vsResetModifiedLineFlags
vsRubout
vsSaveFile
vsSavePos
vsSavePos2
vsSearch
vsSearchPromptReplace
vsSearchReplace
vsSelectBlock
vsSelectChar
vsSelectLine
vsSelectMatch
vsSetAllOldLineNumbers
vsSetFocus
vsSetFocus2
vsSetInsertState
vsSetLineFlags
vsSetSelectType
vsSetTextColor
vsShiftSelectionLeft
vsShiftSelectionRight
vsShowSelection
vsSortSelection
vsSplitLine
vsTestEvent
vsTextColC
vsTop
vsTruncQLineLength
vsUp
vsWinQData
vsWinSetData


C File Functions

save_file
vsBufCreate
vsBufEdit
vsCommandName
vsCommandReplaceQNofChanges
vsCommandSave
vsConfigPath
vsCreateTempView
vsCreateViewFromBuffer
vsDeleteTempView
vsDiffFiles
vsDiffLastFilesMatched
vsDiffSetCompareOptions
vsDropFiles
vsFileAbsolute
vsFileAbsoluteTo
vsFileClose
vsFileFlush
vsFileMove
vsFileOpen
vsFileQType
vsFileRead
vsFileReadLink
vsFileRelative
vsFileSeek
vsFileWrite
vsGetBufferFromView
vsLoadFiles
vsMergeFiles
vsOpenTempView
vsUpdatePicture


C File List Box Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Font Functions

vsFontIsScalable
vsFontList
vsFontQDefaultCharSet
vsFontQType


C Form Functions

vsCreateSWTForm
vsDestroySWTForm


C Form Methods

vsFindControl
vsFindFormObject
vsMenuSet
vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Frame Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Gauge Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Hscroll Bar Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Image Methods

vsMoveWindow
vsQTextWidth
vsRefresh


C Keyboard Functions

vsCallKey
vsEvalExp
vsEvent2Index
vsEvent2Name
vsEventTabIndex
vsGetEmulation
vsIndex2Event
vsIsEventPending
vsMaybeExecuteKey
vsProcessEvents
vsQDefaultEventTab
vsQIdle
vsQLastEvent
vsQLastIndex
vsQPrevIndex
vsResetIdle
vsSetEventTabIndex
vsSetEventTabRangeIndex
vsSetLastIndex
vsSetPrevIndex
vsTestEvent


C Label Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C List Box Methods

vsColWidthClear
vsColWidthGet
vsColWidthSet
vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Macro Programming Functions

vsDllExport
vsHvarFormat
vsLibExport
vsMacroEndRecording
vsMacroGetFilename
vsMacroQDefined
vsMacroQDefining
vsMacroQRecording
vsMacroQRecordSource
vsMacroQRunning
vsMacroSetRecordSource
vsMacroSetRunning
vsMacroStartRecording


C Marker Functions

vsLineMarkerAdd
vsLineMarkerAddB
vsLineMarkerAddMarkId
vsLineMarkerAddMarkIdB
vsLineMarkerAllocFindList
vsLineMarkerGet
vsLineMarkerNext
vsLineMarkerRemove
vsLineMarkerRemoveAllBMIndex
vsLineMarkerRemoveAllType
vsLineMarkerRemoveBMIndex
vsLineMarkerRemoveNonPushedType
vsLineMarkerRemoveType
vsLineMarkerSetBMIndex
vsLineMarkerSetMousePointer
vsLineMarkerSetStyleColor
vsLineMarkerSetUserData
vsMarkerTypeAlloc
vsMarkerTypeFree
vsMarkerTypeQFlags
vsMarkerTypeQPriority
vsMarkerTypeSetCallbackCopyUserData
vsMarkerTypeSetCallbackFreeUserData
vsMarkerTypeSetCallbackKeepEmptyMarker
vsMarkerTypeSetCallbackMouseEvent
vsMarkerTypeSetCallbackPasteIntoLine
vsMarkerTypeSetCallbackPasteUserData
vsMarkerTypeSetCallbackRefresh
vsMarkerTypeSetFlags
vsMarkerTypeSetPriority
vsPicGet
vsPicGetOrder
vsPicSetOrder
vsStreamMarkerAdd
vsStreamMarkerAddB
vsStreamMarkerAllocFindList
vsStreamMarkerRemove
vsStreamMarkerRemoveAllBMIndex
vsStreamMarkerRemoveAllType
vsStreamMarkerRemoveType
vsStreamMarkerSetLength
vsStreamMarkerSetMessage
vsStreamMarkerSetMousePointer
vsStreamMarkerSetStartOffset
vsStreamMarkerSetStyleColor
vsStreamMarkerSetTextColor
vsStreamMarkerSetType
vsStreamMarkerSetUserData


C MDI Window Methods

vsMenuSet
vsMoveWindow
vsQButtonBar
vsQDockChannel
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Menu Functions

vsMenuDelete
vsMenuDestroy
vsMenuFind
vsMenuGetState
vsMenuInsert
vsMenuLoad
vsMenuQInfo
vsMenuSet
vsMenuSetState
vsMenuShow


C Miscellaneous Defines

VSCALLBACK_WIN_GET_MESSAGE


C Miscellaneous Functions

dfprintf
GetVCPPBinPath
mprintf
vsAlloc
vsArg
vsCallbackActivate
vsCallbackAdd
vsCallbackRemove
vsCallbackSet
vsCallIndex
vsCheckTimeout
vsConcurProcessInputDirect
vsConcurProcessIsThisBuffer
vsConcurProcessQCol
vsConcurProcessQExited
vsConcurProcessQReadExited
vsConcurProcessQReadRunning
vsConcurProcessQRunning
vsExecute
vsExit
vsFree
vsGetDefaultFont
vsGetEditorName
vsGetEnv
vsGetMessage
vsGetMessageLine
vsGetServerName
vsGetTimeString
vsGetVar
vsHvarAlloc
vsHvarArrayDeleteEl
vsHvarArrayEl
vsHvarArrayInsertEl
vsHvarArrayLength
vsHvarCallMethod
vsHvarCallMethodByName
vsHvarClassFieldIndex
vsHvarClassFieldName
vsHvarClassFindMethod
vsHvarClassNumFields
vsHvarClassParent
vsHvarCopy
vsHvarFieldIndex
vsHvarFieldName
vsHvarFindInterfaceMethod
vsHvarFindMethod
vsHvarFree
vsHvarGetField
vsHvarGetFieldByName
vsHvarGetHRef
vsHvarGetI
vsHvarGetLstr
vsHvarGetWID
vsHvarGetZ
vsHvarHashtabDeleteEl
vsHvarHashtabEl
vsHvarHashtabInsertEl
vsHvarIndexIn
vsHvarInstanceOf
vsHvarIsEmpty
vsHvarMakeEmpty
vsHvarNextEl
vsHvarNumFields
vsHvarParent
vsHvarSetB
vsHvarSetField
vsHvarSetFieldByName
vsHvarSetI
vsHvarSetPointer
vsHvarSetWID
vsHvarSetZ
vsHvarTypename
vsInit
vsMDICreate
vsMDIRegisterStatusWindow
vsMDISetActiveChild
vsMessage
vsMessageBox
vsPrepareForTerminate
vsprint
vsprintln
vsPropGetHvar
vsPropGetI
vsPropGetL
vsPropGetZ
vsPropSetB
vsPropSetHvar
vsPropSetI
vsPropSetL
vsPropSetZ
vsPropTest
vsQDefaultOption
vsQhide_all_comments_enabled
vsQmflast_enabled
vsRealloc
vsSetEnv
vsSetHelpFilename
vsSetTimeout
vsStickyMessage
vsTerminate
vsZLstrcpy
xprintf


C Mouse Functions

vsLineMarkerSetMousePointer
vsMouCurWord
vsMouQLastInRect
vsMouQLastX
vsMouQLastY
vsStreamMarkerSetMousePointer


C Names Table Functions

vsCommandIndexForKey
vsFindIndex
vsNameCallable
vsNameDelete
vsNameDllAddr
vsNameInfo
vsNameInfoArg2
vsNameInsert
vsNameMatch
vsNameName
vsNameReplace
vsNameType
vsQIntVar


C Picture Box Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Project Functions

vsGetProjectName
vsProjectListConfigs
vsProjectQName
vsWorkspaceListProjects
vsWorkspaceQName


C Radio Button Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Refactoring Functions

refactor_c_add_class_info
refactor_c_get_super_classes
refactor_c_modify_params
refactor_c_modify_params_get_info
refactor_c_pull_up
refactor_c_pull_up_find_members
refactor_c_push_down
refactor_c_push_down_find_class_in_file
refactor_c_push_down_find_members
vsCRefactorCExtractMethodFinish
vsrefactor_copyright
vsrefactor_finalize
vsrefactor_initialize
vsrefactor_version
vsRefactorAddFile
vsRefactorBeginTransaction
vsRefactorCAddClassInfo
vsRefactorCancelTransaction
vsRefactorCEncapsulate
vsRefactorCExtractMethod
vsRefactorCGetSuperClasses
vsRefactorCGlobalToField
vsRefactorCLocalToField
vsRefactorCModifyParams
vsRefactorCModifyParamsGetInfo
vsRefactorCMoveField
vsRefactorCMoveMethod
vsRefactorCommitTransaction
vsRefactorConfigAdd
vsRefactorConfigAddInclude
vsRefactorConfigAddJAR
vsRefactorConfigClose
vsRefactorConfigCount
vsRefactorConfigCountIncludes
vsRefactorConfigCountJARs
vsRefactorConfigDelete
vsRefactorConfigDeleteAll
vsRefactorConfigDeleteAllJARs
vsRefactorConfigDeleteAllType
vsRefactorConfigDeleteInclude
vsRefactorConfigDeleteJAR
vsRefactorConfigGetHeader
vsRefactorConfigGetInclude
vsRefactorConfigGetJAR
vsRefactorConfigGetName
vsRefactorConfigGetType
vsRefactorConfigIsOpen
vsRefactorConfigJavaAdd
vsRefactorConfigOpen
vsRefactorConfigSave
vsRefactorConfigSetHeader
vsRefactorConfigSetName
vsRefactorCountErrorFiles
vsRefactorCountErrors
vsRefactorCountModifiedFiles
vsRefactorCParse
vsRefactorCPreprocess
vsRefactorCPullUp
vsRefactorCPullUpFindMembers
vsRefactorCPushDown
vsRefactorCPushDownFindClassInFile
vsRefactorCPushDownFindMembers
vsRefactorCRename
vsRefactorCReplaceLiteral
vsRefactorCStandardMethods
vsRefactorCStandardMethodsFinish
vsRefactorFinalize
vsRefactorGetError
vsRefactorGetErrorFileName
vsRefactorGetModifiedFileContents
vsRefactorGetModifiedFileName
vsRefactorGetRText
vsRefactorInitialize
vsRefactorInsertText
vsRefactorMessage
vsRefactorProgress
vsRefactorRemoveFile
vsRefactorSetModifiedFileContents


C Search Functions

resume
vsClexFind
vsClexSkipBlanks
vsCommandFind
vsCommandReplace
vsGoToROffset
vsMatchCursorLength
vsMatchLength
vsMatchStart
vsPosGetLinePointers
vsPosGetPointers
vsPosInit
vsPosIsEOL
vsPosIsEOR
vsPosNextBOL
vsPosQCol
vsPosRelPGoTo
vsPosRestore
vsPosSave
vsPosSetCurLine
vsPosSetPointer
vsQRefNextOccurrenceEnabled
vsQROffset
vsRepeatSearch
vsRestoreSearch
vsSaveSearch
vsSearchInitSkipped
vsSearchPromptReplace
vsSearchQNofSkipped
vsSearchQSkipped
vsSearchReplace
vsSelectMatch


C Selection Functions

vsAllocSelection
vsBeginSelect
vsBeginSelectCompare
vsCopyToCursor
vsDeleteSelection
vsDeselect
vsDuplicateSelection
vsEndSelect
vsEndSelectCompare
vsFillSelection
vsFreeSelection
vsGetSelInfo
vsGetSelLines
vsHaveSelection
vsQSelectedTextLength
vsQSelectType
vsSelectBlock
vsSelectChar
vsSelectLine
vsSetSelectType
vsShiftSelectionLeft
vsShiftSelectionRight
vsShowSelection
vsSortSelection


C Selective Display Functions

vsQhide_code_block_enabled


C Spin Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C String Functions

vsExpandTabs
vsExpandTabsC
vsLowcase
vsStrLastPos
vsStrPos
vsStrPosGetFlags
vsStrPosMatchLength
vsStrPosMatchStart
vsStrRev
vsStrTranslate
vsTextColC
vsTogglecase
vsUpcase


C Tagging Functions

SETagInsertInDatabase
SETagInsertOccurrence
SETagOccurrencesEnd
SETagOccurrencesStart
SETagSetClassParents
SETagSetFileDate
tag_check_cached_context
tag_check_cached_locals
tag_insert_context
tag_tree_insert_tag_outline
VS_REF_LATEST_VERSION
VS_TAG_LATEST_VERSION
VS_TAGSEPARATOR_file
vsFindLanguageCallbackIndex
vsLanguageInheritsFrom
vsQBinaryLoadTagsSupported
vsQTaggingSupported
vsRefactorConfigDeleteAllIncludes
vsSetDefaultExtensionInheritsFrom
vsSetLanguageInheritsFrom
vsTagCheckForPackage
vsTagCheckFriendRelationship
vsTagCloseDB
vsTagComposeTag
vsTagContextMatchOccurrence
vsTagContextMatchTags
vsTagCreateDB
vsTagDecomposeTag
vsTagEmbeddedEnd
vsTagEmbeddedStart
vsTagExtInheritsFrom
vsTagFindClass
vsTagFindClosest
vsTagFindEqual
vsTagFindExtCallback
vsTagFindExtension
vsTagFindFile
vsTagFindFriendsOfClass
vsTagFindFriendsToTag
vsTagFindGlobal
vsTagFindIncludedBy
vsTagFindIncludeFile
vsTagFindInFile
vsTagFindLanguage
vsTagFindMember
vsTagFindOccurrence
vsTagFindRegex
vsTagFindTag
vsTagGetBitmap
vsTagGetClassParents
vsTagGetContextInfo
vsTagGetCurrentContext
vsTagGetDate
vsTagGetDetailI
vsTagGetDetailZ
vsTagGetExtension
vsTagGetLanguage
vsTagGetLocalInfo
vsTagGetMatchInfo
vsTagGetNextArgument
vsTagGetOccurrence
vsTagGetTagInfo
vsTagGetType
vsTagInsertContext
vsTagInsertFileEnd
vsTagInsertFileStart
vsTagInsertLocal
vsTagInsertMatch
vsTagInsertOccurrence
vsTagInsertSimpleTag
vsTagInsertTag
vsTagListFileOccurrences
vsTagListSymbolsInClass
vsTagMakeCaption
vsTagMatchOccurrencesInFile
vsTagMatchSymbolInContext
vsTagMatchUsesInFile
vsTagNormalizeClasses
vsTagOccurrencesStart
vsTagOpenDB
vsTagQualifySymbolName
vsTagRemoveFromFile
vsTagRetagFile
vsTagSetClassParents
vsTagSetDate
vsTagSetLanguage
vsTagTreeInsertTag
vsTagUpdateContext
vsTagUpdateLocals


C Text Box Methods

vsBeginLine
vsDeleteChar
vsEndLine
vsKeyin
vsMoveWindow
vsQInsertState
vsQTextWidth
vsRefresh
vsRubout
vsSetFocus
vsSetFocus2
vsSetInsertState


C Tree View Methods

vsColWidthClear
vsColWidthGet
vsColWidthSet
vsTreeAddItem
vsTreeGetUserInfo
vsTreeSearch
vsTreeSetUserInfo


C Unicode Functions

vsASCIIToEBCDIC
vsBeginChar
vsEBCDICToASCII
vsFileDetermineEncoding
vsGetACP
vsIsCodePage
vsIsCodePageAvailable
vsLowcase
vsMultiByteConvertMultiByteToUTF16BE
vsMultiByteConvertMultiByteToUTF16LE
vsMultiByteConvertMultiByteToUTF32BE
vsMultiByteConvertMultiByteToUTF32LE
vsMultiByteFillBuf
vsStrRev
vsTogglecase
vsUpcase
vsUTF16CharNext
vsUTF16CharPrev
vsUTF16CharRead
vsUTF16CharRead2
vsUTF16CharReadPrev
vsUTF16SafeCpy
vsUTF16ToUTF8
vsUTF32ToLower
vsUTF32ToUpper
vsUTF8
vsUTF8CharBegin
vsUTF8CharBegin2
vsUTF8CharNext
vsUTF8CharNext2
vsUTF8CharPrev
vsUTF8CharRead
vsUTF8CharRead2
vsUTF8CharReadPrev
vsUTF8CharWrite
vsUTF8ConvertMultiByteToUTF8
vsUTF8ConvertUTF16BEToUTF8
vsUTF8ConvertUTF16LEToUTF8
vsUTF8ConvertUTF32BEToUTF8
vsUTF8ConvertUTF32LEToUTF8
vsUTF8ConvertUTF8ToMultiByte
vsUTF8ConvertUTF8ToUTF16BE
vsUTF8ConvertUTF8ToUTF16LE
vsUTF8ConvertUTF8ToUTF32BE
vsUTF8ConvertUTF8ToUTF32LE
vsUTF8FileRead
vsUTF8FillBuf
vsUTF8IsAlpha
vsUTF8IsLower
vsUTF8IsUpper
vsUTF8Lowcase
vsUTF8MemICmp
vsUTF8ReadEntireFile
vsUTF8Reverse
vsUTF8StrCmp
vsUTF8StrCmpQuick
vsUTF8StrICmp
vsUTF8StrICmpQuick
vsUTF8Togglecase
vsUTF8ToMultiByte
vsUTF8ToUTF16
vsUTF8Upcase


C Version Control Functions

vsQvcadd_enabled
vsQvccheckin_enabled
vsQvccheckout_enabled
vsQvcdiff_enabled
vsQvcget_enabled
vsQvchistory_enabled
vsQvclock_enabled
vsQvcmanager_enabled
vsQvcproperties_enabled
vsQvcremove_enabled
vsQvcunlock_enabled


C Vscroll Bar Methods

vsMoveWindow
vsQTextWidth
vsRefresh
vsSetFocus
vsSetFocus2


C Window Functions

vsActivateView
vsActivateWindow
vsCreateEditorCtl
vsDeleteWindow
vsDestroyEditorCtl
vsDXY2LXY
vsIsEditorCtl
vsIsWindowValid
vsLastWindowID
vsLoadFiles
vsLoadTemplate
vsLXY2DXY
vsMoveWindow
vsQuitView
vsRegisterWindow
vsUnregisterWindow


C XMLCFG Functions

vsXMLCFGAdd
vsXMLCFGAddAttribute
vsXMLCFGClose
vsXMLCFGCopy
vsXMLCFGCreate
vsXMLCFGDelete
vsXMLCFGDeleteAttribute
vsXMLCFGFindChildWithName
vsXMLCFGFindSimple
vsXMLCFGFindSimpleArray
vsXMLCFGFindSimpleInsert
vsXMLCFGGetAttribute
vsXMLCFGGetDepth
vsXMLCFGGetFilename
vsXMLCFGGetFirstChild
vsXMLCFGGetLastChild
vsXMLCFGGetModify
vsXMLCFGGetName
vsXMLCFGGetNextAttribute
vsXMLCFGGetNextSibling
vsXMLCFGGetNumNodes
vsXMLCFGGetParent
vsXMLCFGGetPath
vsXMLCFGGetPrevSibling
vsXMLCFGGetType
vsXMLCFGGetValue
vsXMLCFGOpen
vsXMLCFGOpenFromBuffer
vsXMLCFGOpenFromString
vsXMLCFGSave
vsXMLCFGSaveToBuffer
vsXMLCFGSaveToString
vsXMLCFGSetAttribute
vsXMLCFGSetModify
vsXMLCFGSetName
vsXMLCFGSetPath
vsXMLCFGSetValue
vsXMLCFGSortOnAttribute


create_ext

int create_ext(int &kt_index, _str extension, _str ref_language, _str mode_name='', _str setup_info='', _str compile_info='', _str syntax_info='', _str be_info='', _str include_info='', _str word_chars='', _str lexer_name='', _str color_flags='')

Deprecated. Use _CreateLanguage() and _CreateExtension().

Creates file extension specific setup data which is used by the Language Options dialog box. This procedure is typically used when adding support for languages not already provided by SlickEdit's default configuration.

See defload procedure in the macro file "modula.e" for an example.

Parameters:

kt_index - (output) 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 ''.

extension - File extension to be setup.

ref_language - If not '', this extension will refer to the same setup data as files with of the language represented by 'ref_language' All other parameters are ignored if 'ref_language' is specified.

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".

include_info - Default include path or copy book search path

word_chars - set of characters used in identifiers/words

lexer_name - name of lexer for Color Coding

color_flags - Color coding flags

Returns: int

Returns the name index of the setup information created.

Category:

Miscellaneous Functions

See Also:

defload


create_prefix_key

_command typeless create_prefix_key()

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", "Options", "Key Bindings...") for creating and removing bindings.

Returns: typeless

Returns 0 if successful. Common return codes are COMMAND_CANCELLED_RC and INTERPRETER_OUT_OF_MEMORY_RC. On error,

Category:

Keyboard Functions

See Also:

bind_to_key, unbind_key, list_keydefs


create_tile

_command typeless create_tile()

Allows you to create a new tiled window by pointing to edge for new window with cursor keys.

Returns: typeless

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.

Applies To:

Edit Window

Category:

Window Functions

See Also:

move_edge, next_window, _prev_window, change_window, delete_tile, window_left, window_right, window_above, window_below


createExtension

int createExtension(_str extension, _str langId, _str encoding=null, _str openApp=null, boolean useAssoc=false)

Creates file extension specific setup data which is used by the File Extension Manager options dialog. This procedure is typically used when associating a physical file extension with a specific language, or when setting up encoding and application preferences for a physical file extension.

Parameters:

extension - File extension to be configured.

langId - Language ID (see p_LangId For a list of language types, see the Language Options dialog ("Tools", "Options", "Language Setup...")

encoding - (optional) default file encoding

openApplication - (optional) path for external application used to open this type of file when double-clicked on in project file browser.

useAssociation - (optional, Windows only) use Windows file association to select application for opening this type of file when double-clicked on in the project file browser.

Returns: int

Returns the name index of the setup information created.

Example:

   ExtensionSettings.createExtension('ada', 'ada');
   ExtensionSettings.createExtension('ads', 'ada');

Category:

Miscellaneous Functions

See Also:

_CreateLanguage


ctab

_command void ctab()

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", "Options", "File Extension Setup...", select the Indent tab) 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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

indent_with_tabs, tabs, gui_tabs


ctrl_prefix

_command typeless ctrl_prefix(...)

Defines an alternate CTRL key. For example, after binding this command to the Ctrl+^ key, pressing Ctrl+^ 'x' is identical to Ctrl+X.

Category:

Keyboard Functions

See Also:

alt_prefix, shift_prefix, esc_alt_prefix


cua_select

_command void cua_select()

Starts or extends a character selection. This command is intended to be bound to Shift+cursor keys.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Selection Functions, Text Box Methods


cur_identifier

_str cur_identifier(int &start_col, int option=VSCURWORD_WHOLE_WORD)

Returns the current identifier. "" is returned if there is no identifier at the cursor. start_col is set to the physical position within the current line of the word returned.

Parameters:

start_col - (output) start column for identifier. The start column is returned as imaginary columns, not physical columns.

option - one of the following:

  • VSCURWORD_WHOLE_WORD - get the entire identifier
  • VSCURWORD_FROM_CURSOR - get part of identifier before cursor
  • VSCURWORD_BEFORE_CURSOR - get part of identifier after cursor
  • VSCURWORD_AT_END_USE_PREV - not supported

Returns: _str

Returns the current word.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


cur_word

_str cur_word(int &start_col, _str from_cursor="", boolean end_prev_word=false, boolean multi_line=false)

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.

Parameters:

start_col -

from_cursor -

end_prev_word -

multi_line -

Returns: _str

Returns the current word.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


current_func_signature

_command _str current_func_signature(boolean dosticky_message=true)

Returns the signature of the current function. If display_message is true or not specified, the current function signature is displayed on the message line.

Parameters:

dosticky_message - Display message on message line, remember to pass "false" if you are calling this just to get the current proc signature.

Returns: _str

the signature of the current procedure or "" if it can't be found

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


current_proc

_command _str current_proc(boolean dosticky_message=true)

Returns the name of the current procedure. This function also will return the name of the current class name, type definition, #define, any definition that is tagged. If display_message is true or not specified, the current function name is displayed on the message line.

Parameters:

dosticky_message - Display message on message line, remember to pass "false" if you are calling this just to get the current proc name.

Returns: _str

the name of the current procedure or "" if it can't be found

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


cursor_command

void cursor_command()

Moves the cursor to the command line.

Applies To:

Edit Window, Command Line

Category:

CursorMovement Functions


cursor_data

void cursor_data()

Moves the cursor to the text area.

Applies To:

Edit Window, Command Line

Category:

CursorMovement Functions


cursor_down

_command int cursor_down(_str count='', _str doScreenLines='')

For an edit window or editor control, the cursor is moved one line down. The Up/Down on Text ("Tools", "Options", "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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Command Line Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods


cursor_error

_command typeless cursor_error()

This command is typically invoked when the build window (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.

Returns: typeless

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.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

next_error


cursor_left

_command void cursor_left(...)

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


cursor_right

_command void cursor_right(...)

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


cursor_shape

_command void cursor_shape(_str options='')

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.

Example:

cmdline is a string in the format:
         [-v] ins_top ins_bot rep_top rep_bot vins_top vins_bot vrep_top vrep_bottom

Category:

Miscellaneous Functions


cursor_up

_command int cursor_up(_str count='', _str doScreenLines='')

For an edit window or editor control, the cursor moves one line up. The Up/Down on Text ("Tools", "Options", "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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Command Line Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods


CursorMovement Functions

_
_begin_char
_begin_line
_end_line
_lineflags
_page_down
_page_up
_restore_pos2
_save_pos2
_scroll_style
+
0
backtab
backward_down_sexp
backward_up_sexp
begin_line
begin_line_text_toggle
begin_window
begin_word
bottom
bottom_left_of_window
bottom_of_buffer
bottom_of_window
cbacktab
center_line
center_region
ctab
cursor_command
cursor_data
cursor_down
cursor_left
cursor_right
cursor_up
cut_next_sexp
cut_prev_sexp
down
emacs_scroll_down
emacs_scroll_up
end_line
end_line_text_toggle
end_window
exchange_point_and_mark
find_delimiter
first_non_blank
forward_down_sexp
forward_up_sexp
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_char
next_full_word
next_level
next_paragraph
next_sentence
next_sexp
next_subword
next_word
page_down
page_left
page_right
page_up
prev_char
prev_full_word
prev_level
prev_paragraph
prev_sentence
prev_sexp
prev_subword
prev_word
restore_pos
right
right_side_of_window
save_pos
scroll_down
scroll_left
scroll_right
scroll_style
scroll_up
select_next_sexp
select_prev_sexp
set_scroll_pos
tab
top
top_left_of_window
top_of_buffer
top_of_window
transpose_sexp
traverse_char
up


cut

_command int cut(boolean push=true, boolean doCopy=false, _str name='')

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", "Options", "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.

Parameters:

push -

doCopy -

name -

Returns: int

Returns 0 if successful. Common return codes are 1 (no line at cursor) and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

copy_to_clipboard, ispf_cut, list_clipboards, paste


cut_code_block

_command void cut_code_block()

Attempts to identify the block of code starting at the current line, and prompts to delete the entire block of code. The deleted line(s) are copied to the clipboard. You may retrieve the deleted line(s) with the command paste.

Returns: void

Returns 0 if successful. Common return codes are 1 (no block at cursor) and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_line


cut_end_line

_command typeless cut_end_line(boolean push=true)

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.

Returns: typeless

Returns 0 if successful. Common return codes are BOTTOM_OF_FILE_RC and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_end_line


cut_full_word

_command typeless cut_full_word()

Same as cut_word, except ignores the def_subword_nav setting and deletes from the cursor to the end of the full word at the cursor or the next word, and copies it to the clipboard.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_subword


cut_level

_command typeless cut_level()

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.

Returns: typeless

Returns 0 if successful. Common return value is TOO_MANY_MARKS_RC. On error, message displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

next_level, cut_prev_level, prev_level


cut_line

_command typeless cut_line(_str cbname='')

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.

Returns: typeless

Returns 0 if successful. Common return codes are 1 (no line at cursor) and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_line


cut_next_sexp

_command int cut_next_sexp()

Delete the next S-expression and add it to the clipboard. If called repeatedly, append the deleted text to the clipboard.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, select_prev_sexp, select_next_sexp, cut_prev_sexp


cut_prev_level

_command typeless cut_prev_level()

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.

Returns: typeless

Returns 0 if successful. Common return values is TOO_MANY_MARKS_RC. On error, message displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

next_level, cut_level, prev_level


cut_prev_sexp

_command int cut_prev_sexp()

Delete the previous S-expression and add it to the clipboard. If called repeatedly, prepend the deleted text to the clipboard.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, select_prev_sexp, select_next_sexp, cut_prev_sexp


cut_prev_word

_command typeless cut_prev_word(boolean doDelete=false, int subwordOption=0)

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", "Options", "File Extension Setup...", select the Advanced tab). The deleted text may be retrieved by the command paste.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_prev_word


cut_region

_command typeless cut_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

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 cut_sentence()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

prev_paragraph, prev_sentence, next_paragraph, select_paragraph, center_within_margins, reflow_region, margins


cut_subword

_command typeless cut_subword()

Same as cut_word, except ignores the def_subword_nav setting and deletes from the cursor to the end of the subword at the cursor or the next word, and copies it to the clipboard.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_full_word


cut_whole_word

_command typeless cut_whole_word()

Delete current word at cursor and copies it to the clipboard.

Returns: typeless

Returns 0 if successful. Common return codes are TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_word, cut_word


cut_word

_command typeless cut_word()

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", "Options", "File Extension Setup...", select the Advanced tab). The deleted text may be retrieved by the command paste.

Returns: typeless

Returns 0 if successful. Common return codes are TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_word


cut_word2

int cut_word2(boolean push, boolean doCopy=false, int subwordOption=0, boolean skipTrailing=true)

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.

Parameters:

push -

doCopy -

subwordOption -

skipTrailing -

Returns: int

Returns 0 if successful. Common return codes are 1 (no line at cursor), TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC.

Applies To:

Edit Window, Editor Control

Categories:

Clipboard Functions, Edit Window Methods, Editor Control Methods


dbg_add_autovar

int dbg_add_autovar(int thread_id, int frame_id, _str expr)

Add a auto-watched variable.

Parameters:

expr - expression to evaluate

thread_id - index of thread

frame_id - index of stack frame

Returns: int

watch ID index >0 on success, <0 on error.

Category:

Debugger Functions


dbg_add_breakpoint

int dbg_add_breakpoint(int count, _str condition, _str thread_name, _str class_name, _str method_name, _str file_name, int line_number, _str address='', int type=VSDEBUG_BREAKPOINT_LINE, int flags=0)

Add a breakpoint. The breakpoint is initially disabled at the time that it is inserted. You must call the package-specific callback to enable the breakpoint.

Parameters:

count - number of times to skip breakpoint -1 indicates that it is a one-time breakpoint

condition - expression for conditional breakpoint

thread_name - name of thread breakpoint is restricted to

class_name - name of class breakpoint is restricted to

method_name - name of method breakpoint is set in

file_name - name of file breakpoint is in

line_number - line number breakpoint occurs at

address - (optional) hex instruction address to set breakpoint at

type - breakpoint type (line, method, watch) see dbg_get_breakpoint_type()

flags - bitset of VSDEBUG_BREAKPOINT_FLAG_

Returns: int

breakpoint index >0 on success, <0 on error.

Category:

Debugger Functions


dbg_add_disassembly_line

int dbg_add_disassembly_line(_str source_file, int line_number, _str(&addresses)[], _str(&instructions)[], _str(&func_names)[], _str(&offsets)[])

Add the disassembly for the indicated line in the indicated source file.

Parameters:

source_file - source file the line is in

line_number - line number to disassemble

addresses - (reference) array of instruction addresses

instructions - (reference) array of disassembled instructions

func_names - (reference) array of function names

offsets - (reference) array of function offsets

Returns: int

the line ID > 0 on success, < 0 on error.

Category:

Debugger Functions


dbg_add_exception

int dbg_add_exception(int stop_when, int count, _str condition, _str class_name, _str thread_name)

Add a exception. The exception is initially disabled at the time that it is inserted. You must call the package-specific callback to enable the exception.

Parameters:

stop_when - THROWN, CAUGHT, UNCAUGHT

count - number of times to skip breakpoint -1 indicates that it is a one-time breakpoint

condition - expression for conditional exception

class_name - name of exception to catch

thread_name - name of thread breakpoint is restricted to

Returns: int

exception index >0 on success, <0 on error.

Category:

Debugger Functions


dbg_add_runtime_expr

int dbg_add_runtime_expr(_str expr)

Add another runtime exclude expression

Parameters:

expr - String describing system exclude

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_add_source_dir

int dbg_add_source_dir(_str source_dir)

Add another source directory

Parameters:

source_dir - directory to add to list

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_add_thread

int dbg_add_thread(int thread_id, int thread_flags, _str thread_name, int parent_group)

Add a thread to the debugger model

Parameters:

thread_id - Thread id from native debugger. VSE will have its own index to refer to this thread by

thread_flags - Combination of

  • VSDEBUG_THREAD_FLAG_ZOMBIE
  • VSDEBUG_THREAD_FLAG_RUNNING
  • VSDEBUG_THREAD_FLAG_SLEEPING
  • VSDEBUG_THREAD_FLAG_MONITOR
  • VSDEBUG_THREAD_FLAG_WAIT
  • VSDEBUG_THREAD_FLAG_SUSPENDED
  • VSDEBUG_THREAD_FLAG_FROZEN

thread_name - Thread name from native debugger

parent_group -

Returns: int

thread_id > 0 on success, < 0 on error.

Example:

int dbg_mydebugger_update_threads()
{
   dbg_clear_threads();
   dbg_add_thread(1,VSDEBUG_THREAD_FLAG_SUSPENDED,"main",0);
   dbg_add_thread(2,VSDEBUG_THREAD_FLAG_SUSPENDED,"cleanup",0);
   dbg_add_thread(3,VSDEBUG_THREAD_FLAG_SUSPENDED,"gc",0);
   return 0;
}

Category:

Debugger Functions


dbg_add_watch

int dbg_add_watch(int tab_number, _str expr, _str context_name, int base)

Add a watched variable.

Parameters:

tab_number - which tab to display this watch on

expr - expression to evaluate

context - context to evaluate watch in

base - base to display value in

Returns: int

watch ID index >0 on success, <0 on error.

Category:

Debugger Functions


dbg_cache_resolved_path

int dbg_cache_resolved_path(_str file_name, _str full_path)

Deprecated. This function is obsolete, as of 7.0.1

Save the fact that 'source_file' maps to 'full_path'.

Parameters:

file_name - source file name (with extension)

full_path - fully resolved, absolute path name

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_clear_autos

int dbg_clear_autos(int thread_id, int frame_id)

Remove all the auto watches.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_breakpoints

int dbg_clear_breakpoints()

Remove all the breakpoints.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_classes

int dbg_clear_classes()

Indicate that the classes model is out of date.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_disassembly

int dbg_clear_disassembly(_str file_name=null)

Clear the disassembly lines for the given file name. If 'file_name' is NULL, clear the disassembly for all files.

Parameters:

file_name - source file to remove disassembly for

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_editor

int dbg_clear_editor()

Turn off debugging mode everywhere

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_editor_disassembly

int dbg_clear_editor_disassembly(int editorctl, _str file_name)

Remove the imaginary lines representing the disassembly for the given buffer.

Parameters:

editorctl - window ID of the editor control

file_name - name of buffer to update

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_exceptions

int dbg_clear_exceptions()

Remove all the exceptions.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_memory

int dbg_clear_memory()

Indicate that the current memory dump region is out of date

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_registers

int dbg_clear_registers()

Indicate that the registers model is out of date

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_runtimes

int dbg_clear_runtimes()

Remove all the runtime exclude exprs.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_sourcedirs

int dbg_clear_sourcedirs()

Remove all the source paths.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_stack

int dbg_clear_stack(int thread_id=0)

Indicate that the stack frame is out of date

Parameters:

thread_id - specific thread ID to invalidate if 0, invalidate stack for all threads.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_threads

int dbg_clear_threads()

Indicate that the list of threads and thread gruops are out of date

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_variables

int dbg_clear_variables()

Indicate that the variables everywhere are out of date

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_watch_variables

int dbg_clear_watch_variables()

Indicate that all the watch variables are out of date. This is necessary when switching tabs in the watch window.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_clear_watches

int dbg_clear_watches()

Remove all the watches, both persistent and dynamic data.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_collapse_auto

int dbg_collapse_auto(int thread_id, int frame_id, _str watch_path)

Collapse all the nodes under the given auto-watched variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

watch_path - path to member in list of auto-watch variables

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_collapse_class

int dbg_collapse_class(_str class_path)

Collapse the information below a specified class or class path

Parameters:

class_path - class ID path to class to collapse.

Category:

Debugger Functions


dbg_collapse_local

int dbg_collapse_local(int thread_id, int frame_id, _str local_path)

Collapse all the nodes under the given local variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

local_path - path to local in list of local variables

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_collapse_member

int dbg_collapse_member(int thread_id, int frame_id, _str member_path)

Collapse all the nodes under the given member variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

member_path - path to member in list of member variables

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_collapse_watch

int dbg_collapse_watch(int thread_id, int frame_id, _str watch_path)

Collapse all the nodes under the given watched variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

watch_path - path to member in list of watch variables

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_create_new_session

int dbg_create_new_session(_str package_name, _str session_name, boolean copy_setup)

Create a new debugger session object handle. If successful, the new session will be made the active session.

Parameters:

package_name - name of debugger integration package (gdb, jdwp, dotnot, ...)

session_name - name of debugger session

copy_setup - copy existing setup data for this session name?

Returns: int

session ID of the new debugger session

Since:

10.0

Example:

To create a GDB debugger session

   int session_id = dbg_create_new_session("gdb", "myUnixApp");
   if (session_id < 0) {
      printf("could not create session object\n");
   } else {
      printf("new session ID = %d\n",session_id);
   }

Category:

Debugger Functions

See Also:

dbg_get_num_sessions, dbg_destroy_session


dbg_destroy_session

int dbg_destroy_session(int session_id)

Destroy the given session and remove it from the session list.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To destroy the first debugger session.

   dbg_destroy_session(1);

Category:

Debugger Functions

See Also:

dbg_create_new_session, dbg_get_num_sessions


dbg_finalize

_command void dbg_finalize()

Close all existing debugging sessions, and free all memory and files associated with the debugging session.

Category:

Debugger Functions


dbg_find_breakpoint

int dbg_find_breakpoint(_str file_name, int line_number, boolean &enabled, int start_id=0, _str address=null)

Find the breakpoint at the given file and line number.

Parameters:

file_name - name of file breakpoint is in

line_number - line number breakpoint occurs at

enabled - (reference) is the breakpoint enabled or disabled

start_id - (optional) breakpoint ID to start searching at, default 0

address - (optional) hex address to search for breakpoint matching

Returns: int

breakpoint ID > 0 on success, <0 on error.

Category:

Debugger Functions


dbg_find_class

int dbg_find_class(_str class_name, int name_only, int start_id=0)

Find the class with the given class name.

Parameters:

class_name - name of class to look for

name_only - find first match using class name only

start_id - class ID to start searching at

Returns: int

class ID > 0 on success, <0 on error.

Category:

Debugger Functions


dbg_find_disassembly_line

int dbg_find_disassembly_line(_str source_file, _str address, int &line_number, int &inst_offset)

Find the line and offset of the instruction corresponding to the given program counter address.

Parameters:

source_file - source file

address - program counter address

line_number - (reference) set to line number

inst_offset - (reference) set to line offset

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_find_exception

int dbg_find_exception(_str class_name, int &enabled, int start_id)

Find the exception with the given class name

Parameters:

class_name - name class corresponding to exception

enabled - (reference) is the exception enabled or disabled

start_id - (optional) exception ID to start searching at, default 0

Returns: int

exception ID > 0 on success, <0 on error.

Category:

Debugger Functions


dbg_find_session

int dbg_find_session(_str session_name)

Return the session ID of the first session with the specified name

Parameters:

session_name - debugger session name

Returns: int

session ID (1 .. max_session) pointer, <0 on failure

Since:

10.0

Example:

To find a debugging session named "MySession"

   int session_id = dbg_find_session("MySession");
   if (session_id < 0) {
      printf("session not found\n");
   }

Category:

Debugger Functions


dbg_get_all_sessions

int dbg_get_all_sessions(int(&id_array)[])

Get all of the session ID's for the active sessions

Parameters:

id_array - array of integers

Returns: int

0 on success, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_get_autovar

int dbg_get_autovar(int thread_id, int frame_id, int watch_id, _str &expr, _str &value)

Get the details about a auto-watch variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

watch_id - index of variable in list of auto-watches

expr - (reference) expression to evaluate

value - (reference) value of variable

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_autovar_info

int dbg_get_autovar_info(int thread_id, int frame_id, _str watch_path, _str &name, _str &class_name, _str &signature, _str &value, int &flags)

Get the details about an auto-watch variable or expanded auto-watch variable

Parameters:

thread_id - index of thread

frame_id - index of stack frame

watch_path - path to auto-watch variable in tree

name - (reference) name of local

class_name - (reference) name of class the member is in

signature - (reference) type of local variable

value - (reference) value of variable

flags - (reference) set to bitset of DEBUG_MODEL_FLAGS_

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_get_breakpoint

int dbg_get_breakpoint(int breakpoint_id, int &count, _str &condition, _str &thread_name, _str &class_name, _str &method_name, _str &file_name, int &line_number, boolean &enabled, _str &address)

Get the details about a breakpoint.

Parameters:

breakpoint_id - index of variable in list of breakpoints

count - (reference) number of times to skip breakpoint -1 indicates that it is a one-time breakpoint

condition - (reference) expression for conditional breakpoint

thread_name - (reference) name of thread breakpoint is restricted to

class_name - (reference) name of class breakpoint is restricted to

method_name - (reference) name of method breakpoint is set in

file_name - (reference) name of file breakpoint is in

line_number - (reference) line number breakpoint occurs at

enabled - (reference) is the breakpoint enabled or disabled

address - (reference) hex address to search from breakpoint matching

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_breakpoint_condition

int dbg_get_breakpoint_condition(int breakpoint_id, _str &condition)

Get the condition constraint for the specified breakpoint.

Parameters:

breakpoint_id - index of variable in list of breakpoints

condition - (reference) expression for conditional breakpoint

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_breakpoint_count

int dbg_get_breakpoint_count(int breakpoint_id)

Get the count constraint for the specified breakpoint.

Parameters:

breakpoint_id - index of variable in list of breakpoints

Returns: int

-1 for temporary breakpoing, <-1 on error, >=0 otherwise

Category:

Debugger Functions


dbg_get_breakpoint_enabled

int dbg_get_breakpoint_enabled(int breakpoint_id)

Return the status (enabled or disabled) for the given breakpoint.

Parameters:

breakpoint_id - Breakpoint to examine

Returns: int

1 for enabled, 0 for disabled, <0 on error.

Category:

Debugger Functions


dbg_get_breakpoint_location

int dbg_get_breakpoint_location(int breakpoint_id, _str &file_name, int &line_number)

Get the file and line number for the specified breakpoint.

Parameters:

breakpoint_id - Breakpoint to examine

file_name - Name of file breakpoint is in

line_number - Line that breakpoint is on

Returns: int

1 for enabled, 0 for disabled, <0 on error.

Category:

Debugger Functions


dbg_get_breakpoint_scope

int dbg_get_breakpoint_scope(int breakpoint_id, _str &class_name, _str &method_name)

Get the class and method scope of the specified breakpoint.

Parameters:

breakpoint_id - Breakpoint to examine

class_name - Name of class that breakpoint is set in

method_name - Name of method that breakpoint is set in

Returns: int

1 for enabled, 0 for disabled, <0 on error.

Category:

Debugger Functions


dbg_get_breakpoint_type

int dbg_get_breakpoint_type(int breakpoint_id, int &breakpoint_flags)

Get the type of a breakpoint (line, method, or watch)

  • VSDEBUG_BREAKPOINT_LINE -- file/line oriented breakpoint
  • VSDEBUG_BREAKPOINT_METHOD -- class/method breakpoint
  • VSDEBUG_BREAKPOINT_ADDRESS -- address within a function
  • VSDEBUG_WATCHPOINT_READ -- read access on breakpoint condition
  • VSDEBUG_WATCHPOINT_WRITE -- write access on breakpoint condition
  • VSDEBUG_WATCHPOINT_ANY -- any access on breakpoint condition
  • VSDEBUG_WATCHPOINT_INSTANCE_READ -- read access on breakpoint condition
  • VSDEBUG_WATCHPOINT_INSTANCE_WRITE -- write access on breakpoint condition
  • VSDEBUG_WATCHPOINT_INSTANCE_ANY -- any access on breakpoint condition

Parameters:

breakpoint_id - index of variable in list of breakpoints

breakpoint_flags - (reference) set to bitset of VSDEBUG_WATCHPOINT_FLAG_

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_callback_name

_str dbg_get_callback_name(int session_id)

Return the debugger system callback name for the given session ID

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: _str

"" on failure, otherwise return session callback name

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_find_session, dbg_get_session_name


dbg_get_capability_name

_str dbg_get_capability_name(int capability)

Parameters:

capability - capability type (DEBUG_CAPABILITY_*)

Returns: _str

the string representation of the given debugger capability

Since:

10.0

Example:

To look up the call back name expected for update registers

   _str cap = dbg_get_capability_name(DEBUG_CAPABILITY_UPDATE_REGISTERS);
   _message_box("registers = " :+ cap);

Category:

Debugger Functions


dbg_get_class

int dbg_get_class(_str class_path, _str &name, _str &outer_class, _str &signature, _str &file_name, int &flags, _str &loader)

Get the basic information about the indicated class

Parameters:

class_path - index path of class in class table

name - (reference) name of class

outer_class - (reference) outer class name

signature - (reference) signature of class (type)

file_name - (reference) source file that class is in

flags - (reference) bitset of DBG_FLAGS_

class_loader - (reference) class loader

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_get_cur_frame

int dbg_get_cur_frame(int thread_id)

Parameters:

thread_id - index of thread to get current frame of

Returns: int

Return the index of current stack frame, 0 if not set.

Category:

Debugger Functions


dbg_get_cur_thread

int dbg_get_cur_thread()

Returns: int

Return the index of current thread being inspected, 0 if not set.

Category:

Debugger Functions


dbg_get_current_session

int dbg_get_current_session()

Returns: int

Return the session ID of the active debugger session.

Since:

10.0

Category:

Debugger Functions


dbg_get_disassembly_line

int dbg_get_disassembly_line(_str source_file, int line_number, _str(&addresses)[], _str(&instructions)[], _str(&func_names)[], _str(&offsets)[])

Get the details about a disassembled source line.

Parameters:

source_file - source file

line_number - line number

addresses - (reference) array of instruction addresses

instructions - (reference) array of disassembled instructions

func_names - (reference) array of function names

offsets - (reference) array of function offsets

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_exception

int dbg_get_exception(int exception_id, int &stop_when, int &count, _str &condition, _str &class_name, _str &thread_name, boolean &enabled)

Get the details about an exception.

Parameters:

exception_id - index of variable in list of exceptions

stop_when - (reference) THROWN, CAUGHT, UNCAUGHT

count - (reference) number of times to skip breakpoint -1 indicates that it is a one-time breakpoint

condition - (reference) expression for conditional exception

class_name - (reference) name of exception to catch

thread_name - (reference) name of thread breakpoint is restricted to

enabled - (reference) is the exception enabled or disabled

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_exception_class

int dbg_get_exception_class(int exception_id, _str &class_name)

Get the class and method scope of the specified exception.

Parameters:

exception_id - Exception to examine

class_name - Name of class that exception is set in

method_name - Name of method that exception is set in

Returns: int

1 for enabled, 0 for disabled, <0 on error.

Category:

Debugger Functions


dbg_get_exception_condition

int dbg_get_exception_condition(int exception_id, _str &condition)

Get the condition constraint for the specified exception.

Parameters:

exception_id - index of variable in list of exceptions

condition - (reference) expression for conditional breakpoint

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_exception_count

int dbg_get_exception_count(int exception_id)

Get the count constraint for the specified exception.

Parameters:

exception_id - index of variable in list of exceptions

Returns: int

-1 for temporary breakpoing, <-1 on error, >=0 otherwise

Category:

Debugger Functions


dbg_get_exception_enabled

int dbg_get_exception_enabled(int exception_id)

Return the status (enabled or disabled) for the given exception.

Parameters:

exception_id - Exception to remove

Returns: int

1 for enabled, 0 for disabled, <0 on error.

Category:

Debugger Functions


dbg_get_field

int dbg_get_field(int class_id, int field_id, _str &name, _str &signature, _str &value, int &flags)

Get the information about the field at the given index in the field table of the given class.

Parameters:

class_id - index of class in class table

field_id - index of field in field table of class

name - (reference) name of field

signature - (reference) set to type of field

value - (reference) set to value of field

flags - (reference) set to bitset of DEBUG_MODEL_FLAGS_

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_format_name

_str dbg_get_format_name(int base)

Gets the name of base specified by base

Returns: _str

name of base specified by base

Category:

Debugger Functions


dbg_get_formatted_var

int dbg_get_formatted_var(int index, _str &formatted_var)

Parameters:

formatted_var_list - variable that the list is put in

Returns: int

0 if succesful

Category:

Debugger Functions


dbg_get_frame

int dbg_get_frame(int thread_id, int frame_id, _str &method_name, _str &signature, _str &return_type, _str &class_name, _str &file_name, int &line_number, _str &address)

Get the details about the given stack frame

Parameters:

thread_id - index of thread to get stack frame from

frame_id - index of frame in stack frame list

method_name - (reference) name of method on stack frame

signature - (reference) method signature

return_type - (reference) return type of method

class_name - (reference) name of class on stack frame

file_name - (reference) name of file that stack frame is positioned at

line_number - (reference) line number that stack frame is positioned at

address - (reference) address of current instruction in stack frame

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_get_frame_path

int dbg_get_frame_path(int thread_id, int frame_id, _str &file_name, int &line_number)

Get the details about file and line number for the the given stack frame.

Parameters:

thread_id - index of thread to get stack frame from

frame_id - index of frame in stack frame list

file_name - (reference) name of file that stack frame is positioned at

line_number - (reference) line number that stack frame is positioned at

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_get_global_format

int dbg_get_global_format()

Gets the current global base

Returns: int

the current global base

Category:

Debugger Functions


dbg_get_local

int dbg_get_local(int thread_id, int frame_id, _str local_path, _str &name, _str &class_name, _str &signature, int &flags, _str &value, int &line_number, int &is_in_scope)

Get the details about a local variable.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

local_path - path to local in list of local variables

name - (reference) name of local

class_name - (reference) name of class that we are in

signature - (reference) type of local variable

flags - (reference) set to bitset of DEBUG_MODEL_FLAGS_

value - (reference) value of variable

line_number - (reference) line number that it is declared at

is_in_scope - (reference) is the variable in scope?

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_member

int dbg_get_member(int thread_id, int frame_id, _str member_path, _str &name, _str &class_name, _str &signature, int &flags, _str &value)

Get the details about a member of 'this' object.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

member_path - path to member in list of member variables

name - (reference) name of member

class_name - (reference) name of class the member is in

signature - (reference) type of variable

value - (reference) value of variable

flags - (reference) set to bitset of DEBUG_MODEL_FLAGS_

is_in_scope - (reference) is the variable in scope?

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_method

int dbg_get_method(int class_id, int method_id, _str &name, _str &class_name, _str &signature, _str &return_type, _str &file_name, int &flags)

Get the details about a method of a class.

Parameters:

class_id - index of class in class table

method_id - index of method in list of classes within specified class

name - (reference) name of method

class_name - (reference) name of class

signature - (reference) parameters of method

return_type - (reference) return type of method

file_name - (reference) source file containing this method

flags - (reference) bitset of DEBUG_MODEL_FLAG_

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_nested_type

int dbg_get_nested_type(int class_id, int type_id, int &nested_id)

Get information about a nested types within a class

Parameters:

class_id - index of class in class table

type_id - index of nested type within class

nested_type - (reference) information about nested type

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_num_autos

int dbg_get_num_autos(int thread_id, int frame_id)

Parameters:

thread_id - index of thread

frame_id - index of stack frame

Returns: int

Return the number of auto-variables.

Category:

Debugger Functions


dbg_get_num_breakpoints

int dbg_get_num_breakpoints()

Returns: int

Return the number of breakpoints.

Category:

Debugger Functions


dbg_get_num_classes

int dbg_get_num_classes()

Returns: int

Return the number of classes in the class table

Category:

Debugger Functions


dbg_get_num_dirs

int dbg_get_num_dirs()

Returns: int

Return the number of source file paths stored, <0 on error.

Category:

Debugger Functions


dbg_get_num_disassembled_files

int dbg_get_num_disassembled_files()

Returns: int

Return the number of disassembled files.

Category:

Debugger Functions


dbg_get_num_disassembly_lines

int dbg_get_num_disassembly_lines(_str source_file)

Parameters:

source_file - disassembled source file

Returns: int

Return the number of disassembly lines for the given file.

Category:

Debugger Functions


dbg_get_num_exceptions

int dbg_get_num_exceptions()

Returns: int

Return the number of exception breakpoints.

Category:

Debugger Functions


dbg_get_num_fields

int dbg_get_num_fields(int class_id)

Parameters:

class_id - index of class to get information for

Returns: int

Return the number of fields in the specified class.

Category:

Debugger Functions


dbg_get_num_formatted_vars

int dbg_get_num_formatted_vars()

Gets the number of non-watch variables formatted (formatted watch variables override these settings and are stored separately)

Returns: int

the number of non-watch variables formatted

Category:

Debugger Functions


dbg_get_num_frames

int dbg_get_num_frames(int thread_id)

Returns: int

Return the number of frames on the stack for the current thread.

Category:

Debugger Functions


dbg_get_num_locals

int dbg_get_num_locals(int thread_id, int frame_id)

Parameters:

thread_id - index of thread

frame_id - index of stack frame

Returns: int

Return the number of locals on the stack for the current stack frame.

Category:

Debugger Functions


dbg_get_num_members

int dbg_get_num_members(int thread_id, int frame_id)

Parameters:

thread_id - index of thread

frame_id - index of stack frame

Returns: int

Return the number of field in 'this' for the current stack frame.

Category:

Debugger Functions


dbg_get_num_methods

int dbg_get_num_methods(int class_id)

Parameters:

class_id - index of class in class table

Returns: int

Return the number of methods in the specified class

Category:

Debugger Functions


dbg_get_num_registers

int dbg_get_num_registers()

Returns: int

Return the number of system registers.

Category:

Debugger Functions


dbg_get_num_runtimes

int dbg_get_num_runtimes()

Returns: int

Return the number of runtime excludes stored, <0 on error.

Category:

Debugger Functions


dbg_get_num_sessions

int dbg_get_num_sessions()

Returns: int

Return the number of debugger sessions active.

Since:

10.0

Category:

Debugger Functions


dbg_get_num_suspended

int dbg_get_num_suspended()

Returns: int

Return the number of suspended threads in the current process.

Category:

Debugger Functions


dbg_get_num_threads

int dbg_get_num_threads()

Returns: int

Return the number of threads in the current running process.

Category:

Debugger Functions


dbg_get_num_watches

int dbg_get_num_watches()

Returns: int

Return the number of watched variables.

Category:

Debugger Functions


dbg_get_parent_class

int dbg_get_parent_class(int class_id, int parent_id, _str &class_name)

Get the name of the specified parent class

Parameters:

class_id - index of class in class table

parent_id - index of parent class (usually '1')

class_name - (referene) name of parent class

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_parent_interface

int dbg_get_parent_interface(int class_id, int parent_id, _str &class_name)

Get the name of the specified interface implemented by the given class.

Parameters:

class_id - index of class in class table

parent_id - index of interface

class_name - (referene) name of parent class

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_register

int dbg_get_register(int reg_id, _str &name, _str &value)

Get the details about a register.

Parameters:

reg_id - index of register in the register table

name - (reference) name of register

value - (reference) value stored in register

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_runtime_expr

int dbg_get_runtime_expr(int i, _str &expr)

Return the i'th system runtime exclude expression

Parameters:

i - index of runtime expr to get, first index is '1'

expr - (reference) set to runtime exclude name

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_session_name

_str dbg_get_session_name(int session_id)

Return the session name for the given session ID

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: _str

NULL on failure, otherwise return session name

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_find_session, dbg_set_session_name


dbg_get_source_dir

int dbg_get_source_dir(int i, _str &source_dir)

Return the i'th source source file path

Parameters:

i - index of source directory to get, first index is '1'

source_dir - (reference) set to source directory name

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_supported_format_list

void dbg_get_supported_format_list(int(&base_list)[])

Gets a list of valid bases

Parameters:

base_list - array to store list of bases in

Category:

Debugger Functions


dbg_get_suspended

int dbg_get_suspended(int thread_id, _str &name, _str &group_name, int &flags)

Get the details about a suspended thread. Note that the index of a suspended thread is not technically the same as the index of that same thread on the complete threads table. It is the n'th thread on the threads table which has the 'suspended' flag set.

Parameters:

thread_id - index of suspend thread in thread table

name - (reference) thread name

group_name - (reference) thread group name

flags - (reference) bitset of DEBUG_MODEL_THREAD_FLAGS_

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_thread

int dbg_get_thread(int thread_id, _str &name, _str &group_name, int &flags)

Get the details about a thread.

Parameters:

thread_id - index of suspend thread in thread table

name - (reference) thread name

group_name - (reference) thread group name

flags - (reference) bitset of DEBUG_MODEL_THREAD_FLAGS_

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_threadgroup

int dbg_get_threadgroup(int threadgroup_id, _str &name, _str &group_name)

Get the details about the specified thread group.

Parameters:

threadgroup_id - index of thread group in table

name - (reference) name of thread group

group_name - (reference) name of parent thread group

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_var_format

int dbg_get_var_format(_str var_name)

Gets the base for a variable

Parameters:

var_name - name of variable to get base for

Returns: int

base of variable specified by var_name

Category:

Debugger Functions


dbg_get_watch

int dbg_get_watch(int thread_id, int frame_id, int watch_id, int &tab_number, _str &expr, _str &context_name, _str &value, int &expandable, int &base)

Get the details about a watched variable.

Parameters:

thread_id - (optional, use 0) index of thread

frame_id - (optional, use 0) index of stack frame

watch_id - index of variable in list of watches

tab_number - (reference) [1-4], which watch tree to insert into

expr - (reference) expression to watch

context_name - (reference) the context to evaluate watch in

value - (reference) value of variable

expandable - (reference) set to 1 if this node is expandable

base - (reference) base to display this variable's value in

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_get_watch_info

int dbg_get_watch_info(int thread_id, int frame_id, _str watch_path, _str &name, _str &class_name, _str &signature, _str &value, int &flags)

Get the details about a variable or expanded watch variable

Parameters:

thread_id - index of thread

frame_id - index of stack frame

watch_path - path to auto-watch variable in tree

name - (reference) name of variable

class_name - (reference) name of class the member is in

signature - (reference) type of variable

value - (reference) value of variable

flags - (reference) set to bitset of DEBUG_MODEL_FLAGS_

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_have_autovars

int dbg_have_autovars(int thread_id, int frame_id)

Are the auto-watch variables up-to-date for the given thread and frame?

Parameters:

thread_id - index of thread

frame_id - index of stack frame

Returns: int

1 if up-to-date, 0 if not, <0 on error.

Category:

Debugger Functions


dbg_have_updated_disassembly

int dbg_have_updated_disassembly(_str file_name)

Is the disassembly up to date for this source file?

Parameters:

file_name - name of source file to check for disassembly

Returns: int

'true' if the disassembly is up to date. Returns <0 on error.

Category:

Debugger Functions


dbg_have_updated_threads

int dbg_have_updated_threads()

Returns: int

'true' if the threads are up to date. Returns <0 on error.

dbg_clear_threads() will mark the threads as stale.

Category:

Debugger Functions

See Also:

dbg_clear_threads, dbg_add_thread, dbg_get_thread


dbg_initialize

_command int dbg_initialize()

Initialize the debugger library and prepare to connect to one or more debugging sessions.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_invalidate_views

int dbg_invalidate_views()

Indicate that all the views need to be refreshed.

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_is_runtime_expr

int dbg_is_runtime_expr(_str name)

Check if the given item is in the system runtime exclude list

Parameters:

name - String to check (usually a package/class name)

Returns: int

1 if excluded, 0 otherwise

Category:

Debugger Functions


dbg_is_session_active

int dbg_is_session_active(int session_id)

Return true if the given session is active.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

true (1) if the session is active, 0 otherwise.

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_find_session, dbg_get_session_name


dbg_remove_breakpoint

int dbg_remove_breakpoint(int breakpoint_id)

Remove the given breakpoint. Note that the breakpoint must be disabled first using the package-specific disable routine. Otherwise an error is returned.

Parameters:

breakpoint_id - Breakpoint to remove

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_remove_exception

int dbg_remove_exception(int exception_id)

Remove the given exception. Note that the exception must be disabled first using the package-specific disable routine. Otherwise an error is returned.

Parameters:

exception_id - Exception to remove

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_remove_watch

int dbg_remove_watch(int watch_id)

Remove the given watch variable/expression.

Parameters:

watch_id - Watch to remove

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_resolve_path

int dbg_resolve_path(_str file_name, _str &full_path)

Attempt to quickly resolve the path to the given source file. First it checks the "source file" to "resolved file" cached mapping. If that fails, it tries to find the file in one of the source dirs.

Parameters:

file_name - source file name (with extension)

full_path - (reference) fully resolved, absolute path name

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_session_detach

int dbg_session_detach(int session_id)

Detach from the debugging session and leave the application running.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_detach(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_disable_breakpoint

int dbg_session_disable_breakpoint(int session_id, int breakpoint_id)

Disable the given breakpoint

Parameters:

session_id - debugger session ID (1 .. max_session)

breakpoint_id - Breakpoint to disable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_disable_breakpoint(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_disable_exception

int dbg_session_disable_exception(int session_id, int exception_id)

Disable the given exception

Parameters:

session_id - debugger session ID (1 .. max_session)

exception_id - Exception to disable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_disable_exception(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_disable_watchpoint

int dbg_session_disable_watchpoint(int session_id, int breakpoint_id)

Disable the given watchpoint

Parameters:

session_id - debugger session ID (1 .. max_session)

breakpoint_id - Watchpoint to disable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_disable_watchpoint(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_do_command

int dbg_session_do_command(int session_id, _str command, _str &reply, _str &errmsg, boolean parse_reply)

Send the given command to the debugger and get the result including both normal result ouput, and possible error output.

Parameters:

session_id - debugger session ID (1 .. max_session)

command - debugger command to send

reply - command reply data

errmsg - output skimmed from stderr

parse_reply - parse the command reply, or just return string?

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   _str reply, errmsg;
   int status = dbg_session_do_command(session_id,
                                       "-insert-symbols vsapi.so",
                                       reply, errmsg);
   if (status) {
      _message_box("error = " :+ errmsg);
      return status;
   }
   _message_box("result = " :+ reply);

Category:

Debugger Functions


dbg_session_enable_breakpoint

int dbg_session_enable_breakpoint(int session_id, int breakpoint_id)

Enable the given breakpoint

Parameters:

session_id - debugger session ID (1 .. max_session)

breakpoint_id - Breakpoint to enable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_enable_breakpoint(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_enable_exception

int dbg_session_enable_exception(int session_id, int exception_id)

Enable the given exception

Parameters:

session_id - debugger session ID (1 .. max_session)

exception_id - Exception to enable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_enable_exception(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_enable_watchpoint

int dbg_session_enable_watchpoint(int session_id, int breakpoint_id)

Enable the given watchpoint

Parameters:

session_id - debugger session ID (1 .. max_session)

breakpoint_id - Watchpoint to enable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_enable_watchpoint(session_id, 1);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_error_message

int dbg_session_error_message(int session_id, _str &errmsg)

Get the last error message returned by the debugger from a failed command.

Parameters:

session_id - debugger session ID (1 .. max_session)

errmsg - error message from debugger

Returns: int

0 on success, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_session_eval_condition

int dbg_session_eval_condition(int session_id, int thread_id, int frame_id, _str expr)

Parse a conditional expression in the current thread and frame.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - current thread

frame_id - current stack frame

expr - expression to parse

Returns: int

0 if the expression evaluates to false, 1 for true, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_session_eval_expression

int dbg_session_eval_expression(int session_id, int thread_id, int frame_id, _str expr, _str &value)

Parse an expression in the current thread and frame.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - current thread

frame_id - current stack frame

expr - expression to parse

value - (reference) set to value of expression

Returns: int

0 on success, <0 on error evaluating.

Since:

10.0

Category:

Debugger Functions


dbg_session_expand_auto_watch

int dbg_session_expand_auto_watch(int session_id, int thread_id, int frame_id, _str autovar_path)

Expand the watched variable at the given variable path for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

autovar_path - path to watched variable to expand

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To expand the structured field at ID 5 under the auto watch with ID 8 in the current thread and the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_expand_auto_watch(session_id, thread_id, 1, "8 5");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_expand_class

int dbg_session_expand_class(int session_id, _str class_path)

Update the items under a class recursively. This includes methods, static members, fields, and parent classes.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_path - List of class ID's and field ID's to expand

Returns: int

0 on success, <0 on failure

Since:

10.0

Example:

To expand the class with class ID 34:

   int status = dbg_session_expand_class(session_id, "34");
   if (status) {
      return status;
   }

To expand a structured static class member with ID 39 under class ID 34:

   int status = dbg_session_expand_class(session_id, "34 39");
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_expand_fields

int dbg_session_expand_fields(int session_id, int class_id)

Update the fields under a class.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_id - index of class to get fields of

Returns: int

0 on success, <0 on failure

Since:

10.0

Category:

Debugger Functions


dbg_session_expand_local

int dbg_session_expand_local(int session_id, int thread_id, int frame_id, _str local_path)

Expand the local variable at the given local variable path for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

local_path - path to local variable to expand

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To expand the structured local at ID 5 under the local with ID 8 in the current thread and the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_expand_local(session_id, thread_id, 1, "8 5");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_expand_member

int dbg_session_expand_member(int session_id, int thread_id, int frame_id, _str member_path)

Expand the member variable at the given member variable path for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

member_path - path to member variable to expand

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To expand the structured member at ID 5 under the member with ID 8 in the current thread and the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_expand_member(session_id, thread_id, 1, "8 5");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_expand_methods

int dbg_session_expand_methods(int session_id, int class_id)

Update the methods under a class.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_id - index of class in class table

Returns: int

0 on success, <0 on failure

Since:

10.0

Category:

Debugger Functions


dbg_session_expand_nested

int dbg_session_expand_nested(int session_id, int class_id)

Update the nested classes under a class.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_id - index of class to get fields of

Returns: int

0 on success, <0 on failure

Since:

10.0

Category:

Debugger Functions


dbg_session_expand_parents

int dbg_session_expand_parents(int session_id, int class_id)

Update the parent classes under a class.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_id - index of class to get fields of

Returns: int

0 on success, <0 on failure

Since:

10.0

Category:

Debugger Functions


dbg_session_expand_watch

int dbg_session_expand_watch(int session_id, int thread_id, int frame_id, _str watch_path)

Expand the watched variable at the given variable path for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

watch_path - path to watched variable to expand

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To expand the structured field at ID 5 under the watch with ID 8 in the current thread and the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_expand_watch(session_id, thread_id, 1, "8 5");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_finalize

int dbg_session_finalize(int session_id)

Stop debugging and close the connection to the debugger.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_finalize(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_get_paths

int dbg_session_get_paths(int session_id, _str &cwd, _str &user, _str &sys)

Parameters:

session_id - debugger session ID (1 .. max_session) Get the user and system class paths for this debugging session.

cwd - Set to the base directory or working directory

user - Set to user path, delimited by newlines

sys - Set to system path, delimited by newlines

Returns: int

0 on success, <0 on error

Since:

10.0

Example:

   _str cwd, user, sys;
   int status = dbg_session_get_paths(session_id, cwd, user, sys);
   if (status) {
      return status;
   }
   _message_box("cwd=" :+ cwd :+ "\n" :+
                "user=" :+ user :+ "\n" :+
                "sys=" :+ sys :+ "\n");

Category:

Debugger Functions


dbg_session_handle_event

int dbg_session_handle_event(int session_id, _str &event_kind, int &event_flags, int &event_thread, _str &event_class, int &breakpoint_id)

Handle the next event from this debugging session's event queue. This function returns '0' if the event was handled and disposed of. Otherwise, it will return '1', indicating that you need to handle the event yourself.

Parameters:

session_id - debugger session ID (1 .. max_session)

event_kind - (reference) kind of event, including:

  • "step"
  • "breakpoint"
  • "frame_pop"
  • "exception"
  • "user"
  • "thread_start"
  • "thread_stop"
  • "class_prepare"
  • "class_unload"
  • "class_load"
  • "field_access"
  • "field_modify"
  • "catch"
  • "method_entry"
  • "method_exit"
  • "vm_start"
  • "vm_stop"

event_flags - (reference) Event handling flags, what needs updating?

  • VSDEBUG_EVENT_SUSPEND_ALL
  • VSDEBUG_EVENT_SUSPEND_THREAD
  • VSDEBUG_EVENT_GOTOPC
  • VSDEBUG_EVENT_CHANGE_THREAD
  • VSDEBUG_EVENT_UPDATE_CLASSES
  • VSDEBUG_EVENT_UPDATE_REGS
  • VSDEBUG_EVENT_UPDATE_MEMORY
  • VSDEBUG_EVENT_UPDATE_THREADS
  • VSDEBUG_EVENT_UPDATE_STACK
  • VSDEBUG_EVENT_UPDATE_VARS

event_thread - (reference) ID of thread event occurred in

event_class - (reference) Class that event occurred in

breakpoint_id - (reference) ID of breakpoint for breakpoint events

Returns: int

0 on success, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_session_initialize

int dbg_session_initialize(int session_id, _str host_or_program, _str port_or_pid, _str arguments, int timeout, _str debugger_path, _str debugger_args)

Initialize the connection to the debugger

Parameters:

session_id - debugger session ID (1 .. max_session)

host_or_program - The usage of this argument may vary between debuggers and types of connections. For example:

  • host -- Name of host to connect to. If the host name is the empty string, assume 'localhost'
  • program -- Program to debug. If we are attaching to a port this parameter is still useful becuase it is needed for loading debugging information

port_or_pid - The usage of this argument may vary between debuggers and types of connections. For example:

  • port -- Port to connect to. This corresponds to the host parameter above. Default is 8000
  • pid -- Process ID to attach to

arguments - Command line arguments to pass to program

timeout - Timeout for connection and debugger communication in milliseconds

debugger_path - Path to debugger executable

debugger_args - Additional arguments needed to invoke debugger

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To connect to the local host on port 8000 with a 10 second timeout:

   int status = dbg_session_initialize(session_id, "", 8000, 10000, NULL, NULL);
   if (status) {
      return status;
   }

To debug the 'hellow" program and pass it arguments "1 2 3 4" with a 10 second timeout:

   int status = dbg_session_initialize(session_id, "hellow", 0, "1 2 3 4", 10000, NULL, NULL);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_interrupt

int dbg_session_interrupt(int session_id, int thread_id)

Interrupt the execution of a specific thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - ID of specific thread to interrupt

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To interpret the thread id 7:

   int status = dbg_session_interrupt(session_id, 7);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_is_implemented

int dbg_session_is_implemented(int session_id, int capability)

Check if the given debugger session implements the given capability.

Parameters:

session_id - debugger session ID (1 .. max_session)

capability - debugger capability (DEBUG_CAPABILITY_*)

Returns: int

>0 if the feature is implemented, 0 if not, <0 on error.

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_session_is_name_implemented


dbg_session_is_name_implemented

int dbg_session_is_name_implemented(int session_id, _str capability)

Check if the given debugger session implements the given capability.

Parameters:

session_id - debugger session ID (1 .. max_session)

capability - debugger capability

Returns: int

1 if the feature is implemented, 0 if not, <0 on error.

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_session_is_implemented


dbg_session_modify_auto_watch

int dbg_session_modify_auto_watch(int session_id, int thread_id, int frame_id, _str autovar_path, _str new_value)

Modify the value of the specified auto watch expression in the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

watch_path - path to local variable to expand

new_value - value to set variable to

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To change the value of the the auto watch with ID 8 in the current thread and the top-most stack frame to 48:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_modify_auto_watch(session_id, thread_id, 1, "8", "48");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_modify_field

int dbg_session_modify_field(int session_id, _str field_path, _str new_value)

Modify the value of the specified field of the specified class.

Parameters:

session_id - debugger session ID (1 .. max_session)

field_path - path to field to modify

new_value - value to set variable to

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To change the value of the the field with ID 8 under the class with ID 22 to the integer value 48:

  int status = dbg_session_modify_field(session_id, "8 22", "48");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_modify_local

int dbg_session_modify_local(int session_id, int thread_id, int frame_id, _str local_path, _str new_value)

Modify the value of the specified local variable in the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

local_path - path to local variable to expand

new_value - value to set variable to

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To change the value of the the local with ID 8 in the current thread and the top-most stack frame to 48:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_modify_local(session_id, thread_id, 1, "8", "48");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_modify_member

int dbg_session_modify_member(int session_id, int thread_id, int frame_id, _str member_path, _str new_value)

Modify the value of the specified member variable in the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

local_path - path to local variable to expand

new_value - value to set variable to

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To change the value of the the class member with ID 8 in the current thread and the top-most stack frame to 48:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_modify_member(session_id, thread_id, 1, "8", "48");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_modify_watch

int dbg_session_modify_watch(int session_id, int thread_id, int frame_id, _str watch_path, _str new_value)

Modify the value of the specified watch expression in the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

watch_path - path to local variable to expand

new_value - value to set variable to

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To change the value of the the watch with ID 8 in the current thread and the top-most stack frame to 48:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_modify_watch(session_id, thread_id, 1, "8", "48");
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_print_error

int dbg_session_print_error(int session_id, _str error_str)

Send an error string directly to vsdebugio stderr.

Parameters:

session_id - debugger session ID (1 .. max_session)

error_str - String to send to stderr.

Returns: int

0 on success, <0 on error evaluating.

Since:

10.0

Category:

Debugger Functions


dbg_session_print_info

int dbg_session_print_info(int session_id, _str info_str)

Send an informational message string directly to vsdebugio stdout.

Parameters:

session_id - debugger session ID (1 .. max_session)

info_str - String to send to stdout.

Returns: int

0 on success, <0 on error evaluating.

Since:

10.0

Category:

Debugger Functions


dbg_session_print_output

int dbg_session_print_output(int session_id, _str output_str)

Send a output string directly to vsdebugio stdout.

Parameters:

session_id - debugger session ID (1 .. max_session)

output_str - String to send to stdout.

Returns: int

0 on success, <0 on error evaluating.

Since:

10.0

Category:

Debugger Functions


dbg_session_probe_breakpoint

int dbg_session_probe_breakpoint(int session_id, _str class_name, _str method_name, _str file_name, int line_number)

Probe if a breakpoint can be set on the given line and return the corrected line, file, class, and method that the breakpoint would be placed at.

Parameters:

session_id - debugger session ID (1 .. max_session)

class_name - name of class breakpoint is in

method_name - name of function breakpoint is in

file_name - name of file breakpoint is in

line_number - line number in file breakpoint is in

Returns: int

"fixed" line number >0 on success, <0 on error.

Since:

10.0

Example:

To probe setting a breakpoint in a function name "xmain" in a class named "Application":

   int status = dbg_session_probe_breakpoint(session_id,
                                             "Application", "xmain",
                                             "cfront.c", 0);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_reload

int dbg_session_reload(int session_id, _str file_names, int options)

Reload the given module into the debugger and continue debugging.

Parameters:

session_id - debugger session ID (1 .. max_session)

file_names - Modules (class files) to reload

options - System-specific options

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_reload(session_id, "mylibrary.so", 0);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_resolve_path

int dbg_session_resolve_path(int session_id, _str file_name, _str &full_path)

Resolve the path to the given source file using debugger-specific lookup methods.

Parameters:

session_id - debugger session ID (1 .. max_session)

file_name - source file name (with extension)

full_path - (reference) fully resolved, absolute path name

Returns: int

0 on success, <0 on error

Since:

10.0

Category:

Debugger Functions


dbg_session_restart

int dbg_session_restart(int session_id)

Restart the program running under the debugger and step into it. Resets all breakpoints. Note that this maintains the existing connections to the debugger and vsdebugio (where applicable).

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To restart an active debug session.

   int status = dbg_session_restart(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_resume

int dbg_session_resume(int session_id, int thread_id)

Continue execution of the for the entire debugging session, or a specific thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - "0" to continue all threads, otherwise, a specific thread to continue.

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To continue all threads:

   int status = dbg_session_resume(session_id);
   if (status) {
      return status;
   }

To continue only the "current" thread:

   int thread_id = dbg_get_cur_thread();
   if (thread_id < 0) {
       return thread_id;
   }
   int status = dbg_session_resume(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_send_direct_input

int dbg_session_send_direct_input(int session_id, _str input_str)

Send input text directly to debugger. This will be interpreted as debugee input by the debugger.

Parameters:

session_id - debugger session ID (1 .. max_session)

input_str - String to send to debugger tty.

Returns: int

0 on success, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_session_set_instruction_pointer

int dbg_session_set_instruction_pointer(int session_id, int thread_id, int frame_id, _str class_name, _str method_name, _str file_name, int line_number, _str address)

Set the instruction pointer for the top frame in the given thread to correspond to the given file/line/address. NOTE: typically the 'frame_id' is ignored, only the top frame can be modified.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID for instruction pointer to change

frame_id - Frame ID to modify instruction pointer for

class_name - name of class breakpoint is restricted to

method_name - name of method breakpoint is set in

file_name - name of file breakpoint is in

line_number - line number breakpoint occurs at

address - hex instruction address to set breakpoint at

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To move the instruction pointer to line 48:

   int thread_id = dbg_get_cur_thread();
   int frame_id = dbg_get_cur_frame(thread_id);

   _str file_name;
   int line_number=0;
   int status = dbg_get_frame_path(thread_id, frame_id,
                                   file_name, line_number);
   if (status) {
      return status;
   }

   int status = dbg_session_set_instruction_pointer(thread_id, frame_id,
                                                    "", "", file_name, 48);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_step_instruction

int dbg_session_step_instruction(int session_id, int thread_id)

Step by the minimal amount possible, for C++, this means step into the assembly code for a statement.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to step

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_step_instruction(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_step_into

int dbg_session_step_into(int session_id, int thread_id)

If the next statement is a function call, step into the function, otherwise, step to the next simple statement.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to step

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_step_into(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_step_into_runtimes

int dbg_session_step_into_runtimes(int session_id, int thread_id)

If the next statement is a function call, step into the function, even if it is a builtin or runtime function, otherwise, step to the next simple statement.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to step

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_step_into_runtimes(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_step_out

int dbg_session_step_out(int session_id, int thread_id)

Step out of the current function and back into the calling function.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to step

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_step_out(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_step_over

int dbg_session_step_over(int session_id, int thread_id)

Step over the current statement or function call.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to step

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_step_over(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_suspend

int dbg_session_suspend(int session_id, int thread_id)

Suspend the entire debugging session or suspend a specific thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - "0" to suspend all threads, otherwise, a specific thread ID to suspend.

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To suspend all threads:

   int status = dbg_session_suspend(session_id);
   if (status) {
      return status;
   }

To suspend only the "current" thread:

   int thread_id = dbg_get_cur_thread();
   if (thread_id < 0) {
       return thread_id;
   }
   int status = dbg_session_suspend(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_terminate

int dbg_session_terminate(int session_id, int exit_code)

Stop the debugger and terminate execution.

Parameters:

session_id - debugger session ID (1 .. max_session)

exit_code - exit code for halted executable

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_terminate(session_id, 0);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_test_version

int dbg_session_test_version(int session_id, _str debugger_path, _str &version, int timeout)

Test the given debugger executable for version compability. This command is used outside of a debugging session to query if a particular debugger executable is compatible.

Parameters:

session_id - debugger session ID (1 .. max_session)

debugger_path - Path to debugger executable to test

version - On success, set to the version number

timeout - Connection timeout in milliseconds

Returns: int

1 on success, 0 on successful failure, <0 on serious failure (not executable, file not found)

Since:

10.0

Example:

To test the GDB supplied with cygwin, for example

   _str version;
   int status = dbg_session_test_version(session_id,
                                         'C:\cygwin\bin\gdb.exe',
                                         version,10000);
   if (status==0) {
      _message_box("Inadaquate GDB version");
   } else if (status<0) {
      _message_box("GDB executable failure: ":+get_message(status));
   } else {
      _message_box("GDB version is good");
   }

Category:

Debugger Functions


dbg_session_update_auto_watches

int dbg_session_update_auto_watches(int session_id, int thread_id, int frame_id)

Update the watched variables for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To update all automatic watch variables in the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_update_auto_watches(session_id, thread_id, 1);
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_update_classes

int dbg_session_update_classes(int session_id)

Update the list of classes loaded by the system being debugged.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error

Since:

10.0

Example:

   int status = dbg_session_update_classes(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_update_disassembly

int dbg_session_update_disassembly(int session_id, _str file_name, int start_line, int num_lines)

Update the dissassembler output associated with the given stack frame.

Parameters:

file_name - Name of source file to disassemble

start_line - First line to disassemble

num_lines - Number of lines in the source file

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = debugger->updateDisassembly("myfile.cpp", 1, 100);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_update_locals

int dbg_session_update_locals(int session_id, int thread_id, int frame_id)

Update the local variables for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To update the local variables in the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_update_locals(session_id, thread_id, 1);
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_update_members

int dbg_session_update_members(int session_id, int thread_id, int frame_id)

Update the list of fields in the current class for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To update the class members in the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_update_members(session_id, thread_id, 1);
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_update_memory

int dbg_session_update_memory(int session_id, _str address, int size)

Update the watched memory region.

Parameters:

session_id - debugger session ID (1 .. max_session)

address - Start address to dump

size - Number of bytes to dump

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To examine the first 100 bytes of structure pointed to by a variable named 'p':

   int status = dbg_session_update_memory(session_id, "p", 100);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_update_registers

int dbg_session_update_registers(int session_id)

Update the registers and register values.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_update_registers(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_update_stack

int dbg_session_update_stack(int session_id, int thread_id)

Update the stack trace for the indicated thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - Thread ID to update stack for

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int thread_id = dbg_get_cur_thread();
   int status = dbg_session_update_stack(session_id, thread_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions


dbg_session_update_thread_groups

int dbg_session_update_thread_groups(int session_id)

Update the tree of thread groups in this debugging session.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_update_thread_groups(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions

See Also:

dbg_session_update_threads


dbg_session_update_thread_names

int dbg_session_update_thread_names(int session_id)

Update the names of threads and thread groups in this debugging session.

NOTE: You must update the threads and thread groups first.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_update_threads(session_id);
   if (status) {
      return status;
   }
   status = dbg_session_update_thread_groups(session_id);
   if (status) {
      return status;
   }
   status = dbg_session_update_thread_names(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions

See Also:

dbg_session_update_threads, dbg_session_update_thread_groups, dbg_session_update_thread_states


dbg_session_update_thread_states

int dbg_session_update_thread_states(int session_id)

Update the status flags of all threads in this debugging session.

NOTE: You must update the threads first.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_update_threads(session);
   if (status) {
      return status;
   }
   status = dbg_session_update_thread_states(session);
   if (status) {
      return status;
   }

Category:

Debugger Functions

See Also:

dbg_session_update_threads, dbg_session_update_thread_names


dbg_session_update_threads

int dbg_session_update_threads(int session_id)

Update the list of threads running in this debugging session.

A thread has a thread name as well as a thread state.

Fundamentally, the responsibility of this method is to merely identify the active threads and their system thread IDs. Optionally, it may gather the thread names and state information. If it does not, that work is deferred until updateThreadNames() or updateThreadStates() is called.

Parameters:

session_id - debugger session ID (1 .. max_session)

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

   int status = dbg_session_update_threads(session_id);
   if (status) {
      return status;
   }

Category:

Debugger Functions

See Also:

dbg_session_update_thread_names, dbg_session_update_thread_states


dbg_session_update_watches

int dbg_session_update_watches(int session_id, int thread_id, int frame_id, int tab_number)

Update the watched variables for the specified stack frame in the specified thread.

Parameters:

session_id - debugger session ID (1 .. max_session)

thread_id - index of thread in table

frame_id - index of frame in thread's stack

tab_number - which set of watches to update [1-4]

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To update the second watch set in the top-most stack frame:

  int thread_id = dbg_get_cur_thread();
  int status = dbg_session_update_watches(session_id, thread_id, 1, 2);
  if (status) {
     return status;
  }

Category:

Debugger Functions


dbg_session_version

int dbg_session_version(int session_id, _str &description, _str &major_version, _str &minor_version, _str &runtime_version, _str &debugger_name)

Get the version information for the debugger.

Parameters:

session_id - debugger session ID (1 .. max_session)

description - Description of debugger and version

major_version - Major version number

minor_version - Minor version number

runtime_version - Version of runtime environment

debugger_name - Name of debugger

Returns: int

0 on success, <0 on error.

Since:

10.0

Example:

To get the version information for the debugger:

   _str description;
   _str major_version;
   _str minor_version;
   _str runtime_version;
   _str debugger_name;
   int status = dbg_session_version(session_id, description,
                                    major_version, minor_version,
                                    runtime_version, debugger_name);
   if (status) {
      return status;
   }
   _message_box("description=" :+ description :+ "\n" :+
                "major=" :+ major_version :+ "\n" :+
                "minor=" :+ minor_version :+ "\n" :+
                "runtime=" :+ runtime_version :+ "\n" :+
                "debugger_name=" :+ debugger_name);

Category:

Debugger Functions


dbg_set_breakpoint_enabled

int dbg_set_breakpoint_enabled(int breakpoint_id, int enabled)

Enable or disable the given breakpoint. Note that this function should be called only when outside of debugging mode. Normally, you would use the packge-specific callback to enable a breakpoint.

Parameters:

breakpoint_id - Breakpoint to enable

enabled - True of false

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_breakpoint_location

int dbg_set_breakpoint_location(int breakpoint_id, _str file_name, int line_number, _str address)

Modify the file, line, and address location information for a breakpoint.

Parameters:

breakpoint_id - Breakpoint to enable

file_name - file breakpoint is set in

line_number - line number to set breakpoint at

address - breakpoint address

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_breakpoint_scope

int dbg_set_breakpoint_scope(int breakpoint_id, _str class_name, _str method_name)

Modify the class name / method scope for a breakpoint.

Parameters:

breakpoint_id - Breakpoint to enable

class_name - class that breakpoint is set in

method_name - name of function breakpoint is set in

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_cur_frame

int dbg_set_cur_frame(int thread_id, int frame_id)

Sets the current frame index as specified.

Parameters:

thread_id - Frame to set frame ID for

frame_id - New current frame index

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_cur_suspended_thread

int dbg_set_cur_suspended_thread(int thread_id)

Sets the current thread index to the n'th suspended thread.

Parameters:

thread_id - New current thread index

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_cur_thread

int dbg_set_cur_thread(int thread_id)

Sets the current thread index as specified.

Parameters:

thread_id - New current thread index

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_current_session

int dbg_set_current_session(int new_session_id)

Designate a new session to be the active debugger session.

Returns: int

the previous active session ID, 0 if none, <0 on error.

Since:

10.0

Category:

Debugger Functions


dbg_set_exception_enabled

int dbg_set_exception_enabled(int exception_id, int enabled)

Enable or disable the given exception. Note that this function should be called only when outside of debugging mode. Normally, you would use the packge-specific callback to enable a exception.

Parameters:

exception_id - Exception to remove

enabled - True of false

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_field

int dbg_set_field(int class_id, int field_id, _str value)

Set the value of a field in a class

Parameters:

class_id - index of class in class table

field_id - index of field within class

value - (reference) new value of field

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_frame_path

int dbg_set_frame_path(int thread_id, int frame_id, _str full_path)

Save the resolved (full) file path to the given stack frame.

Parameters:

thread_id - index of thread to get stack frame from

frame_id - index of frame in stack frame list

full_path - path to file that stack frame is positioned at

Returns: int

0 on success, <0 on error

Category:

Debugger Functions


dbg_set_global_format

void dbg_set_global_format(int new_base)

Sets the current global base

Parameters:

new_base - base to set as global base

Category:

Debugger Functions


dbg_set_local

int dbg_set_local(int thread_id, int frame_id, _str local_path, _str value)

Set the value of a local variable in the current stack frame.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

local_path - path to local in list of local variables

value - new value to set local variable to

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_member

int dbg_set_member(int thread_id, int frame_id, _str member_path, _str value)

Set the value of a member of 'this' object.

Parameters:

thread_id - index of thread

frame_id - index of stack frame

member_path - path to member in list of member variables

value - new value to set member to

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_register

int dbg_set_register(int reg_id, _str value)

Set the value of a system register.

Parameters:

reg_id - index of register in register table

value - new value to set register to

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_set_session_name

int dbg_set_session_name(int session_id, _str session_name)

Modify the session name for the given session ID

Parameters:

session_id - debugger session ID (1 .. max_session)

session_name - new name for session

Returns: int

0 on success, <0 on failure

Since:

10.0

Category:

Debugger Functions

See Also:

dbg_find_session, dbg_get_session_name


dbg_set_var_format

void dbg_set_var_format(_str var_name, int new_base)

Sets the base for a variable

Parameters:

var_name - name of variable to set base for

new_base - new base for a variable

Category:

Debugger Functions


dbg_set_watch

int dbg_set_watch(int watch_id, _str expr, _str context_name, int base)

Modify a watch expression.

Parameters:

watch_id - watch to modify

expr - expression to evaluate

context_name - context to evaluate expression in

base - base to display value in

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_toggle_disassembly

int dbg_toggle_disassembly(_str file_name, int on_off)

Toggle whether the disassembly lines for the given file name should be displayed or not.

Parameters:

file_name - source file to remove disassembly for

on_off - new setting for displaying disassembly use -1 to query value

Returns: int

'true' if the disassembly is to be displayed, false if not, <0 on error.

Category:

Debugger Functions


dbg_translate_capability

int dbg_translate_capability(_str capability)

Convert the named debugger capability to an int in the capability enumeration type.

Parameters:

capability - name of capability to look up

  • initialize -- initialize debugger connection
  • finalize -- clean up debugger connection
  • terminate -- stop debugging
  • detach -- detach from debugging session
  • restart -- restart from start of program
  • do_command -- perform debugger command
  • error_message -- get last error message
  • print_output -- print output to vsdebugio
  • print_info -- send info to vsdebugio
  • print_error -- send error message to vsdebugio
  • send_direct_input -- send input to direct to debugee
  • version -- get version of debugger
  • test_version -- test version of debugger
  • reload -- reload module and continue
  • get_paths -- get debugger paths
  • resolve_path -- resolve source file path
  • suspend -- suspend execution
  • resume -- resume execution
  • interrupt -- send interrupt to thread
  • step_into -- step into function
  • step_over -- step over statement
  • step_out -- step out of function
  • step_into_runtimes -- step into runtime function
  • step_instr -- step by instruction
  • set_instruction_pointer -- move instruction pointer
  • disable_breakpoint -- disable breakpoint
  • enable_breakpoint -- enable breakpoint
  • probe_breakpoint -- test breakpoint
  • disable_watchpoint -- disable watchpoint
  • enable_watchpoint -- enable watchpoint
  • disable_exception -- disable exception
  • enable_exception -- enable exception
  • handle_event -- poll for asynchronous event
  • update_threads -- update thread list
  • update_thread_groups -- update thread group tree
  • update_thread_names -- update thread names
  • update_thread_states -- update thread states
  • update_stack -- update stack
  • update_locals -- update local variables
  • expand_local -- expand local variable
  • modify_local -- modify local variable
  • update_members -- update class members variables
  • expand_member -- expand class member variable
  • modify_member -- modify class member variable
  • update_watches -- update user defined watches
  • expand_watch -- expand watch variable
  • modify_watch -- modify watch variable
  • update_auto_watches -- update auto watch variables
  • expand_auto_watch -- expand auto watch variable
  • modify_auto_watch -- modify auto watch variable
  • eval_condition -- evaluate condition
  • eval_expression -- evaluate expression
  • update_classes -- update classes
  • expand_class -- expand class members
  • expand_methods -- expand class methods
  • expand_fields -- expand class fields
  • expand_nested -- expand inner classes
  • expand_parents -- expand class parents
  • modify_field -- modify static class field
  • update_registers -- update registers
  • update_memory -- update memory contents

Returns: int

DEBUG_CAPABILITY_NOT_FOUND if no such capability exists, otherwise, it returns the debugger capability index.

Since:

10.0

Example:

To look up the capability ID for initialize

   int cap = dbg_translate_capability("initialize");
   return cap;

Category:

Debugger Functions


dbg_update_autos_tree

int dbg_update_autos_tree(int tree_wid, int tree_index, int thread_id, int frame_id, _str autovar_path=null)

Update the display of auto-watched variables. Each variable has two columns:

  • Name
  • Value

Parameters:

tree_wid - window ID of tree control

tree_index - Index to insert variables at (TREE_ROOT_INDEX)

thread_id - index of thread

frame_id - index of stack frame

autovar_path - (optional) position to start updating tree at

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_breakpoints_tree

int dbg_update_breakpoints_tree(int tree_wid, int tree_index, _str rel_dir, int pic_enabled, int pic_disabled)

Update the display of currently set breakpoints. Each breakpoint has four columns:

  • Class
  • Method
  • File
  • Line

Parameters:

tree_wid - window ID of tree control

tree_index - Index to insert variables at (TREE_ROOT_INDEX)

rel_dir - Show breakpoint file names relative to this directory

pic_enabled - bitmap to display for an enabled breakpoint

pic_disabled - bitmap to display for a disabled breakpoint

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_class_list

int dbg_update_class_list(int list_wid, _str parent_class)

Update the list of classes with the information retrieved by the debugger system. The classes are inserted with their names only.

Parameters:

list_wid - window ID of tree control

parent_class - (optional) last classes that derive from a this class

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_class_tree

int dbg_update_class_tree(int tree_wid, int tree_index, _str class_path, boolean hide_system=false)

Update the debugger class browser tree with the information retrieved by the debugger system. The list has three columns:

  • Class name
  • Outer class name (or package name)
  • Class status (loaded, prepred, unloaded)

Parameters:

tree_wid - window ID of tree control

tree_index - Index of tree control to update under

class_path - Path to members under class to expand

hide_system - Hide system classes

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_disassembly

int dbg_update_disassembly(int editorctl, _str file_name)

Update the imaginary lines representing the disassembly for the given buffer and editor control.

Parameters:

editorctl - window ID of the editor control

file_name - name of buffer to update

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_editor_breakpoints

int dbg_update_editor_breakpoints()

Update the editor controls with the breakpoints

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_editor_stack

int dbg_update_editor_stack(int thread_id, int frame_id)

Update the editor controls with the stack information

Parameters:

thread_id - Thread ID to look at stack for

frame_id - ID of Stack frame to inspect

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_exceptions_tree

int dbg_update_exceptions_tree(int tree_wid, int tree_index, int pic_enabled, int pic_disabled)

Update the display of currently set exception breakpoints. Each exception breakpoint has two columns:

  • Class name
  • Thrown, Caught, or Uncaught

Parameters:

tree_wid - window ID of tree control

tree_index - Index to insert variables at (TREE_ROOT_INDEX)

pic_enabled - bitmap to display for an enabled breakpoint

pic_disabled - bitmap to display for a disabled breakpoint

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_group_tree

int dbg_update_group_tree(int tree_wid, int tree_index)

Update the thread groups tree with the information retrieved by the debugger system.

Parameters:

tree_wid - window ID of tree control

tree_index - tree index to insert under (TREE_ROOT_INDEX)

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_locals_tree

int dbg_update_locals_tree(int tree_wid, int tree_index, int thread_id, int frame_id, _str local_path=null)

Update the list of local variables for the specified stack frame within the given thread. Each local has three columns:

  • variable bitmap (variable or parameter)
  • local variable name
  • value of variable

Parameters:

tree_wid - window ID of tree control

tree_index - Index to insert under (TREE_ROOT_INDEX)

thread_id - Thread ID to look at stack for

frame_id - ID of Stack frame to inspect

local_path - (optional) position to start updating tree at

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_members_tree

int dbg_update_members_tree(int tree_wid, int tree_index, int thread_id, int frame_id, _str member_path=null)

Update the list of members of the current class for the specified stack frame within the given thread. Each entry has three columns:

  • bitmap (variable or group)
  • name of variable
  • class name
  • value of variable (editable)

Parameters:

tree_wid - window ID of tree control

tree_index - index to insert under (TREE_ROOT_INDEX)

thread_id - thread ID to inspect

frame_id - stack frame ID to get members in

member_path - (optional) position to start updating tree at

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_registers_tree

int dbg_update_registers_tree(int tree_wid, int tree_index)

Update the list of registers and register values

Parameters:

tree_wid - window ID of tree control

tree_index - tree index to insert under (TREE_ROOT_INDEX)

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_stack_list

int dbg_update_stack_list(int list_wid, int thread_id)

Update the list of functions in the stack dump.

Parameters:

list_wid - List control to insert functions into

thread_id - thread ID to show stack dump for

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_stack_tree

int dbg_update_stack_tree(int tree_wid, int tree_index, int thread_id)

Update the list of functions on the current stack frame. Each entry has two columns:

  • The method name with parameter list
  • The class name

Parameters:

tree_wid - window ID of tree control

tree_index - tree index to insert under (TREE_ROO_INDEX)

thread_id - thread ID to get stack dump for

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_thread_list

int dbg_update_thread_list(int list_wid, boolean only_suspended)

Update a list of suspended threads

Parameters:

list_wid - List control window ID

only_suspended - Only included suspended threads?

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_thread_tree

int dbg_update_thread_tree(int tree_wid, int tree_index)

Update the list of threads in the system. The thread tree has four columns:

  • Thread name
  • Group name
  • Thread status
  • Thread State

Parameters:

tree_wid - window ID of the tree control

tree_index - tree index to insert under (TREE_ROOT_INDEX)

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_update_watches_tree

int dbg_update_watches_tree(int tree_wid, int tree_index, int thread_id, int frame_id, int tab_number, _str watch_path=null)

Update the display of manually-watched variables. Each variable watch has two columns:

  • Name
  • Value

Parameters:

tree_wid - window ID of tree control

tree_index - Index to insert variables at (TREE_ROOT_INDEX)

thread_id - index of thread

frame_id - index of stack frame

tab_number - which tree tab the watch belongs to

watch_path - (optional) position to start updating tree at

Returns: int

0 on success, <0 on error.

Category:

Debugger Functions


dbg_windbg_get_modules

int dbg_windbg_get_modules(_str(&modulelist)[])

Parameters:

modules -

Category:

Debugger Functions


dbg_windbg_write_dumpfile

int dbg_windbg_write_dumpfile(_str filename)

Parameters:

filename -

Category:

Debugger Functions


dde

_command typeless dde(_str params='')

Supported under Windows, Windows NT, and Windows 95/98. When another application wants to communicate with SlickEdit using DDE, the other application should use the server name of 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 SlickEdit to have SlickEdit open the file "c:\junk". The first instance of SlickEdit has the server AND application window name "SlickEdit". All instances of SlickEdit that follow have the server and application window name "SlickEdit Server n" where n starts at 1. Invoke SlickEdit with the +new option to create another instance. The editor_name function may be used to get the server name.

Parameters:

params - params 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.

Category:

Miscellaneous Functions


dderefresh

_command void dderefresh()

Executes the refresh function to update the editor screen after multiple DDE commands have been sent to the editor from another application.

Category:

Miscellaneous Functions


debug_add_breakpoint

_command int debug_add_breakpoint()

Create a new breakpoint or watch point.

Returns: int

breakpoint id > 0 on success, < 0 on error.

Category:

Debugger Commands


debug_add_exception

_command int debug_add_exception(_str expr="")

Add an exception breakpoint for the symbol under the cursor, or if this is not an editor control display dialog to select an exception class to add a breakpoint on.

Category:

Debugger Commands


debug_add_watch

_command int debug_add_watch(_str expr="")

Add a watch on the symbol under the cursor

Category:

Debugger Commands


debug_add_watchpoint

_command int debug_add_watchpoint(_str expr="", _str class_name="", _str field_name="")

Add a watchpoint on the symbol under the cursor

Parameters:

expr - expression to watch

class_name - class that expression's field is in

field_name - field that expression is in

Category:

Debugger Commands


debug_add_watchpoint_on_variable

_command void debug_add_watchpoint_on_variable()

Attempt to add a watchpoint on the selected local, member, or auto watch variable.

Category:

Debugger Commands


debug_attach

_command int debug_attach(_str debug_cb_name=_project_DebugCallbackName, _str attach_info="", _str session_name="")

Attach the debugger to a process not managed by the editor, such as a Java application being ran remotely, or a running process.

The attach_info depends on the target debugger.

  • GDB -- pid=[process_id],app=[program_path]
  • Java -- host=[host_name],port=[port_number]

Parameters:

debug_cb_name - debugger system callback name (gdb, jdwp, or dotnet)

attach_info - parameters for attaching to the process

Category:

Debugger Commands


debug_breakpoints

_command int debug_breakpoints()

Display the breakpoints toolbar

Category:

Debugger Commands


debug_class_break

_command void debug_class_break()

Set a breakpoint on the selected method

Category:

Debugger Commands


debug_class_collapse

_command void debug_class_collapse()

Collapse everything in the class tree

Category:

Debugger Commands


debug_class_exception

_command void debug_class_exception()

Set an uncaught exception breakpoint on the selected method

Category:

Debugger Commands


debug_class_props

_command void debug_class_props()

Display the class properties dialog for the selected class.

Category:

Debugger Commands


debug_class_watch

_command void debug_class_watch()

Set a watch on the selected static field

Category:

Debugger Commands


debug_class_watchpoint

_command void debug_class_watchpoint()

Set a watch on the selected static field

Category:

Debugger Commands


debug_clear_all_breakpoints

_command int debug_clear_all_breakpoints()

Clear all the breakpoints currently set.

Returns: int

0 on success, <0 on error

Category:

Debugger Commands


debug_clear_all_exceptions

_command int debug_clear_all_exceptions()

Clear all the exceptions currently set.

Returns: int

0 on success, <0 on error

Category:

Debugger Commands


debug_clear_watches

_command int debug_clear_watches()

Remove all watches from this watch tab.

Category:

Debugger Commands


debug_configurations

_command int debug_configurations()

Display the GDB configuration management dialog in order to manage different GDB executable configurations.

Format of debugger configuration file

<Debugger>
   <Package Name="GDB">
      <Configuration
         Name="PalmOS"
         Path='C:\palmsdk\bin\gdb_palm.exe'
         Platform="NT386"
         Arguments=""
      />
   </Package>
</Debugger>

Category:

Debugger Commands


debug_continue_thread

_command int debug_continue_thread()

Resume a single thread.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_corefile

_command int debug_corefile(_str debug_cb_name=_project_DebugCallbackName, _str attach_info="", _str session_name="")

Attach the debugger to a core file left after a process crashed.

Category:

Debugger Commands


debug_delete_breakpoint

_command int debug_delete_breakpoint()

Remove the current breakpoint

Category:

Debugger Commands


debug_delete_exception

_command int debug_delete_exception()

Remove the current exception

Category:

Debugger Commands


debug_detach

_command int debug_detach()

Detach from the current debugging session (if supported), leaving the client application running, and exiting debug mode.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_disable_all_breakpoints

_command int debug_disable_all_breakpoints()

Disable all the breakpoints currently stored.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_disable_all_exceptions

_command int debug_disable_all_exceptions()

Disable all the exceptions currently stored.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_down

_command int debug_down()

Move down one frame in the stack.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_edit_breakpoint

_command int debug_edit_breakpoint()

Edit the selected breakpoint, or the breakpoint under the cursor.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_edit_exception

_command int debug_edit_exception()

Edit the selected exception, or the exception under the cursor.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_exceptions

_command int debug_exceptions()

Display the exception breakpoints toolbar

Category:

Debugger Commands


debug_executable

_command int debug_executable(_str debug_cb_name=_project_DebugCallbackName, _str attach_info="", _str session_name="")

Create a debugging session to debug an executable not associated with the current project.

Category:

Debugger Commands


debug_go

_command int debug_go(boolean buildFirstDone=false)

Resume all threads. This command also doubles as the entry point for starting debugging. If we are not already in debug mode, this command will delegate to "_project_debug2" to start everything, and then immediately issue a 'continue' command.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_goto_breakpoint

_command void debug_goto_breakpoint()

Attempt to go to the location of the selected breakpoint.

Category:

Debugger Commands


debug_goto_decl

_command void debug_goto_decl()

Go to the definition of the selected item

Category:

Debugger Commands


debug_goto_exception

_command void debug_goto_exception()

Attempt to go to the declaration of the selected exception class.

Category:

Debugger Commands


debug_goto_variable

_command void debug_goto_variable()

Attempt to go to the declaration of the selected local, member, or watch variable.

Category:

Debugger Commands


debug_interrupt

_command int debug_interrupt()

Send an interrupt to a single thread.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_mouse_drag_instruction_pointer

int debug_mouse_drag_instruction_pointer()

Returns: int

Returns 0 if successful.

Category:

Debugger Functions


debug_options

_command int debug_options(_str default_tab='')

Display the debugger properties dialog.

Category:

Debugger Commands


debug_props

_command int debug_props(_str default_tab='')

Display the debugger information dialog. The debugger must be active for this command to work properly.

Category:

Debugger Commands


debug_reload

_command int debug_reload(_str file_name=null)

Reload the file passed in.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_remote

_command int debug_remote(_str debug_cb_name=_project_DebugCallbackName, _str attach_info="", _str session_name="")

Attach the GDB debugger to a remote target

Category:

Debugger Commands


debug_remove_watch

_command void debug_remove_watch()

Attempt to go to the declaration of the selected local, member, or watch variable.

Category:

Debugger Commands


debug_restart

_command int debug_restart()

Restart the debugger for this application. If there is an debugger system-specific "restart" callback, we simply do that, otherwise, we revert to the very simple method of stopping the debugger and then restarting debug mode.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_run_to_cursor

_command int debug_run_to_cursor(boolean buildFirstDone=false, _str debugStepType='go')

Run until we hit the line where the cursor currently is.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_send_command

_command int debug_send_command(_str command='')

Send the given command to the debugger and display the result if there is one.

Parameters:

command - debugger command

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_set_auto_lines

_command void debug_set_auto_lines(_str num_lines=3)

Set the number of lines to scan for auto-watches

Category:

Debugger Commands


debug_set_instruction_pointer

_command int debug_set_instruction_pointer()

Set the instruction pointer for the top frame in the current thread to the current file/line/address.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_show_memory

_command void debug_show_memory()

Attempt to go to the declaration of the selected local, member, or watch variable.

Category:

Debugger Commands


debug_show_next_statement

_command int debug_show_next_statement(boolean quiet=false, int breakpoint_id=0, int exception_id=0, _str event_kind='', _str event_text='', int thread_id=0, int frame_id=1)

Display the next statement to be executed for the current stack frame.

Parameters:

quiet - Do not complain about errors (default false)

breakpoint_id - breakpoint ID from debugger event

execption_id - exception ID from debugger event

event_kind - type of debugger event causing this update

event_text - description of debugger event

thread_id - thread ID to make active, if == 0, use the current thread ID

frame_id - frame ID to make active, if == 0, use the current frame ID if == 1, use the topmost frame ID

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_deep

_command int debug_step_deep()

Step into the next instruction even if it is a system call.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_instr

_command int debug_step_instr()

Step into the next instruction (or step into the first instruction).

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_into

_command int debug_step_into(boolean buildFirstDone=false, boolean doRestart=false)

Step into the next statement (or step into the first statement).

This command also doubles as the entry point for starting debugging. If we are not already in debug mode, this command will delegate to "_project_debug2" to start everything, and then immediately issue a 'step into' command.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_out

_command int debug_step_out()

Step out of the current function.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_over

_command int debug_step_over()

Step over the next statement.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_step_past

_command int debug_step_past()

Step past the current line. This behaves like run-to-cursor, pretending the cursor is on the next line.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_stop

_command int debug_stop(boolean quiet=true, boolean stay_in_debug_mode=false)

Terminate the debugger.

Parameters:

quiet - Do not issue error messages, just stop debugging.

stay_in_debug_mode - Do not switch out of debug mode. This is used to avoid toolbar switching when restarting the debugger.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_suspend

_command int debug_suspend()

Suspend all threads.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_suspend_thread

_command int debug_suspend_thread()

Suspend a single thread.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_toggle_breakpoint

_command int debug_toggle_breakpoint()

Toggles breakpoint between two states, enabled and removed

Category:

Debugger Commands


debug_toggle_breakpoint3

_command int debug_toggle_breakpoint3()

Toggles breakpoint between three states, enabled, disabled, and removed

Category:

Debugger Commands


debug_toggle_breakpoint_enabled

_command int debug_toggle_breakpoint_enabled()

Toggles breakpoint between two states, enabled and disabled

Category:

Debugger Commands


debug_toggle_disassembly

_command int debug_toggle_disassembly()

Toggle disassembly view

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_top

_command int debug_top()

Move to the top of the execution stack.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_up

_command int debug_up()

Move up one frame in the stack.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


debug_watch_variable

_command void debug_watch_variable()

Attempt to add a watch on the selected local, member, or auto watch variable.

Category:

Debugger Commands


Debugger Commands

debug_add_breakpoint
debug_add_exception
debug_add_watch
debug_add_watchpoint
debug_add_watchpoint_on_variable
debug_attach
debug_breakpoints
debug_class_break
debug_class_collapse
debug_class_exception
debug_class_props
debug_class_watch
debug_class_watchpoint
debug_clear_all_breakpoints
debug_clear_all_exceptions
debug_clear_watches
debug_configurations
debug_continue_thread
debug_corefile
debug_delete_breakpoint
debug_delete_exception
debug_detach
debug_disable_all_breakpoints
debug_disable_all_exceptions
debug_down
debug_edit_breakpoint
debug_edit_exception
debug_exceptions
debug_executable
debug_go
debug_goto_breakpoint
debug_goto_decl
debug_goto_exception
debug_goto_variable
debug_interrupt
debug_options
debug_props
debug_reload
debug_remote
debug_remove_watch
debug_restart
debug_run_to_cursor
debug_send_command
debug_set_auto_lines
debug_set_instruction_pointer
debug_show_memory
debug_show_next_statement
debug_step_deep
debug_step_instr
debug_step_into
debug_step_out
debug_step_over
debug_step_past
debug_stop
debug_suspend
debug_suspend_thread
debug_toggle_breakpoint
debug_toggle_breakpoint_enabled
debug_toggle_breakpoint3
debug_toggle_disassembly
debug_top
debug_up
debug_watch_variable
toggle_breakpoints
toggle_call_stack
toggle_classes
toggle_debug
toggle_debug_sessions
toggle_exceptions
toggle_locals
toggle_members
toggle_memory
toggle_registers
toggle_threads
toggle_variables
toggle_watch
windbg_list_modules
windbg_update_image_path
windbg_update_symbols_path
windbg_write_dumpfile


Debugger Functions

_RestoreBreakpointsInFile
_SaveBreakpointsInFile
dbg_add_autovar
dbg_add_breakpoint
dbg_add_disassembly_line
dbg_add_exception
dbg_add_runtime_expr
dbg_add_source_dir
dbg_add_thread
dbg_add_watch
dbg_cache_resolved_path
dbg_clear_autos
dbg_clear_breakpoints
dbg_clear_classes
dbg_clear_disassembly
dbg_clear_editor
dbg_clear_editor_disassembly
dbg_clear_exceptions
dbg_clear_memory
dbg_clear_registers
dbg_clear_runtimes
dbg_clear_sourcedirs
dbg_clear_stack
dbg_clear_threads
dbg_clear_variables
dbg_clear_watch_variables
dbg_clear_watches
dbg_collapse_auto
dbg_collapse_class
dbg_collapse_local
dbg_collapse_member
dbg_collapse_watch
dbg_create_new_session
dbg_destroy_session
dbg_finalize
dbg_find_breakpoint
dbg_find_class
dbg_find_disassembly_line
dbg_find_exception
dbg_find_session
dbg_get_all_sessions
dbg_get_autovar
dbg_get_autovar_info
dbg_get_breakpoint
dbg_get_breakpoint_condition
dbg_get_breakpoint_count
dbg_get_breakpoint_enabled
dbg_get_breakpoint_location
dbg_get_breakpoint_scope
dbg_get_breakpoint_type
dbg_get_callback_name
dbg_get_capability_name
dbg_get_class
dbg_get_cur_frame
dbg_get_cur_thread
dbg_get_current_session
dbg_get_disassembly_line
dbg_get_exception
dbg_get_exception_class
dbg_get_exception_condition
dbg_get_exception_count
dbg_get_exception_enabled
dbg_get_field
dbg_get_format_name
dbg_get_formatted_var
dbg_get_frame
dbg_get_frame_path
dbg_get_global_format
dbg_get_local
dbg_get_member
dbg_get_method
dbg_get_nested_type
dbg_get_num_autos
dbg_get_num_breakpoints
dbg_get_num_classes
dbg_get_num_dirs
dbg_get_num_disassembled_files
dbg_get_num_disassembly_lines
dbg_get_num_exceptions
dbg_get_num_fields
dbg_get_num_formatted_vars
dbg_get_num_frames
dbg_get_num_locals
dbg_get_num_members
dbg_get_num_methods
dbg_get_num_registers
dbg_get_num_runtimes
dbg_get_num_sessions
dbg_get_num_suspended
dbg_get_num_threads
dbg_get_num_watches
dbg_get_parent_class
dbg_get_parent_interface
dbg_get_register
dbg_get_runtime_expr
dbg_get_session_name
dbg_get_source_dir
dbg_get_supported_format_list
dbg_get_suspended
dbg_get_thread
dbg_get_threadgroup
dbg_get_var_format
dbg_get_watch
dbg_get_watch_info
dbg_have_autovars
dbg_have_updated_disassembly
dbg_have_updated_threads
dbg_initialize
dbg_invalidate_views
dbg_is_runtime_expr
dbg_is_session_active
dbg_remove_breakpoint
dbg_remove_exception
dbg_remove_watch
dbg_resolve_path
dbg_session_detach
dbg_session_disable_breakpoint
dbg_session_disable_exception
dbg_session_disable_watchpoint
dbg_session_do_command
dbg_session_enable_breakpoint
dbg_session_enable_exception
dbg_session_enable_watchpoint
dbg_session_error_message
dbg_session_eval_condition
dbg_session_eval_expression
dbg_session_expand_auto_watch
dbg_session_expand_class
dbg_session_expand_fields
dbg_session_expand_local
dbg_session_expand_member
dbg_session_expand_methods
dbg_session_expand_nested
dbg_session_expand_parents
dbg_session_expand_watch
dbg_session_finalize
dbg_session_get_paths
dbg_session_handle_event
dbg_session_initialize
dbg_session_interrupt
dbg_session_is_implemented
dbg_session_is_name_implemented
dbg_session_modify_auto_watch
dbg_session_modify_field
dbg_session_modify_local
dbg_session_modify_member
dbg_session_modify_watch
dbg_session_print_error
dbg_session_print_info
dbg_session_print_output
dbg_session_probe_breakpoint
dbg_session_reload
dbg_session_resolve_path
dbg_session_restart
dbg_session_resume
dbg_session_send_direct_input
dbg_session_set_instruction_pointer
dbg_session_step_instruction
dbg_session_step_into
dbg_session_step_into_runtimes
dbg_session_step_out
dbg_session_step_over
dbg_session_suspend
dbg_session_terminate
dbg_session_test_version
dbg_session_update_auto_watches
dbg_session_update_classes
dbg_session_update_disassembly
dbg_session_update_locals
dbg_session_update_members
dbg_session_update_memory
dbg_session_update_registers
dbg_session_update_stack
dbg_session_update_thread_groups
dbg_session_update_thread_names
dbg_session_update_thread_states
dbg_session_update_threads
dbg_session_update_watches
dbg_session_version
dbg_set_breakpoint_enabled
dbg_set_breakpoint_location
dbg_set_breakpoint_scope
dbg_set_cur_frame
dbg_set_cur_suspended_thread
dbg_set_cur_thread
dbg_set_current_session
dbg_set_exception_enabled
dbg_set_field
dbg_set_frame_path
dbg_set_global_format
dbg_set_local
dbg_set_member
dbg_set_register
dbg_set_session_name
dbg_set_var_format
dbg_set_watch
dbg_toggle_disassembly
dbg_translate_capability
dbg_update_autos_tree
dbg_update_breakpoints_tree
dbg_update_class_list
dbg_update_class_tree
dbg_update_disassembly
dbg_update_editor_breakpoints
dbg_update_editor_stack
dbg_update_exceptions_tree
dbg_update_group_tree
dbg_update_locals_tree
dbg_update_members_tree
dbg_update_registers_tree
dbg_update_stack_list
dbg_update_stack_tree
dbg_update_thread_list
dbg_update_thread_tree
dbg_update_watches_tree
dbg_windbg_get_modules
dbg_windbg_write_dumpfile
debug_mouse_drag_instruction_pointer
isay
vsdebug_version


dec2hex

_str dec2hex(long number, typeless base="")

Parameters:

number - decimal number

base - may be 2 or 8 or 16.

Returns: _str

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'.

Output: base=16 0xNNNN base=8 0NNNN base=2 0bNNNN

Category:

String Functions


def_actapp

int def_actapp

Application activation options.

  • ACTAPP_AUTORELOADON -- Automatically reload files that have changed on disk?
  • ACTAPP_SAVEALLONLOSTFOCUS -- Save all files when SlickEdit loses focus?
  • ACTAPP_SUPPRESSPROMPTUNLESSMODIFIED -- Automatically reload with no prompting unless the buffer is modified?
  • ACTAPP_WARNONLYIFBUFFERMODIFIED -- Only warn the user when the file is modified outside SlickEdit?
  • ACTAPP_AUTOREADONLY -- Automatically update read-only status of files on disk?

Default:

ACTAPP_AUTORELOADON|ACTAPP_AUTOREADONLY

Category:

Configuration Variables


def_adaptive_formatting_flags

int def_adaptive_formatting_flags

Default adaptive formatting flags for a buffer. See p_adaptive_formatting_flags.

Default:

0

Category:

Configuration Variables


def_adaptive_formatting_on

boolean def_adaptive_formatting_on

Whether adaptive formatting is on by default. Adaptive Formatting is controlled individually by language def-vars. However, if no language def-var exists, we consult this value.

Default:

true

Category:

Configuration Variables


def_add_to_prj_dep_ext

_str def_add_to_prj_dep_ext

List of file extensions of files that are identified to the project system as dependencies when loading a project from a Makefile.

Default:

'.h .hpp .hxx'

Category:

Configuration Variables


def_add_to_project_save_as

boolean def_add_to_project_save_as

If enabled, add a file being saved in save-as dialog box to a current project.

Default:

false

Category:

Configuration Variables


def_advanced_select

_str def_advanced_select

Specifies a persistent select style ('P') for some selection functions. Set to '' for a non-persistent select style.

Default:

'P'

Category:

Configuration Variables

See Also:

select_line, select_block, select_char, select_code_block


def_alias_case

_str def_alias_case

Controls whether aliases are case sensitive ('e') or not ('i').

Default:

'e'

Category:

Configuration Variables

See Also:

expand_alias


def_alt_menu

_str def_alt_menu

Controls whether Alt menu hot keys are enabled for shortcut access to the MDI menu.

Default:

1, (0 for Emacs and Brief emulations)

Category:

Configuration Variables


def_always_prompt_for_else_if

boolean def_always_prompt_for_else_if

When doing syntax expansion for C-like languages, if the user typed "} else" or "}else", always prompt to expand "else" or "else if". Otherwise, you are only prompted if "else" is incomplete, like "} el[Space]".

Default:

false

Category:

Configuration Variables


def_ansic_exts

_str def_ansic_exts

Space-delimited list of extensions (no dots). These extensions will be overridden with extension settings and options from the 'ansic' extension.
NOTE: This setting is no longer supported as of SlickEdit 2008. You can just refer 'c' to 'ansic'.

Default:

""

Category:

Configuration Variables


def_ant_install_dir

_str def_ant_install_dir

Set to the directory in which the Ant build tool is installed.

Default:

""

Category:

Configuration Variables


def_antmake_display_imported_targets

boolean def_antmake_display_imported_targets

Display targets imported from external Ant files

Default:

true

Category:

Configuration Variables


def_antmake_filter_matches

boolean def_antmake_filter_matches

Filter matches for Ant goto_definition functionality for visibility: do not show results which are not visible from where the command was invoked.

Default:

false

Category:

Configuration Variables


def_antmake_identify

boolean def_antmake_identify

Parse XML files when opened in order to identify Ant build files.

Default:

true

Category:

Configuration Variables


def_antmake_use_classpath

int def_antmake_use_classpath

Tell antmake to use SE classpath settings

Default:

1

Category:

Configuration Variables


def_argument_completion_maximum

int def_argument_completion_maximum

Control the maximum number of arguments to be displayed in the list created by argument completion. The default is 100 items, which gives very good response time, without overloading the user with more results than he would want to cycle through.

Default:

500

Category:

Configuration Variables


def_as_directory

_str def_as_directory

Directory where auto-save information will be stored. If set to '', it will use an 'autosave' subdirectory under the configuration directory.

Default:

""

Category:

Configuration Variables


def_as_flags

int def_as_flags

Auto-save flags. Composed of a bitset of AS_

  • AS_ON -- Auto-save is on
  • AS_ASDIR -- Auto-save to different directory
  • AS_SAMEFN -- Auto-save to same file
  • AS_DIFFERENT_EXT -- Auto-save to Generated extension
  • AS_SAVE_WINDOWS -- Auto-save window configuration

Default:

AS_ASDIR

Category:

Configuration Variables


def_as_timer_amounts

_str def_as_timer_amounts

Auto-save timer settings. Consists of three space-delimited values: "inactive time", "absolute time", and "config amount"

Default:

'm1 m1 0'

Category:

Configuration Variables


def_auto_complete_block_comment

boolean def_auto_complete_block_comment

Enables automatic completion of C style comment block start and end markers. Typing

    /*
on a blank line will auto complete to
    /**/
with the cursor placed between the two astericks.

Default:

true

Category:

Configuration Variables


def_auto_complete_idle_time

int def_auto_complete_idle_time

Delay before auto completion is displayed (in milliseconds).

Not used when auto completion is active.

Default:

250 milliseconds

Category:

Configuration Variables


def_auto_complete_max_symbols

int def_auto_complete_max_symbols

Maximum number of items to find for auto symbol completion

Default:

100

Category:

Configuration Variables


def_auto_complete_max_words

int def_auto_complete_max_words

Maximum number of items to find for auto word completion

Default:

100

Category:

Configuration Variables


def_auto_complete_minimum_length

int def_auto_complete_minimum_length

Minimum expandable symbol length to trigger auto completion.

The actual configurable options are stored per extension in def_autocompletemin_[ext]. This is used as a global default setting.

Default:

1

Category:

Configuration Variables


def_auto_complete_options

int def_auto_complete_options

Control the default behavior of alias and other auto-completion options. Bitset of AUTO_COMPLETE_*. The default is for everything to be enabled except partial symbol expansion and displaying the expansion bar.

The actual configurable options are stored per extension in def_autocomplete_[ext]. This is used as a global default setting.

Category:

Configuration Variables


def_auto_complete_timeout_time

int def_auto_complete_timeout_time

Auto-complete should stop searching for completions after this amount of time. This is done to prevent large typing delays.

Default:

1000 milliseconds (1 second)

Category:

Configuration Variables


def_auto_complete_update_idle_time

int def_auto_complete_update_idle_time

Delay before auto completion list is updated (in milliseconds).

When auto completion is active, this is the delay before it is updated when you are typing identifier characters. Not used when auto completion list is not displayed.

Default:

50 milliseconds

Category:

Configuration Variables


def_auto_doc_comment

boolean def_auto_doc_comment

This setting is the default for all languages for the comment editing feature for automatically generating doc comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_AUTO_DOXYGEN_COMMENT.

The comment is generated when the user hits ENTER after typing /*! on a line directly above a function, class or variable.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_auto_javadoc

boolean def_auto_javadoc

This setting is the default for all languages for the comment editing feature for automatically inserting an asterisk on a new line when extending a JavaDoc comment. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_AUTO_JAVADOC_ASTERISK.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_auto_javadoc_comment

boolean def_auto_javadoc_comment

This setting is the default for all languages for the comment editing feature for automatically generating JavaDoc comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_AUTO_JAVADOC_COMMENT.

The comment is generated when the user hits ENTER after typing /** on a line directly above a function, class or variable.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_auto_linecomment

boolean def_auto_linecomment

This setting is the default for all languages for the comment editing feature for joining line comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_JOIN_COMMENTS.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_auto_reset

_str def_auto_reset

If non-zero, reset-next-error is called. before a compile or make commands is executed.

Default:

""

Category:

Configuration Variables

See Also:

dos, _project_command


def_auto_restore

int def_auto_restore

Controls whether or not when the editor exits, if it will save data about the last editor session: including open files, file positions, clipboards, bookmarks, and window sizes and positions.

Default:

1

Category:

Configuration Variables

See Also:

auto_restore


def_auto_string

boolean def_auto_string

This setting is the default for all languages for the comment editing feature for splitting string constants. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_SPLIT_STRINGS.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_auto_unsurround_block

boolean def_auto_unsurround_block

When on, if you delete the first line of a simple block statement, you will be prompted if you want to delete the entire block, or just delete the outer statement (un-surround).

Default:

false

Category:

Configuration Variables


def_auto_xmldoc_comment

boolean def_auto_xmldoc_comment

This setting is the default for all languages for the comment editing feature for automatically generating XMLDoc comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_AUTO_XMLDOC_COMMENT.

The comment is generated when the user hits ENTER after typing /// on a line directly above a function, class or variable.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_autoclipboard

boolean def_autoclipboard

When on, text selected with the mouse is copied to the clipboard.

Default:

'true' on Unix, 'false' otherwise

Category:

Configuration Variables

See Also:

_autoclipboard, mou_paste


def_autoclose_flags

int def_autoclose_flags

The auto-close options control when SlickEdit will automatically close a file which was briefly visited using a tagging or search operation. The flags consist of a bitset of VS_BUFFER_MANAGEMENT_* flags, including:

  • VS_BUFFER_MANAGEMENT_ENABLED -- When enabled, if you navigate away from a file that was opened using a search or tagging operation, SlickEdit will attempt to close the file unless it is modified or open in another window.
  • VS_BUFFER_MANAGEMENT_CONFIRMATION -- Prompt the user if he wants to close instead of just closing the file automatically.

Default:

VS_BUFFER_MANAGEMENT_DEFAULT=3

Category:

Configuration Variables

See Also:

pop_bookmark, push_tag, push_ref, find_next, find_prev, push_destination, pop_destination


def_autotag_flags2

int def_autotag_flags2

Control dynamic tagging options. Consists of a bitset of AUTOTAG_* flags.

  • AUTOTAG_ON_SAVE -- Tag file on save
  • AUTOTAG_BUFFERS -- Background tag buffers
  • AUTOTAG_PROJECT_ONLY -- Background tag project buffers only (obsolete?)
  • AUTOTAG_FILES -- Background tag all files
  • AUTOTAG_SYMBOLS -- Refresh tag window (symbols tab)
  • AUTOTAG_FILES_PROJECT_ONLY -- Background tag project files only
  • AUTOTAG_CURRENT_CONTEXT -- Background update current context
  • AUTOTAG_UPDATE_CALLSREFS -- Update call tree and references on change event for symbols browser and proctree

Default:

AUTOTAG_ON_SAVE | AUTOTAG_BUFFERS | AUTOTAG_SYMBOLS | AUTOTAG_FILES_PROJECT_ONLY | AUTOTAG_CURRENT_CONTEXT

Category:

Configuration Variables


def_background_tagging_idle

int def_background_tagging_idle

Specifies the amount of time in milliseconds to wait before starting to gather background tagging results.

Default:

100 ms

Category:

Configuration Variables


def_background_tagging_threads

int def_background_tagging_threads

Specifies the number of threads to dedicate to processing baground tagging jobs. This setting requires you to restart the editor for a change to take effect.

Default:

2

Category:

Configuration Variables


def_background_tagging_timeout

int def_background_tagging_timeout

Specifies the maximum amount of time in milliseconds to spend gathering background tagging results before returning control to the editor.

Default:

1000 ms

Category:

Configuration Variables


def_backupinfix

_str def_backupinfix

Optional string to place between backup files' names and extensions: <file><infix>.<ext>

Default:

""

Category:

Configuration Variables

See Also:

def_backupprefix, def_backuppostfix


def_backuppostfix

_str def_backuppostfix

Optional string to place after backup files' names and extensions: <file>.<ext><postfix>

Default:

""

Category:

Configuration Variables

See Also:

def_backupprefix, def_backupinfix


def_backupprefix

_str def_backupprefix

Optional string to place before backup files' names and extensions: <prefix><file>.<ext>

Default:

""

Category:

Configuration Variables

See Also:

def_backupinfix, def_backuppostfix


def_batch_reload_files

boolean def_batch_reload_files

Show all files that need to be reloaded or resaved in a single select tree dialog, rather than one dialog per file.

Default:

true

Category:

Configuration Variables


def_bgtag_options

_str def_bgtag_options

Options for background file tagging. Consists of three parts (space separated):

  1. activate interval -- seconds in idle time to wait before starting background tagging
  2. maximum files to check -- maximum files per iteration
  3. maximum number to retag -- maximum to retag per iteration
  4. timeout before retagging -- time in seconds before re-activating background tagging

Default:

'30 10 3 600';

Category:

Configuration Variables


def_bm_max_id

int def_bm_max_id

Field width of bookmark id for display. Must be at least 5.

Default:

5

Category:

Configuration Variables


def_bm_show_line

_str def_bm_show_line

boolean string. Turn off if you don't want line number displayed.

Category:

Configuration Variables


def_bm_show_picture

boolean def_bm_show_picture

Show bitmaps for standard bookmarks.

Default:

true

Category:

Configuration Variables


def_brief_paste_restore

int def_brief_paste_restore

If on, saves and restores the cursor position before pasting text in Brief emulation.

Default:

0

Category:

Configuration Variables

See Also:

brief_paste


def_brief_word

boolean def_brief_word

If true, use Brief style select word and delete word.

Default:

false, except for Brief emulation

Category:

Configuration Variables


def_buffer_retag

int def_buffer_retag

Amount of idle time in milliseconds to wait before retagging buffers in the background.

Default:

1000 (3000 on Unix)

Category:

Configuration Variables


def_buflist

int def_buflist

Buffer list options.

  • SORT_BUFLIST_FLAG -- sort the buffer list
  • SEPARATE_PATH_FLAG -- separate paths
  • SHOW_SYSTEM_BUFFERS_FLAG -- show system buffers
  • SELECT_ACTIVE_BUFFER -- select the active buffer
  • FORCE_OLD_BUFLIST -- Use old list buffers dialog

Default:

SORT_BUFLIST_FLAG | SEPARATE_PATH_FLAG

Category:

Configuration Variables

See Also:

list_buffers, list_modified


def_build_errors_re

_str def_build_errors_re

If a build error message matches this regular expression, it will be categorized as an "Error" in the message list.

Default:

"error"

Category:

Configuration Variables


def_build_messages_limit

int def_build_messages_limit

If a build is generating excessive errors, the number of messages generated can be capped by setting the limit to a value greater than 0.

Default:

1000

Category:

Configuration Variables


def_build_warnings_re

_str def_build_warnings_re

If a build error message matches this regular expression, it will be categorized as a "Warning" in the message list.

Default:

"warning"

Category:

Configuration Variables


def_c_expand_include

int def_c_expand_include

By default, when you type a space after a #include, we will not do anything special. Set this option to non-zero to force SlickEdit to insert quotes and list the header files in the current directory for completion after hitting space.

Default:

0

Category:

Configuration Variables


def_c_replace_operators

boolean def_c_replace_operators

If set to true, when the user selects an operator from list-members, Context Tagging® will attempt to replace the verbose "operator" syntax with the actual operator.

Default:

false

Category:

Configuration Variables


def_cb_filter_by_types

int[] def_cb_filter_by_types

Array of booleans corresponding to tag types and indicating if the type should be filtered out (1=allow; 0=disallow).

Default:

1,1,1, ...

Category:

Configuration Variables


def_cb_max_derived_class_depth

int def_cb_max_derived_class_depth

Indicates the maximum depth which to expand the symbol browser's derived classes dialog. If set to 1 (the default), only the immediate derived classes will be expanded. If set higher, the entire inheritance tree can be exposed on one operation.

Default:

1

Category:

Configuration Variables


def_cb_max_references

int def_cb_max_references

Maximum number of symbol references to find before stopping search.

Default:

CB_MAX_REFERENCES=1024

Category:

Configuration Variables

See Also:

push_ref, find_refs


def_cbrowser_flood_refresh

int def_cbrowser_flood_refresh

Maximum number of items to insert when expanding nodes in the symbol browser without prompting twice.

Default:

CB_FLOOD_WATER_MARK=16000

Category:

Configuration Variables


def_cbrowser_high_refresh

int def_cbrowser_high_refresh

Maximum number of items to insert when expanding nodes in the symbol browser without prompting for confirmation.

Default:

CB_HIGH_WATER_MARK=4000

Category:

Configuration Variables


def_cbrowser_low_refresh

int def_cbrowser_low_refresh

Maximum number of items to insert when refreshing open categories in the symbol browser.

Default:

CB_LOW_WATER_MARK=2000

Category:

Configuration Variables


def_cc_print

typeless def_cc_print

Print using color coding to highlight syntax.

Default:

0

Category:

Configuration Variables

See Also:

enscript_command


def_cd

int def_cd

Change directory options. Bitset of the following:

  • CDFLAG_CHANGE_DIR_IN_BUILD_WINDOW -- Also change directory in build window.
  • CDFLAG_EXPAND_ALIASES_IN_CD_FORM -- Expand aliases in the change directory form
  • CDFLAG_NO_SYS_DIR_CHOOSER -- Windows only - defeat windows "Browse for folder" dialog

Default:

3

Category:

Configuration Variables


def_cde_workaround

boolean def_cde_workaround

Problem on Solaris running CDE causes some keys (Left arrow) not to work when this option is on. If this is set to true (default) then _firstinit() will set def_focus_select=false. This allows the user to override it if they want.

Default:

true

Category:

Configuration Variables

See Also:

def_focus_select


def_cfgfiles

boolean def_cfgfiles

If disabled, do not generate source files (vusrdefs.e, vusrobjs.e, etc) when saving the configuration. Typically non-zero, advanced users may never want source files for configuration.

Default:

true

Category:

Configuration Variables

See Also:

save_config


def_change_dir

int def_change_dir

Change directory in editor when changing directory in open and save as dialog boxes.

Default:

OFN_CHANGEDIR;

Category:

Configuration Variables


def_class_flags

int def_class_flags

Symbol filters used by the Class tool window. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_cleanup_pushed_bookmarks_on_quit

boolean def_cleanup_pushed_bookmarks_on_quit

When on, when a buffer is closed (quit), remove any pushed bookmarks remaining in that file. This option is helpful for buffer management, because it prevents buffers which were explicitly closed from coming back when you pop up out of your bookmark stack.

Default:

false

Category:

Configuration Variables


def_click_past_end

_str def_click_past_end

If enabled, allow cursor to be positioned in virtual space past the end of the line when clicking with the mouse.

Default:

false

Category:

Configuration Variables

See Also:

mou_click


def_clipboard_formats

_str def_clipboard_formats

Additional clipboard formats to push to the system clipboard. One or more of the following formats are available:

'R' - 'RTF Format' (Windows format) 'H' - 'HTML Format' (Windows format)

Category:

Configuration Variables


def_clipboards

int def_clipboards

Maximum number of clipboards.

Default:

50 (46 for vi emulation)

Categories:

Configuration Variables, Clipboard Functions

See Also:

clipboards


def_clipboards_max_preview

int def_clipboards_max_preview

Maximum size (in bytes) for preview displayed in Clipboards tool window

Category:

Configuration Variables


def_close_build_window_on_exit

boolean def_close_build_window_on_exit

If enabled, attempt to automatically quit the build window when the command shell exits.

Default:

false

Category:

Configuration Variables


def_close_window_like_1fpw

boolean def_close_window_like_1fpw

If one file per window is turned off, this controls whether or not close window will attempt to close the current file if it is not modified and there is only one window open. If disabled, close window will only close the window.

Default:

true

Category:

Configuration Variables

See Also:

def_one_file, close_window


def_cobol_copy_path

_str def_cobol_copy_path

COBOL copy book path.

Default:

""

Category:

Configuration Variables


def_cobol_levels

_str def_cobol_levels

Expected indentation columns corresponding to different cobol data section level numbers. Speace separated list of pairs (level=column).

Default:

'01=8 03=12 05=16 07=20 77=8 88=8';

Category:

Configuration Variables


def_code_block_view_delay

int def_code_block_view_delay

Amount of time in milliseconds to delay in order to animate unsurround and delete code block when the the confirmation prompts are turned off.

Default:

500 milliseconds

Category:

Configuration Variables


def_codehelp_idle

int def_codehelp_idle

Delay in milliseconds before auto-list members pops up after you type a member access operator such as '->'.

Default:

0

Category:

Configuration Variables

See Also:

auto_codehelp_key


def_codehelp_key_idle

int def_codehelp_key_idle

Amount of idle time in milliseconds before updating the parameter list when parameter information is active after a key is pressed (causing the word prefix under the cursor to change).

Default:

50 ms (200 on Unix)

Category:

Configuration Variables


def_codehelp_max_comments

int def_codehelp_max_comments

Maximum number of lines to retrieve for comment help when retrieving comments for parameter information or list members.

Default:

500

Category:

Configuration Variables


def_codehelp_max_params

int def_codehelp_max_params

Maximum number of parameters to display for parameter information. Any number of parameters over this threshold will be elided.

Default:

8

Category:

Configuration Variables


def_color_print

typeless def_color_print

Print using color?

Default:

0

Category:

Configuration Variables

See Also:

enscript_command


def_color_scheme

_str def_color_scheme

Name of the current active color scheme. Consists of scheme name followed by "(modified)" if the colors have been modified since selecting the scheme. Set to "(init)" to indicate to use the default color scheme initially.

Default:

"(init)"

Category:

Configuration Variables


def_color_scheme_version

int def_color_scheme_version

Version number for the current color settings. This allows us to detect when a user has an older color scheme and update it with new color settings as needed.

Default:

0

Category:

Configuration Variables


def_compile_flags

int def_compile_flags

Compile flags, bitset of the following:

  • COMPILEFLAG_CLEARPROCESSBUFFER -- clear build window
  • COMPILEFLAG_CDB4COMPILE -- change directory before compile

Default:

COMPILEFLAG_CDB4COMPILE;

Category:

Configuration Variables


def_complete_flags

int def_complete_flags

Word completion options. Bitset of the following flags (COMPLETE_*)

  • COMPLETE_REVERSE_AT_CURSOR Indicates that the "duplicate locations" cache should be cleared after changing directon. Don't confuse this cache with the "duplicates words" cache which the COMPLETE_ALLOW_DUP_MATCHES uses.
  • COMPLETE_CHECK_SCOPE -- Indicates whether matches was found outside of scope of function.
  • COMPLETE_ALLOW_DUP_MATCHES -- Indicates that once a particular word is found that any subsequent matches should be skipped. After change directions (i.e. say do a complete_prev,complete_prev, and then a complete_next), the "duplicate words" cache is cleared.
  • COMPLETE_LOOK_FOR_ANYTHING -- When off, applies some heuristics. By default (no COMPLETE_LOOK_FOR_ANYTHING flag), matches found in comments or strings are skipped if the cursor was not in a comment or string and the match is "far" away from the cursor (2 lines- second number from def_complete_vars).

Default:

COMPLETE_REVERSE_AT_CURSOR|COMPLETE_ALLOW_DUP_MATCHES

Category:

Configuration Variables

See Also:

complete_next, complete_prev, complete_more


def_complete_vars

_str def_complete_vars

If we're in a comment or string, check everywhere. If not, just look for variables (not color coded).

First value is on/off, second value is allow any match (color coded or not) within [value] lines from the cursor position (of the prefix). The first value is redundant with the COMPLETE_LOOK_FOR_ANYTHING flag. This could be cleaned up.

Default:

"1 2"

Category:

Configuration Variables

See Also:

complete_next, complete_prev, complete_more


def_context_toolbar_flags

int def_context_toolbar_flags

Options for current context tool window. This is a bitset of the following flags:

  • CONTEXT_TOOLBAR_ADD_LOCALS -- include local variables when displaying the current symbol under the cursor. Set to "0" to only show tags in context. Note that the drop down list will always be display locals for navigation purposes independent of this setting.
  • CONTEXT_TOOLBAR_SORT_BY_LINE -- sort the items in the list by line number rather than alphabetically.

Default:

CONTEXT_TOOLBAR_ADD_LOCALS=1

Category:

Configuration Variables


def_copy_noselection

boolean def_copy_noselection

Copy to clipboard will copy the current line if there is no selection.

Default:

true

Category:

Configuration Variables

See Also:

cut, copy_to_clipboard


def_cpp_include_path_re

_str def_cpp_include_path_re

If one of these directory names are found along a path to an extensionless file, consider the file as C++

Default:

"inc|include|c++|g++-2|g++-3|g++-4";

Category:

Configuration Variables


def_ctags_flags

int def_ctags_flags

Bitwise flags that are checked in vsc_list_tags() to fine-tune tagging options.

  • 1 -- Do NOT skip over function definitions/prototypes that do not have a semicolon or open brace following the parameter list. C++ source code that uses Microsoft MFC macro definitions are one of the reasons a user may want to skip over these types of definitions. Set this option when you do not want old C-style function definitions skipped.
  • 2 -- Tag C/C++ prototypes.
  • 4 -- Do not skip over old style C/C++ prototypes that do not have an explicit return type. This should be off in order for local-variable search to work properly, otherwise it is very difficult to distinguish a function call from a prototype.
  • 8 -- Do not break out of parsing a function if we see a brace in column 1. We normally do this as a safeguard against parsing past the end of a proc when the braces mismatch.
  • 16 -- Ignore stray identifiers that may be preprocessing.
  • 32 -- Ignore Visual C++ bracketted Attributes in C++ code.

Default:

2

Categories:

Configuration Variables, Tagging Functions


def_cua_textbox

_str def_cua_textbox

Determines whether text box is CUA style. "0" is false and all other string values are true.

Default:

"" (true)

Category:

Configuration Variables


def_cursor_beginend_select

boolean def_cursor_beginend_select

When on, cursor up/down/left/right moves to begin/end of selection. Enabled by default in Visual C++ and Visual Studio emulations.

Default:

false

Category:

Configuration Variables

See Also:

cursor_left, cursor_right


def_cursorwrap

boolean def_cursorwrap

Cursor left/right wrap to previous/next line (respectively).

Default:

0 (in most emulations)

Category:

Configuration Variables

See Also:

cursor_left, cursor_right


def_cvs_flags

int def_cvs_flags

CVS options. Bitset of CVS_

  1. CVS_ALWAYS_USE_DASH_D -- always use the "-d" option with cvs update
  2. CVS_USE_TOOLBAR_BITMAPS -- show CVS file status in project tool window
  3. CVS_FIND_NEXT_AFTER_DIFF -- advance to next item after diff
  4. CVS_RESTORE_COMMENT -- restore last checkin comment
  5. CVS_RESTORE_TAGS -- restore last checkin tag(s)
  6. CVS_SHOW_LABELS_IN_TREE -- show labels in version history tree

Default:

CVS_RESTORE_COMMENT;

Category:

Configuration Variables


def_cvs_global_options

_str def_cvs_global_options

These are options passed to all CVS operations before the command name.

Default:

""

Category:

Configuration Variables


def_cvs_info

CVS_INFO def_cvs_info

CVS options including the path to the executable, checkin login id, and hash table of command options.

Default:

null

Category:

Configuration Variables


def_cvs_shell_options

_str def_cvs_shell_options

CVS shell options.

Default:

'Q'

Category:

Configuration Variables

See Also:

shell


def_cw_analyze_lines_max

int def_cw_analyze_lines_max

Maximum number of lines in a block comment or in a block of consecutive line comments that will be analyzed when trying to automatically determine the proper width on the comment. Comment wrapping will look analyze at most def_cw_analyze_lines_max number of lines above the cursor position and def_cw_analyze_lines_max number of lines below the cursor postion.

Default:

100

Category:

Configuration Variables


def_CW_DoubleEnterEndsLineComments

int def_CW_DoubleEnterEndsLineComments

If positive, then Comment Wrap for line comments will stop on the second consecutive Enter keystroke.

Default:

1

Category:

Configuration Variables


def_CW_EnterEndsLineComments

int def_CW_EnterEndsLineComments

If positive, then Comment Wrap for line comments will stop on the first Enter keystroke.

Default:

0

Category:

Configuration Variables


def_cw_line_comment_min

int def_cw_line_comment_min

Number of consecutive line comments needed for the comment wrapping feature to recognize the line comments as a block that can be wrapped.

Default:

2

Category:

Configuration Variables


def_CW_use_width_for_box

int def_CW_use_width_for_box

If positive, then the Comment Block command under the Document window (box()) will use the Comment Wrap settings to determine how wide to make the comment. Additionally, Comment Wrap must be enabled for block comments. The comment wrap setting will be ignored if they specify a width that is not wide enough for the selected text.

Default:

1

Category:

Configuration Variables


def_debug_auto_lines

int def_debug_auto_lines

The number of lines to scan surrounding the current line of code for variables to show in the debugger's auto variable tool window.

Default:

3

Category:

Configuration Variables


def_debug_exe_extensions

_str def_debug_exe_extensions

Extension list of files that can be attached to by the debugger

Default:

EXE_FILE_RE (.exe on Windows, "" on Unix)

Category:

Configuration Variables


def_debug_logging

int def_debug_logging

Debugging logging support. If enabled, all transactions between SlickEdit and the host debugger (Java or GDB) will be logged to the log file (vs.log in the configuration directory).

Default:

0

Category:

Configuration Variables


def_debug_max_update_time

int def_debug_max_update_time

Max amount of time in milliseconds to spend in _UpdateDebugger(), handling events. This also controls the frequency that _UpdateDebugger() triggers when the application being debugged is suspended.

Default:

1000

Category:

Configuration Variables


def_debug_message_duration

int def_debug_message_duration

Amount of time to for java debugger to display "loading classes" message (in seconds).

Default:

5 seconds

Category:

Configuration Variables


def_debug_min_update_time

int def_debug_min_update_time

Minimum amount of time in milliseconds to spend in _UpdateDebuggerDefault:

250

Category:

Configuration Variables


def_debug_number_formats

DebugNumberFormat:[] def_debug_number_formats

Debugger number formats. Hash table of integer types mapped to the numerical base to format them using.

Default:

null

Category:

Configuration Variables


def_debug_options

int def_debug_options

Debugging support options flags Bitset of VSDEBUG_OPTION_

  • VSDEBUG_OPTION_SUPPORT_HOTSWAP -- support hot swap (Java)
  • VSDEBUG_OPTION_CONFIRM_DIRECTORY -- confirm directory when locating source files
  • VSDEBUG_OPTION_ALLOW_EDITING -- allow source files to be edited during debugging
  • VSDEBUG_OPTION_MOUSE_OVER_INFO -- show values of variables when mouse floats over them
  • VSDEBUG_OPTION_AUTO_CORRECT_BP -- automatically correct breakpoint locations

Default:

0xffffffff

Category:

Configuration Variables


def_debug_timeout

int def_debug_timeout

Amount of time to wait before debugger should time out on commands (in seconds).

Default:

30 seconds

Category:

Configuration Variables


def_debug_timer_delay

int def_debug_timer_delay

Amount of time to wait before updating debug windows (in milliseconds)

Default:

100 milliseconds

Category:

Configuration Variables


def_debug_vsdebugio_port

_str def_debug_vsdebugio_port

Default port to use to connect to vsdebugio application when debugging using GDB on Unix.

Default:

8001

Category:

Configuration Variables


def_debug_watchpoint_type

int def_debug_watchpoint_type

The default type of watchpoint to set.

  • VSDEBUG_WATCHPOINT_READ -- stop on read access
  • VSDEBUG_WATCHPOINT_WRITE -- stop on write access
  • VSDEBUG_WATCHPOINT_ANY -- stop on any access (read or write)

Default:

VSDEBUG_WATCHPOINT_WRITE

Category:

Configuration Variables


def_delay_filelist

boolean def_delay_filelist

Delay inserting of file list in open file dialog until user is done typing filename.

Default:

1

Category:

Configuration Variables


def_deltasave_flags

int def_deltasave_flags

Backup history options. Bitset of DELTASAVE_*.

  • DELTASAVE_BACKUP_FILES -- enable backup history
  • DELTASAVE_DELTA_FOR_MATCHING_FILES -- create backup history entry on save even if file has not changed.

Default:

0

Category:

Configuration Variables


def_deltasave_versions

int def_deltasave_versions

Maximum number of backup history revisions to create per file.

Default:

400

Category:

Configuration Variables


def_deselect_copy

boolean def_deselect_copy

If enabled, cancel current selection after copy.

Default:

1 (in most emulations)

Category:

Configuration Variables

See Also:

copy


def_deselect_copyto

boolean def_deselect_copyto

If enabled, cancel current selection after copy to cursor or move to cursor operation.

Default:

0

Category:

Configuration Variables


def_deselect_paste

boolean def_deselect_paste

If enabled, cancel current selection after paste.

Default:

1 (in most emulations)

Category:

Configuration Variables

See Also:

copy


def_diff_edit_options

int def_diff_edit_options

Difference editor options. Bitset of DIFFEDIT_*.

  • DIFFEDIT_START_AT_TOP -- start at top of file
  • DIFFEDIT_START_AT_FIRST_DIFF -- start at first diff in file
  • DIFFEDIT_CURFILE_INIT -- initialize Diff dialog with current file
  • DIFFEDIT_AUTO_JUMP -- automatically jump to next diff after merge
  • DIFFEDIT_SHOW_GAUGE -- show gauge during diff
  • DIFFEDIT_NO_AUTO_MAPPING -- disable automatic directory mapping in diff dialog
  • DIFFEDIT_AUTO_CLOSE -- automatically close diff dialog after last difference
  • DIFFEDIT_NO_PROMPT_ON_MFCLOSE -- do not prompt when multi-file diff dialog is closed
  • DIFFEDIT_BUTTONS_AT_TOP -- move diff buttons to the top of dialog
  • DIFFEDIT_SPAWN_MFDIFF -- run multi-file diff in background

Default:

Category:

Configuration Variables


def_diff_options

int def_diff_options

File differencing options. Bitset of DIFF_

  • DIFF_EXPAND_TABS -- expand tabs to spaces
  • DIFF_IGNORE_LSPACES -- ignore leading white space
  • DIFF_IGNORE_TSPACES -- ignore trailing white space
  • DIFF_IGNORE_SPACES -- ignore all white space in line
  • DIFF_IGNORE_CASE -- ignore text case
  • DIFF_OUTPUT_INTERLEAVED -- display interleaved output instead of side-by-side difference
  • DIFF_DONT_COMPARE_EOL_CHARS -- do not compare end of line characters
  • DIFF_OUTPUT_BOOLEAN -- output boolean
  • DIFF_LEADING_SKIP_COMMENTS -- skip leading comments in each file
  • DIFF_NO_BUFFER_SETUP -- no buffer setup

Default:

0

Category:

Configuration Variables


def_disable_cpp_refactoring

boolean def_disable_cpp_refactoring

If 'false', the menu items for C++ refactoring will be removed.

Default:

true

Category:

Configuration Variables


def_disable_postbuild_error_markers

boolean def_disable_postbuild_error_markers

Disables automatic error markers after builds are complete.

Category:

Configuration Variables


def_disable_replace_tooltip

boolean def_disable_replace_tooltip

Disable replace tooltip helper used for search and replace.

Category:

Configuration Variables


def_do_block_mode_backspace

boolean def_do_block_mode_backspace

If enabled, support Backspace while in block insert mode. If disabled, Backspace merely deletes the block selection.

Default:

true

Category:

Configuration Variables


def_do_block_mode_del_key

boolean def_do_block_mode_del_key

If enabled, support Del while in block insert mode. If disabled, Del deletes the block selection.

Default:

true

Category:

Configuration Variables


def_do_block_mode_delete

boolean def_do_block_mode_delete

If enabled, support Delete while in block insert mode. If disabled, Delete merely deletes the block selection.

Default:

true

Category:

Configuration Variables


def_do_block_mode_key

boolean def_do_block_mode_key

If enabled, enter block insert mode immediately after typing printable characters if there is a block selection.

Default:

true

Category:

Configuration Variables


def_dock_channel_delay

int def_dock_channel_delay

The delay in milliseconds before an action (e.g. mouse-in, mouse-out, lost-focus) causes a dock channel item to be acted upon. Set this value to 0 to force user to click on dock channel item to activate it.

Default:

500

Category:

Configuration Variables


def_dock_channel_options

int def_dock_channel_options

Docking channel options. Bitset of DOCKCHANNEL_OPT_*.

  • DOCKCHANNEL_OPT_NO_MOUSEOVER -- Mousing over a dock channel item does not activate it. This option forces user to click on a dock channel item to activate it.

Default:

0

Category:

Configuration Variables


def_dragdrop

boolean def_dragdrop

Enable drag and drop of text within the editor?

Default:

true

Category:

Configuration Variables


def_eclipse_switchbuf

int def_eclipse_switchbuf

Switch buffers Eclipse-style, with CTRL-PAGEUP and CTRL-PAGEDOWN (SWT events)

Used in plugin only.

Default:

1

Category:

Configuration Variables


def_embedded_color_scheme

_str def_embedded_color_scheme

Name of the current active embedded color scheme. Consists of scheme name followed by "(modified)" if the colors have been modified since selecting the scheme. Set to "(init)" to indicate to use the default embedded color scheme initially.

Default:

"(init)"

Category:

Configuration Variables


def_emulate_leading_tabs

boolean def_emulate_leading_tabs

If enabled, cursor movement emulates having real tabs rather than spaces in the leading whitespace of a line.

Default:

false

Category:

Configuration Variables


def_emulation_was_selected

boolean def_emulation_was_selected

Set to true when the user selects an emulation from the emulations dialog. This is to prevent us from prompting again for an emulation when they upgrade or patch SlickEdit.

Default:

false

Category:

Configuration Variables

See Also:

def_keys


def_encoding

_str def_encoding

Default non-extension specific encoding load option.

Default:

'+fautounicode'

Category:

Configuration Variables


def_end_line_stop_at_vertical_line

boolean def_end_line_stop_at_vertical_line

If enabled, end_line_text_toggle() will stop at the vertical line column before stopping at the end of the line.

Default:

false

Category:

Configuration Variables


def_enter_indent

boolean def_enter_indent

If enabled, syntax indent on Enter inserts real indent rather than just positioning cursor in virtual space.

Default:

0

Category:

Configuration Variables


def_err

int def_err

Boolean which indicates whether error processing commands should try to look for bufname.err files.

Default:

0

Category:

Configuration Variables


def_error_info_commands_re

_str def_error_info_commands_re

This regular expression gets looked at when you press ENTER in the build window.

Default:

'^?*make?*$';

Category:

Configuration Variables


def_exit_file_list

boolean def_exit_file_list

If enabled, do not display file list when exiting w/modified buffers.

Default:

0

Category:

Configuration Variables

See Also:

safe_exit


def_exit_flags

int def_exit_flags

Exit options. Bitset of EXIT_

  • EXIT_CONFIG_ALWAYS -- always save configuration
  • EXIT_CONFIG_PROMPT -- always prompt to save configuration
  • EXIT_CONFIRM -- confirm exit before closing editor
  • SAVE_CONFIG_IMMEDIATELY -- save configuration changes immediately instead of waiting for exit.

Default:

EXIT_CONFIG_ALWAYS

Category:

Configuration Variables

See Also:

safe_exit


def_exit_on_autosave

boolean def_exit_on_autosave

Exit setting - do they want to shut down SlickEdit when time elapses.

Default:

0

Category:

Configuration Variables


def_exit_process

_str def_exit_process

Try to exit process buffer when closing editor. "0" is false and all other string values are true.

Default:

"" (true)

Category:

Configuration Variables

See Also:

safe_exit


def_expand_brace_syntax

boolean def_expand_brace_syntax

By default, when you type an open brace in C-like languages, SlickEdit will attempt to insert the matching end brance and re-align the brace according to your syntax expansion settings.

Set this option to false to disable this behavior.

Default:

true

Category:

Configuration Variables


def_expansion_overrides_locals

boolean def_expansion_overrides_locals

If set to true, syntax expansion can still expand a keyword prefix, even if there is a local variable with the same name as the prefix. For example:

   void foobar(int i) {
      i<space>
   }
will expand to:
   void foobar(int i) {
      if (<cursor>) {
      }
   }

Default:

false

Category:

Configuration Variables


def_ext

_str def_ext

Default open and save as file extension.

Default:

""

Category:

Configuration Variables


def_extend_linecomment

boolean def_extend_linecomment

This setting is the default for all languages for the comment editing feature for splitting and extending line comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_SPLIT_LINE_COMMENTS.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_fast_auto_readonly

int def_fast_auto_readonly

If 1, auto readonly (def_actapp&ACTAPP_AUTOREADONLY) will perform a fast check (only check attribute on disk, do not open file). Only affects Windows (more stringent test is fast enough in UNIX)

Default:

true

Category:

Configuration Variables


def_fast_open

boolean def_fast_open

Use Windows 3.1 style open file dialog.

Default:

false

Category:

Configuration Variables


def_file_tabs_abbreviates_files

boolean def_file_tabs_abbreviates_files

If 'true', The File tabs toolbar will compress the names of files that differ from the previous file in the list only by extension. This saves space and helps group associated files.

Default:

true

Category:

Configuration Variables


def_file_tabs_uses_pictures

boolean def_file_tabs_uses_pictures

If 'true', the File tabs toolbar will display bitmaps next to file tabs for "special" buffers, including, but not limited to: The Build window, file manager windows, and search result windows.

Default:

true

Category:

Configuration Variables


def_file_types

_str def_file_types

File filters used by File Open and File Save As dialogs. Separate each file filter with a comma. Place file patterns in parentheses. Separate file patterns with a semicolon. The first file filter is used to initialize the file list.

To modify this list go to "Tools" > "Options" > "File Options..." and switch to the "File Filters" tab. Press the "..." button to bring up the filter list editor.

Example:

   Basic Files (*.bas), All Files (*.*)
   C Files (*.cpp;*.cxx;*.c;*.h), All Files (*.*)

Category:

Configuration Variables


def_filelist_show_dotfiles

boolean def_filelist_show_dotfiles

Shows or hides dot files in file and directory list controls, as in Open/Edit dialog.

Category:

Configuration Variables


def_filetouch_checking

boolean def_filetouch_checking

Do extra checking to see if the file's contents have been modified when its timestamp has changed.

Default:

false

Category:

Configuration Variables


def_find_close_on_default

int def_find_close_on_default

Close find tool window when not docked after completing a search or replace operation.

Default:

true

Category:

Configuration Variables


def_find_file_attr_flags

_str def_find_file_attr_flags

Extra paramters for find/replace int files for extra attributes (HIDDEN/SYSTEM) for Windows users.

Default:

"

Category:

Configuration Variables


def_find_hide_tabs

boolean def_find_hide_tabs

Hide tab bar in find tool window.

Default:

false

Category:

Configuration Variables


def_find_high_added_bookmarks

int def_find_high_added_bookmarks

Maximum recommended number of bookmarks that should be added to a buffer in a find all operation.

Default:

128

Category:

Configuration Variables


def_find_init_defaults

int def_find_init_defaults

Initialize find dialog to defaults. If not enabled, the find dialog will be initialized with the values used for the last operation.

Default:

0

Category:

Configuration Variables


def_find_symbol_flags

int def_find_symbol_flags

Symbol filters used by Find Symbol tool window. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_find_tag_flags

int def_find_tag_flags

Find tag preferences (bitset of VS_FIND_TAG_*). These flags control whether find tag navigates to definitions or declarations first?

  • 0 -- no bias, prompt for all tags first
  • 1 -- bias to go to definitions first, then declarations
  • 2 -- bias to go to declarations first, then declarations

Default:

0

Category:

Configuration Variables


def_focus_select

boolean def_focus_select

If enabled, when you click or switch focus to a text box or combo box, automatically select the text in the text box so that it can be typed over.

Default:

true

Category:

Configuration Variables


def_format_columns_flags

int def_format_columns_flags

Options controlling how the format_columns command works. Set to FORMATCOLUMNSFLAG_NOCOMPRESS = 1 to prevent it from compressing inter-column whitespace.

Default:

0

Category:

Configuration Variables

See Also:

format_columns


def_fortran_free_form_indent

int def_fortran_free_form_indent

If enabled, Fortran syntax expansion will work properly with Fortran 90 with free form indentation. Otherwise, the indentation will always be forced to at least column 7, in order to leave room for line numbers.

Default:

0

Category:

Configuration Variables


def_forwardback_enabled

boolean def_forwardback_enabled

Enable forward/back history tracking.

Default:

true

Category:

Configuration Variables

See Also:

forward, back


def_forwardback_max

int def_forwardback_max

Maximum number of items to store in the forward/back history.

Default:

10

Category:

Configuration Variables

See Also:

forward, back


def_from_cursor

boolean def_from_cursor

If enabled, operate on current word starting at the cursor position instead of the beginning of the word.

Default:

false, true for Emacs

Category:

Configuration Variables

See Also:

cur_word


def_fullscreen_maximize_mdi

boolean def_fullscreen_maximize_mdi

Should fullscreen mode maximize the editor to use the entire screen? If disabled, fullscreen just swaps in the fullscreen toolbars, but the editor maintains the same size and position.

NOTE: On Unix, maximize is not guaranteed to work since the window manager controls sizing.

Default:

true

Category:

Configuration Variables


def_fullscreen_show_mdimenu

boolean def_fullscreen_show_mdimenu

Should fullscreen mode show the MDI menu? Set to false to hide the MDI menu in fullscreen mode.

Default:

true

Category:

Configuration Variables


def_gdb_proxy_port

_str def_gdb_proxy_port

(Windows only). Port to use when gdb connects to a remote target through the gdb remote proxy application. def_gdb_use_proxy must be set to true for this to have any effect. Set to "" to use the default port number of 8002.

Default:

""

Category:

Configuration Variables


def_gdb_use_proxy

boolean def_gdb_use_proxy

(Windows only). Set to true to use gdb remote proxy application to mediate connection between gdb and remote target. This setting only applies to attaching to remote target.

Default:

true

Category:

Configuration Variables


def_gui

_str def_gui

Bind open, find, and replace commands (among others) to massively simplified command line prompts "0" is false and all other string values are true.

This setting is controlled by going to "Tools" > "Options" > "Keyboard" > "Advanced" and setting "Command Line Prompting" to the desired value.

Default:

1 (true)

Category:

Configuration Variables

See Also:

gui_open, gui_find, gui_replace


def_hack_tabs

boolean def_hack_tabs

By default, pressing the Backspace key when the previous character is a tab causes the rest of the line to be moved to the previous tab stop. If you are using a mode that has a syntax indent for each level that is different from the Tab settings, do not enable this setting.

If you want your Backspace key to delete through tab characters one column at a time, enable this setting.

This setting is controlled by going to "Tools" > "Options" > "Redefine Common Keys..." and checking "Hack tabs backspace."

Default:

0

Category:

Configuration Variables


def_hanging_statements_after_col

int def_hanging_statements_after_col

When deleting an open brace from a brace block that encloses a single line statement, leave the statement hanging instead of pulling it up to the same line if the current column is greater than or equal to this value. To always force hanging statements, set this number to 0.

Example:

if (condition)
   doSomething();
instead of
if (condition) doSomething();

Default:

40

Category:

Configuration Variables


def_help_flags

int def_help_flags

Options controlling API help indexing.

  • HF_CLOSE
  • HF_EXACTMATCH
  • HF_USEDEFAULT

Default:

HF_CLOSE

Category:

Configuration Variables


def_hex_display_xlat2

_str def_hex_display_xlat2

String containing characters to display for corresponding hex characters on right-hand side of hex display. Typically uses '.' to represent non-printable characters.

Category:

Configuration Variables

See Also:

hex


def_hidetoolbars

boolean def_hidetoolbars

When on, non-docked toolbars are hidden when you switch to another application. When you switch back to SlickEdit the toolbar is made visible again. This option is global to all toolbars.

To control this setting, go to "View" > "Toolbars" > "Customize..." and check "Hide when application is inactive."

Default:

false

Category:

Configuration Variables


def_highlight_matching_parens

boolean def_highlight_matching_parens

Highlight matching parentheses, braces, brackets, and begin/end pairs under the cursor.

Default:

true

Category:

Configuration Variables


def_highlight_paren_under_cursor

boolean def_highlight_paren_under_cursor

If parentheses highlighting is enabled, this setting determines whether or not to highlight the item under the cursor.

Default:

true

Category:

Configuration Variables


def_highlight_symbols_timeout_time

int def_highlight_symbols_timeout_time

Symbol highlighting should stop searching after this amount of time. This is done to prevent large typing delays.

Default:

1000 milliseconds (1 second)

Category:

Configuration Variables


def_hotspot_navigation

boolean def_hotspot_navigation

If enabled, alias and syntax expansion can define hotspots in order to have multiple cursor stops.

For example, if you have an alias such as:

    if ( %\c) {
        %\c
    }

Initially the cursor will be positioned at the first cursor stops (%\c), when you hit Ctrl+[ (next_hotspot), the cursor will jump to the next hotspot within the brace block.

Default:

true

Category:

Configuration Variables

See Also:

expand_alias, c_space, next_hotspot, prev_hotspot


def_import_file_types

_str def_import_file_types

Types that can be imported to the project properties dialog.

Default:

"Text Files (*.txt)";

Category:

Configuration Variables


def_indent_member_access_specifier

boolean def_indent_member_access_specifier

Indent C++ member access specifiers, public: private: protected: in classes and structs. False indicates to indent with class/struct column.

Default:

false

Category:

Configuration Variables


def_init_delay

int def_init_delay

Delay in milliseconds before scrolling list box when dragging mouse.

Default:

50

Category:

Configuration Variables


def_initial_scope

typeless def_initial_scope

Controls the initial amount of code selected by select_code_block Set to 's' to select just one statement initially. Set to 'b' to select entire code block.

Default:

's' (statement)

Category:

Configuration Variables


def_ispf_autosave

boolean def_ispf_autosave

Controls ISPF emulations autosave functionality.

Default:

true

Category:

Configuration Variables

See Also:

ispf_autosave, ispf_end


def_ispf_flags

int def_ispf_flags

ISPF Emulation options. Contains a bitset of VSISPF_* flags:

  • VSISPF_RIGHT_CONTROL_IS_ENTER
  • VSISPF_CURSOR_TO_LC_ON_ENTER

Default:

0

Category:

Configuration Variables


def_ispf_xedit

boolean def_ispf_xedit

Enable XEDIT extensions to ISPF emulation?

Default:

false

Category:

Configuration Variables


def_j2me_phone_types

_str def_j2me_phone_types

List of J2ME phone types.

Default:

'DefaultColorPhone;DefaultGrayPhone;MediaControlSkin;QwertyDevice'

Category:

Configuration Variables


def_java_live_errors_deprecation_warning

int def_java_live_errors_deprecation_warning

If enabled, show Java deprecation warnings with live errors.

Default:

1

Category:

Configuration Variables


def_java_live_errors_enabled

int def_java_live_errors_enabled

Enable Java live errors?

Default:

false

Category:

Configuration Variables


def_java_live_errors_errored

int def_java_live_errors_errored

Tracks whether or not the RTE thread has reported an error during compilation

Default:

false

Category:

Configuration Variables


def_java_live_errors_first

int def_java_live_errors_first

First time live errors has been initialized?

Default:

true

Category:

Configuration Variables


def_java_live_errors_incremental_compile

int def_java_live_errors_incremental_compile

Enable incremental compilation with Java live errors. This will slightly improve performance.

Default:

false

Category:

Configuration Variables


def_java_live_errors_init_heap_size

int def_java_live_errors_init_heap_size

Initial Java heap size for live errors. 0 means use Java default. Only intended to be modified through Java Options.

Default:

0

Category:

Configuration Variables


def_java_live_errors_jdk_6_dir

_str def_java_live_errors_jdk_6_dir

JDK 6 root directory.

Default:

""

Category:

Configuration Variables


def_java_live_errors_jvm_lib

_str def_java_live_errors_jvm_lib

JDK 6 jvm lib file

Default:

""

Category:

Configuration Variables


def_java_live_errors_max_heap_size

int def_java_live_errors_max_heap_size

Maximum Java heap size for live errors. 0 means use Java default. Only intended to be modified through Java Options.

Default:

0

Category:

Configuration Variables


def_java_live_errors_no_asserts

int def_java_live_errors_no_asserts

If enabled, do not display asserts for Java live errors.

Default:

false

Category:

Configuration Variables


def_java_live_errors_no_warnings

int def_java_live_errors_no_warnings

If enabled, do not show warnings with Java live errors.

Default:

1

Category:

Configuration Variables


def_java_live_errors_other_options

int def_java_live_errors_other_options

If enabled, use 'Other Options' from the 'Compiler' tab for Java live errors.

Default:

0

Category:

Configuration Variables


def_java_live_errors_pedantic

int def_java_live_errors_pedantic

If enabled, show pedantic Java warnings with live errors.

Default:

1

Category:

Configuration Variables


def_java_live_errors_sleep_interval

int def_java_live_errors_sleep_interval

Amount of time in microseconds to wait before Java live errors should update the current buffer.

Default:

250

Category:

Configuration Variables


def_java_live_errors_stack_size

int def_java_live_errors_stack_size

Java stack size for live errors. 0 means use Java default. Only intended to be modified through Java Options.

Default:

0

Category:

Configuration Variables


def_javadoc_exceptionmax

int def_javadoc_exceptionmax

Maximum number of characters for exception names. This setting is used by the JavaDoc editor when reformatting JavaDoc comments. If the name is longer than this, the exception comment will be continued on the next line.

Default:

10

Category:

Configuration Variables


def_javadoc_exceptionmin

int def_javadoc_exceptionmin

Minimum number of characters for exception names. This setting is used by the JavaDoc editor when reformatting JavaDoc comments.

Default:

6

Category:

Configuration Variables


def_javadoc_filter_flags

int def_javadoc_filter_flags

Symbol filters used by JavaDoc editor. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_javadoc_format_flags

int def_javadoc_format_flags

These setting is used by the JavaDoc editor when reformatting JavaDoc comments. This is a bitset of VSJAVADOCFLAG_*.

  • VSJAVADOCFLAG_BEAUTIFY -- Beautify JavaDoc comments when exiting the JavaDoc editor
  • VSJAVADOCFLAG_ALIGN_PARAMETERS -- Align function parameters
  • VSJAVADOCFLAG_ALIGN_EXCEPTIONS -- Align exception names
  • VSJAVADOCFLAG_BLANK_LINE_AFTER_PARAMETERS -- Add blank line after parameter list
  • VSJAVADOCFLAG_BLANK_LINE_AFTER_RETURN -- Add blank line after @return statement
  • VSJAVADOCFLAG_BLANK_LINE_AFTER_DESCRIPTION -- Add blank line after symbol's description
  • VSJAVADOCFLAG_ALIGN_RETURN -- Align comments for @return statement
  • VSJAVADOCFLAG_ALIGN_DEPRECATED -- Align comments for @deprecated
  • VSJAVADOCFLAG_BLANK_LINE_AFTER_EXAMPLE -- Add balnk line after example
  • VSJAVADOCFLAG_BLANK_LINE_AFTER_LAST_PARAM -- Add blank line after last parameter comment

Category:

Configuration Variables


def_javadoc_keep_obsolete

boolean def_javadoc_keep_obsolete

Controls whether or not the JavaDoc editor will preserve comments for obsolete or misnamed parameters.

Category:

Configuration Variables


def_javadoc_parammax

int def_javadoc_parammax

Maximum number of characters for parameter names. This setting is used by the JavaDoc editor when reformatting JavaDoc comments. If the name is longer than this, the parameter comment will be continued on the next line.

Default:

10

Category:

Configuration Variables


def_javadoc_parammin

int def_javadoc_parammin

Minimum number of characters for parameter names. This setting is used by the JavaDoc editor when reformatting JavaDoc comments.

Default:

6

Category:

Configuration Variables


def_jmp_on_tab

boolean def_jmp_on_tab

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, disable this option.

Also, when positioning the cursor with the mouse, this option also controls whether or not the cursor position is snapped to the nearest real character instead of allowing it to be placed in virtual space.

This option can be configured by going to "Tools" > "Options" > "Redefine common keys."

Default:

1

Category:

Configuration Variables

See Also:

cursor_left, cursor_right


def_join_comments

boolean def_join_comments

This setting is the default for all languages for the comment editing feature for joining line comments. This setting corresponds to the language specific flag: VS_COMMENT_EDITING_FLAG_JOIN_COMMENTS.

Go to "Tools" > "Options" > "Language Setup" > "Comments" to modify this language specific setting.

Default:

1

Category:

Configuration Variables


def_jrefactor_add_blank_lines

boolean def_jrefactor_add_blank_lines

If enabled, insert blank lines between groups of import statements when doing organize imports in Java code.

To modify this setting, go to "Tools" > "Imports" > "Options..."

Default:

true

Category:

Configuration Variables


def_jrefactor_auto_import

int def_jrefactor_auto_import

If enabled, support auto import for Java.

To modify this setting, go to "Tools" > "Imports" > "Options..."

Default:

true

Category:

Configuration Variables


def_jrefactor_auto_import_jsp

int def_jrefactor_auto_import_jsp

If enabled, support auto import for JSP pages (Java embedded in HTML).

To modify this setting, go to "Tools" > "Imports" > "Options..."

Default:

false

Category:

Configuration Variables


def_jrefactor_auto_import_lowcase_identifiers

boolean def_jrefactor_auto_import_lowcase_identifiers

If enabled, Java auto import and organize imports will attempt to insert import statements even for classes that start with lower case letters. By default, this is disabled as a performance and accuracy optimization because, by convention, Java classes use initial caps.

Default:

false

Category:

Configuration Variables


def_jrefactor_imports_per_package

int def_jrefactor_imports_per_package

This setting controls the maximum number of classes that will be explicitely imported from a package before auto import or organize imports will collapse the imports into a wildcard import.

To modify this setting, go to "Tools" > "Imports" > "Options..."

Default:

10

Category:

Configuration Variables


def_jrefactor_prefix_list

_str def_jrefactor_prefix_list

List of Java package prefixes to use to categorize and order imports when doing auto-import and organize imports.

To modify this setting, go to "Tools" > "Imports" > "Options..."

Default:

"java;javax;org;com"

Category:

Configuration Variables


def_jsellist_font

_str def_jsellist_font

Default selection list font for Japanese and other double byte locales.

Category:

Configuration Variables

See Also:

def_sellist_font, _sellist_form


def_keydisp

_str def_keydisp

Option for how to display key bindings on menus and tooltips.

  • 'S' -- Return Slick-C® source code event name.
  • 'L' -- Return long menu bar event name.
  • 'C' -- Return condensed menu bar event name.

Default:

'L'

Category:

Configuration Variables

See Also:

event2name


def_keys

_str def_keys

Name of active emulation keys help item.

Default:

""

Category:

Configuration Variables


def_keys_version

_str def_keys_version

Key bindings version. We need this to know whether we should automatically update some key bindings when transferring a users keyboard configuration to a new version.

Default:

0

Category:

Configuration Variables


def_leading_codes

_str def_leading_codes

Additional text / printer codes to prepend to output file when printing on Unix.

Default:

''

Category:

Configuration Variables

See Also:

tprint


def_leave_selected

_str def_leave_selected

If enabled, when searching leave the last occurance of search string found selected.

This setting is controlled by going to "Tools" > "Options" > "General" and selecting the "Search" tab and checking "Leave selected."

Default:

0 (false, for most emulations)

Category:

Configuration Variables

See Also:

gui_find, find, find_next


def_line_insert

_str def_line_insert

Controls whether the editor inserts lines above ('A') or below ('B') the current line when pasting text.

To modify this setting to go "Tools" > "Options" > "General", and select the "More" tab and choose your line insert style.

Default:

"A" (for most emulations)

Category:

Configuration Variables

See Also:

get, paste


def_linewrap

boolean def_linewrap

The line wrap on text option affects whether line wrapping occurs when the left margin is reached or column one is reached for the Left and Backspace key configurations. By default, when the word wrap option is enabled, wrapping occurs when the left margin is reached regardless of the Left or Backspace key configurations. Mark this check box if you want wrapping to occur when column one is reached.

This option can be configured by going to "Tools" > "Options" > "Redefine common keys", and checking "Line wrap on text".

Default:

1

Category:

Configuration Variables

See Also:

wordwrap_delete_char


def_load_options

_str def_load_options

Default load options used when opening files in the editor. The options consist of a string of command line options supported by the edit command.

These options may be configured by going to "Tools" > "Options" > "File Options..." and selecting the "Load" tab.

Default:

'+L -LF +LE -S -E +U:32000 -N +BP';

Category:

Configuration Variables

See Also:

edit


def_localsta

boolean def_localsta

Use local state file in configuration directory. If set to 0, always use the global state file. If you don't have disk space, set this to zero.

Default:

true

Category:

Configuration Variables


def_long_month_names

_str def_long_month_names

Stores long version of the months of the year as a space separated list. Used by alias mechanism to translation the %\h% (user formatted date) escape sequence.

Default:

"January February March April May June July August September October November December"

Category:

Configuration Variables


def_long_weekday_names

_str def_long_weekday_names

Stores long version of days of the week as a space separated list. Used by alias mechanism to translation the %\h% (user formatted date) escape sequence.

Default:

"Sunday Monday Tuesday Wednesday Thursday Friday Saturday"

Category:

Configuration Variables


def_macfiles

_str def_macfiles

This option contains a space-delimited list of all the user-loaded macros and shared libraries.

Slick-C macros must have ".ex" extension. DLL files must have extension specified if there is one. Filenames with spaces are in double quotes.

Default:

""

Category:

Configuration Variables


def_match_paren_idle

int def_match_paren_idle

Amount of time to wait before finding the matching paren or block under the cursor and highlighting it.

Default:

true

Category:

Configuration Variables

See Also:

def_highlight_matching_parens, _UpdateShowMatchingParen()


def_max_ant_file_size

boolean def_max_ant_file_size

Maximum size of a file that _IsAntBuildFile will recognize

Default:

true

Category:

Configuration Variables


def_max_bm_tags

int def_max_bm_tags

Maximum number of tag bookmarks.

Default:

15

Category:

Configuration Variables


def_max_bookmark_relocate_time

int def_max_bookmark_relocate_time

Number of milliseconds to attempt to relocate all bookmarks in a file.

Default:

2000

Category:

Configuration Variables


def_max_breakpoint_relocate_time

int def_max_breakpoint_relocate_time

Number of milliseconds to attempt to relocate all breakpoints in a file.

Default:

2000

Category:

Configuration Variables


def_max_completion_items

int def_max_completion_items

The maximum number of items that should be displayed by argument completion. If there are more items than this the user will be prompted if they want to get all items or not.

Default:

2000 items

Category:

Configuration Variables


def_max_doc_mode_mru

int def_max_doc_mode_mru

Defines maximum number of recently used document modes displayed to the user on the New File dialog.

Category:

Configuration Variables


def_max_error_markers

int def_max_error_markers

Maximum number of error markers to process in postbuild. Set to <0 to always process all errors.

Category:

Configuration Variables


def_max_filehist

int def_max_filehist

Maximium files listed under File menu.

Default:

9

Category:

Configuration Variables


def_max_loadall

_str def_max_loadall

This option controls whether a file is loaded entirely into memory or if it should be partially loaded by block-by-block. The format of this variable is:

   [on/off]  [ksize]
where [on/off] is 0 or 1, and [ksize] is the number of kilobytes for the load partial threshold.

Default:

'1 8000'

Category:

Configuration Variables


def_max_mffind_output

int def_max_mffind_output

Sets maximum buffer size for search results buffer.

Category:

Configuration Variables


def_max_proj_type_mru

int def_max_proj_type_mru

Defines maximum number of recently used project types displayed to the user on the New Project dialog.

Category:

Configuration Variables


def_max_RELOC_MARKER_time

int def_max_RELOC_MARKER_time

Number of milliseconds to attempt to relocate a single relocatable code marker.

Default:

1000

Category:

Configuration Variables


def_max_windowhist

int def_max_windowhist

Maximium files listed under Winodw menu.

Default:

9

Category:

Configuration Variables


def_memberhelp_idle

int def_memberhelp_idle

Amount of idle time in milliseconds before updating the list of symbols when list members is active.

Default:

50 msg (400 on Unix)

Category:

Configuration Variables


def_mouse_create_window_modename

_str def_mouse_create_window_modename

This setting specifies the default mode name to use when you drag the mouse in the MDI area in order to create new windows. If set to null or the empty string, it will create a new window viewing the current file, or a fundamental mode if there is no current window.

Default:

null

Category:

Configuration Variables


def_nant_install_dir

_str def_nant_install_dir

Set to the directory in which the NAnt build tool is installed.

Default:

""

Category:

Configuration Variables


def_no_error_info_commands

_str def_no_error_info_commands

This list is examined when certain commands, such as project commands, are automatically generated and when ENTER is pressed in the build window.

This is a list of commands for which we do not need to insert the current directory.

Default:

Windows: 'cl javac sj sgrep vst msdev'; Unix: 'cc CC gcc g++ vst javc sgrep c89 c++ vscomp.rexx'

Category:

Configuration Variables


def_no_error_info_commands2

_str def_no_error_info_commands2

This list gets looked at for automatically generated commands like project commands.and when ENTER is pressed in the build window.

Default:

Windows: 'vsbuild java pkzip pkunzip unzip'; Unix: 'vsbuild java ls echo cp mv rm mkdir rmdir cd diff find more sed set export setenv'

Category:

Configuration Variables


def_one_file

_str def_one_file

One file per window.

If enabled, each file you open will be allocated in its own window. If disabled, each file will open in the same window.

This setting is controlled by going to "Tools" > "Options" > "General", selecting the "General" tab, and checking "One file per window"

Default:

true

Category:

Configuration Variables

See Also:

new, edit, quit, close_window


def_perl_exe_path

_str def_perl_exe_path

Set to the path to 'perl' executable.

Default:

""

Category:

Configuration Variables


def_php_exe_path

_str def_php_exe_path

Set to the path to 'php' executable.

Default:

""

Category:

Configuration Variables


def_plusminus_blocks

boolean def_plusminus_blocks

If enabled, the plusminus command will try to find code blocks to expand or collapse if the cursor is on a line that does not have a +/- bitmap on it.

Default:

true

Categories:

Configuration Variables, Tagging Functions


def_pmatch_chars

_str def_pmatch_chars

Charactors to use for parentheses pair matching.

By default, this only supports parentheses, square brackets, and curly braces.

To support < and > for template argument lists, simply append <> to this variable. Note that this can be easily confused with uses of < and > in comparison expressions.

Default:

"()[]{}"

Category:

Configuration Variables

See Also:

find_matching_paren, keyin_match_paren


def_postscript_print

typeless def_postscript_print

Print using Postscript output?

Default:

0

Category:

Configuration Variables

See Also:

enscript_command


def_print_device

typeless def_print_device

Regular expression for customizing error handling.

Default:

Category:

Configuration Variables

See Also:

next_error, prev_error


def_proctree_flags

int def_proctree_flags

Symbol filters used by Defs tool window. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_prompt_for_delete_code_block

boolean def_prompt_for_delete_code_block

Prompt user for confirmation before deleting code blocks using cut_code_block or delete_code_block.

Default:

true

Category:

Configuration Variables


def_prompt_for_unsurround_block

boolean def_prompt_for_unsurround_block

Prompt user for confirmation before unsurrounding code blocks using unsurround.

Default:

true

Category:

Configuration Variables


def_python_exe_path

_str def_python_exe_path

Set to the path to 'python' executable.

Default:

""

Category:

Configuration Variables


def_qmark_complete

_str def_qmark_complete

Indicates whether '?' is used for completion

Default:

'' (true)

Category:

Configuration Variables


def_references_flags

int def_references_flags

Symbol filters used by references tool window. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_restore_flags

int def_restore_flags

Restore option flags. Composed of a bitset of RF_*. This effects what aspects of the editor are restored when the editor is closed and restarted or when we switch workspaces (in the case of RF_PROJECTFILES).

  • RF_CLIPBOARDS -- Restore clipboards
  • RF_CWD -- Restore current working directory
  • RF_PROCESS -- Restore Build Window
  • RF_PROJECTFILES -- Restore files on a per-workspace basis
  • RF_LINEMODIFY -- Restore line modification colors
  • RF_NOSELDISP -- If this flag is not set, restore selective display
  • RF_CBROWSER_TREE -- Restore expanded nodes in Symbols tool window

Default:

RF_CWD|RF_PROJECTFILES

Category:

Configuration Variables


def_scroll_speeds

_str def_scroll_speeds

Controls how fast the editor or a list box is scrolled when you create a selection and drag the mouse outside of the editor control. Scrolling gets faster as you move the mouse further past edge. Contains scroll speed levels, ordered from slowest to fastest. Each pair is of the form ( timer delay in milliseconds . number of lines to scroll ).

Default:

'30.0 20.3 10.4 10.6'

Category:

Configuration Variables


def_search_incremental_highlight

int def_search_incremental_highlight

Highlight current and all matching occurences in current view when using incremental search (i-search).

Default:

1

Category:

Configuration Variables

See Also:

i_search


def_search_result_push_bookmark

boolean def_search_result_push_bookmark

Push a bookmark when navigating between search results.

Default:

true

Category:

Configuration Variables


def_select_proc_flags

int def_select_proc_flags

Default flags for using select_proc command.

Category:

Configuration Variables


def_select_type_block

boolean def_select_type_block

Toggles selection type between block and character. Off by default. Used in Eclipse emulation.

Category:

Configuration Variables


def_sellist_font

_str def_sellist_font

Default selection list font.

Category:

Configuration Variables

See Also:

def_jsellist_font, _sellist_form


def_short_month_mames

_str def_short_month_mames

Stores short version of the months of the year as a space separated list. Used by alias mechanism to translation the %\h% (user formatted date) escape sequence.

Default:

"Jan. Feb. Mar. Apr. May June July Aug. Sept. Oct. Nov. Dec."

Category:

Configuration Variables


def_short_weekday_names

_str def_short_weekday_names

Stores short version of days of the week as a space separated list. Used by alias mechanism to translation the %\h% (user formatted date) escape sequence.

Default:

"Sun. Mon. Tues. Wed. Thur. Fri. Sat."

Category:

Configuration Variables


def_show_all_proj_with_file

boolean def_show_all_proj_with_file

Determines whether to prompt the user to select a project when using the command 'show_file_in_projects_tb' or to just expand all relevant projects in the project tool window.

Category:

Configuration Variables


def_show_bm_tags

boolean def_show_bm_tags

Show bitmaps for tag bookmarks.

Default:

true

Category:

Configuration Variables


def_stop_process_noselection

boolean def_stop_process_noselection

Copy to clipboard will execute stop_build in the Build window if there is no selection and the last key was Ctrl+C.

#default true;

Category:

Configuration Variables

See Also:

copy_to_clipboard, stop_build


def_style3_indent_all_braces

int def_style3_indent_all_braces

If true, interpret style 3 braces (as shown in the C extension options dialog, as the following:

   if (cond)
      {
         ++i;
      }
instead of the default behavior of:
   if (cond)
      {
      ++i;
      }

Default:

false

Category:

Configuration Variables


def_surround_mode_options

int def_surround_mode_options

This option controls the behavior of the active code block surround mode. It consists of a set of bit flags of VS_SURROUND_MODE_*.

  • VS_SURROUND_MODE_ENABLED -- Enable dynamic surround
  • VS_SURROUND_MODE_DRAW_BOX -- Draw box around surround block
  • VS_SURROUND_MODE_JUMP_FAST -- Jump over block statements
  • VS_SURROUND_MODE_EDITABLE -- Allow primitive editing

Default:

0xFFFF

Category:

Configuration Variables


def_svn_global_options

_str def_svn_global_options

These are options passed to all Subversion operations before the command name.

Default:

""

Category:

Configuration Variables


def_switchbuf_cd

boolean def_switchbuf_cd

Set this variable to 1 to change the current working directory to the file that currently has focus in the editor. This variable is on by default in the GNU Emacs emulation, and off in all other emulations.

Category:

Configuration Variables


def_symbol_color_chunk_size

int def_symbol_color_chunk_size

Number of lines to color per pass when calculating symbol coloring for off-page lines. By breaking the symbol coloring work into passes, each one doing a small chunk of lines, we are able to guard against symbol coloring monopolizing the CPU and provide more consistent smooth performance.

Default:

20 lines

Category:

Configuration Variables


def_symbol_color_delay

int def_symbol_color_delay

Number of milliseconds of idle time to wait before updating the symbol coloring for the current file.

Default:

500 ms (1/2 second)

Category:

Configuration Variables


def_symbol_color_off_page_lines

int def_symbol_color_off_page_lines

Number of lines to color above and below the current page when calculating symbol coloring. The lines on the current page are calculated first, then the off-page lines are calculated on subsequent passes. This makes it possible for symbol coloring to already be up-to-date and available immediately when you page up if there has been a sufficient amount of time for it to be pre-calculated.

Default:

100 lines

Category:

Configuration Variables


def_symbol_color_scheme

se.color.SymbolColorRuleBase def_symbol_color_scheme

Active symbol coloring rule base. This is modified using the GUI only.

Default:

ACTAPP_AUTORELOADON|ACTAPP_AUTOREADONLY

Category:

Configuration Variables


def_symbol_color_timeout

int def_symbol_color_timeout

Number of milliseconds of time to allow symbol coloring to spend during each pass. If this isn't enough time, the screen may be only partially painted.

Default:

1000 ms (1 second)

Category:

Configuration Variables


def_tagging_cache_max

int def_tagging_cache_max

If the current machine has lots of memory available, we can dedicate more memory to tagging cache. This is the maximum amount we should stretch out the tagging cache to. If we can not get this much memory, we will at least get the amount specified in def_tagging_cache_size.

Default:

192M

Category:

Configuration Variables


def_tagging_cache_size

int def_tagging_cache_size

Default size in kilobytes for tag file cache.

Default:

64M

Category:

Configuration Variables


def_tagselect_flags

int def_tagselect_flags

Symbol filters used by go to definition symbol search dialog. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables

See Also:

gui_push_tag


def_tagwin_flags

int def_tagwin_flags

Symbol filters used by symbol tool window. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_tbc_expand_all

boolean def_tbc_expand_all

Expand all classes in the Class tool window. If this option is turned off, only the current (top level) class will be expanded.

Default:

false

Category:

Configuration Variables


def_tbc_expand_structs

boolean def_tbc_expand_structs

If enabled, expand all inner structs, enums, classes, etc. in the Class tool window.

Default:

false

Category:

Configuration Variables


def_tbc_filter_outside_wspace

boolean def_tbc_filter_outside_wspace

If enabled, classes that are not in the current workspace will not be included in the class heirarchy in the Class tool window. This is useful to eliminate some noise in a langauge like Java where your classes typically derive from system classes which have a deep hierarchy.

Default:

false

Category:

Configuration Variables


def_tbc_organize_by_source

boolean def_tbc_organize_by_source

Organize inherited class members in the Class tool window in categories according to their parent class. If this option is turned off, the class members will be presented in a single flat list.

Default:

true

Category:

Configuration Variables


def_tbc_sort_by_name

boolean def_tbc_sort_by_name

Sort symbols (class members) in the Class tool window by name. If this is turned off, then symbols are sorted by line number.

Default:

false

Category:

Configuration Variables


def_tbc_sort_class_by_hierarchy

boolean def_tbc_sort_class_by_hierarchy

Sort class names in the Class tool window from top-to-bottom of the inheritance hierarchy. If this is turned off, then classes will simply be sorted by name.

Default:

true

Category:

Configuration Variables


def_top_bottom_push_bookmark

boolean def_top_bottom_push_bookmark

If enabled, push a bookmark before jumping to the top or bottom of the current buffer. This allows you to use pop-bookmark to jump back to the previous location.

Default:

false

Category:

Configuration Variables


def_top_bottom_style

_str def_top_bottom_style

If enabled, preserve Column when going to top or bottom of buffer.

Default:

0 (false, for most emulations)

Category:

Configuration Variables


def_tprint_device

_str def_tprint_device

Device to send printout to when printing on Unix.

Default:

'/dev/lp0'

Category:

Configuration Variables

See Also:

tprint


def_trailing_codes

_str def_trailing_codes

Additional text / printer codes to append to output file when printing on Unix.

Default:

''

Category:

Configuration Variables

See Also:

tprint


def_twoup_print

typeless def_twoup_print

Print output side-by-side (two-up).

Default:

0

Category:

Configuration Variables

See Also:

enscript_command


def_update_tagging_extra_idle

int def_update_tagging_extra_idle

Amount of idle time in milliseconds to wait before updating the current context window, Defs tool window, and Symbol tool window if we have already waited 'def_update_tagging_idle', but the background tagging has not yet updated the current context.

Default:

250 ms

Category:

Configuration Variables


def_update_tagging_idle

int def_update_tagging_idle

Amount of idle time in milliseconds before updating the current context window, Defs tool window, and Symbol tool window.

Default:

500 ms (1000 on Unix)

Category:

Configuration Variables


def_uri_scheme_list

_str def_uri_scheme_list

Holds a list of space-separated URI scheme names.

Note: Use just the names, don't include '://'

Default:

"file ftp http https"

Category:

Configuration Variables


def_use_390_display_translations

int def_use_390_display_translations

If enabled, use S/390 display translations.

Default:

false

Category:

Configuration Variables

See Also:

p_display_xlat


def_use_old_goto_definition_dialog

boolean def_use_old_goto_definition_dialog

Use the classic "Go to Definition" dialog instead of the new "Find Symbol" tool window for gui_push_tag.

Default:

false

Category:

Configuration Variables


def_use_timers

boolean def_use_timers

Set this to 'false' to disable all AutoSave and Context Tagging® timer functions. This is for debugging purposes only. This variable should NEVER be modified programatically. If you want to just turn off timers temporarily use _use_timers instead.

Default:

true

Category:

Configuration Variables


def_use_workspace_bm

boolean def_use_workspace_bm

Store bookmarks in the workspace history file. The alternate is in the vrestore.slk file.

Default:

false

Category:

Configuration Variables


def_use_xp_opendialog

int def_use_xp_opendialog

If set to 1, use the older Windows XP style open dialog when running on Windows Vista, Windows 7, or later

Default:

0

Category:

Configuration Variables


def_vim_change_cursor

boolean def_vim_change_cursor

Indicates whether or not to change the cursor between Vim command and insert mode.

There is an issue with the cursor appearing longer than it should in UTF8 files on Linux and UNIX system.

Default:

true

Category:

Configuration Variables


def_vim_esc_codehelp

boolean def_vim_esc_codehelp

If on, and in Vim emulation, ESC during any codehelp or autocomplete will not only dismiss the dialog, but also switch to command mode.

Default:

false

Category:

Configuration Variables


def_warn_about_vslickconfig

boolean def_warn_about_vslickconfig

Set this to 0 if you do not want to be warned about having a VSLICKCONFIG or VSLICKCLASSICCONFIG environment variable, which as of SlickEdit 2008, are no longer supported.

VSLICKCONFIG has been replaced with SLICKEDITCONFIG which specifies a versioned subdirectory.

Default:

true

Category:

Configuration Variables


def_warn_adaptive_formatting

boolean def_warn_adaptive_formatting

Whether we warn the user that adaptive formatting has occurred.

Default:

true

Category:

Configuration Variables


def_xml_max_smart_editing

int def_xml_max_smart_editing

Maximum seek position within an XML document where syntax indent and SmartPaste® will still work. Beyond this point, Enter and paste will work the same as it does in fundamental mode.

Default:

125k

Category:

Configuration Variables


def_xml_messages_limit

int def_xml_messages_limit

If a document contains excessive XML validation errors, the number of message actually logged generated can be capped by setting the limit to a value greater than 0.

Default:

25000

Category:

Configuration Variables


def_xml_no_schema_list

_str def_xml_no_schema_list

Holds a list of space-separated extensions on which to bypass XML color coding set up. Adding an extension to this list will prevent the editor from trying to fetch the dtd/schema when these XML files are loaded.

Note: You must prepend the '.' to the extension (e.g. '.xml' NOT 'xml').

Default:

''

Category:

Configuration Variables


def_xmldoc_filter_flags

int def_xmldoc_filter_flags

Symbol filters used by XMLDoc editor. This setting contains a bitset of VS_TAGFILTER_* flags used for selecting which symbol types to display.

Category:

Configuration Variables


def_xw_pre_tag_search_depth

int def_xw_pre_tag_search_depth

Default xml/html tag nesting depth for searching tags that preserve content.

Default:

10

Category:

Configuration Variables


delay

void delay(int secondsX100, _str option="")

Waits secondsX100 is in hundredths of a second. If 'K' is specified for option, this function returns when a key is pressed.

Category:

Miscellaneous Functions


delete_all

_command typeless delete_all()

Deletes contents of current buffer

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


delete_blank_lines

_command typeless delete_blank_lines()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


delete_bookmark

_command int delete_bookmark(_str bm_id='', int vsbmflags=VSBMFLAG_STANDARD)

Deletes the bookmark specified.

Parameters:

bm_id - is an identifier returned by one of the functions push_bookmark or set_bookmark. If bm_id is not found, this function does nothing.

vsbmflags -

Returns: int

Category:

Bookmark Functions


delete_bookmark_from_tree

_command void delete_bookmark_from_tree()

Deletes the currently selected bookmark from the Bookmarks tool window.

Category:

Bookmark Functions


delete_char

_command void delete_char(_str force_wrap='')

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


delete_code_block

_command void delete_code_block()

Attempts to identify the block of code starting at the current line, and prompts to delete the entire block of code.

Returns: void

Returns 0 if successful. Common return codes are 1 (no block at cursor) and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_line


delete_end_line

_command void delete_end_line()

Deletes text from cursor to end of line.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_end_line


delete_file

int delete_file(_str filename)

Deletes the filename specified.

Returns: int

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.

Category:

File Functions


delete_full_word

_command typeless delete_full_word()

Same as delete_word, except ignores the def_subword_nav setting and deletes from the cursor to the end of the current full word.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_subword


delete_line

_command void delete_line()

Deletes the current line.

This function is hooked into auto-unsurround. If you simply want to programmatically delete a single line, call _delete_line.

Returns: void

Returns 0 if successful. Common return codes are 1 (no line at cursor) and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_line, _delete_line


delete_name

void delete_name(int index)

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.

Category:

Names Table Functions

See Also:

find_index, name_match, name_name, name_type, name_info, call_index, insert_name, set_name_info, replace_name


delete_prev_full_word

_command void delete_prev_full_word()

Same as delete_prev_word, except ignores the def_subword_nav setting and deletes from the cursor to the beginning of the previous full word.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_prev_word, delete_prev_subword


delete_prev_subword

_command void delete_prev_subword()

Same as delete_prev_word, except ignores the def_subword_nav setting and deletes from the cursor to the beginning of the previous subword.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_prev_word, delete_prev_full_word


delete_prev_word

_command void delete_prev_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_prev_word


delete_selection

_command void delete_selection()

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.

Returns: void

On error, displays message. Possible message is "Text not selected".

Category:

Selection Functions

See Also:

cut


delete_space

_command typeless delete_space()

Used in EMACS emulation. Deletes all space and tab characters to left and to right of cursor on the current line.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


delete_subword

_command typeless delete_subword()

Same as delete_word, except ignores the def_subword_nav setting and deletes from the cursor to the end of the current subword.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_full_word


delete_tile

_command typeless delete_tile(typeless arg1='', typeless arg2='', typeless move_edge='', typeless direction='', typeless start_key='')

Allows you to delete a window tile by pointing to the edge of the window you wish to delete with the cursor keys.

Parameters:

move_edge - '' to delete window, 'e' to move window

direction - UP, DOWN, LEFT, or RIGHT

start_key - UP, DOWN, LEFT, RIGHT, or ''

Returns: typeless

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.

Applies To:

Edit Window

Category:

Window Functions


delete_whole_word

_command typeless delete_whole_word()

Delete current word at cursor.

Returns: typeless

Returns 0 if successful. Common return codes are TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Clipboard Functions, Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

delete_word, cut_word


delete_word

_command typeless delete_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

cut_word


deselect

_command void deselect()

Clears the selection.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


deselect_all

_command void deselect_all()

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.

Category:

Miscellaneous Functions


deselect_mark

_command void deselect_mark()

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.

Category:

Selection Functions


dfprintf

void dfprintf(char *s, ...)

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 preserved even if the application crashes.

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®.

This function's parameters are identical to the C run-time printf function.

Category:

Miscellaneous Functions

See Also:

xprintf, mprintf, dfprintf


diff

_command int diff(_str cmdline='', boolean showNoEditorOptions=false)

Visually compare two files or directories for differences.

Command line usage:

   diff [options] <file1> <file2>

Command line options: (options are case insensitive)

-i
interleaved output
-r1
make file 1 read only
-r2
make file 2 read only
-q
quiet option:only shuts off the "Files match" message
-modal
run diff modally
-B1
filename1 is a buffer name and should be loaded +b w/o absolute
-B2
filename2 is a buffer name and should be loaded +b w/o absolute
-bi1
filename1 is a buffer id
-bi2
filename2 is a buffer id
-preserve1
Do not delete buffer 1 when the diff closes. Should be used in conjunction with -b1 or -bi1. 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 p_modify(VSP_MODIFY) off, and set p_undo_steps(VSP_UNDOSTEPS) to a large number(32000 or more).
-preserve2
Same as -preserve1, except for buffer 2.
-NoMap
Do not add information about this diff to the mapping files
-optionsfile
Put options in a file. Used to launch a multifile diff in a different process. Supports the following options:
        filespec:<filespec list, space delimited>
        excludefilespec:<filespec list, space delimited>
        recursive:1|0
        path1:<first path>
        path2:<second path>
diff will delete the file after it retrieves the information from the file
-listonly <outputfile> <PATH1FILELIST|PATH2FILELIST> <differentfiles|vieweddifferentfiles|matchingfiles|filesnotinpath1|filesnotinpath2>
will run a multifile diff and give the for the path specified by the second argument in the output file specified. The third argument is a comma delimited list of what type of items to put in the output file.
-verifymfd
verify multifile diff input is valid
-registerasmfdchild <parent_wid>
specify that this diff will be a child of the multi-file diff dialog <parent_wid>
-refreshtagsclose <file1> <file2>
must be used "-registerasmfdchild <wid>". When this diff is closed, recompare file1 and file2 and refresh the tags expanded for this file in the parent dialog.
-nomapping
Do not save mapping for these files in diffmap.ini. This option should be used for diffs that are done with data that are not real files, like two old versions of a file from a version control system
-d1
Get file one from disk
-d2
Get file two from disk
-dialogtitle <title>
Set title of diff dialog to title
-file1title <title>
Set title of file1 dialog to title
-file2title <title>
Set title of file2 dialog to title
-savebutton1caption <caption>
Set title caption of file1's save button
-savebutton2caption <caption>
Set title caption of file2's save button
-viewonly
View differences only. Buffers are set to read only and copy/delete buttons are hidden.
-comment
currently unused
-ok
currently unused
-commentbuttoncaption
currently unused - Caption for OK button
-viewid1
file1 is a view id
-viewid2
file2 is a view id
-imaginarylinecaption
caption to use for Imaginary Buffer Lines
-autoclose
If a diff is launched from a multi-file diff, when the Next Diff button is pressed and there are no more differences, automatically close this diff dialog
-geometry <width>[xHeight [+X[+Y]]l]
specify width, height, x and y
-restorefromini
save/restore geometry information and options to/from diffmap.ini.
-tags
Show different tags for these files.
-noeol
Do not compare the EOL characters
-symbol <symbolname>
Compare symbol named symbolname in both files
-useglobaldata
Get options from the gDiffSetupData global struct.
-sourcediff
Diff code, use token information to balance files before running diff

The options below are intended only to be used to implement asynchronous diffs which invoke another copy of the editor.

-optionflags <flags>
set def_diff_options to flags
-recursive
recurse subdirectories(multi-file only)
-loadstate <diffstatefilename>
Load the previously saved diff output specified

Parameters:

cmdline -

showNoEditorOptions -

Returns: int

0 if successful, Otherwise a nonzero error code.

Note that "successful" implies nothing about the number of differences between the files, just that all files were loaded successfully, and the difference engine ran succesfully.

Categories:

Buffer Functions, File Functions

See Also:

merge, diff_with


diff_current_file

_command int diff_current_file(_str diffargs="")

Compare the current file, assuming it is modified, against the original version on disk.

Parameters:

diffargs - Arguments to pass along to the diff command

Returns: int

0 if successful, Otherwise a nonzero error code.

Note that "successful" implies nothing about the number of differences between the files, just that all files were loaded successfully, and the difference engine ran succesfully.

Categories:

Buffer Functions, File Functions

See Also:

diff, diff_with


diff_with

_command int diff_with(_str dirname='')

Compare the current buffer against another file.

Command line usage:

   diff-with <dir or file name>

The directory name can be just a directory root, and diff-with will splice together the entire matching file path for you. For example, if the current file is "E:\13.0.2\unittest\cparse\testcparse.cpp", you can compare it to "E:\14.0.0\unittest\cparse\testcparse.cpp" simply using the command:

    diff-with e:\14.0.0

Parameters:

dirname - file or directory name to compare against

Returns: int

0 if successful, Otherwise a nonzero error code.

Note that "successful" implies nothing about the number of differences between the files, just that all files were loaded successfully, and the difference engine ran succesfully.

Categories:

Buffer Functions, File Functions

See Also:

diff


dir

_command typeless dir(_str path='')

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.

Parameters:

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.

Returns: typeless

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.

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.

Category:

File Functions

See Also:

fileman


dir_match

_str dir_match(_str name, boolean find_first)

Parameters:

name - directory name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next directory name which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Categories:

Completion Functions, File Functions

See Also:

f_match


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Directory List Box Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_fixed_font
p_font_bold
p_font_charset
p_font_height
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_font_width
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


dirnew_match

_str dirnew_match(_str name, boolean find_first)

Parameters:

name - directory path to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next directory name which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

If there are absolute no matches to name, and find_first is true, it will return name.

This function behaves like dir_match, but allows the user to type a non-existent directory name. This is useful in order to get completion for directory names, but still be able to specify a new path.

Categories:

Completion Functions, File Functions

See Also:

f_match


dirnq_match

_str dirnq_match(_str name, boolean find_first)

Parameters:

name - directory name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next directory name which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

"dirnq" means "directory no quote". This function does not quote the items returned.

Categories:

Completion Functions, File Functions

See Also:

dir_match, fnq_match


Display Functions

_pixels_per_inch_x
_screen_height
_screen_width
_twips_per_pixel_x
_twips_per_pixel_y


display_hscroll

_command void display_hscroll(_str yesno="")

Determines whether horizontal scroll bars are displayed on edit windows.

Category:

Miscellaneous Functions


display_top

_command void display_top(_str yesno="")

Determines whether a top of line indicator is displayed in edit windows.

Category:

Miscellaneous Functions


display_vscroll

_command void display_vscroll(_str yesno="")

Determines whether vertical scroll bars are displayed on edit windows.

Category:

Miscellaneous Functions


dload

_command typeless dload(_str filename='')

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 are prompted for one. See simple.c for an example of a DLL that can be loaded.

This function is not yet available in the UNIX version.

Returns: typeless

Returns 0 if successful.

Category:

Macro Programming Functions

See Also:

dunload, _dllload


do_surround_mode_keys

boolean do_surround_mode_keys(boolean force=false, NotificationFeature callingFeature=-1)

Process keys handled by surround mode. Immediately exit from surround mode if any unrecognized key or mouse event happens.

While in surround mode, cursor-down will move the line after the last line of the block down one line and indent it within the block. Likewise, cursor-up will move the last line in the block outside and unindent it to it's original state.

Parameters:

force - (default=false) force surround mode even if disabled

Category:

Editor Control Methods


doExpandSpace

boolean doExpandSpace(_str langId)

Determines whether we try to expand the text when the user hits the space bar.

Parameters:

langId -

Returns: boolean

boolean

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


dos

_command typeless dos(_str command='', _str unused='', _str errorFileName='')

Executes the external program command specified. No search for 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.

Parameters:

command - parameters of the form: [-e | -w | -s | -t] ProgramName Args

Returns: typeless

Returns positive return code of program executed which may include 0. 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, 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.

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

Category:

Miscellaneous Functions

See Also:

shell


dos_copy

_command typeless dos_copy(_str cmdline='')

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.

Returns: typeless

Return code depends on operating system. Use the copy_file built-in for predictable and portable results.

Category:

File Functions


dos_del

_command typeless dos_del(_str cmdline='')

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.

Category:

File Functions


dos_move

_command typeless dos_move(_str cmdline='')

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.

Returns: typeless

Return code depends on operating system.

Category:

File Functions


down

int down(int Noflines=1, boolean doScreenLines=false)

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.

Parameters:

Noflines - Number of lines to cursor down

doScreenLines - When true, cursor down to next soft wrap line or next line.

Returns: int

Returns 0 if successful. Otherwise BOTTOM_OF_FILE_RC is returned.

Example:

    status=down();
    if (status==BOTTOM_OF_FILE_RC ) {
        message(get_message(status));
    }

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

up


draw

_command typeless draw(...)

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.

Applies To:

Edit Window

Category:

Miscellaneous Functions


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Drive List Properties

p_active_form
p_backcolor
p_bbside
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_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


dsay

void dsay(_str string)

Write a string to the SlickEdit log file. The log file is named "vs.log" and is located in the user's configuration directory.

Parameters:

string - string to display

Category:

Miscellaneous Functions


dunload

_command typeless dunload(_str filename='')

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Macro Programming Functions

See Also:

dload, _dllload


duplicate_window

_command typeless duplicate_window()

Creates a new window viewing the current buffer. The window size of the original window is not duplicated.

Applies To:

Edit Window

Categories:

Edit Window Methods, Window Functions


dynamic_surround

_command int dynamic_surround(_str quiet='', _str onlyIfEmpty='')

Locate the enclosing block statement for the line the cursor is currently located on and attempt to jump into dynamic surround to adjust the scope of that block statement.

Category:

Editor Control Methods


e

_command typeless e(_str filenameArg='', typeless a2_flags='', _str auto_create_firstw_arg='')

Command line version of the gui_open command. Edits the file(s) specified. filespec may have wild card characters (* or ? for DOS). The File Options dialog box ("Tools", "Options", "File Options...", select the Load tab) sets global edit command options. The Extension Options dialog box optional defines a per extension encoding used by the edit 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", "Options", "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 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 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 SlickEdit to interpret a file in UNIX format.
+FM [buf_name]
Force SlickEdit to interpret a file in MAC format.
+FD [buf_name]
Force SlickEdit to interpret a file in DOS format.
+Fnnn
Force SlickEdit to use nnn as the decimal value of the line separator character.
+FTEXT
SBCS/DBCS mode. Open SBCS/DBCS file. This is the default mode when no mode (either SBCS/DBCS or Unicode) is specified.
+FEBCDIC
SBCS/DBCS mode. Open EBCDIC file.
+FUTF8
Unicode mode. Open UTF-8 file with or without signature.
+FUTF8S
Unicode mode. Open UTF-8 file with or without signature.
+FUTF16LE
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16LES
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16BE
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16BES
Unicode mode. Open UTF-16 big endian file with or without signature.
+FUTF32LE
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32LES
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32BE
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32BES
Unicode mode. Open UTF-32 big endian file with or without signature.
+FCPddd
Unicode mode. Open code page file specified by ddd. Under windows, this can be any valid code page or one of the VSCP_* constants defined in "slick.sh."
+FACP
Unicode mode. Open active code page file. Under windows, this can be any valid code page or one of the VSCP_* constants defined in "slick.sh."
+FAUTOXML
Unicode mode. Open XML file. The encoding is determined based on the encoding specified by the "?xml" tag. If the encoding is not specified by the "?xml", the file data is assumed to be UTF-8 data which is consistent with XML standards. We applied some modifications to the standard XML encoding determination to allow for some user error. If the file has a standard Unicode signature, the Unicode signature is assumed to be correct and the encoding defined by the "?xml" tag is ignored.
+FAUTOUNICODE
If the file has a standard Unicode signature, open the file as a Unicode file. Otherwise, the file is loaded as SBCS/DBCS data.
+FAUTOUNICODE2
If the file has a standard Unicode signature or "looks" like a Unicode file, open the file as a Unicode file. Otherwise, the file is loaded as SBCS/DBCS data. This option is NOT full proof and may give incorrect results.
+FAUTOEBCDIC
If the file "looks" like an EBCDIC file, open the file as an EBCDIC file. Otherwise, the file is loaded as SBCS/DBCS data. This option is NOT full proof and may give incorrect results. We have attempted to make this option support binary EBCDIC files.
+FAUTOEBCDIC,UNICODE
This option is a combination of "+FAUTOEBCDIC" and "+FAUTOUNICODE" options.
+FAUTOEBCDIC,UNICODE2
This option is a combination of "+FAUTOEBCDIC" and "+FAUTOUNICODE2" options.
+ or -E
Turn on/off expand tabs to spaces switch. Default is off. Tab increments of 8 are the default if not otherwise specified in the language setup for this file type.
+ 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. This MUST specify the exact contents of p_buf_name or p_DocumentName. DO NOT put quotes around buffer names with spaces. Use absolute() if necessary when searching for a fully qualified filename.
+N or -N
Network support switch. When on, 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.

Returns: typeless

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.

Applies To:

Edit Window

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.

Category:

File Functions

See Also:

gui_open


e_match

_str e_match(_str name, boolean find_first)

Parameters:

prefix_name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


edit_associated_file

_command void edit_associated_file()

Find the header or source file associated with the current file in the editor and open it.

Category:

File Functions

See Also:

gui_open, edit


edit_file

_str edit_file(_str filename)

Loads filename. Filename may contain options allowed by load_files built-in.

Parameters:

filename - may contain options. Only one filename may be given

Returns: _str

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, File Functions


edit_file_in_project

_command typeless edit_file_in_project(_str filenames='')

Command line version of the project_load -p command. Edits the file(s) specified. Only the file names need to be supplied, not their entire paths.

If you need to edit a file whose name contains space characters, place double quotes around the name.

This command accepts most of the same options as the edit() command.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions

See Also:

edit, project_load


edit_file_in_workspace

_command typeless edit_file_in_workspace(_str filenames='')

Command line version of the project_load command. Edits the file(s) specified. Only the file names need to be supplied, not their entire paths.

If you need to edit a file whose name contains space characters, place double quotes around the name.

This command accepts most of the same options as the edit() command.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions

See Also:

edit, project_load


Edit Window Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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

_GetDefaultExtensionOptions
_GetDefaultLanguageOptions
_SetDefaultExtensionOptions
_SetDefaultLanguageOptions
_SetExtensionReferTo
back
caps
case_toggle
comment
comment_erase
forward
re_search
re_toggle
renumber
toggle_comment
unnum
wleft_margin


Edit Window Methods

_adjust_block_selection
_AllocColor
_autoclipboard
_begin_char
_begin_identifier
_begin_line
_begin_select
_begin_select_compare
_buf_transfer
_clex_find
_clex_identifier_chars
_clex_identifier_notre
_clex_identifier_re
_clex_is_identifier_char
_clex_skip_blanks
_copy_color_coding_to_clipboard
_copy_from_clipboard
_copy_to_clipboard
_copy_to_cursor
_cursor_move_deselects
_cursor_move_extendssel
_delete_buffer
_delete_char
_delete_line
_delete_text
_delete_window
_draw_rect
_enabled
_end_identifier
_end_line
_end_select
_end_select_compare
_expand_tabsc
_expand_tabsc_raw
_ext_commentwrap_flags
_find_longest_line
_font_flags2props
_font_props2flags
_FreeColor
_fselect_line
_get_window
_GetBufferContents
_GetCaps
_GetCommentWrapFlags
_GetFontCharSet
_GetSymbolColoringSchemeName
_GetTextColor
_GoToOldLineNumber
_GoToROffset
_hex_begin_line
_hex_down
_hex_end_line
_hex_keyin
_hex_left
_hex_pagedown
_hex_pageup
_hex_right
_hex_up
_in_comment
_in_string
_InheritColor
_insert_drive_list
_insert_font_list
_insert_state
_insert_text
_insert_text_raw
_insert_toggle
_inslit.on_create
_join_line
_JoinLineToCursor
_justifyok.on_create
_kbd_add_callback
_kbd_remove_callback
_kbd_try_callbacks
_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
_prev_window
_print
_QReadOnly
_QROffset
_QSymbolColoringEnabled
_QSymbolColoringErrors
_QSymbolColoringSupported
_rawLength
_rawSubstr
_rawText
_refresh_scroll
_remove_duplicates
_restore_draw_setup
_restore_pos2
_rubout
_save_draw_setup
_save_pos2
_select_block
_select_char
_select_line
_select_match
_SetAllOldLineNumbers
_SetEditorLanguage
_SetSymbolColoringEnabled
_SetSymbolColoringErrors
_SetSymbolColoringSchemeName
_SetTextColor
_ShowWindow
_spell_check
_spell_check_area
_split_line
_text_colc
_text_height
_text_width
_tprint
_tprint_format
_undo
_use_edit_font
append_cut
append_cut2
append_to_clipboard
autocomplete
autocomplete_space
AutoCompleteUpdateInfo
backtab
backward_down_sexp
backward_up_sexp
begin_line
begin_line_text_toggle
begin_select
begin_window
begin_word
binary_mode
block_insert_mode
block_was_read
bottom
bottom_left_of_window
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_asterisk
c_begin
c_endbrace
c_enter
c_format
c_format_selection
c_mode
c_paren
c_semicolon
c_slash
c_space
c_tab
call_event
cap_selection
cap_word
cbacktab
center_line
center_region
center_within_margins
column_process_list
comment_wrap
comment_wrap_preserve_width
comment_wrap_preserve_width_toggle
comment_wrap_toggle
complete_list
complete_more
complete_next
complete_next_match
complete_next_no_dup
complete_prev
complete_prev_match
complete_prev_no_dup
convert_spaces2tabs
convert_tabs2spaces
copy_full_word
copy_lines_down
copy_lines_up
copy_region
copy_subword
copy_to_clipboard
copy_to_cursor
copy_ucn_as_unicode
copy_unicode_as_c
copy_unicode_as_java
copy_unicode_as_regex
copy_unicode_as_ucn
copy_unicode_as_xml
copy_unicode_as_xmldec
copy_word
count_lines
ctab
cua_select
cur_identifier
cur_word
current_func_signature
current_proc
cursor_down
cursor_left
cursor_right
cursor_up
cut
cut_code_block
cut_end_line
cut_full_word
cut_level
cut_line
cut_next_sexp
cut_prev_level
cut_prev_sexp
cut_prev_word
cut_region
cut_sentence
cut_subword
cut_whole_word
cut_word
cut_word2
delete_all
delete_blank_lines
delete_code_block
delete_end_line
delete_full_word
delete_line
delete_prev_full_word
delete_prev_subword
delete_prev_word
delete_space
delete_subword
delete_whole_word
delete_word
down
duplicate_window
edit_file
emacs_paste
emacs_quit
emacs_scroll_down
emacs_scroll_up
emacs_select_block
emacs_select_char
end_line
end_line_text_toggle
end_select
end_window
enter_on_bl
enumerate
exchange_point_and_mark
expand_alias
expand_tabs
file
find
find_current
find_delimiter
find_matching_paren
find_next
find_prev
first_non_blank
format_columns
forward_down_sexp
forward_up_sexp
fundamental_mode
get
get_line
get_line_raw
get_match_text
get_text
get_text_raw
get_text_safe
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_reflow_comment
gui_replace
gui_replace_backward
gui_replace_regex
gui_replace2
gui_visit_file
h_format
h_format_selection
hex
hex_backspace
hex_bottom
hex_del
hex_keyin
hex_select_line
hex_select_word
hex_tab
hex2dec
highlight_selection
html_contentwrap
html_contentwrap_toggle
html_formatting
html_formatting_toggle
html_mode
html_preview
html_taglayout
html_taglayout_toggle
indent_line
indent_on_enter
indent_previous
indent_region
indent_rigidly
indent_selection
indent_with_tabs
indent_with_tabs_toggle
insert_file_list
insert_line
insert_line_raw
insert_literal
insert_object
insert_toggle
java_mode
java_proc_search
javadoc_comment
join_line
join_lines
keyin
keyin_buf_name
keyin_dir_name
keyin_enter
keyin_space
keyin_underscore
kill_window
left
left_justify
left_side_of_window
line_to_bottom
line_to_top
linehex
linewrap_delete_char
linewrap_rubout
load_files
lock_selection
lowcase_word
ma
maybe_split_insert_line
modify_toggle
move_lines_down
move_lines_up
move_text_backtab
move_text_tab
move_to_cursor
name
next_char
next_full_word
next_level
next_paragraph
next_ref
next_sentence
next_sexp
next_subword
next_word
nosplit_insert_line
nosplit_insert_line_above
overlay_block_selection
overlay_clipboard
page_down
page_left
page_right
page_up
pas_proc_search
pascal_enter
pascal_mode
past_end_of_line
paste
point
prepeat_search
prev_buffer
prev_char
prev_full_word
prev_level
prev_paragraph
prev_ref
prev_sentence
prev_sexp
prev_subword
prev_word
process_list
psearch
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
remove_duplicates
remove_highlight
remove_highlight_in_selection
remove_trailing_spaces
repeat_search
replace_line
replace_line_raw
replace_string
restore_pos
reverse_regex_search
rexx_mode
right
right_side_of_window
rubout
ruler
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_full_word
select_line
select_mode
select_next_sexp
select_paragraph
select_prev_sexp
select_proc
select_subword
select_tag_file
select_toggle
select_whole_word
select_word
set_next_error
set_scroll_pos
show_point
slick_enter
slick_paren
slick_semicolon
slick_space
slickc_mode
sort_buffer
spell_check
spell_check_files
spell_check_source
spell_check_word
split_insert_line
split_line
symbol_coloring_errors_toggle
symbol_coloring_next_scheme
symbol_coloring_prev_scheme
symbol_coloring_set_scheme
symbol_coloring_toggle
tab
tabify_region
tabs
text_col
top
top_left_of_window
top_of_buffer
top_of_window
translate_again
translate_backward
translate_forward
transpose_chars
transpose_lines
transpose_sexp
transpose_words
traverse_char
trunc
undo
undo_cursor
undo_steps
unindent_line
untabify_region
up
upcase_word
update_format_line
vera_paren
view_formfeed_toggle
view_line_numbers_toggle
view_nlchars_toggle
view_spaces_toggle
view_specialchars_toggle
view_tabs_toggle
visit_file
wfont
wfont_zoom
wfont_zoom_in
wfont_zoom_out
word_wrap
word_wrap_toggle
wordwrap_delete_char
xml_contentwrap
xml_contentwrap_toggle
xml_formatting
xml_formatting_toggle
xml_mode
xml_taglayout
xml_taglayout_toggle
xmldoc_comment
xmldoc_mode
xsd_mode
zap_line


Edit Window Properties

p_active_form
p_adaptive_formatting_flags
p_attribute_casing
p_AutoSelectExtension
p_AutoSelectLanguage
p_backcolor
p_bbside
p_begin_end_style
p_binary
p_BoundsEnd
p_BoundsStart
p_buf_flags
p_buf_id
p_buf_name
p_buf_size
p_buf_user
p_buf_width
p_buser
p_caps
p_char_width
p_child
p_client_height
p_client_width
p_col
p_color_flags
p_cursor_x
p_cursor_y
p_DebugMode
p_display_xlat
p_DocumentName
p_edit
p_embedded
p_embedded_orig_values
p_EmbeddedCaseSensitive
p_EmbeddedIdentifierChars
p_EmbeddedLexerName
p_enabled
p_encoding
p_encoding_set_by_user
p_encoding_translation_error
p_eventtab
p_eventtab2
p_extension
p_file_date
p_fixed_font
p_font_bold
p_font_charset
p_font_height
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_font_width
p_forecolor
p_function_brace_on_new_line
p_HasBuffer
p_height
p_help
p_hex_field
p_hex_mode
p_hex_nibble
p_hex_Nofcols
p_hex_toppage
p_hex_value_casing
p_hwnd
p_hwndframe
p_identifier_chars
p_indent_case_from_switch
p_indent_style
p_indent_with_tabs
p_index
p_isbutton_bar
p_IsTempEditor
p_KeepPictureGutter
p_keyword_casing
p_LangCaseSensitive
p_LangId
p_LastModified
p_LCBufFlags
p_left_edge
p_lexer_name
p_line
p_line_numbers_len
p_LinesForceWrapped
p_margins
p_MaxLineLength
p_mdi_child
p_mode_eventtab
p_mode_name
p_modify
p_ModifyFlags
p_mouse_pointer
p_MouseActivate
p_name
p_newline
p_next
p_no_space_before_paren
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_parent
p_pointer_style
p_prev
p_ProtectReadOnlyMode
p_rawpos
p_RBufSize
p_ReadOnly
p_readonly_mode
p_readonly_set_by_user
p_redraw
p_rel_line
p_RLine
p_RNoflines
p_scale_mode
p_scroll_left_edge
p_show_tabs
p_showeof
p_ShowSpecialChars
p_SoftWrap
p_SoftWrapOnWord
p_SourceRecording
p_SwapColors
p_SyntaxIndent
p_tabs
p_tag_casing
p_TextWrapChangeNotify
p_tile_id
p_TruncateLength
p_undo_steps
p_user
p_user2
p_UTF8
p_value_casing
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_xlat
p_xyparent
p_xyscale_mode
p_y
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


edit_with

_command typeless edit_with(_str command='')

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.

Parameters:

cmdline - a string in the format: filename command

Returns: typeless

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.

Example:

   for-select edit-with %f  c/string1/string2
   for-select edit-with %f  c/string1/string2/**   No prompting

Category:

Miscellaneous Functions


Editor Control Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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

_GetDefaultExtensionOptions
_GetDefaultLanguageOptions
_SetDefaultExtensionOptions
_SetDefaultLanguageOptions
_SetExtensionReferTo
caps
case_toggle
re_search
re_toggle
renumber
unnum
wleft_margin


Editor Control Methods

_adjust_block_selection
_AllocColor
_autoclipboard
_begin_char
_begin_identifier
_begin_line
_begin_select
_begin_select_compare
_buf_transfer
_center_window
_CheckLineLengths
_clex_find
_clex_identifier_chars
_clex_identifier_notre
_clex_identifier_re
_clex_is_identifier_char
_clex_jspAddKeywordAttrs
_clex_jspGetConfig
_clex_jspSetConfig
_clex_skip_blanks
_clex_xmlAddKeywordAttrs
_clex_xmlGetConfig
_clex_xmlSetConfig
_copy_color_coding_to_clipboard
_copy_from_clipboard
_copy_to_clipboard
_copy_to_cursor
_cursor_move_deselects
_cursor_move_extendssel
_delete_char
_delete_line
_delete_text
_delete_window
_draw_rect
_enabled
_end_identifier
_end_line
_end_select
_end_select_compare
_expand_tabsc
_expand_tabsc_raw
_ext_commentwrap_flags
_find_longest_line
_font_flags2props
_font_props2flags
_FreeColor
_fselect_line
_get_window
_GetBufferContents
_GetCaps
_GetCommentWrapFlags
_GetFontCharSet
_GetSymbolColoringSchemeName
_GetTextColor
_GoToOldLineNumber
_GoToROffset
_hex_begin_line
_hex_down
_hex_end_line
_hex_keyin
_hex_left
_hex_pagedown
_hex_pageup
_hex_right
_hex_up
_in_comment
_in_string
_InheritColor
_insert_drive_list
_insert_font_list
_insert_state
_insert_text
_insert_text_raw
_insert_toggle
_inslit.on_create
_join_line
_JoinLineToCursor
_justifyok.on_create
_kbd_add_callback
_kbd_remove_callback
_kbd_try_callbacks
_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
_QReadOnly
_QROffset
_QSymbolColoringEnabled
_QSymbolColoringErrors
_QSymbolColoringSupported
_rawLength
_rawSubstr
_refresh_scroll
_remove_duplicates
_restore_draw_setup
_restore_pos2
_rubout
_save_draw_setup
_save_pos2
_select_block
_select_char
_select_line
_select_match
_SetAllOldLineNumbers
_SetEditorLanguage
_SetSymbolColoringEnabled
_SetSymbolColoringErrors
_SetSymbolColoringSchemeName
_SetTextColor
_ShowWindow
_spell_check
_spell_check_area
_split_line
_text_colc
_text_height
_text_width
_undo
_unique_name
_unique_tab_index
_use_edit_font
append_cut
append_to_clipboard
autocomplete
autocomplete_space
AutoCompleteUpdateInfo
backtab
backward_down_sexp
backward_up_sexp
begin_line
begin_line_text_toggle
begin_window
begin_word
binary_mode
block_insert_mode
block_was_read
bottom
bottom_left_of_window
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_asterisk
c_begin
c_endbrace
c_enter
c_format
c_mode
c_paren
c_semicolon
c_slash
c_space
c_tab
call_event
cap_selection
cap_word
cbacktab
center_line
center_region
center_within_margins
column_process_list
comment_wrap
comment_wrap_preserve_width
comment_wrap_preserve_width_toggle
comment_wrap_toggle
complete_list
complete_more
complete_next
complete_next_match
complete_next_no_dup
complete_prev
complete_prev_match
complete_prev_no_dup
convert_spaces2tabs
convert_tabs2spaces
copy_full_word
copy_lines_down
copy_lines_up
copy_region
copy_subword
copy_to_clipboard
copy_to_cursor
copy_to_file
copy_ucn_as_unicode
copy_unicode_as_c
copy_unicode_as_java
copy_unicode_as_regex
copy_unicode_as_ucn
copy_unicode_as_xml
copy_unicode_as_xmldec
copy_word
count_lines
ctab
cua_select
cur_identifier
cur_word
current_func_signature
current_proc
cursor_down
cursor_left
cursor_right
cursor_up
cut
cut_code_block
cut_end_line
cut_full_word
cut_level
cut_line
cut_next_sexp
cut_prev_level
cut_prev_sexp
cut_prev_word
cut_region
cut_sentence
cut_subword
cut_whole_word
cut_word
cut_word2
delete_all
delete_blank_lines
delete_code_block
delete_end_line
delete_full_word
delete_line
delete_prev_full_word
delete_prev_subword
delete_prev_word
delete_space
delete_subword
delete_whole_word
delete_word
do_surround_mode_keys
down
dynamic_surround
edit_file
emacs_paste
emacs_quit
emacs_scroll_down
emacs_scroll_up
emacs_select_block
emacs_select_char
end_line
end_line_text_toggle
end_select
end_window
enter_on_bl
enumerate
exchange_point_and_mark
expand_alias
expand_surround_with
expand_tabs
find
find_current
find_delimiter
find_matching_paren
find_next
find_prev
first_non_blank
format_columns
forward_down_sexp
forward_up_sexp
fundamental_mode
get
get_line
get_line_raw
get_match_text
get_text
get_text_raw
get_text_safe
goto_line
goto_point
goto_tag
gui_beautify
gui_copy_to_file
gui_find
gui_goto_col
gui_goto_line
gui_reflow_comment
gui_replace
gui_replace2
h_format
hex
hex_backspace
hex_bottom
hex_del
hex_keyin
hex_select_line
hex_select_word
hex_tab
hex2dec
highlight_selection
html_contentwrap
html_contentwrap_toggle
html_formatting
html_formatting_toggle
html_mode
html_preview
html_taglayout
html_taglayout_toggle
indent_line
indent_on_enter
indent_previous
indent_region
indent_rigidly
indent_selection
indent_with_tabs
indent_with_tabs_toggle
insert_code_template
insert_file_list
insert_line
insert_line_raw
insert_literal
insert_object
insert_toggle
java_mode
java_proc_search
javadoc_comment
join_line
join_lines
keyin
keyin_buf_name
keyin_dir_name
keyin_enter
keyin_space
keyin_underscore
left
left_justify
left_side_of_window
line_to_bottom
line_to_top
linehex
linewrap_delete_char
linewrap_rubout
load_files
lock_selection
lowcase_word
ma
maybe_split_insert_line
modify_toggle
move_lines_down
move_lines_up
move_text_backtab
move_text_tab
move_to_cursor
next_char
next_full_word
next_level
next_paragraph
next_ref
next_sentence
next_sexp
next_subword
next_word
nosplit_insert_line
nosplit_insert_line_above
overlay_block_selection
overlay_clipboard
page_down
page_left
page_right
page_up
pas_proc_search
pascal_enter
pascal_mode
past_end_of_line
paste
point
prepeat_search
prev_buffer
prev_char
prev_full_word
prev_level
prev_paragraph
prev_ref
prev_sentence
prev_sexp
prev_subword
prev_word
process_list
psearch
push_bookmark
quit_view
read_format_line
read_only_mode
read_only_mode_toggle
reflow_paragraph
reflow_region
refresh
reindent_line
remove_duplicates
remove_highlight
remove_highlight_in_selection
remove_trailing_spaces
repeat_search
replace_line
replace_line_raw
restore_pos
rexx_mode
right
right_side_of_window
rubout
ruler
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_full_word
select_line
select_mode
select_next_sexp
select_paragraph
select_prev_sexp
select_proc
select_subword
select_tag_file
select_toggle
select_whole_word
select_word
set_next_error
set_scroll_pos
slick_enter
slick_paren
slick_semicolon
slick_space
slickc_mode
sort_buffer
spell_check
spell_check_files
spell_check_source
spell_check_word
split_insert_line
split_line
sur_text
surround_with
symbol_coloring_errors_toggle
symbol_coloring_next_scheme
symbol_coloring_prev_scheme
symbol_coloring_set_scheme
symbol_coloring_toggle
tab
tabify_region
tabs
text_col
top
top_left_of_window
top_of_buffer
top_of_window
transpose_chars
transpose_lines
transpose_sexp
transpose_words
traverse_char
trunc
undo
undo_cursor
undo_steps
unindent_line
unsurround
untabify_region
up
upcase_word
update_format_line
vera_paren
view_formfeed_toggle
view_line_numbers_toggle
view_nlchars_toggle
view_spaces_toggle
view_specialchars_toggle
view_tabs_toggle
wfont
wfont_zoom
wfont_zoom_in
wfont_zoom_out
word_wrap
word_wrap_toggle
wordwrap_delete_char
xml_contentwrap
xml_contentwrap_toggle
xml_formatting
xml_formatting_toggle
xml_mode
xml_taglayout
xml_taglayout_toggle
xmldoc_comment
xmldoc_mode
xsd_mode
zap_line


Editor Control Properties

p_active_form
p_adaptive_formatting_flags
p_AllowSave
p_attribute_casing
p_auto_size
p_AutoSelectExtension
p_AutoSelectLanguage
p_backcolor
p_bbside
p_begin_end_style
p_binary
p_border_style
p_BoundsEnd
p_BoundsStart
p_buf_flags
p_buf_id
p_buf_name
p_buf_size
p_buf_user
p_buf_width
p_buser
p_caps
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_DebugMode
p_display_xlat
p_DocumentName
p_edit
p_embedded
p_embedded_orig_values
p_EmbeddedCaseSensitive
p_EmbeddedIdentifierChars
p_EmbeddedLexerName
p_enabled
p_encoding
p_encoding_set_by_user
p_encoding_translation_error
p_eventtab
p_eventtab2
p_extension
p_file_date
p_fixed_font
p_font_bold
p_font_charset
p_font_height
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_font_width
p_forecolor
p_function_brace_on_new_line
p_HasBuffer
p_height
p_help
p_hex_field
p_hex_mode
p_hex_nibble
p_hex_Nofcols
p_hex_toppage
p_hex_value_casing
p_hwnd
p_hwndframe
p_identifier_chars
p_indent_case_from_switch
p_indent_style
p_indent_with_tabs
p_index
p_isbutton_bar
p_IsTempEditor
p_KeepPictureGutter
p_keyword_casing
p_LangCaseSensitive
p_LangId
p_LastModified
p_LCBufFlags
p_left_edge
p_lexer_name
p_line
p_line_numbers_len
p_LinesForceWrapped
p_MaxLineLength
p_mdi_child
p_mode_eventtab
p_mode_name
p_modify
p_ModifyFlags
p_mouse_pointer
p_MouseActivate
p_name
p_newline
p_next
p_no_space_before_paren
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_parent
p_pointer_style
p_prev
p_ProtectReadOnlyMode
p_rawpos
p_RBufSize
p_ReadOnly
p_readonly_mode
p_readonly_set_by_user
p_redraw
p_rel_line
p_RLine
p_RNoflines
p_scale_mode
p_scroll_bars
p_scroll_left_edge
p_selected
p_show_tabs
p_showeof
p_ShowSpecialChars
p_SoftWrap
p_SoftWrapOnWord
p_SourceRecording
p_SwapColors
p_SyntaxIndent
p_tab_index
p_tab_stop
p_tabs
p_tag_casing
p_TextWrapChangeNotify
p_TruncateLength
p_undo_steps
p_undo_visible
p_user
p_user2
p_UTF8
p_value_casing
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_xlat
p_xyparent
p_xyscale_mode
p_y
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


editor_name

_str editor_name(_str option='E', _str new_value=null)

Parameters:

option - defaults to 'E' if not given or ''.

new_value - (optional). Set new value for option. Only valid for 'R' option.

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.
      If new_value!=null, then option is set to new_value and
      new_value is returned.
'V'   DDE server name.

Returns: _str

Return value depends on input.

Category:

Miscellaneous Functions


emacs_paste

_command typeless emacs_paste()

Used in EMACS emulation. Inserts the last clipboard created.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

list_clipboards, paste


emacs_quit

_command typeless emacs_quit()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

select_buffer, edit


emacs_scroll_down

_command typeless emacs_scroll_down()

Used in EMACS emulation.

When called without an argument, calls page_up

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

emacs_scroll_up, scroll_up, scroll_down, scroll_left, scroll_right


emacs_scroll_up

_command typeless emacs_scroll_up()

Used in EMACS emulation.

When called without an arguent, calls page_down

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

emacs_scroll_down, scroll_up, scroll_down, scroll_left, scroll_right


emacs_select_block

_command typeless emacs_select_block()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

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 typeless emacs_select_char(...)

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

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


end_line

_command void end_line()

Places cursor after end of current line.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


end_line_text_toggle

_command void end_line_text_toggle()

For a text box, the cursor is moved to the last column. For an edit window or editor control, if the cursor is not on the last column the cursor is placed on the last non blank character of the current line.

If def_end_line_stop_at_vertical_line is set to 'true' and the user has a vertical line column configured, then the cursor will also stop at the vertical line column if the line extends beyond it. Otherwise the cursor is moved to the last column.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


end_proc

_command int end_proc()

Navigate to end of current procedure.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

next_proc, prev_proc


end_recording

_command typeless end_recording(boolean quiet=false, _str suffix="")

Ends the definition of a recorded macro and names it last_recorded_macro.

Parameters:

quiet - Save macro without prompting.

suffix - Suffix to append to macro name

Returns: typeless

Returns 0 if successful and displays message. Otherwise a non-zero value is returned and a message or message box is displayed.

Category:

Macro Programming Functions

See Also:

start_recording, record_macro_toggle, record_macro_end_execute, execute_last_macro, execute_last_macro_key, list_macros, gui_save_macro, save_macro, _macro


end_select

_command typeless end_select(_str markid='')

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.

Returns: typeless

Returns 0 if successful. Otherwise TEXT_NOT_SELECTED_RC is returned. On error, message is displayed.

Applies To:

Edit Window

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


end_statement

_command int end_statement(_str quiet='')

Navigate to the end of the current statement under the cursor.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


end_statement_block

_command int end_statement_block(_str quiet='')

Navigate to the end of the current statement block.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


end_tag

_command int end_tag()

Navigate to end of current tag. This function uses the same flags as the proc tree on the project toolbar, so you can use that to filter out certain tags.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

next_tag, prev_tag


end_window

_command typeless end_window()

Places cursor at bottom right of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

begin_window


enscript_command

_str enscript_command(_str psprint_command, _str buf_name)

Generates the enscript command string.

Returns: _str

Returns enscript command string.

Category:

Miscellaneous Functions


enter_on_bl

typeless enter_on_bl()

Typically used by a command which is bound to the ENTER key. Called when ENTER key is pressed on a blank line.

Returns: typeless

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


enumerate

_command void enumerate(_str cmdline='')

This commands adds incrementing numbers to a selection.

Parameters:

cmdline - is a string in the format:

   [-x | -xf] [-l leading] [-t trailing]
         [start [ increment [ DigitWidth ]]]
-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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

gui_enumerate


env_case

_str env_case(_str name)

Returns: _str

Returns env_name in operating specific case. DOS environment variables are displayed in upper case.

Category:

String Functions


env_eq

_str env_eq(_str env1, _str env2)

Compares environment variable names env1 to env2 in the case sensitivity of the operating system.

Category:

File Functions


env_match

_str env_match(_str name_prefix, int find_first)

Returns: _str

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.

Category:

Miscellaneous Functions

See Also:

get_env, set_env


eq_name2value

typeless eq_name2value(_str name, _str string, boolean preserveCase=false)

Parameters:

name - key to search for

string - string to search within

preserveCase - whether to preserve the case of the returned value (as it is in the string)

Returns: typeless

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.

Category:

String Functions


eq_value2name

_str eq_value2name(_str nv, _str string)

Returns: _str

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.

Category:

String Functions


error_pos

_str error_pos(_str cmdline)

Parameters:

cmdline - is a string in the format: pcode_offset filename

Returns: _str

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);

Category:

Miscellaneous Functions


esc_alt_prefix

_command typeless esc_alt_prefix(_str completion_info='')

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.

Category:

Keyboard Functions

See Also:

shift_prefix, ctrl_prefix, alt_prefix


eval_exp

int eval_exp(_str &result, _str source, int base, ...)

Evaluates expression and places the result in the variable result in the base specified. base may be 2,8, 10, or 16.

Returns: int

Returns 0 if successfuland result is set. On error 1 is returned.

Category:

Miscellaneous Functions


event2index

int event2index(_str string)

Returns: int

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));

Category:

Keyboard Functions

See Also:

get_event, test_event, last_event, call_key, event2name, index2event, list_bindings, name2event, eventtab_index


event2name

_str event2name(_str event, _str option="S")

Parameters:

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.

Returns: _str

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.

Example:

         key=get_event()
          message 'The key pressed was 'event2name(key)

Category:

Keyboard Functions

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="")

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));

Category:

Keyboard Functions


eventtab_inherit

int eventtab_inherit(int etab_index, int new_etab_index=-1)

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.

Category:

Keyboard Functions


exchange_point_and_mark

_command typeless exchange_point_and_mark()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

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

void execute(_str command=null, _str options="")

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.

Parameters:

command -

options - 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.

Category:

Miscellaneous Functions

See Also:

command_state, command_toggle, set_command, get_command


execute_last_macro

_command void execute_last_macro()

Ends macro recording if currently recording and saves it as the last recorded macro.

Displays message if a macro was defined.

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, record_macro_toggle, save_macro, gui_save_macro, execute_last_macro_key, record_macro_end_execute


execute_last_macro_key

_command void execute_last_macro_key()

Ends macro recording if currently recording and saves it as the last recorded macro for this key. This macro may be bound to an array of keys, such as Ctrl+0 through Ctrl+9, in order to have unique last recorded macros for each key.

Displays message if a macro was defined.

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, record_macro_toggle, save_macro, gui_save_macro, execute_last_macro, record_macro_end_execute_key


execute_selection

_command typeless execute_selection()

Executes the commands in a selection.

Displays messages if commands are completed successfully or unsuccessfully.

Applies To:

Edit Window

Category:

Selection Functions


exit

void exit(int retcode)

Exits the editor without saving anything. The editors return code is set to number if given. Otherwise return code is set to 0.

Category:

Miscellaneous Functions

See Also:

safe_exit, fexit


exit_list

void exit_list(boolean endingSession=false)

Calls all Slick-C® macro procedures whose name has prefix "_exit_" before SlickEdit is terminated by one of the commands safe_exit, save_exit (BRIEF emulation), or quit.

Parameters:

endingSession - (Windows only) Is the user logging out rather than just closing SlickEdit?

Category:

Miscellaneous Functions


exit_process

_command void exit_process(_str force='')

Exits the build window by entering the "exit" command and waiting until the command processor finishes.

Category:

Miscellaneous Functions


expand_alias

_command int expand_alias(_str alias_name='', _str insert_space_arg='', _str aliasfilename='', boolean isDocCommentExpansion=false, boolean isAutoExpansion=false)

Ctrl+Space bar

Expands the alias name before the cursor by deleting the alias name and replacing it with its value.

Parameters:

alias_name - Option name of alias

insert_space_arg - If not '', space character is inserted if alias is not found.

aliasfilename - Single alias file to look in.

isDocCommentExpansion - True if this is a special case of a doc comment expansion. False for a regular alias.

isAutoExpansion - true if we are trying to auto-expand an alias through syntax expansion after a user hit space

Returns: int

Returns 0 if successful. Otherwise a non-zero number is returned.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

alias, alias_cd


expand_surround_with

_command int expand_surround_with(_str text=' ', boolean delete_on_error=false, _str prefix='', boolean prompt=true)

Inserts the specified text, selects it, and then runs surround_with

Parameters:

text - The text to insert and surround

delete_on_error - If true and there is an error expanding the template, delete the inserted text

prefix - Specifies the name of the surround-with template to use. If no argument is given or if multiple possible templates are found, the user may be prompted to select the template they wish to use.

prompt - if false and multiple matches are found, it is handled as if no matches were found

Returns: int

zero if a code template was expanded

Category:

Editor Control Methods

See Also:

Alias Facility


expand_tabs

_str expand_tabs(_str string, int start=1, int count=-1, _str option='E')

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

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

_text_colc, text_col, _expand_tabsc, _expand_tabsc_raw


expand_window

_command void expand_window()

Increases the size of the current tile. If the current window has no adjacent tile, an error is displayed.

Applies To:

Edit Window

Category:

Window Functions

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_inherits_from

boolean ext_inherits_from(_str parent, _str lang=null)

Deprecated. Use _LanguageInheritsFrom.

Does the current language mode match or inherit behaviors from the given language? The current object should be an editor control.

Parameters:

parent - language ID to compare to

lang - current language ID (default=p_LangId)

Category:

Tagging Functions


external_cmd

int external_cmd(_str name, _str params, _str shell_options, _str exact_options)

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.

Returns: int

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.

Category:

File Functions


f_match

_str f_match(_str name, boolean find_first)

Parameters:

name - file name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Categories:

Completion Functions, File Functions


fast_scroll

_command void fast_scroll()

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.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


fexit

_command void fexit()

Exits the editor without saving files or doing anything. This command is mainly useful to a macro hacker and the developers of SlickEdit. You might want to use this function to test our AutoSave feature.

Category:

Miscellaneous Functions

See Also:

safe_exit


field

_str field(_str string, int width)

Returns: _str

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.

Category:

String Functions


file

_command int file(_str cmdline='', int flags=-1)

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 File Options dialog ("Tools", "Options", "File Options...", select the save and/or Backup tab). See _save_file() function for a list of valid options.

Parameters:

cmdline - is a string in the format: options[filename]

Returns: int

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.

Applies To:

Edit Window

Categories:

Edit Window Methods, File Functions


file_date

_str file_date(_str filename)

Returns: _str

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.

Category:

File Functions

See Also:

_file_date


file_eq

boolean file_eq(_str file1, _str file2)

Compares file parts file1 to file2 in the case sensitivity of the operating system file system.

Category:

File Functions


File Functions

_cache_size
_CheckLineLengths
_chmod
_clex_load
_config_path
_ConfigPath
_create_config_path
_drive_type
_file_case
_file_date
_file_path
_file_size
_file_time
_FileQType
_fm_copy
_fm_erase
_fm_move
_fm_subcopy
_get_windows_directory
_GetFileContents
_ini_delete_section
_ini_get_hashtable_values
_ini_get_section
_ini_get_section_array
_ini_get_sections_list
_ini_get_value
_ini_get_value_expand_copy_from
_ini_list_sections
_ini_parse_line
_ini_put_section
_ini_replace_section
_ini_set_hashtable_values
_ini_set_value
_insert.lbutton_up
_insert_drive_list
_macro_path
_ntBrowseForFolder
_open_temp_view
_parent_path
_save_file
_spell_save
_spill_file_path
absolute
alias_cd
append
append_dir
append_list
attr_case
block_insert_mode
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_file
copy_to_file
delete_file
diff
diff_current_file
diff_with
dir
dir_match
dirnew_match
dirnq_match
dos_copy
dos_del
dos_move
e
edit_associated_file
edit_file
edit_file_in_project
edit_file_in_workspace
env_eq
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_enter
fileman_find
fileman_keyin_name
fileman_list_buffers
fileman_mode
fileman_move
fileman_replace
fileman_select_down
fileman_select_up
fileman_sort
fileman_space
filenew_match
find_file
fmsay
fnq_match
for_dir
for_select
fsort
get
get_extension
goto_url
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
make_path
makeNload
maybe_find_file
maybe_quote_filename
merge
name
open_url
parse_file
path_exists
path_search
pathlen
pcextension
pcfile
pcfilename
pcname
pcpath
pd
popd
prompt_cd
prompt_dir
quit_file
read_list
recycle_file
relative
restore_path
revert
revert_or_refresh
rmdir
save
save_all
save_all_forms
save_as
save_exit
save_file
save_window_config
select_all
select_attr
select_ext
select_mark
select_reverse
semicolonfiles_match
shell
slick_path_search
spill_file_path
strip_filename
toggle_deltasave
unlist_all
unlist_attr
unlist_ext
unlist_search
unlist_select
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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


File List Box Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_fixed_font
p_font_bold
p_font_charset
p_font_height
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_font_width
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


file_list_field

_str file_list_field(_str filename, int col, int width)

Returns: _str

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.

Category:

File Functions

See Also:

file_time, file_date


file_match

_str file_match(_str name_prefix_options, int find_first)

Performs find first, find next directory search.

Parameters:

name_prefix_options - has the following syntax: {name_prefix | ['-' | '+' option_letters]}

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.

option_letters may be:

H
Include hidden files. Defaults to off. On UNIX this option is ignored. 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.
U
UNIX dot files. Defaults to on.
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 partitioned 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.

find_first - 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("junk",DIR_ATTR_COL,DIR_ATTR_WIDTH)) ) {
                message('File "junk" is read only');
           } else {
                message('File "junk" is NOT read only');
           }

Category:

File Functions

See Also:

find_index, name_match, buf_match, path_search


file_time

_str file_time(_str filename)

Returns: _str

Returns time of filename in the format of the Visual SlickEdit file manager. '' is returned if filename is not found.

Category:

File Functions


fileman

_command void fileman(_str doAppend='')

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.

Category:

File Functions

See Also:

dir, list


fileman_attr

_command typeless fileman_attr(_str result='')

Displays the Set Attributes dialog box used by the file manager to change attributes (UNIX: permissions) on the selected files. Used by fileman mode.

Category:

File Functions


fileman_backup

_command void fileman_backup(_str dest_dir='')

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.

This command is not supported in a keyboard macro

Category:

File Functions


fileman_command

_str fileman_command(_str msg, _str operation, _str source, _str destfilename, typeless doPause='')

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.

Returns: _str

Returns 0 if successful. If the command returns a non-zero value, this function returns that value which could be anything.

Category:

File Functions


fileman_copy

_command void fileman_copy(_str dest_dir='')

Displays the Copy dialog box used by the file manager to copy the selected files to a directory you choose.

Category:

File Functions


fileman_delete

_command typeless fileman_delete()

Prompts you whether you wish to delete the selected files. Used in fileman mode.

Category:

File Functions


fileman_deselect_down

_command void fileman_deselect_down()

Removes the '>' character at the beginning of the current line and moves the cursor to next line. Used by fileman mode.

Category:

File Functions


fileman_deselect_up

_command void fileman_deselect_up()

Removes the '>' character at the beginning of the current line and moves the cursor to previous line. Used by fileman mode.

Category:

File Functions


fileman_edit

_command typeless fileman_edit()

Category:

File Functions


fileman_enter

_command void fileman_enter()

Opens the file at the cursor or inserts directory file list. Used by fileman mode.

Category:

File Functions


fileman_find

_command int fileman_find(_str search_string='', _str options='', _str mfflags='')

Performs a search on the selected files. This command is used while in fileman mode to perform a search across multiple files and directories.

Returns: int

Returns 0 if successful. Otherwise, a non-zero number is returned.

Categories:

File Functions, Search Functions


fileman_help

_command void fileman_help()

Displays help for fileman mode.

Category:

Miscellaneous Functions


fileman_keyin_name

_command void fileman_keyin_name()

Keys in file name at text cursor into the command line. Used by fileman mode.

Category:

File Functions

See Also:

keyin_buf_name


fileman_list_buffers

_command typeless fileman_list_buffers(_str wildcard=ALLFILES_RE)

Creates a buffer and inserts a list of the files that are currently open 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.

Parameters:

wildcards - may contain operating system wild cards such as '*' and '?'.

Returns: typeless

Returns 0 if successful.

Category:

File Functions

See Also:

fileman


fileman_mode

_command void fileman_mode()

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.

Category:

File Functions


fileman_move

_command void fileman_move(_str dest_dir='')

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.

This command is not supported in a keyboard macro

Category:

File Functions


fileman_replace

_command int fileman_replace(_str search_string='', _str replace_string='', _str options='')

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).

Returns: int

Returns 0 if successful. Otherwise, a non-zero number is returned.

Categories:

File Functions, Search Functions


fileman_select_down

_command void fileman_select_down()

Replaces the first character of the current line with '>' and moves the cursor to next line. Used by fileman mode.

Category:

File Functions


fileman_select_up

_command void fileman_select_up()

Replaces the first character of the current line with '>' and moves the cursor to previous line. Used by fileman mode.

Category:

File Functions


fileman_sort

_command typeless fileman_sort()

Displays the file manager File Sort dialog box. Used by fileman mode.

Category:

File Functions


fileman_space

_command typeless fileman_space()

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.

Category:

File Functions


filenew_match

_str filenew_match(_str name, boolean find_first)

Parameters:

name - file name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

If there are absolute no matches to name, and find_first is true, it will return name.

This function behaves like f_match, but allows the user to type a non-existent file name. This is useful in order to get completion for directory names, but still be able to specify a new file.

Categories:

Completion Functions, File Functions

See Also:

f_match


fill_selection

_command typeless fill_selection(...)

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


filter_get_string

_str filter_get_string(_str &string)

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.

Returns: _str

Returns 0 if successful. A non-zero value is returned if all text in the selection has been filtered.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

filter_init, filter_put_string, filter_restore_pos, filter_selection


filter_init

void filter_init(boolean doRaw=false)

Saves the cursor position and prepares for calls to functions filter_get_string, filter_put_string, and filter_restore_pos.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

filter_get_string, filter_put_string, filter_restore_pos, filter_selection


filter_put_string

_str filter_put_string(_str string)

Returns: _str

Returns 0 and replaces current partial line of the selection being filtered with out_string.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

filter_init, filter_get_string, filter_restore_pos, filter_selection


filter_restore_pos

void filter_restore_pos()

Restores the cursor position to the position saved by the filter_init procedure.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

filter_get_string, filter_put_string, filter_init, filter_selection


filter_selection

_str filter_selection(typeless filter, _str optionL='', boolean doRaw=false)

Filter selected text through an external command. The external command must be capable of redirecting stdin from a file and output to stdout. Takes an optional argument that is the command to run. If "", then user * will be prompted for command to run.

Returns: _str

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

filter_init, filter_get_string, filter_put_string, filter_restore_pos


find

_command int find(_str string='', _str options=null, VSSEARCH_BOUNDS vssearch_bounds=null)

Syntax: /string [ /options ] or L /string [ /options ] or find /string [ /options ]

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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Parameters:

string - Input string to search for.

options - 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 SlickEdit 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.
L
Interpret string as a Perl regular expression.
&
Interpret string as a Wildcard regular expression.
H
Search through hidden lines.
#
Highlight matched occurrences with highlight color.
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", "Options", "File Extension Setup...", select the Advanced tab).
W
SlickEdit-regular-expression Specifies the valid characters in a word. The default value is [A-Za-z0-9_$].
W:P
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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter to separate ambiguous options.
XCLetters'
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 Options ("Tools > Options > Editing > Search").

vssearch_bounds - Specifies ISPF search bounds parameters

Returns: int

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

Applies To:

Edit Window, Editor Control

Example:

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.

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

i_search, replace, gui_find, gui_replace, find_next, find_prev


find_buffer

_command typeless find_buffer(_str buf_name_arg='')

Activates the buffer specified if it exists. If buf_name_arg is not given, user will be prompted for name of buffer to activate.

Parameters:

buf_name_arg - Name of buffer to activate.

Returns: typeless

typeless Returns 0 if successful. Common return codes include FILE_NOT_FOUND_RC (buffer buf_name_arg does not exist).

Category:

Buffer Functions


find_current

_command int find_current()

Repositions the cursor on the item currently selected in the search or references tool window. If neither window is active, it will do a find-prev, followed by a find-next to attempt to reposition on the current match.

Parameters:

doPrevious - If true, repeats search in the oposite direction.

Returns: int

Returns 0 if successful. Otherwise STRING_NOT_FOUND_RC is returned. On error, message is displayed.

Applies To:

Edit Window,Editor Control

Categories:

Editor Control Methods, Edit Window Methods, Search Functions

See Also:

find, replace, gui_replace, gui_find, find_prev, find_next, next_ref, prev_ref


find_delimiter

_command typeless find_delimiter()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

find_matching_paren, keyin_match_paren


find_error

_command void find_error()

Finds the last 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).

Category:

Miscellaneous Functions


find_ext_callback

int find_ext_callback(_str callback_name, _str lang=null)

Deprecated. Use _FindLanguageCallbackIndex().

Return the names table index for the callback function for the current language, or a language which we inherit behavior from. The current object should be an editor control.

Parameters:

callback_name - name of callback to look up, with a '%s' marker in place where the language ID would be normally located.

lang - current language (default=p_LangId)

Returns: int

Names table index for the callback. 0 if the callback is not found or not callable.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


find_file

_command void find_file()

Displays the Find File dialog box which lets you find and open one or more files for editing.

Applies To:

Edit Window

Category:

File Functions


find_index

int find_index(_str name, int name_type_flags)

Parameters:

name - symbol name to search for

name_type_flags - The name type flags are listed in the file "slick.sh".

PROC_TYPE
Matches global function
VAR_TYPE
Matches global variable
EVENTTAB_TYPE
Matches event table
COMMAND_TYPE
Matches command
CLASS_TYPE
Matches class name
INTERFACE_TYPE
Matches interface name
STRUCT_TYPE
Matches struct name
CONST_TYPE
Matches const name
ENUM_TYPE
Matches enumerated type
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.

Returns: int

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.

Example:

// 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";

Category:

Names Table Functions

See Also:

name_match, name_name, name_type, name_info, call_index, insert_name, set_name_info, delete_name, oi2type, replace_name


find_matching_paren

_command int find_matching_paren(boolean quiet=false)

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.

Returns: int

Returns 0 if match found. Common return codes are TOO_MANY_SELECTIONS_RC and STRING_NOT_FOUND_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

keyin_match_paren, def_pmatch_chars


find_next

_command int find_next(boolean doPrevious=false)

Ctrl+G or "Search", "Next Occurrence"

Repeats a search initiated by a search command in same direction and with the same search options.

Parameters:

doPrevious - If true, repeats search in the opposite direction.

Returns: int

Returns 0 if successful. Otherwise STRING_NOT_FOUND_RC is returned. On error, message is displayed.

Applies To:

Edit Window,Editor Control

Categories:

Editor Control Methods, Edit Window Methods, Search Functions

See Also:

find, replace, gui_replace, gui_find, find_prev


find_prev

_command int find_prev()

Ctrl+Shift+G or "Search", "Previous Occurrence"

Repeats a search initiated by a search command in the opposite direction.

Returns: int

Returns 0 if successful. Otherwise STRING_NOT_FOUND_RC is returned. On error, message is displayed.

Applies To:

Edit Window,Editor Control

Categories:

Editor Control Methods, Edit Window Methods, Search Functions

See Also:

find, replace, gui_replace, gui_find, find_prev


find_proc

_command typeless find_proc(_str name='', boolean force_case_sensitivity=false)

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.

Returns: typeless

Returns 0 if successful. Otherwise a non-zero value is returned and a message box is displayed.

Applies To:

Edit Window

Category:

Search Functions

See Also:

f, find_tag, push_tag, gui_find_proc


find_refs

_command typeless find_refs(_str params="", _str preview_option="")

Find refernces to the symbol under the cursor.

Parameters:

params - find tag options (-e [ext] or -sc for Slick-C®)

Returns: typeless

0 on success, <0 on error

Category:

Tagging Functions


find_search_expression

_command void find_search_expression(_str name='')

Search for text in buffer using search string and search options stored from an entry in the saved search expressions list.

Parameters:

name - Saved search expression name. If no name is passed in, a selection list is displayed to pick from the list of saved expressions.

Applies To:

Edit Window, Editor Control @categories Search_Functions

See Also:

find


find_tag

_command typeless find_tag(_str params="", boolean quiet=false)

This command is the same as the push_tag command except that no bookmark is pushed.

Parameters:

params - command line parameters
                     -sc = include Slick-C® and C/C++ tag files
                     -is = include Slick-C® tag file
                     -c  = use context find tag to find proc_name
                     -cs = use strict case-sensitivity
                     proc_name = name of symbol to find

quiet - only return status, no message boxes

Returns: typeless

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window

Category:

Tagging Functions

See Also:

f, push_tag, find_proc, make_tags, gui_make_tags, gui_push_tag


find_view

int find_view(_str buf_name)

Activates the temp window and buffer name specified.

Parameters:

buf_name - Name of buffer to search for.

Returns: int

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window

Category:

Buffer Functions


find_window_closest_to_point

int find_window_closest_to_point(int direction)

Find the window that is closest to current cursor position in the direction indicated (LEFT, RIGHT, UP, DOWN).

Returns: int

If found, the window id of the window closest to the current cursor position; otherwise 0 is returned.

Applies To:

Edit Window

Category:

Window Functions


find_window_with_edge

_str find_window_with_edge(int x1, int y1, int x2, int y2)

Returns: _str

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.

Applies To:

Edit Window

Category:

Window Functions


find_window_with_point

_str find_window_with_point(int x, int y)

Returns: _str

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.

Applies To:

Edit Window

Category:

Window Functions


first_non_blank

_command void first_non_blank(...)

Moves the cursor to the first non space or tab character of the current line.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


flush_keyboard

void flush_keyboard()

Removes all key and mouse events from input queue.

Category:

Keyboard Functions


fmsay

int fmsay(_str msg)

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

Returns: int

Returns 0.

Category:

File Functions

See Also:

for_all, for_mark, for_select, for_dir


fnq_match

_str fnq_match(_str name, boolean find_first)

Parameters:

name - file name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

"fnq" means "file no quote". This function does not quote the files returned.

Categories:

Completion Functions, File Functions

See Also:

f_match


for_all

_command typeless for_all(_str commandArg='', _str shell_wait='', _str echo_command='', typeless command_view_id='')

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

Example:

for-all fmsay %L
Displays all lines of the current buffer

Category:

Miscellaneous Functions


for_dir

_command typeless for_dir(_str commandArg='', _str shell_wait='', _str echo_command='')

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.

Category:

File Functions


for_each_buffer

typeless for_each_buffer(_str command)

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 & VSBUFFLAG_HIDDEN) false are visible to the user.

Returns: typeless

Returns 0 if successful. Common return codes are STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and FILE_NOT_FOUND_RC.

Category:

Buffer Functions


for_each_mdi_child

typeless for_each_mdi_child(_str command, ...)

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.

Returns: typeless

Returns 0 if successful. Common return codes are STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and FILE_NOT_FOUND_RC.

Category:

Window Functions


for_list

_str for_list(_str word, _str command, _str echo_command)

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.

Parameters:

word -

command -

echo_command -

Returns: _str

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.

Example:

        status=edit("list");
        if (status) {
             return(status);
        }
        for_list("@"absolute("list"), "e %L",0);

Category:

Miscellaneous Functions


for_mark

_command typeless for_mark(_str commandArg='', _str shell_wait='', _str echo_command='')

Executes command specified on the selection. See help on for_all command form information on inserting parts of line in the command.

Category:

Selection Functions


for_select

_command typeless for_select(_str commandArg='', _str shell_wait='', _str echo_command='', _str help_str='')

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.

Category:

File Functions


force_reindent

_command void force_reindent()

Forces a reindent of the current line or selection by using smarttab.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

smarttab


Form Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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
_GetDialogInfo
_GetDialogInfoHt
_GetDialogInfoHtPtr
_GetDialogInfoPtr
_isloaded
_modal_wait
_search_form_xy
_SetDialogInfo
_SetDialogInfoHt
list_objects
new_form
open_form
save_form
show


Form Methods

_bottom_height
_center_window
_copy_objects_to_clipboard
_delete_window
_draw_rect
_enabled
_find_control
_get_child_extents
_get_window
_load_subform
_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
_show_entire_form
_ShowWindow
_text_width
_top_height
_update_template
call_event
refresh


Form Properties

p_active_form
p_backcolor
p_bbside
p_border_style
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_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_init_style
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_menu_handle
p_modal
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_parent
p_prev
p_scale_mode
p_selected
p_template
p_tool_window
p_ToolbarBorder
p_user
p_user2
p_view_id
p_visible
p_width
p_window_id
p_x
p_xyparent
p_xyscale_mode
p_y
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


format_columns

_command int format_columns()

Formats words for each line in a selection based on the words in the first line.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Miscellaneous Functions


Forms

_b2k_form
_bas_extform
_ChooseDirDialog
_cob_extform
_dlge_form
_edit_form
_find_file_form
_font_form
_for_extform
_gl_extform
_mfmore.on_create
_ok.lbutton_up
_ok.on_create
_okay.on_create
_OpenDialog
_openfn.on_create
_seektext.on_create
_sellist.on_create
ctldone.on_create
select_tree
textBoxDialog


forward

_command void forward()

Go to the next viewed file and cursor location like a web browser. This function is only available after using the back command.

Category:

Edit Window Functions


forward_down_sexp

_command int forward_down_sexp()

Moves forward and down into the next S-expression starting from the cursor position. If the cursor is not on a open paren, bracket, or brace, it will behave just like next_sexp.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, backward_up_sexp, backward_down_sexp, forward_up_sexp


forward_up_sexp

_command int forward_up_sexp()

Moves forward up into the parent S-expression starting from the cursor position. Cursor position is unchanged if not found.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, backward_up_sexp, backward_down_sexp, forward_down_sexp


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Frame Properties

p_active_form
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_clip_controls
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


fsort

_command typeless fsort(_str args='')

Fileman Sort command

Parameters:

args - Handle input arguments:

  • Type = N,E,D,S,P ; name, extension, date,size, path
  • Order = A,D ; ascending, descending

Returns: typeless

Returns 0 if successful.

Category:

File Functions


fundamental_mode

_command void fundamental_mode()

Switches to fundamental mode key bindings.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Gauge Properties

p_active_form
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


get

_command int get(_str src_filename='', _str obsolete='', _str insert_style='', int start_line=0, int end_line=0, _str load_options='')

Inserts file before or after current line

Parameters:

src_filename - Name of file to insert

obsolete - This argument is not used.

insert_style - Selects whether to insert after or before the current line. 'A', 'B', or '' which corresponds to 'After', 'Before', or def_line_insert setting.

start_line -

end_line -

load_options - may be "" or only may contain the following

  • +bi <buf_id>
  • +d
  • +b

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, File Functions

See Also:

gui_insert_file


get_command

void get_command(_str &text, int &start_sel=0, int &end_sel=0, _str &prompt="")

Be sure to look at the get_string function which prompts the user for command line input.

Returns: void

Returns the command line text, start of selection, end of selection, and prompt in the corresponding variables. If two 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.

Applies To:

Text Box, Combo Box

Categories:

Combo Box Methods, Text Box Methods

See Also:

command_state, command_toggle, execute, set_command


get_completion_info

_str get_completion_info(_str command)

Returns: _str

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".

Category:

Completion Functions


get_env

_str get_env(_str EnvVarName)

Returns: _str

Returns the value of the environment variable name. If name is not found, rc is set to STRING_NOT_FOUND_RC and '' is returned.

Category:

Miscellaneous Functions

See Also:

env_match, set_env


get_event

_str get_event(_str options="")

Parameters:

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 zero.

If 'R' option is not given, the screen is refreshed.

Returns: _str

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.

Example:

     key=get_event();
     message('The key pressed was 'event2name(key));

Category:

Keyboard Functions

See Also:

pgetkey, test_event, last_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


get_extension

_str get_extension(_str buf_name, boolean returnDot=false)

Returns extension of buffer name without dot unless returnDot is true.

Parameters:

buf_name - Filename to get extension from.

returnDot - Specify true if you want '.' included in return value.

Returns: _str

Returns extension of buffer name.

Category:

File Functions


get_line

void get_line(_str &line)

Places the current line of the current buffer into the variable line.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

insert_line, replace_line, _delete_line


get_line_raw

void get_line_raw(_str &line)

This function is identical to the get_line function, except that the resulting string is always in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS Macro Programming."

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


get_match_substr

_str get_match_substr(_str s, _str n='')

Parameters:

n - tagged expression number, between 0 and 9. If left to default (empty string), returns the entire string match.

Returns: _str

Contents of n'th tagged expression of last pos or lastpos performed.

Category:

String Functions

See Also:

pos, lastpos, substr


get_match_text

_str get_match_text(_str n='')

Parameters:

n - tagged expression number, between 0 and 9. If left to default (empty string), returns the entire string match.

Returns: _str

Contents of n'th tagged expression of last search performed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

match_length, get_text, search


get_message

_str get_message(int rc=MAXINT, ...)

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 SlickEdit message line is returned. The error codes are listed in the file "rc.sh".

Parameters:

rc - error status to look up

s0 - string to replace %s0 with

s1 - string to replace %s1 with

sN - string to replace %sN with

Returns: _str

Message string for the given error code with arguments collated.

Category:

String Functions


get_replace_text

_str get_replace_text(_str replace_string)

Performs text substitution used by searchreplace without modifying buffer. Substitution includes RE groups and handles preserve case options.

Parameters:

replace_string - Replace string.

Returns: _str

Destination replacement text.

Category:

Search Functions

See Also:

search, search_replace


get_string

_str get_string(_str &line, _str prompt, _str arg_type_info='', _str initial_value='')

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.

Parameters:

line - (output) set to value entered by user

prompt - the command prompt.

arg_type_info - 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 may 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").

initial_value - (optional) The command line is set to initial value. If you want to specify this parameter and you don't want to specify the third parameter, pass '' for the third parameter.

Returns: _str

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')

Categories:

Command Line Functions, Keyboard Functions

See Also:

letter_prompt, prompt


get_text

_str get_text(int count=1, int seek_pos=-3)

Parameters:

count - Specifies the number of bytes to get. The following negative numbers have special meaning:

-1
Get current unicode character or DBCS character
-2
Get composite character or DBCS character

seek_pos - Specifies the byte offset in the file to get the bytes from. -3 specifies the cursor position.

Returns: _str

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.

Applies To:

Edit_Window, Editor_Control

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'))

Categories:

Edit Window Methods, Editor Control Methods


get_text_raw

_str get_text_raw(int count=1, int seek_pos=-3)

This function is identical to the get_text function, except that the resulting string is always in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS Macro Programming."

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


get_text_safe

_str get_text_safe(int count=1, int seek_pos=-3)

This function is identical to the get_text function, except that it safely handles the case where you try to get text which is past the end of the buffer, even if the buffer does not end with a newline character.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


get_view_id

void get_view_id(int &view_id)

Deprecated. Use get_window_id().

This function has been deprecated. It has the same effect as calling get_window_id().

Applies To:

All Window Objects

Category:

Window Functions


get_window_id

void get_window_id(int &window_id)

Determines the current object/current window. This function has the same effect as setting the p_window_id property.

Example:

get_window_id(window_id);   // Remember current window
_next_window();           // Switch to next window
activate_window(window_id); // Go back to orig. window

Applies To:

All Window Objects

Categories:

Buffer Functions, Window Functions

See Also:

activate_window, load_files, _next_window, _prev_window


getAdaptiveFormattingFlags

int getAdaptiveFormattingFlags(_str langID, int defaultValue=null)

Gets the adaptive formatting flags for this language. This value is controlled on the GUI on the Adaptive Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

adaptive formatting flags for this language

Category:

LanguageSettings API


getAliasFilename

_str getAliasFilename(_str langID, _str defaultValue=null)

Gets the alias filename value for this language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

alias filename value for this language

Category:

LanguageSettings API


getAttributeCase

int getAttributeCase(_str langID, int defaultValue=null)

Retrieves the attribute case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

attribute case setting for language

Category:

LanguageSettings API


getAutoBracket

int getAutoBracket(_str langID)

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

Category:

LanguageSettings API


getAutoCaseKeywords

boolean getAutoCaseKeywords(_str langID, boolean defaultValue=null)

Retrieves whether or not we want to auto-case keywords for this language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: boolean

whether to auto-case keywords in this language

Category:

LanguageSettings API


getAutoCompleteMinimumLength

int getAutoCompleteMinimumLength(_str langID, int defaultValue=null)

Gets the minimum length required for autocomplete to be triggered for this language. This value is available on the AutoComplete form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

minimum autocomplete length for this language

Category:

LanguageSettings API


getAutoCompleteOptions

int getAutoCompleteOptions(_str langID, int defaultValue=null)

Gets the autocomplete options for this language, which are a bitset of AUTO_COMPLETE_. This value controls the options which are available on the AutoComplete form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

autocomplete options for this language

Category:

LanguageSettings API


getAutoCorrelateStartEndTags

boolean getAutoCorrelateStartEndTags(_str langID, boolean defaultValue=null)

Retrieves the auto correlate start/end tags setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

auto correlate start/end tags setting for language

Category:

LanguageSettings API


getAutoInsertLabel

boolean getAutoInsertLabel(_str langID, boolean defaultValue=null)

Retrieves the auto-insert label setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

auto-insert label setting for language

Category:

LanguageSettings API


getAutoSymbolTranslation

boolean getAutoSymbolTranslation(_str langID, boolean defaultValue=null)

Retrieves the auto symbol translation setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

auto symbol translation setting for language

Category:

LanguageSettings API


getAutoValidateOnOpen

boolean getAutoValidateOnOpen(_str langID, boolean defaultValue=null)

Retrieves the auto validate on open setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

auto validate on open setting for language

Category:

LanguageSettings API


getBackspaceUnindents

boolean getBackspaceUnindents(_str langID, boolean defaultValue=null)

Determines whether backspace at the beginning of the line unindents the line for this language. This value is available on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: boolean

backspace options for this language

Category:

LanguageSettings API


getBeginEndComments

boolean getBeginEndComments(_str langID, boolean defaultValue=null)

Retrieves the begin/end comments setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

begin/end comments setting for language

Category:

LanguageSettings API


getBeginEndPairs

_str getBeginEndPairs(_str langID, _str defaultValue=null)

Gets the Begin/End pairs for this language. This value is available on the GUI on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

begin/end pairs value for this language

Category:

LanguageSettings API


getBeginEndStyle

int getBeginEndStyle(_str langID, int defaultValue=null)

Retrieves the begin/end style for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

begin/end style setting for language

Category:

LanguageSettings API


getBounds

_str getBounds(_str langID, _str defaultValue=null)

Retrieves the bounds for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: _str

bounds for language

Category:

LanguageSettings API


getCaps

int getCaps(_str langID, int defaultValue=null)

Retrieves the caps for the given language. The possible values are as follows:

  • CM_CAPS_OFF - does not change the caps
  • CM_CAPS_ON - converts keywords to upper case
  • CM_CAPS_AUTO - uses _GetCaps to determine if there are any lowerase letters in the file. If so, turns caps off. If not, caps is turned on.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

caps for language

Category:

LanguageSettings API


getCobolSyntax

int getCobolSyntax(_str langID, int defaultValue=null)

Retrieves the COBOL syntax setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

COBOL syntax setting for language

Category:

LanguageSettings API


getCodehelpFlags

int getCodehelpFlags(_str langID, int defaultValue=null)

Gets the codehelp flags for this language. The options for this value are available on the GUI on the Context Tagging form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

codehelp flags for this language

Category:

LanguageSettings API


getColorFlags

int getColorFlags(_str langID, int defaultValue=null)

Retrieves the color flags for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

color flags for language

Category:

LanguageSettings API


getCommentEditingFlags

int getCommentEditingFlags(_str langID, int defaultValue=null)

Retrieves the comment editing flags for this language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

comment editing flags for this language

Category:

LanguageSettings API


getCommentWrapOptions

_str getCommentWrapOptions(_str langID, _str defaultValue=null)

Gets the comment wrap options for this language. This value is controlled by the options available on the Comments form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

comment wrap options for this language

Category:

LanguageSettings API


getCuddleElse

boolean getCuddleElse(_str langID, boolean defaultValue=null)

Retrieves the cuddle else setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

cuddle else setting for language

Category:

LanguageSettings API


getcwd

_str getcwd(_str path)

Returns: _str

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 */

Category:

Miscellaneous Functions


getDelphiExpansions

boolean getDelphiExpansions(_str langID, boolean defaultValue=null)

Retrieves the delphi expansions setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

delphi expansions setting for language

Category:

LanguageSettings API


getDocCommentFlags

_str getDocCommentFlags(_str langID, _str defaultValue=null)

Gets the doc comment flags for this language. This value is controlled by the options available on the Comments form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

doc comment flags for this language

Category:

LanguageSettings API


getFunctionBeginOnNewLine

boolean getFunctionBeginOnNewLine(_str langID, boolean defaultValue=null)

Retrieves the function brace on new line setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

function brace on new line setting for language

Category:

LanguageSettings API


getHexMode

int getHexMode(_str langID, int defaultValue=null)

Retrieves the hex mode for the given language. Possible values:

  • HM_HEX_OFF - hex mode off
  • HM_HEX_ON - hex mode on
  • HM_HEX_LINE - hex mode on using line hex

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

hex mode for language

Category:

LanguageSettings API


getHexValueCase

int getHexValueCase(_str langID, int defaultValue=null)

Retrieves the hex value case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

hex value case setting for language

Category:

LanguageSettings API


getIndentCaseFromSwitch

boolean getIndentCaseFromSwitch(_str langID, boolean defaultValue=null)

Retrieves the indent case from switch setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

indent case from switch setting for language

Category:

LanguageSettings API


getIndentFirstLevel

int getIndentFirstLevel(_str langID, int defaultValue=null)

Retrieves the indent first level setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

indent first level setting setting for language

Category:

LanguageSettings API


getIndentStyle

int getIndentStyle(_str langID, int defaultValue=null)

Retrieves the indent style for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

indent style for language

Category:

LanguageSettings API


getIndentWithTabs

boolean getIndentWithTabs(_str langID, boolean defaultValue=null)

Retrieves the indent with tabs setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

indent with tabs setting for language

Category:

LanguageSettings API


getInsertBeginEndImmediately

boolean getInsertBeginEndImmediately(_str langID, boolean defaultValue=null)

Retrieves the insert braces immediately setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

insert braces immediately setting for language

Category:

LanguageSettings API


getInsertBlankLineBetweenBeginEnd

boolean getInsertBlankLineBetweenBeginEnd(_str langID, boolean defaultValue=null)

Retrieves the insert blank line between braces setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

insert blank line between braces setting for language

Category:

LanguageSettings API


getInsertRealIndent

boolean getInsertRealIndent(_str langID, boolean defaultValue=null)

Gets whether we insert real indent for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: boolean

whether we insert real indent for this language

Category:

LanguageSettings API


getInsertRightAngleBracket

boolean getInsertRightAngleBracket(_str langID, boolean defaultValue=null)

Retrieves the insert right angle bracket setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

insert right angle bracket setting for language

Category:

LanguageSettings API


getKeyTableName

_str getKeyTableName(_str langID)

Retrieves the key table name for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: _str

key table name for language

Category:

LanguageSettings API


getKeywordCase

int getKeywordCase(_str langID, int defaultValue=null)

Retrieves the keyword case for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

keyword case setting for language

Category:

LanguageSettings API


getLangInheritsFrom

_str getLangInheritsFrom(_str langID, _str defaultValue=null)

Gets the inheritance value for this language, which defines if a language inherits callbacks from another language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

inheritance value for this language (language whose callbacks this language inherits from)

Category:

LanguageSettings API


getLanguageDefinitionOptions

int getLanguageDefinitionOptions(_str langID, VS_LANGUAGE_SETUP_OPTIONS &setup)

Retrieves a VS_LANGUAGE_SETUP_OPTIONS struct populated with options for the given language.

Parameters:

langID - language of interest

setup - struct to populate

Returns: int

the index of def-language-

Category:

LanguageSettings API


getLanguageSetupStringFromSetupOptions

_str getLanguageSetupStringFromSetupOptions(VS_LANGUAGE_SETUP_OPTIONS &setup)

Builds a language setup string (such as contained in def-langugage-) given a VS_LANGUAGE_SETUP_OPTIONS object containing language options.

Parameters:

setup - language options

Returns: _str

def-language string

Category:

LanguageSettings API


getLexerName

_str getLexerName(_str langID)

Retrieves the lexer name for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: _str

lexer name for language

Category:

LanguageSettings API


getLineNumbersFlags

int getLineNumbersFlags(_str langID, int defaultValue=null)

Retrieves the line numbers flags for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

line numbers flags for language

Category:

LanguageSettings API


getLineNumbersLength

int getLineNumbersLength(_str langID, int defaultValue=null)

Retrieves the line numbers length for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

line numbers length for language

Category:

LanguageSettings API


getLoadAsBinary

boolean getLoadAsBinary(_str langID)

Gets whether files in this language are loaded as binary. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: boolean

whether files are loaded as binary

Category:

LanguageSettings API


getLoadExpandTabsToSpaces

int getLoadExpandTabsToSpaces(_str langID)

Gets whether tabs are expanded to spaces when files in this language are loaded. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: int

whether tabs are expanded to spaces during file loading

Category:

LanguageSettings API


getLowercaseFilenamesWhenInsertingLinks

boolean getLowercaseFilenamesWhenInsertingLinks(_str langID, boolean defaultValue=null)

Retrieves the lowercase filenames when inserting links setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

lowercase filenames when inserting links setting for language

Category:

LanguageSettings API


getMainStyle

int getMainStyle(_str langID, int defaultValue=null)

Retrieves the MAIN style setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

MAIN style setting setting for language

Category:

LanguageSettings API


getMargins

_str getMargins(_str langID, _str defaultValue=null)

Retrieves the margins for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: _str

margins for language

Category:

LanguageSettings API


getMenuIfNoSelection

_str getMenuIfNoSelection(_str langID, _str defaultValue=null)

Gets the name of the menu used for right-click context menus when there is no selection for this language. This value is available on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

menu info for this language

Category:

LanguageSettings API


getMenuIfSelection

_str getMenuIfSelection(_str langID, _str defaultValue=null)

Gets the name of the menu used for right-click context menus when there is a selection for this language. This value is available on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

menu info for this language

Category:

LanguageSettings API


getMinimumAbbreviation

int getMinimumAbbreviation(_str langID, int defaultValue=null)

Retrieves the minimum abbreviation setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

minimum abbreviation setting for language

Category:

LanguageSettings API


getModeName

_str getModeName(_str langID)

Retrieves the mode name for the given language.

Parameters:

langID - language ID (see p_LangId

Returns: _str

mode name for language

Category:

LanguageSettings API


getMultilineIfExpansion

boolean getMultilineIfExpansion(_str langID, boolean defaultValue=null)

Retrieves the multiline IF expansion setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

multiline IF expansion setting setting for language

Category:

LanguageSettings API


getNoSpaceBeforeParen

boolean getNoSpaceBeforeParen(_str langID, boolean defaultValue=null)

Retrieves the no space before parenthesis setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

no space before parenthesis setting for language

Category:

LanguageSettings API


getNumberingStyle

int getNumberingStyle(_str langID, int defaultValue=null)

Gets the numbering style for this language. This value is available on the Formattiong options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

numbering style value for this language

Category:

LanguageSettings API


getPadParens

boolean getPadParens(_str langID, boolean defaultValue=null)

Retrieves the pad parentheses setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

pad parentheses setting for language

Category:

LanguageSettings API


getpid

int getpid()

Returns: int

Returns the process id of SlickEdit.

Category:

Miscellaneous Functions


getPointerStyle

int getPointerStyle(_str langID, int defaultValue=null)

Retrieves the pointer style for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

pointer style setting for language

Category:

LanguageSettings API


getQuickBrace

boolean getQuickBrace(_str langID, boolean defaultValue=null)

Retrieves the quick brace setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

quick brace setting for language

Category:

LanguageSettings API


getQuotesForNumericValues

boolean getQuotesForNumericValues(_str langID, boolean defaultValue=null)

Retrieves the quotes for numeric values setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

quotes for numeric values setting for language

Category:

LanguageSettings API


getQuotesForSingleWordValues

boolean getQuotesForSingleWordValues(_str langID, boolean defaultValue=null)

Retrieves the quotes for single word values setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

quotes for single word values setting for language

Category:

LanguageSettings API


getRubyStyle

int getRubyStyle(_str langID, int defaultValue=null)

Retrieves the ruby style setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

ruby style setting for language

Category:

LanguageSettings API


getSaveAsBinary

boolean getSaveAsBinary(_str langID)

Gets whether files in this language are saved as binary. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: boolean

whether files are saved as binary

Category:

LanguageSettings API


getSaveEOLFormat

_str getSaveEOLFormat(_str langID)

Gets the format used to translate EOL characters when files in this language are saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: _str

how EOL characters are translated when a file is saved values:

                           A - Automatic
                           D - DOS
                           M - Mac
                           U - Unix

Category:

LanguageSettings API


getSaveExpandTabsToSpaces

int getSaveExpandTabsToSpaces(_str langID)

Gets whether tabs are expanded to spaces when files in this language are saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: int

whether tabs are expanded to spaces during file save

Category:

LanguageSettings API


getSaveStripTrailingSpaces

int getSaveStripTrailingSpaces(_str langID)

Gets whether files in this language are have their trailing spaces stripped when saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

Returns: int

whether trailing spaces are stripped on save

Category:

LanguageSettings API


getShowTabs

int getShowTabs(_str langID, int defaultValue=null)

Retrieves the show tabs setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

show tabs setting for language

Category:

LanguageSettings API


getSmartPaste

boolean getSmartPaste(_str langID, boolean defaultValue=null)

Gets the smartpaste value for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: boolean

smartpaste value for this language

Category:

LanguageSettings API


getSmartTab

int getSmartTab(_str langID, int defaultValue=null)

Gets the smart tab value for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

smart tab value for this language

Category:

LanguageSettings API


getSoftWrap

boolean getSoftWrap(_str langID, boolean defaultValue=null)

Retrieves the soft wrap setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

soft wrap setting for language

Category:

LanguageSettings API


getSoftWrapOnWord

boolean getSoftWrapOnWord(_str langID, boolean defaultValue=null)

Retrieves the soft wrap on word setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

soft wrap on word setting for language

Category:

LanguageSettings API


getSurroundOptions

int getSurroundOptions(_str langID, int defaultValue=null)

Gets the surround options for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

surround options for this language

Category:

LanguageSettings API


getSymbolColoringOptions

int getSymbolColoringOptions(_str langID, int defaultValue=null)

Gets the symbol coloring options for this language. This value is controlled by options which are available on the View form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: int

symbol coloring options for this language

Category:

LanguageSettings API


getSyntaxExpansion

boolean getSyntaxExpansion(_str langID, boolean defaultValue=null)

Retrieves the syntax expansion setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

syntax expansion setting for language

Category:

LanguageSettings API


getSyntaxIndent

int getSyntaxIndent(_str langID, int defaultValue=null)

Retrieves the syntax indent for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

syntax indent for language

Category:

LanguageSettings API


getTabs

_str getTabs(_str langID, _str defaultValue=null)

Retrieves the tabs for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: _str

tabs for language

Category:

LanguageSettings API


getTagCase

int getTagCase(_str langID, int defaultValue=null)

Retrieves the tag case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

tag case setting for language

Category:

LanguageSettings API


getTruncateLength

int getTruncateLength(_str langID, int defaultValue=null)

Retrieves the truncate length for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

truncate length for language

Category:

LanguageSettings API


getUseAdaptiveFormatting

boolean getUseAdaptiveFormatting(_str langID, boolean defaultValue=null)

Gets the adaptive formatting value for this language, which controls whether adaptive formatting is turned on. This value is controlled on the GUI on the Adaptive Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: boolean

adaptive formatting value for this language

Category:

LanguageSettings API


getUseColorNames

boolean getUseColorNames(_str langID, boolean defaultValue=null)

Retrieves the use color names setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

use color names setting for language

Category:

LanguageSettings API


getUseContinuationIndentOnFunctionParameters

boolean getUseContinuationIndentOnFunctionParameters(_str langID, boolean defaultValue=null)

Retrieves the continuation indent on function parameters setting for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

continuation indent on function parameters setting for language

Category:

LanguageSettings API


getUseDivTagsForAlignment

boolean getUseDivTagsForAlignment(_str langID, boolean defaultValue=null)

Retrieves the use div tags for alignment setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

use div tags for alignment setting for language

Category:

LanguageSettings API


getUsePathsForFileEntries

boolean getUsePathsForFileEntries(_str langID, boolean defaultValue=null)

Retrieves the use paths for file entries setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: boolean

use paths for file entries setting for language

Category:

LanguageSettings API


getValueCase

int getValueCase(_str langID, int defaultValue=null)

Retrieves the single word value case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

single word value case setting for language

Category:

LanguageSettings API


GetVCPPBinPath

int VSAPI GetVCPPBinPath(VSHREFVAR hrefPath, int iUserSpecifiedVersion)

Gets the path of the binaries for Visual C++/Visual Studio

Parameters:

hrefPath - Path of binaries

iUserSpecifiedVersion - Version of Visual C++/Visual Studio user has. If not certain, use -1

AppendExename - (optional) If true, append the name of the executable

Returns: int

0 if succesful

Category:

Miscellaneous Functions


getWordChars

_str getWordChars(_str langID)

Retrieves the word characters for the given language.

Parameters:

langID - language ID (see p_LangId

Returns: _str

word characters for language

Category:

LanguageSettings API


getWordWrapStyle

int getWordWrapStyle(_str langID, int defaultValue=STRIP_SPACES_WWS | WORD_WRAP_WWS)

Retrieves the word wrap style for the given language.

Parameters:

langID - language ID (see p_LangId

defaultValue - (optional) the value to return if no value is saved for this setting in the given language. If this is not specified, then the application's default value for this language setting is returned

Returns: int

word wrap style for language

Category:

LanguageSettings API


getXMLWrapOptions

_str getXMLWrapOptions(_str langID, _str defaultValue=null)

Gets the xml wrap options for this language. This value is available on the GUI on the Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

defaultValue - if the value is not available, then we just return this value. If this parameter is not specified, then the default value for the overall def-var is used.

Returns: _str

xml wrap options for this language

Category:

LanguageSettings API


goto_bookmark

_command int goto_bookmark(_str bookmarkName='')

Places the cursor at the file and cursor position stored in the bookmark given by bookmarkName.

Note: This command no longer supports the + and - options.

Parameters:

bookmarkName - Name of bookmark on which to place cursor.

Returns: int

Returns the bookmark ID on success. <0 on error.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

set_bookmark, toggle_bookmark, old_goto_bookmark, bookmark_stack


goto_bookmark_in_tree

_command void goto_bookmark_in_tree()

Navigate to the currently selected bookmark from the Bookmarks tool window.

Category:

Bookmark Functions


goto_clipboard

void goto_clipboard(int clipboard_index, boolean skip_named_clipboards=false)

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_window _clipboards_view_id).

Applies To:

Edit Window

Category:

Clipboard Functions


goto_line

_command int goto_line(_str lineNumber='')

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 SlickEdit command line. Press ESC to get to the command line.

Parameters:

LineNumber -

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods, Search Functions

See Also:

goto_line, p_RLine, p_line, gui_goto_line


goto_parent

_command int goto_parent()

Moves the cursor to the begining of the enclosing statement or symbol scope relative to the current cursor position.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


goto_point

int goto_point(_str text_pos, int linenum=-1)

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 SlickEdit's implementation of line 0.

Returns: int

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);

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

point, seek, gui_seek, _nrseek, _GoToROffset, _QROffset


goto_read_point

void goto_read_point()

Places the cursor on the "read point" of the build window. 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 build window must be active before calling this function.

Category:

CursorMovement Functions


goto_tag

_command typeless goto_tag()

Used in EMACS emulation. Prompts for a procedure tag name and places the cursor on the definition of the procedure name specified.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

make_tags, gui_make_tags, push_tag


goto_url

_command int goto_url(_str webpage="", boolean UseHelpBrowser=false, int overrideDDE=-1)

Displays URL in Web browser.

Parameters:

webpage - URL to go to

UseHelpBrowser -

overrideDDE - If -1, the user's preference for using DDE is honored. If 0, DDE is not used in this case. If 1, DDE is used.

Category:

File Functions

See Also:

open_url, open_url_in_assoc_app


grep_last

_command int grep_last()

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.

Returns: int

Returns 0 if a file from the list is selected for editing.

Applies To:

Edit Window

Category:

Search Functions

See Also:

find


grep_tag

_command typeless grep_tag(_str search_str='', _str options="")

Search for tags matching the given search pattern. Note: 'gt' is shorthand for the grep-tag command.

  Usage:  gt/tag_name_regex/search_options

Parameters:

search_str - Regex and search options. The following search options are accepted:

E
Case-sensitive match
I
Case-insensitive match
R
use SlickEdit regular expressions
U
use Unix regular expressions
B
use Brief regular expressions
L
use Perl regular expressions
&
use SlickEdit wildcard (filename) expressions
A
Search all tag files, not just the workspace tag file.
P
Limit search to the current project only

Returns: typeless

Returns 0 if successful. Otherwise, a non-zero value is returned.

Category:

Tagging Functions

See Also:

f, push_tag, find_proc, find_tag, gui_push_tag


grid

_command void grid(_str cmdline='')

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).

Parameters:

cmdline - is a string in the format: width height

Category:

Miscellaneous Functions

See Also:

gui_grid, _grid_width, _grid_height


gui_append_selection

_command typeless gui_append_selection()

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.

Returns: typeless

Returns 0 if successful.

Category:

Selection Functions

See Also:

append, put, gui_write_selection


gui_beautify

_command typeless gui_beautify()

Runs the language specific 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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

c_beautify, c_beautify_selection


gui_bind_to_key_deprecated

_command int gui_bind_to_key_deprecated()

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.

Applies To:

Edit Window

Category:

Keyboard Functions

See Also:

bind_to_key, unbind_key


gui_cd

_command typeless gui_cd()

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 build window.

Returns: typeless

Returns 0 if successful.

Category:

File Functions

See Also:

cd, cdd, alias_cd


gui_copy_to_file

_command typeless gui_copy_to_file()

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.

Returns: typeless

Returns 0 if successful. Common return values are:

  • 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
  • PATH_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window

Categories:

Editor Control Methods, File Functions

See Also:

save_as, save, name, copy_to_file


gui_draw

_command void gui_draw()

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 know which font if any supports the line drawing characters.

Category:

Miscellaneous Functions

See Also:

draw, box


gui_enumerate

_command void gui_enumerate()

Adds incrementing numbers to a selection. Displays Enumerate dialog box.

Applies To:

Edit Window, Editor Control

Category:

File Functions

See Also:

enumerate


gui_fill_selection

_command void gui_fill_selection()

Fill the selection with a character you choose. The Fill Selection dialog box is displayed to prompt you for the character to press.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

fill_selection


gui_find

_command int gui_find(...)

Searches for a string you specify. The Find and Replace tool window is displayed to prompt you for the search string and options.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

File Functions, Edit Window Methods, Editor Control Methods, Search Functions

See Also:

find_next, gui_replace, find, replace, find_prev


gui_find_backward

_command typeless gui_find_backward()

Used in BRIEF emulation. Same as gui_find command except that the search direction is initially backward.

Applies To:

Edit Window

Category:

Edit Window Methods


gui_find_backward_regex

_command typeless gui_find_backward_regex()

Used in EMACS emulation. Same as gui_find command except that the search direction is initially backward and regular expressions are turned on.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions


gui_find_proc

_command int gui_find_proc()

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.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window

Category:

Search Functions

See Also:

find_proc, list_tags


gui_find_regex

_command typeless gui_find_regex()

Used in EMACS emulation. Same as gui_find command except that regular expressions are turned on.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions


gui_goto_col

_command void gui_goto_col(_str colNo='')

Places the cursor on a column you specify. A dialog box is displayed which prompts you for the column.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, CursorMovement Functions, Search Functions

See Also:

p_line, goto_line, gui_goto_line, p_RLine


gui_goto_line

_command int gui_goto_line()

Places the cursor on a line number you specify. A dialog box is displayed which prompts you for a line number.

Returns: int

Returns 0 if successful

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Edit Window Methods, CursorMovement Functions, Search Functions

See Also:

p_line, goto_line, gui_goto_col, p_RLine


gui_grid

_command typeless gui_grid()

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).

Category:

Miscellaneous Functions

See Also:

grid, _grid_height, _grid_width


gui_insert_file

_command typeless gui_insert_file()

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", "Options", "More Options...", "Line Insert Style").

Applies To:

Edit Window

Category:

File Functions

See Also:

get


gui_justify

_command void gui_justify()

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.

SlickEdit provides three justification styles:

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", "Options", "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", "Options", "File Extension Setup...", select the Word Wrap tab, select an extension, "Justify Style").

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

justify


gui_list_macfiles

_command void gui_list_macfiles()

Display a list of the user's loaded macros and allow them to load, unload, or re-order them. This is essentially a fancy editor for def_macfiles.

Category:

Macro Programming Functions

See Also:

def_macfiles, list_macros, load, unload, gui_load, gui_unload


gui_load

_command typeless gui_load()

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.

Returns: typeless

Returns 0 if successful.

Category:

Macro Programming Functions

See Also:

gui_unload, load, unload


gui_make_tags

_command void gui_make_tags()

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.

Returns: void

Returns 0 if successful.

Category:

Search Functions

See Also:

make_tags, push_tag, gui_push_tag, find_tag, f


gui_margins

_command typeless gui_margins()

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...", select the Word Wrap tab).

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

margins, reflow_paragraph, reflow_selection, gui_justify, justify


gui_open

_command typeless gui_open(typeless flags="")

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.

Parameters:

ofn_flags - defaults to (OFN_READONLY|OFN_ALLOWMULTISELECT) and may be 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_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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions

See Also:

e, edit


gui_print

_command typeless gui_print()

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

print, tprint


gui_push_tag

_command typeless gui_push_tag(_str proc_name='')

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 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.

Parameters:

proc_name - encoded tag name to find. See tag_tree_compose_tag.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Bookmark Functions, Search Functions

See Also:

make_tags, push_tag, gui_make_tags, find_tag, f


gui_reflow_comment

_command typeless gui_reflow_comment()

Runs the dialog box which is used to set comment reflow options and perform reflow block comment.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

reflow comment dialog box


gui_replace

_command int gui_replace(...)

Searches for a string you specify and replaces it with another string you specify. The Find and Replace tool window is displayed to prompt you for the search and replace options.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

File Functions, Edit Window Methods, Editor Control Methods, Search Functions

See Also:

find_next, gui_find, find, replace, gui_replace2, find_prev


gui_replace2

int gui_replace2(_str search_string, _str replace_string, _str options, boolean quiet=false, boolean multifile=false, SearchResults *results=null, boolean tempFile=false)

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.

Parameters:

options - 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 SlickEdit regular expression. In addition, the characters \ and # take on new meaning in the replace string. See SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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.

quiet - When true, no message is displayed on the message line when an error occurs.

multifile - When true, the "Next file" button of the Prompt Replace dialog is made visible.

logfile -

tempFile - Set to true when doing replace in temp file to avoid read-only checks/prompts

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

File Functions, Edit Window Methods, Editor Control Methods, Search Functions

See Also:

find_next, gui_find, find, replace, gui_replace, find_prev


gui_replace_backward

_command typeless gui_replace_backward()

Used in BRIEF emulation. Same as gui_replace command except that the search direction is initially backward.

Applies To:

Edit Window

Category:

Edit Window Methods


gui_replace_regex

_command typeless gui_replace_regex()

Used in EMACS emulation. Same as gui_replace command except that regular expressions are turned on.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions


gui_save_as

_command typeless gui_save_as()

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions

See Also:

save, name, save_as


gui_save_config

_command typeless gui_save_config()

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 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.

Returns: typeless

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
  • PATH_NOT_FOUND_RC

On error, message box displayed.

Category:

Miscellaneous Functions

See Also:

write_state, save_config


gui_save_macro

_command typeless gui_save_macro()

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.

Returns: typeless

Returns 0 if successful.

Category:

Macro Programming Functions

See Also:

save_macro, start_recording, end_recording, record_macro_toggle, record_macro_end_execute, execute_last_macro, execute_last_macro_key


gui_seek

_command typeless gui_seek()

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 cannot be past the end of the file. Negative seek positions are possible due to 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, SlickEdit strips the EOF (character 27) if there is one at the end of the file.

Category:

Miscellaneous Functions

See Also:

seek, _QROffset, _GoToROffset, goto_point, point, _nrseek


gui_select_ext

_command typeless gui_select_ext()

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.

Category:

File Functions

See Also:

select_ext


gui_set_var

_command typeless gui_set_var()

Displays and optionally sets a macro variable you specify. A dialog box is displayed to prompt you for the macro variable and value.

Category:

Macro Programming Functions

See Also:

set_var


gui_shift_selection

_command typeless gui_shift_selection()

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


gui_sort

_command typeless gui_sort()

Sorts the current buffer or selection. The Sort dialog box is displayed which allows you to select various sort options.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

sort_buffer, sort_within_selection, sort_on_selection


gui_tabs

_command typeless gui_tabs()

Displays and optionally sets the tabs for the current buffer. The Tabs dialog box prompts you for the tab stops.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

tabs


gui_unlist_ext

_command typeless gui_unlist_ext()

Deletes lines of files with a specified extension. A dialog box is displayed which prompts you for an extension. Used in fileman mode.

Category:

File Functions

See Also:

unlist_ext


gui_unload

_command typeless gui_unload()

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.

Category:

Macro Programming Functions

See Also:

unload


gui_visit_file

_command typeless gui_visit_file()

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.

Applies To:

Edit Window

Category:

Edit Window Methods

See Also:

edit, visit_file


gui_write_selection

_command typeless gui_write_selection()

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Selection Functions

See Also:

put, append, gui_append_selection, get


h_format

_command int h_format(int in_wid=0, int start_indent=0, _str lang="", htmScheme_t *pscheme=null, boolean quiet=false)

Beautifies the current buffer using the current options. Use the HTML Beautifier dialog box set beautifier options used by this command.

Parameters:

in_wid - Input window id to format. If 0, then current window is formatted. Defaults to 0.

start_indent - Starting indent for formatted lines. Defaults to 0.

lang - Canonical language ID of window being formatted. If "", then p_LangId of the window is used. Defaults to "".

pscheme - Pointer to formatter settings to use. Defaults to 0 (NULL).

quiet - (optional). Set to true if you do not want to see status messages or be prompted for options (e.g. tab mismatch). More serious errors (e.g. failed to save default options, etc.) will still be displayed loudly. Defaults to false.

Returns: int

0 if sucessful, non-zero for error. value==2 means there was an error beautifying and calling function should get the error message with vscf_iserror().

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

gui_beautify, h_beautify_selection, xml_beautify_selection


h_format_selection

_command int h_format_selection(_str lang="", htmScheme_t *pscheme=null, boolean quiet=false)

Beautifies the current selection using the current options. If there is no current selection the entire buffer is beautified. Use the HTML Beautifier dialog box set beautifier options used by this command.

Parameters:

lang - Canonical language ID of window being formatted. If "", then p_LangId of the window is used. Defaults to "".

pscheme - Pointer to formatter settings to use. Defaults to 0 (NULL).

quiet - (optional). Set to true if you do not want to see status messages or be prompted for options (e.g. tab mismatch). More serious errors (e.g. failed to save default options, etc.) will still be displayed loudly. Defaults to false.

Applies To:

Edit Window, Editor Control

Category:

Edit Window Methods

See Also:

gui_beautify, h_beautify


hc_match

_str hc_match(_str name, boolean find_first)

Parameters:

name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns help class which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions


help

_command typeless help(_str keyword="", _str filename="")

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.

Category:

Miscellaneous Functions


help_index

_command void help_index()

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.

Category:

Miscellaneous Functions


hex

_command void hex()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex2dec

typeless hex2dec(_str hex, int base=16)

Parameters:

hex - 0xNNNN, xNNNN, or NNNN represent a valid hex number 0NNNN for an Octal number 0bNNNN, bNNNN represent a valid binary number

base - input base. Defaults to 16.

Returns: typeless

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'.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_backspace

_command void hex_backspace()

Deletes byte to left of cursor when in hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_bottom

_command void hex_bottom()

Moves the cursor one byte past the last byte in the current buffer.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_del

_command void hex_del()

Deletes the byte under the cursor when in hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_keyin

_command void hex_keyin()

Inserts byte or nibble specified by last_event() depending on whether cursor is in ASCII column or hex nibbles.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_select_line

_command void hex_select_line()

Selects the current line for hex mode display. For practical purposes, the mark is a character selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_select_word

_command void hex_select_word()

Selects the current column in the hex mode display.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hex_tab

_command void hex_tab()

Toggles cursor between ASCII column or hex nibbles when in hex mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hide_all_comments

_command void hide_all_comments()

Hides all lines in current buffer which contain only comment text.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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 hide_code_block()

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.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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_comments_and_code_blocks

_command typeless hide_comments_and_code_blocks(_str seldisp_flags="")

Hides all procedures and comment blocks.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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


hide_dotnet_regions

_command typeless hide_dotnet_regions()

Selective display command for #region / #endregion blocks in C# or C++/CLI code

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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


hide_mouse

_command void hide_mouse(_str yesno="")

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.

Category:

Mouse Functions


hide_selection

_command void hide_selection(_str markid="", _str doShow="")

Hides lines in current selection.

Parameters:

markid - 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.

doShow - show selected lines or hide them?

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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, show_selection


highlight_all_occurrences

int highlight_all_occurrences(_str search_text, _str search_options)

Highlight all matching occurrences in a buffer.

Parameters:

search_text - String to search for.

search_options - Search options (@see find)

Returns: int

Number of occurrences

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

search


highlight_selection

_command void highlight_selection()

Create highlight for selected area. Use clear_highlights command to clear all highlights or you can also use Undo to remove the highlights.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


hNt_match

_str hNt_match(_str name, boolean find_first)

Parameters:

name - help item to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns help item or help topic which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Hscroll Bar Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_large_change
p_max
p_mdi_child
p_min
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


hsplit_window

_command typeless hsplit_window(_str load_options="")

Splits the current window horizontally in half. Optionally load buffer into split window.

Parameters:

buffer_name - Option to load buffer into split window. See load_file.

Returns: typeless

Returns 0 if successful. Common return codes are TOO_MANY_WINDOWS_RC and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Applies To:

Edit Window

Category:

Window Functions

See Also:

vsplit_window


ht_match

_str ht_match(_str name, boolean find_first)

Parameters:

name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns help type which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions


html_contentwrap

_command int html_contentwrap(_str yesno="")

If yes, the editor attempts to wrap the contents of html elements automatically.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

html_contentwrap_toggle


html_contentwrap_toggle

_command void html_contentwrap_toggle()

Toggles the content wrapping portion of the HTML formatting feature on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


html_formatting

_command int html_formatting(_str yesno="")

If yes, the editor attempts to wrap and auto format html.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

html_formatting_toggle


html_formatting_toggle

_command void html_formatting_toggle()

Toggles HTML formatting on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


html_mode

_command void html_mode()

Activates HTML file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


html_preview

_command int html_preview()

Saves the current buffer if necessary and runs an HTML browser. Use the ("Tools", "Options", "Web Browser Setup...") menu item to configure an HTML browser. This command is on the button bar by default.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


html_taglayout

_command int html_taglayout(_str yesno="")

If yes, the editor attempts to do automatic tag layout in html documents.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

html_taglayout_toggle


html_taglayout_toggle

_command void html_taglayout_toggle()

Toggles the tag layout portion of the HTML formatting feature on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


i_search

_command void i_search()

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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Applies To:

Edit Window

Category:

Search Functions

See Also:

reverse_i_search, gui_find, find, replace, gui_replace


iconize_all

_command void iconize_all()

Set all editor windows to iconized(minimized).

Applies To:

Edit Window

Category:

Window Functions


iconize_mdi

_command void iconize_mdi()

Iconizes the MDI window.

Category:

Window Functions


iconize_window

_command void iconize_window()

Iconizes an MDI child edit window.

Applies To:

Edit Window

Category:

Window Functions


Image Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Image Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_command
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_max_click
p_mdi_child
p_message
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_Orientation
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


include_search

_str include_search(_str filename, _str multi_path='', _str multi_path2='')

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.

Returns: _str

If successful, a complete file specification for filename is returned. Otherwise '' is returned.

Category:

File Functions


indent_line

_command void indent_line()

Indents the current line one indent level. Indenting will be with tab or space characters depending upon the Indent With Tabs setting ("Tools", "Options", "File Extension Setup...", select the Indent tab). Set the Syntax Indent for each level using the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Indent tab). If Syntax Indent is grayed, the tab settings are used for all tab related operations including this command.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

unindent_line, indent_selection


indent_on_enter

void indent_on_enter(int syntax_indent, ...)

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


indent_previous

_command typeless indent_previous()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

indent_region, indent_rigidly


indent_region

_command typeless indent_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

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 typeless indent_rigidly()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

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 typeless indent_selection()

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 ("Tools", "Options", "File extension setup...", select the Indent tab, select an extension, "Indent with tabs"). Set the indent for each level using the Extension Options dialog ("Tools", "Options", "File extension setup...", select the Indent tab, 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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

unindent_selection


indent_string

_str indent_string(int width)

Returns: _str

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.

Category:

String Functions


indent_with_tabs

_command typeless indent_with_tabs(_str yesno="")

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", "Options", "File Extension Setup...", select the Indent tab, select an extension, "Indent with tabs').

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

indent_with_tabs_toggle


indent_with_tabs_toggle

_command void indent_with_tabs_toggle()

Toggles indenting with tabs on or off for the current buffer.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

indent_with_tabs


index2event

_str index2event(int index)

Converts key table index into the binary string representation of keys returned by get_event(), test_event, and last_event().

Category:

Keyboard Functions

See Also:

get_event, test_event, last_event, call_key, event2name, event2index, list_bindings, name2event, eventtab_index


index_callable

int index_callable(int index)

Returns: int

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));
         }

Category:

Names Table Functions

See Also:

call_index


init_command_op

void init_command_op()

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();
}

Category:

Command Line Functions


init_error

void init_error()

Initializes regular expression and procedure index variables used for searching and parsing error messages. Initializes variables used by the SEARCH_FOR_ERROR() and PARSE_ERROR() functions. See comment at the top of "error.e" for details.

Category:

Miscellaneous Functions


insert_code_template

_command int insert_code_template(_str prefix='', boolean prompt=true)

Inserts a code template. The code templates are defined as surround-with templates. This only uses surround-with as its base instead of working with aliases directly so that the template prompting, recorded macro handling and beautification of surround-with can be leveraged. Also it will keep the code templates separate from the regular aliases.

Parameters:

prefix - Specifies the name of the surround-with template to use. If no argument is given or if multiple possible templates are found, the user is prompted to select the template they wish to use.

prompt - if false and multiple matches are found, it is handled as if no matches were found

Returns: int

zero if a code template was expanded

Category:

Editor Control Methods

See Also:

Alias Facility


insert_file_list

int insert_file_list(_str cmdline)

Inserts a file list of the files specified with columns for size, date, time, attributes, and name.

Parameters:

cmdline - has the following syntax:

     {filespec  | ['-' | '+' option_letters] [-exclude exfiles]}

option_letters - may be 'H','S','A','D','P','T','V' with the following meanings:

H
Include hidden files (defaults to OFF)
This option is always turned on under Windows if the "Show all files" explorer option is set. On UNIX, this option is ignored.
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)
U
UNIX dot files (defaults to ON)
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 partitioned 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.

exfiles - may contain operating system wild cards such as '*' and '?'. Specifying a directory will exclude a named directory and contained subdirectories

Returns: int

Returns 0 if successful. Common return codes are:

  • FILE_NOT_FOUND_RC
  • PATH_NOT_FOUND_RC
  • NO_MORE_FILES_RC
  • ACCESS_DENIED_RC

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.
insert_file_list('+tp \*.* -exclude *\CVS\'); //List all file, append paths, excluding "CVS" subdirectories
insert_file_list('+tp \*.* -exclude *.txt'); //List all files, append paths, excluding .txt files

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Methods, Editor Control Methods, File Functions, List Box Methods


insert_keydef

_command void insert_keydef()

Inserts Slick-C® source code for the binding of the key(s) you type. Displays message if key sequence pressed has no definition.

Category:

Keyboard Functions


insert_line

void insert_line(_str line)

Inserts line into editor buffer after the current line.

Parameters:

line - String to insert. line should not contain newline characters since the appropriate newline characters are appended.

Example:

insert_line("add line after current line");

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

get_line, replace_line, delete_line, get_text


insert_line_raw

void insert_line_raw(_str line)

This function is identical to the insert_line function, except that the input string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS Macro Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


insert_literal

_command void insert_literal(_str result='')

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.

Returns: void

Returns 0 if a character was inserted.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

keyin


insert_name

int insert_name(_str name, int type, _str info="", int copy_index=0)

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.

Returns: int

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.

Category:

Names Table Functions

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_object

_command typeless insert_object(_str result="")

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).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


insert_retrieve

void insert_retrieve(int retrieve_view_id, boolean &first_retrieve, _str line)

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.

Category:

Retrieve Functions

See Also:

pretrieve_next, pretrieve_prev


insert_toggle

_command void insert_toggle()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


insert_var

_command typeless insert_var(_str result='')

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.

Parameters:

binary - defaults to false.

NewLineChars - defaults to p_newline.

Category:

Macro Programming Functions


isalnum

boolean isalnum(_str key)

Returns: boolean

Returns true if char is a numeric or alphabetic character.

Category:

String Functions


isalpha

boolean isalpha(_str key)

Returns: boolean

Returns non-zero value if char is an alphabetic character.

Category:

String Functions


isay

void isay(int level, _str string)

Write a string to the SlickEdit debug window, indented by the specified number of tabs.

Parameters:

level - indentation level

string - string to display

Category:

Debugger Functions


iscancel

_str iscancel(_str key)

Indicates whether a key is considered a cancel key.

Parameters:

key - A string key returned from get_event(), test_event(), or last_event().

Returns: _str

Returns true if key:==ESC or key is bound to the command abort.

Category:

Keyboard Functions

See Also:

islist_cancel, cancel_key_index


isdigit

boolean isdigit(_str key)

Returns: boolean

Returns true if key is a single numeric character.

Category:

String Functions


isdirectory

_str isdirectory(_str name, _str appendFileSep="")

Returns: _str

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.

Category:

File Functions


isdrive

boolean isdrive(_str name)

Returns: boolean

Returns true if string is of the format d: where d is the drive.

Category:

File Functions


ishexnum

boolean ishexnum(_str num)

Returns: boolean

Returns true value if string is a valid hex number.

Category:

String Functions


isid_valid

boolean isid_valid(_str name)

Returns: boolean

Returns true if the name specified is a valid Slick-C® identifier.

Category:

Miscellaneous Functions


isinteger

boolean isinteger(_str string)

Returns: boolean

Returns true if string is a valid signed or unsigned integer. If string is floating point number, 0 is returned.

Category:

String Functions


islist_cancel

boolean islist_cancel(_str key)

Returns: boolean

Returns true if key:==ESC, key is bound to the command abort, or key is bound to the command quit.

Category:

Keyboard Functions

See Also:

iscancel, cancel_key_index


isnormal_char

boolean isnormal_char(_str key)

Returns: boolean

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.

Category:

Keyboard Functions


isnumber

boolean isnumber(_str number)

Returns: boolean

Returns non-zero value if string is a valid number of any kind, including floating point.

Category:

String Functions


ispf_autosave

_command void ispf_autosave(_str cmdline='')

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.

Parameters:

cmdline - Syntax of cmdline:

   on| off|prompt

Category:

ISPF Primary Commands

See Also:

ispf_number, ispf_renumber, ispf_nonumber, ISPF Emulation Options


ispf_bottom

_command void ispf_bottom()

Moves cursor to the end of the buffer.

Category:

ISPF Emulation Commands

See Also:

ispf_top, bottom_of_buffer


ispf_bounds

_command void ispf_bounds(_str cmdline='')

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. right_col defaults to left_col if not specified.

Parameters:

cmdline - Synax of cmdline:

   left_col [right_col]

Category:

ISPF Primary Commands

See Also:

ispf_change, ispf_find, ispf_exclude, ISPF Line Commands


ispf_browse

_command void ispf_browse(_str filename='')

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.

Parameters:

filename - Filename or path which may contains wildcards.

Category:

ISPF Primary Commands

See Also:

edit, ispf_end, ispf_cancel


ispf_cancel

_command void ispf_cancel()

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.

Category:

ISPF Primary Commands

See Also:

ispf_end


ispf_change

_command int ispf_change(_str arglist="")

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.

   CHANGE string1 string2
          [FIRST| LAST | NEXT | PREV ]
          [WORD| PREFIX | SUFFIX ]
          [X| EX| NX ]
          [ ALL ]
          [StartCol-EndCol]
          [StartLabel-EndLabel]

Returns: int

Returns 0 if successful.

Category:

ISPF Primary Commands

See Also:

ispf_find, ispf_exclude, ispf_locate


ispf_compare

_command void ispf_compare(_str filename='')

The compare command compares the file you are editing with another file or PDS member. The differences are displayed using 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.

Parameters:

filename - Filename to compare current buffer with. If no filename is specified, the current buffer is compared to the file on disk.

Category:

ISPF Primary Commands

See Also:

diff


ispf_copy

_command int ispf_copy(_str arglist="")

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:

Syntax:

   COPY [member] [AFTER label ] [BEFORE label ] [line_range]

Arguments:

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.

Returns: int

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.

Category:

ISPF Primary Commands

See Also:

ispf_move, ISPF Line Command A, ISPF Line Command B, ISPF Line Labels


ispf_create

_command void ispf_create(_str filename="")

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.

Syntax:

   CREATE filename

Category:

ISPF Primary Commands

See Also:

ispf_browse, ispf_end, ispf_cancel, ispf_return


ispf_cut

_command void ispf_cut(_str arglist="")

Cut lines out of the current buffer and place them in the specified clipboard.

Sytnax:

   CUT [ line_range ] [DEFAULT | clipboardname ] [REPLACE] [DISPLAY]

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.

Category:

ISPF Primary Commands

See Also:

ispf_paste, list_clipboards, cut


ispf_delete

_command void ispf_delete(_str cmdline="")

Deletes lines in the given line range, or the entire buffer.

Sytnax:

   DELETE [ ALL| X| NX ] [ line_range ]

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.

Category:

ISPF Primary Commands

See Also:

delete_line, ISPF Line Command Delete


ispf_do_lc

_command int ispf_do_lc(_str column_number="")

Process ISPF Line Comments, usually bound to ENTER or CTRL/ENTER key or RIGHT CTRL key.

Returns: int

0 on success, <0 on error

Category:

ISPF Primary Commands

See Also:

ispf_enter, ispf_locate, ispf_reset, ISPF Line Commands


ispf_down

_command void ispf_down()

Moves cursor to next page of text.

Category:

ISPF Emulation Commands

See Also:

ispf_top, bottom_of_buffer


ISPF Emulation Commands

ispf_bottom
ispf_down
ispf_enter
ispf_home
ispf_retrieve
ispf_retrieve_back
ispf_top
ispf_up


ispf_end

_command void ispf_end()

The end command closes the current file. If "END command saves the file" option is on (see ISPF Emulation Options), modifications will be saved automatically, otherwise, you will be prompted if you want to save modifications.

Category:

ISPF Primary Commands

See Also:

ispf_autosave, ispf_browse, ispf_cancel, ispf_return


ispf_enter

_command boolean ispf_enter()

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.

Returns: boolean

True if in ISPF mode and the event was processed, otherwise, returns false.

Category:

ISPF Emulation Commands

See Also:

ISPF Line Commands


ispf_exclude

_command int ispf_exclude(_str arglist="")

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.

Syntax:

   EXCLUDE string [ range ] [NEXT | ALL | FIRST | LAST | PREV | CHARS | SUFFIX | WORD | X | NX] [col1 [col2 ]]

Returns: int

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.

Category:

ISPF Primary Commands

See Also:

ispf_find, ispf_flip, ISPF Line Command Exclude


ispf_find

_command int ispf_find(_str arglist="")

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):

Syntax:

   string [ range ] [NEXT | ALL | FIRST | LAST | PREV | CHARS | SUFFIX | WORD | X | NX | QUIET] [col1 [col2 ]]

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.
col1
Starting column boundary to search within.
col2
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 SlickEdit 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).

Returns: int

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.

Category:

ISPF Primary Commands

See Also:

ispf_change, ispf_locate, ispf_exclude, ispf_hilite, ispf_flip


ispf_flip

_command void ispf_flip(_str cmdline="")

Reverse excluded lines for visible lines. All excluded lines become visible and all visisble lines become excluded. This command does not effect no-save lines.

Category:

ISPF Primary Commands

See Also:

ispf_exclude, ispf_find, ISPF Line Command Exclude, ISPF Line Command First


ispf_hex

_command void ispf_hex(_str arglist="")

Toggles display of the document in line hexadecimal mode. The standard ISPF hex options of VERT and DATA are not supported. When no argument is specified, line hexadecimal mode is toggled.

Syntax:

   HEX [ON | OFF]

Category:

ISPF Primary Commands

See Also:

hex, linehex


ispf_hilite

_command void ispf_hilite(_str arglist="")

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.

Syntax:

   HILITE [ ON | OFF | DEFAULT | OTHER | ASM | BOOK | C | COBOL | DB2 | DTL |
            HTML | JAVA | JCL | PANEL | PASCAL | PLI | REXX | SKEL | IDL]
          [RESET] [FIND] [CURSOR] [DISABLED]
Arguments:
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 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").

Category:

ISPF Primary Commands

See Also:

select_mode


ispf_home

_command void ispf_home()

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.

Category:

ISPF Emulation Commands

See Also:

HOME Key Configurations, ISPF Emulation Options


ispf_locate

_command void ispf_locate(_str cmdline="")

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.

Syntax:

   LOCATE line_number
   LOCATE label
   LOCATE [NEXT | PREV | FIRST | LAST ]
          [LABEL COMMAND CMD ERROR CHANGE CHG C SPECIAL S EXCLUDED X]
          [range]

Arguments:

line_number
Line number to go directly to.
label
ISPF label to go directly to.
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.

Category:

ISPF Primary Commands

See Also:

ispf_do_lc, ispf_reset, ISPF Line Commands


ispf_move

_command int ispf_move(_str arglist="")

The MOVE command moves 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:

Syntax:

   MOVE [member] [AFTER label ] [BEFORE label ]

Arguments:

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

Returns: int

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.

Category:

ISPF Primary Commands

See Also:

ispf_copy, ISPF Line Command A, ISPF Line Command B, ISPF Line Labels


ispf_nonumber

_command void ispf_nonumber()

Turns off numbering mode. This command is to "NUMBER OFF".

Category:

ISPF Primary Commands

See Also:

ispf_number


ispf_number

_command void ispf_number(_str arglist="")

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.

Syntax:

   NUMBER [ ON | OFF ] [ STD | NOSTD ] [ COBOL | NOCOBOL ]

Arguments:

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.

Category:

ISPF Primary Commands

See Also:

ispf_nonumber, ispf_renumber, ispf_unnumber


ispf_paste

_command void ispf_paste(_str arglist="")

The paste command copies lines from the clipboard to the specified position in the buffer, or the current line.

Syntax:

   PASTE [ clipboardname ] [ AFTER label ] [BEFORE label ] [KEEP]

Arguments:

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.

Category:

ISPF Primary Commands

See Also:

ispf_cut, list_clipboards, paste, ISPF Line Command A


ispf_preserve

_command void ispf_preserve(_str arglist="")

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", "Options", "File Options...").

Category:

ISPF Primary Commands


ISPF Primary Commands

ispf_autosave
ispf_bounds
ispf_browse
ispf_cancel
ispf_change
ispf_compare
ispf_copy
ispf_create
ispf_cut
ispf_delete
ispf_do_lc
ispf_end
ispf_exclude
ispf_find
ispf_flip
ispf_hex
ispf_hilite
ispf_locate
ispf_move
ispf_nonumber
ispf_number
ispf_paste
ispf_preserve
ispf_rchange
ispf_renumber
ispf_replace
ispf_reset
ispf_return
ispf_rfind
ispf_sort
ispf_swap
ispf_unnum


ispf_rchange

_command int ispf_rchange(_str cmdline='', boolean supportDoAll=false)

Repeats the change requested by the most recent change command.

Syntax:

   RCHANGE

Returns: int

Returns 0 if successful.

Category:

ISPF Primary Commands

See Also:

ispf_change


ispf_renumber

_command void ispf_renumber(_str arglist="")

The renumber command immediately updates the line numbers in a file.

Syntax:

   RENUMBER [ ON ] [ STD ] [ COBOL ]

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.

Category:

ISPF Primary Commands

See Also:

ispf_nonumber, ispf_number, ispf_unnumber


ispf_replace

_command void ispf_replace(_str member="")

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.

Syntax:

   REPLACE [member]

Category:

ISPF Primary Commands

See Also:

ispf_browse, ispf_end, ispf_cancel, ispf_create


ispf_reset

_command void ispf_reset(_str cmdline="")

Resets the line prefix area for specific types of lines or all lines in the buffer.

Syntax:

   RESET [ ALL | CHANGE | COMMAND | ERROR | EXCLUDED |
           FIND | LABEL | SPECIAL ] [ line_range ]

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

Category:

ISPF Primary Commands

See Also:

ispf_do_lc, ispf_locate, ISPF Line Commands


ispf_retrieve

_command void ispf_retrieve(_str back_arg="")

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.

Syntax:

   RETRIEVE [BACK]

Category:

ISPF Emulation Commands

See Also:

retrieve_next, retrieve_prev


ispf_retrieve_back

_command void ispf_retrieve_back()

This command is identical to the "ispf_retrieve back" command.

Category:

ISPF Emulation Commands


ispf_return

_command void ispf_return()

This command is identical to the ispf_end command.

Category:

ISPF Primary Commands


ispf_rfind

_command int ispf_rfind()

Repeat the last find operation requested by the last find command issued.

Syntax:

   RFIND

Returns: int

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.

Category:

ISPF Primary Commands

See Also:

ispf_find


ispf_sort

_command int ispf_sort(_str arglist="")

The sort command sorts lines of data in a specified order.

Syntax:

   SORT [ line_range ] [X] [NX] sort_field_1 ... sort_field_n

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.
col1
Starting physical column boundary for this field.
col2
Ending physical column boundary for the field.

Returns: int

Returns 0 if successful. Common return codes are 1 (you tried to sort the build window), NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC. On error, a message is displayed.

Category:

ISPF Primary Commands

See Also:

sort_buffer


ispf_swap

_command void ispf_swap()

Switches to the next window if One File per Window is on. Otherwise, switches to the next buffer.

Applies To:

Edit Window

Category:

ISPF Primary Commands

See Also:

next_doc


ispf_top

_command void ispf_top()

Moves cursor to the top of the buffer.

Category:

ISPF Emulation Commands

See Also:

ispf_bottom, top_of_buffer


ispf_unnum

_command void ispf_unnum(_str arglist="")

The unnumber command immediately blanks out the line numbers in a file.

Syntax:

   UNNUMBER  [ STD ] [ COBOL ]

Arguments:

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.

Category:

ISPF Primary Commands

See Also:

ispf_nonumber, ispf_number, ispf_renumber


ispf_up

_command void ispf_up()

Moves cursor up to the previous page of text.

Category:

ISPF Emulation Commands

See Also:

ispf_down, page_up


isprint

boolean isprint(_str key)

Returns: boolean

Returns true if char is length one and its ASCII value is greater than 29.

Category:

String Functions


isunc_root

boolean isunc_root(_str name, ...)

This procedure returns true if filename is a root directory on a UNC network.

Category:

File Functions


iswildcard

boolean iswildcard(_str filename)

Returns: boolean

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 '~'.

Category:

File Functions


java_mode

_command void java_mode()

Activates Java file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


java_proc_search

int java_proc_search(_str &proc_name, int find_first)

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.

Returns: int

Returns 0 if successful. Otherwise a non-zero value is returned.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


javadoc_comment

_command void javadoc_comment()

Generate a javadoc-style comment for the current tag. Will attempt to convert the current comment to javadoc.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


join

_str join(_str(&string_array)[], _str delimiter)

Join the contents of an array of strings into a delimited string.

Parameters:

string_array - Array of strings to join

delimeter - delimeter to use when joining

Returns: _str

Delimited string

Category:

String Functions

See Also:

split


join_line

_command int join_line(_str noStripLeadingSpaces='')

Joins the next line to the current line at the cursor position. Leading blanks on the next line are removed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


join_lines

_command void join_lines()

Joins the next line to the current line at the cursor position. Works on selections.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


justify

_command typeless justify(_str options="")

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.

'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 ("Tools", "Options", "File Options...", select the Save tab) to be set such that trailing spaces are not stripped when a buffer is saved.

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", "Options", "File Extension Setup...", select the Word Wrap tab, 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", "Options", "File Options...", select Save Tab).

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

word_wrap, gui_justify


k_match

_str k_match(_str name, boolean find_first)

Parameters:

name - macro name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Categories:

Completion Functions, Macro Programming Functions


key2ascii

_str key2ascii(_str key)

Returns: _str

Returns ASCII character corresponding to key. This is useful for converting keys like ENTER and TAB to the characters Ctrl+M and Ctrl+I.

Category:

Keyboard Functions


key_not_defined

_command void key_not_defined()

The editor invokes this command when the user presses a key that has no definition, or a mouse event occurs that has no binding.

Category:

Keyboard Functions


Keyboard Functions

_b2k_bind
_b2k_form
_executed_from_key_or_cmdline
_FlushPendingKeys
_IsCodePageLoadedAsUTF8
_IsEventPending
_IsKeyDown
_IsKeyPending
_key_for_display
alt_argument
alt_prefix
append_key_bindings
argument
bind_to_key
call_key
call_root_key
case_indirect
create_prefix_key
ctrl_prefix
esc_alt_prefix
event2index
event2name
eventtab_index
eventtab_inherit
flush_keyboard
get_event
get_string
gui_bind_to_key_deprecated
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
on_keystatechange
pgetkey
process_events
prompt
prompt_for_key
quote_key
repeat_key
root_keydef
set_eventtab_index
shift_prefix
signal_handler
test_event
unbind_key
what_is
where_is


keyin

void keyin(_str string)

Parameters:

string - character sequence to key in 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. Don't use keyin() unless you absolutely want word wrap support. keyin was and always will be MUCH SLOWER than _insert_text(). The new word wrap in comment feature added a lot more overhead to this already slow function. The performance of keyin can't be improved that much. Worse yet, keyin will overwrite characters when in replace mode. This is rarely what you want in any macros you write. Note that when you record a macro you get a lot of keyin() calls. This is the correct code generation but it is recommended that you translate the keyin calls to _insert_text() if you are unhappy with the performance.

Applies To:

Text Box, Combo Box, Edit Window, Editor Control

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


keyin_buf_name

_command void keyin_buf_name()

Inserts or overwrites the MDI edit window buffer name depending on the insert state.

Applies To:

Edit Window, Editor Control Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


keyin_dir_name

_command void keyin_dir_name()

Inserts or overwrites the MDI edit window buffer name path depending on the insert state.

Applies To:

Edit Window, Editor Control Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


keyin_enter

_command typeless keyin_enter()

Command to key in an enter key without doing syntax indent or any other language specific expansions normally done on enter.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


keyin_match_paren

_command typeless keyin_match_paren()

Inserts one of the end parenthesis ], }, or ) and then temporarily places the cursor on the matching begin parenthesis for a short period of time.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions

See Also:

find_matching_paren, show_matching_paren


keyin_space

_command typeless keyin_space()

Command to key in a space character without doing syntax expansion or any other intelligent expansions that are normally done on space.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


keyin_underscore

_command typeless keyin_underscore()

Command to key in the underscore character. This can be bound to a key that is easier to type that underscore, for example Ctrl+U.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


keymsg_delay

_command void keymsg_delay(_str tenths_of_second="")

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.

Category:

Keyboard Functions


kill_window

_command typeless kill_window()

Used in EMACS emulation. Deletes the current window.

Applies To:

Edit Window

Category:

Edit Window Methods

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


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
_SetListColCaption
_SetListColInfo
_SetMultiLabelProp
_ShowWindow
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Label Properties

p_active_form
p_alignment
p_auto_size
p_backcolor
p_bbside
p_caption
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


LanguageSettings API

getAdaptiveFormattingFlags
getAliasFilename
getAttributeCase
getAutoBracket
getAutoCaseKeywords
getAutoCompleteMinimumLength
getAutoCompleteOptions
getAutoCorrelateStartEndTags
getAutoInsertLabel
getAutoSymbolTranslation
getAutoValidateOnOpen
getBackspaceUnindents
getBeginEndComments
getBeginEndPairs
getBeginEndStyle
getBounds
getCaps
getCobolSyntax
getCodehelpFlags
getColorFlags
getCommentEditingFlags
getCommentWrapOptions
getCuddleElse
getDelphiExpansions
getDocCommentFlags
getFunctionBeginOnNewLine
getHexMode
getHexValueCase
getIndentCaseFromSwitch
getIndentFirstLevel
getIndentStyle
getIndentWithTabs
getInsertBeginEndImmediately
getInsertBlankLineBetweenBeginEnd
getInsertRealIndent
getInsertRightAngleBracket
getKeyTableName
getKeywordCase
getLangInheritsFrom
getLanguageDefinitionOptions
getLanguageSetupStringFromSetupOptions
getLexerName
getLineNumbersFlags
getLineNumbersLength
getLoadAsBinary
getLoadExpandTabsToSpaces
getLowercaseFilenamesWhenInsertingLinks
getMainStyle
getMargins
getMenuIfNoSelection
getMenuIfSelection
getMinimumAbbreviation
getModeName
getMultilineIfExpansion
getNoSpaceBeforeParen
getNumberingStyle
getPadParens
getPointerStyle
getQuickBrace
getQuotesForNumericValues
getQuotesForSingleWordValues
getRubyStyle
getSaveAsBinary
getSaveEOLFormat
getSaveExpandTabsToSpaces
getSaveStripTrailingSpaces
getShowTabs
getSmartPaste
getSmartTab
getSoftWrap
getSoftWrapOnWord
getSurroundOptions
getSymbolColoringOptions
getSyntaxExpansion
getSyntaxIndent
getTabs
getTagCase
getTruncateLength
getUseAdaptiveFormatting
getUseColorNames
getUseContinuationIndentOnFunctionParameters
getUseDivTagsForAlignment
getUsePathsForFileEntries
getValueCase
getWordChars
getWordWrapStyle
getXMLWrapOptions
languageSetupToArray
setAdaptiveFormattingFlags
setAliasFilename
setAttributeCase
setAutoBracket
setAutoCaseKeywords
setAutoCompleteMinimumLength
setAutoCompleteOptions
setAutoCorrelateStartEndTags
setAutoInsertLabel
setAutoSymbolTranslation
setAutoValidateOnOpen
setBackspaceUnindents
setBeginEndComments
setBeginEndPairs
setBeginEndStyle
setBounds
setCaps
setCobolSyntax
setCodehelpFlags
setColorFlags
setCommentEditingFlags
setCommentWrapOptions
setCuddleElse
setDelphiExpansions
setDocCommentFlags
setFunctionBeginOnNewLine
setHexMode
setHexValueCase
setIndentCaseFromSwitch
setIndentFirstLevel
setIndentStyle
setIndentWithTabs
setInsertBeginEndImmediately
setInsertBlankLineBetweenBeginEnd
setInsertRealIndent
setInsertRightAngleBracket
setKeyTableName
setKeywordCase
setLangInheritsFrom
setLanguageDefinitionOptions
setLexerName
setLineNumbersFlags
setLineNumbersLength
setLoadAsBinary
setLoadExpandTabsToSpaces
setLowercaseFilenamesWhenInsertingLinks
setMainStyle
setMargins
setMenuIfNoSelection
setMenuIfSelection
setMinimumAbbreviation
setModeName
setMultilineIfExpansion
setNoSpaceBeforeParen
setNumberingStyle
setPadParens
setPointerStyle
setQuickBrace
setQuotesForNumericValues
setQuotesForSingleWordValues
setRubyStyle
setSaveAsBinary
setSaveEOLFormat
setSaveExpandTabsToSpaces
setSaveStripTrailingSpaces
setShowTabs
setSmartPaste
setSmartTab
setSoftWrap
setSoftWrapOnWord
setSurroundOptions
setSymbolColoringOptions
setSyntaxExpansion
setSyntaxIndent
setTabs
setTagCase
setTruncateLength
setUseAdaptiveFormatting
setUseColorNames
setUseContinuationIndentOnFunctionParameters
setUseDivTagsForAlignment
setUsePathsForFileEntries
setValueCase
setWordChars
setWordWrapStyle
setXMLWrapOptions


languageSetupToArray

void languageSetupToArray(VS_LANGUAGE_SETUP_OPTIONS &setup, typeless(&langInfo)[])

Transfers the language data contained in a VS_LANGUAGE_SETUP_OPTIONS object into an array indexed by the items in the LanguageDefinitionItems enum. If any of the items in the struct are null, then these are not transferred over.

Parameters:

setup - language options

langInfo - array to receive info

Category:

LanguageSettings API


last_buffer

boolean last_buffer()

Returns: boolean

Returns non-zero value if there are more non-hidden buffers.

Category:

Buffer Functions


last_char

_str last_char(_str string)

Returns: _str

Returns last character of string. If string is null, the space character is returned.

Category:

String Functions


last_event

_str last_event(_str newEvent=null, boolean keysOnly=false)

Parameters:

newEvent - set the last event

keysOnly - report only the last keyboard event, no MOUSE_MOVE, etc.

Returns: _str

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()));

Category:

Keyboard Functions

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")

Returns: int

All index values returned by this function are indexes into the names table. 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.

Category:

Names Table Functions

See Also:

prev_index


last_macro

_command void last_macro(_str event_name="")

Executes the last recorded macro if one exists. Message is displayed if no macro exists.

Returns: void

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.

Categories:

Completion Functions, Macro Programming Functions


last_recorded_macro

_command typeless last_recorded_macro()

Executes the last recorded macro.

Category:

Macro Programming Functions


lastpos

int lastpos(_str needle, _str haystack="", int start=MAXINT, _str options="", _str wordchars=null)

Parameters:

needle - string to search for. If this is the only parameter it retrieves tagged expression information. (see example).

haystack - (optional) string to search within

start - (optional) specifies the position at which the search should begin. If not specified or if "" is specified, searching begins at end of haystack. start must be in the range 1..MAX_WHOLE_NUMBER.

options - (optional) Multiple options may be specified with the following meaning:

'I'
Ignore case.
'R'
Interpret search string needle as a regular expression. See help section "SlickEdit Regular Expressions" for syntax of regular expressions.
'U'
Interpret search string as a UNIX regular expression. See help section "UNIX Regular Expressions".
'B'
Interpret string as a Brief regular expression. See help section "Brief Regular Expressions".
'L'
Interpret string as a Perl regular expression. See help section "Perl Regular Expressions".
'&'
Interpret string as a Wildcard expression. See help section "Wildcard 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.

wordchars - (optional) Define the word characters set for the string, for use when you need to use regular expressions with word boundaries (example "[A-Za-z0-9]").

Returns: int

Returns the position (1..length(haystack)) of the last occurrence of needle in haystack. If needle is not found, 0 is returned.

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.
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.

Category:

String Functions

See Also:

pos, substr


launch_os_shell

_command void launch_os_shell()

Launchs the plaform-specific OS Shell.

Category:

Miscellaneous Functions


lbutton_double_click

typeless lbutton_double_click()

Occurs when the left mouse button is double clicked.

Categories:

Combo Box Events, Edit Window Events, Editor Control Events, Form Events, Image Events, List Box Events, Picture Box Events, Text Box Events


lbutton_down

typeless lbutton_down()

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.

Categories:

Combo Box Events, Edit Window Events, Editor Control Events, Form Events, Image Events, List Box Events, Picture Box Events, Text Box Events


lbutton_triple_click

typeless lbutton_triple_click()

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

Categories:

Combo Box Events, Edit Window Events, Editor Control Events, Form Events, Image Events, List Box Events, Picture Box Events, Text Box Events


lbutton_up

typeless lbutton_up()

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:

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.
PSPIC_HIGHLIGHTED_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.

Categories:

Check Box Events, Command Button Events, Image Events, Picture Box Events, Radio Button Events


left

void left()

Moves the text cursor one position to the left.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

right


left_justify

_command void left_justify()

Reformats current paragraph or selection using left justification.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

justify


left_side_of_window

_command typeless left_side_of_window()

Moves the cursor to the left side of the window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

right_side_of_window


length

int length(_str string)

Returns: int

Returns the number of bytes in string.

Example:

length('abc')  == 3
length('')  == 0

Category:

String Functions


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.

Returns: _str

Returns key pressed which caused return. If it is one of the letter keys, it is returned in upper case.

Category:

Keyboard Functions

See Also:

get_string, prompt


line_numbers_set_width

_command void line_numbers_set_width(_str numChars='')

Determines the number of characters to display for line numbers, including the trailing colon.

Category:

Miscellaneous Functions

See Also:

view_line_numbers_toggle, line_numbers_show_colon


line_numbers_show_colon

_command void line_numbers_show_colon(_str showColon='')

Determines whether line numbers display a trailing colon or not.

Category:

Miscellaneous Functions

See Also:

view_line_numbers_toggle, line_numbers_set_width


line_to_bottom

_command void line_to_bottom()

Returns: void

Places current line at bottom of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


line_to_top

_command void line_to_top()

Returns: void

Places current line at top of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


linehex

_command void linehex()

Toggles line 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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


linewrap_delete_char

_command void linewrap_delete_char()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


linewrap_rubout

_command void linewrap_rubout()

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", "Options", "Redefine Common Keys...").

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


link_window

_command typeless link_window()

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", "Options"). Use the list_buffers command, if you are NOT in one file per window mode because it is more powerful than this function.

Returns: typeless

Returns 0 if switched buffers successfully.

Applies To:

Edit Window

Category:

Window Functions


list

_command typeless list(_str path='')

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.

Parameters:

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.

Returns: typeless

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.

Applies To:

Edit Window

Category:

File Functions

See Also:

dir


list_all_occurrences

int list_all_occurrences(_str search_text, _str search_options, int mfflags, int grep_id)

List all occurrences in a buffer.

Parameters:

search_text - String to search for.

search_options - Search options (@see find)

mfflags - search results flags

grep_id - ID of search results windows (0-max number).

Returns: int

Number of occurrences

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

search


list_bindings

void list_bindings(int &keytab_index, VSEVENT_BINDING(&list)[], int match_index=0)

Finds all bindings to a name table index.

Parameters:

keytab_index - Names table index to event table.

list - (Output) List of events and bindings

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);
VSEVENT_BINDING list[];
list_bindings(_default_keys,list,match_index);
if (list.length()>0 ) {
    message("Found bindings for this command");
}

Category:

Keyboard Functions

See Also:

get_event, test_event, last_event, call_key, event2name, event2index, index2event, eventtab_index, name2event


List Box Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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_retrieve_list
_delete_window
_draw_rect
_enabled
_find_longest_line
_font_flags2props
_font_props2flags
_get_window
_GetFontCharSet
_insert_drive_list
_insert_font_list
_lbadd_bounded
_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
_ShowWindow
_spell_insert_suglist
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
insert_file_list
refresh


List Box Properties

p_active_form
p_after_pic_indent_x
p_auto_size
p_backcolor
p_bbside
p_char_width
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_line
p_LinesForceWrapped
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_multi_select
p_name
p_next
p_no_select_color
p_Nofselected
p_Nofstates
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_parent
p_pic_point_scale
p_pic_space_y
p_picture
p_prev
p_redraw
p_scale_mode
p_scroll_bars
p_scroll_left_edge
p_sel_length
p_sel_start
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


list_buffers

_command int list_buffers(_str option='', boolean hide_current=false)

Displays and activates the Files toolbar

If options or hide_current are specified the old 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.

Parameters:

option - if this string contains "-h", hidden buffers will be shown if this string contains "-w", the dialog will perform as the "Link Window" dialog

hide_current - if true, hides the current buffer from the list

Returns: int

Returns 0 if switched buffers successfully.

Applies To:

Edit Window

Category:

Buffer Functions


list_clipboards

_command void list_clipboards()

Displays and activates the Clipboards toolbar, which displays selection list and previews of recently used clipboards.

Applies To:

Edit Window

Category:

Buffer Functions


list_config

_command typeless list_config()

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.

Returns: typeless

Returns 0 if successful.

Category:

Miscellaneous Functions

See Also:

list_source, list_keydefs, list_objects, list_usersys_objects, list_sys_objects


list_errors

_command typeless list_errors()

Displays the build window in a popup edit window and allows you to go to a specific error location.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

next_error, cursor_error, project_compile, project_build


list_keydefs

_command typeless list_keydefs()

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.

Category:

Keyboard Functions

See Also:

list_source, list_objects, list_usersys_objects, list_config


list_macros

_command typeless list_macros(_str macro_name="")

List user recorded macros and allows them to be bound to keys, edited, or run.

Appliesto:

Edit Window

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, last_macro, record_macro_toggle, record_macro_end_execute, execute_last_macro, execute_last_macro_key


list_matches

_str list_matches(_str name, typeless match_fun_index, _str title='', int multi_select=0, _str help_proc='', boolean auto_select_if_one_match=false, boolean doAddToAutoCompletion=false, typeless &words=null, boolean doAddToArgumentCompletion=false)

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.

Parameters:

name - Prefix string to match

match_fun_index - One ????_ARG constants defined in slick.sh OR index of find first/next function

title - Title of popup-window

multi_select - If Not '', allow multiple selections This argument is here for backward compatibility

help_proc - Name of help function to call

auto_select_if_one_match - Auto select if 1 match

Returns: _str

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);

Category:

Completion Functions


list_modified

_command int list_modified(_str title='', boolean quiet=false, boolean hideCurrent=false)

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 ''.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Buffer Functions, Window Functions


list_objects

_command typeless list_objects(_str args='', ...)

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.

Returns: typeless

Returns 0 if successful. Returns 1 if no templates are defined. Other errors are non-zero.

Category:

Form Functions

See Also:

list_usersys_objects, list_sys_objects


list_source

_command typeless list_source(...)

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 SlickEdit that can not read your old "vslick.sta" file. The vusrdefs (UNIX: vunxdefs) batch macro can be executed in the new version of SlickEdit by typing the name on the command line.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

list_objects, list_usersys_objects, list_keydefs, list_config


list_symbols

_command void list_symbols()

List the symbols visible in the current context in the list members window. This command is normally bound to Alt+Dot

Category:

Tagging Functions

See Also:

_do_list_members


list_sys_objects

_command typeless list_sys_objects()

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 SlickEdit was installed. No user created dialog box templates are inserted. This command is typically used by the developers of SlickEdit.

Returns: typeless

Returns 0 if successful. Returns 1 if no templates are defined (this should never happen). Other errors are non-zero.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

list_usersys_objects, list_objects


list_tags

_command typeless list_tags(_str options="")

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", "Options", "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.

Parameters:

options - use 'a' to show all tags, not just procs

Returns: typeless

Returns 0 if successful user selected to go to a tag.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

push_tag, find_tag, find_proc, make_tags, gui_make_tags


list_usersys_objects

_command typeless list_usersys_objects()

Opens a new buffer called "vusrsNNN.e" and inserts Slick-C® source code for system dialog box templates (forms) that have been modified since SlickEdit was installed. No user created dialog box templates are inserted.

Returns: typeless

Returns 0 if successful. Returns 1 if no templates are defined. Other errors are non-zero.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

list_sys_objects, list_objects


load

_command typeless load(_str arg1='')

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.

Prior to loading the module, it will invoke the _on_unload_XXX callbacks with a single argument indicating the Slick-C® module to be loaded.

Returns: typeless

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.

Applies To:

Edit Window

Category:

Macro Programming Functions

See Also:

gui_load, gui_unload, unload


load_all

_command typeless load_all(_str eventtab_name="")

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.

Category:

Macro Programming Functions

See Also:

unload, load, gui_load, gui_unload, _load


load_files

int load_files(_str options)

For an explanation of how windows, views, and buffers are related, see section "Windows Structure."

Parameters:

options - options may contain one file or buffer name and the following options:

FileOrBufferName
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 SlickEdit to count the number of lines in a file. -LF turns off fast line counting.
+ or -LB
SBCS/DBCS mode. 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[I] [buf_name]
Start a default operating system format temp buffer with name buf_name. +TI indicates that buf_name is an internal name and should not be converted to absolute.
+T[I]U [buf_name]
Start a UNIX format temp buffer with name buf_name. +TIU indicates that buf_name is an internal name and should not be converted to absolute.
+T[I]M [buf_name]
Start a MACINTOSH format temp buffer with name buf_name. +TIM indicates that buf_name is an internal name and should not be converted to absolute.
+T[I]D [buf_name]
Start a DOS format temp buffer with name buf_name. +TID indicates that buf_name is an internal name and should not be converted to absolute.
+T[I]nnn
Start a temp buffer where nnn is the decimal value of the character to be used as the line separator character. +TInnn indicates that buf_name is an internal name and should not be converted to absolute.
+FU [buf_name]
Force SlickEdit to interpret a file in UNIX format.
+FM [buf_name]
Force SlickEdit to interpret a file in MAC format.
+FD [buf_name]
Force SlickEdit to interpret a file in DOS format.
+Fnnn
SBCS/DBCS mode. Force SlickEdit to use nnn as the decimal value of the line separator character.
+FENDDEFAULTS
When an editing mode switch is such as "+FTEXT" or "+FUTF8" is specified, the value for the p_encoding_set_by_user property is set. When this option is specified, p_encoding_set_by_user is set to -1. This option made implementing the p_encoding_set_by_user property easier.
+FTEXT
SBCS/DBCS mode. Open SBCS/DBCS file. This is the default mode when no mode (either SBCS/DBCS or Unicode) is specified.
+FEBCDIC
SBCS/DBCS mode. Open EBCDIC file.
+FUTF8
Unicode mode. Open UTF-8 file with or without signature.
+FUTF8S
Unicode mode. Open UTF-8 file with or without signature.
+FUTF16LE
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16LES
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16BE
Unicode mode. Open UTF-16 little endian file with or without signature.
+FUTF16BES
Unicode mode. Open UTF-16 big endian file with or without signature.
+FUTF32LE
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32LES
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32BE
Unicode mode. Open UTF-32 little endian file with or without signature.
+FUTF32BES
Unicode mode. Open UTF-32 big endian file with or without signature.
+FCPddd
Unicode mode. Open code page file specified by ddd. Under windows, this can be any valid code page or one of the VSCP_* constants defined in "slick.sh."
+FACP
Unicode mode. Open active code page file. Under windows, this can be any valid code page or one of the VSCP_* constants defined in "slick.sh."
+FAUTOXML
Unicode mode. Open XML file. The encoding is determined based on the encoding specified by the "?xml" tag. If the encoding is not specified by the "?xml," the file data is assumed to be UTF-8 data which is consistent with XML standards. We applied some modifications to the standard XML encoding determination to allow for some user error. If the file has a standard Unicode signature, the Unicode signature is assumed to be correct and the encoding defined by the "?xml" tag is ignored.
+FAUTOUNICODE
If the file has a standard Unicode signature, open the file as a Unicode file. Otherwise, the file is loaded as SBCS/DBCS data.
+FAUTOUNICODE2
If the file has a standard Unicode signature or "looks" like a Unicode * file, open the file as a Unicode file. Otherwise, the file is loaded as * SBCS/DBCS data. This option is NOT full proof and may give incorrect results.
+FAUTOEBCDIC
If the file "looks" like an EBCDIC file, open the file as an EBCDIC file. Otherwise, the file is loaded as SBCS/DBCS data. This option is NOT full proof and may give incorrect results. We have attempted to make this option support binary EBCDIC files.
+FAUTOEBCDIC,UNICODE
This option is a combination of "+FAUTOEBCDIC" and "+FAUTOUNICODE" options.
+FAUTOEBCDIC,UNICODE2
This option is a combination of "+FAUTOEBCDIC" and "+FAUTOUNICODE2" options.
+ 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.
-I or +I
Insert a window with no views. This option is not supported by _BufLoad or vsBufLoad().
+ or -W
If the file or buffer is not already displayed in a window, insert a window for displaying the file or buffer. This option is not supported by _BufLoad or vsBufLoad().
+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 cursor position of current buffer before activating a new buffer. This option is ignored by the _BufLoad() or vsBufLoad() functions.
+ or -N
Network support switch. When on, 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. This option is not supported by the _BufLoad() or vsBufLoad() functions.
+ or -Q
Quiet switch. This option is ignored by the _BufLoad() or vsBufLoad() functions

The options above that only show a plus sign will also take a minus sign. However there function will remain the same.

Here are more detailed descriptions 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.
+V [window_id]
Selects buffer by window information. If no window is specified the active window 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 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, 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.

Returns: int

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.

Example:

         // Create a temp buffer and attatch it to the current window
         // The previous buffers cursor position information is saved before
         // switching to the new buffer.
         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'

   ;          Case 1  No buffer has name absolute(filename).
   ;          Then     Filename is loaded from disk.  The active cursor position
   ;                 information is replaced with the non-active cursor position
   ;                 information of this
   ;                       buffer.

   ;          Case 2  Buffer exists with name absolute(filename).
   ;          Then     The active cursor position information is replaced with the
   ;                    non-active cursor position information of this buffer.
   ;
   ;          In any case, the active cursor position information is saved in the
   ;          active buffer's non-active cursor position.

   load_files 'filename'

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, File Functions, Window Functions

See Also:

get_window_id, activate_window, _next_window, _prev_window


lock_selection

_str lock_selection(_str quiet='')

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.

Returns: _str

Returns 0 if no mark active in current buffer. Otherwise 1 is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


lowcase

_str lowcase(_str string, int utf8=-1)

Parameters:

string - Input string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that input and output string are SBCS/DBCS. 1 specifies that input and output string are UTF-8.

Returns: _str

Returns string converted to lower case.

Example:

   lowcase('ABc') == 'abc'
   lowcase('ABC') == 'abc'

Category:

String Functions

See Also:

upcase


lowcase_selection

_command void lowcase_selection()

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

upcase_selection


lowcase_word

_command typeless lowcase_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Returns: typeless

Returns 0 if successful. Returns 1 if no word exists at cursor. On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

upcase_word, cap_word


m_match

_str m_match(_str name, boolean find_first)

Parameters:

name - module name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


ma

_command void ma(_str cmdline="")

Parameters:

cmdline - is a string in the format left [right [new-paragraph]]

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...", select the Word Wrap tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

gui_margins, reflow_paragraph, reflow_selection, gui_justify, justify


machine

_str machine()

Returns: _str

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. Returns 'MACOSX11' if running under Mac OS X on a PowerPC.

  • "PCDOS" -- Windows 3.1
  • "PCDOSP" -- Windows 3.1 protected mode?
  • "NTPPC" -- Windows NT on a PowerPC.
  • "NTMIPS" -- Windows NT on MIPS/compatible machine.
  • "NTALPHA" -- Windows NT DEC ALPHA AXP machine.
  • "NT386" -- Windows NT on 386 compatible machine.
  • "OS2386" -- OS/2 on 386 compatible machine
  • "OS2PPC" -- OS/2 on PowerPC.
  • "LINUX" -- LINUX on Intel machine.
  • "SPARCSOLARIS" -- Sun Solaris on Sun SPARC station.
  • "SPARC" -- SUN SPARC station.
  • "RS6000" -- AIX RS600.
  • "M88K" -- Unix on Motorola 88K
  • "HP9000" -- UNIX/HPUX on HP9000.
  • "SGMIPS" -- UNIX/Irix on Silicon Graphics machine.
  • "EPMIPS" --
  • "UNIXWARE" -- Unixware on Intel compatible machine.
  • "ALPHAOSF" -- OSF/1 on DEC ALPHA AXP machine.
  • "INTELSOLARIS" -- Sun Solaris on Intel compatible machine.
  • "DECULTRIX" -- DEC Ultrix on MIPS
  • "SCO" -- SCO on Intel compatible machine.
  • "FREEBSD" -- FreeBSD on Intel compatible machine.
  • "UNIXWARE" -- UnixWare on Intel compatible machine.
  • "S390" -- Operating System/390
  • "LINUXON390" -- Linux on System/390
  • "MACOSX11" -- Mac OS X

Category:

Miscellaneous Functions

See Also:

_win32s


Macro Functions by Category

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").

Annotation Functions
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
Configuration Functions
Configuration Variables
CursorMovement Functions
Debugger Functions
Debugger Commands
Directory List Box Events, Methods, Properties
Display Functions
Drive List Events, Methods, Properties
Editor Control Functions
Editor Control Methods, Properties, Events
Edit Window Functions, Methods, Properties, Events
File Functions
File List Box Events, Methods, Properties
Form Functions, Events, Methods, Properties
Forms
Frame Events, Methods, Properties
Gauge Events, Methods, Properties
Marker Functions
Hscroll Bar Events, Methods, Properties
Image Events, Methods, Properties
ISPF Emulation Commands
ISPF Primary Commands
Keyboard Functions
Label Methods, Properties
LanguageSettings API
List Box Events, Methods, Properties
Macro Programming Functions
MDI Window Events, Methods, Properties
Menu Functions, Properties
Menu Item Properties
Mini HTML Properties
Miscellaneous Functions
Mouse Functions
Names Table Functions
Picture Box Events, Methods, Properties
Project Functions
Radio Button Events, Methods, Properties
Refactoring Functions
Retrieve Functions
Search Functions
Selection Functions
Selective Display
Spin Events, Methods, Properties
SSTab Methods, Properties
String Functions
Tagging Functions
Text Box Events, Methods, Properties
Toolbar Functions
Tree View Events, Methods, Properties
Unicode Functions
Vscroll Bar Events, Methods, Properties
Window Functions
XMLCFG Functions


Macro Programming Functions

_CheckTimeout
_delete_macro
_dllload
_dquote
_InsertSlickCProfilingData
_load
_macro
_macro_append
_macro_call
_macro_delete_line
_macro_delete_show
_macro_get_line
_macro_path
_macro_repeat
_macro_replace_line
_quote
_set_var
_SetTimeout
_SlickCDebugging
_SlickCDebuggingEnabled
_SlickCDebugHandler
_SlickCProfiling
cancel_recording
check_links
dload
dunload
end_recording
execute_last_macro
execute_last_macro_key
gui_list_macfiles
gui_load
gui_save_macro
gui_set_var
gui_unload
insert_var
k_match
last_macro
last_recorded_macro
list_macros
load
load_all
pause_recording
profile
record_macro_end_execute
record_macro_end_execute_key
record_macro_toggle
save_macro
set_var
slickc_debug
st
start_recording
unload
vstw


make_buf_match

_str make_buf_match(_str name)

Parameters:

name - buffer name

Returns: _str

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:\>"

Category:

Buffer Functions


make_path

int make_path(_str path, typeless doShellMessages='')

Creates the necessary multi-level directories in path so that files may be copied to path.

Parameters:

path - Input path or filename. All subdirectories are created. Last character may be a file separator character.

Returns: int

Returns 0 if successful. Common return codes are PATH_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, and ACCESS_DENIED_RC.

Category:

File Functions


make_tags

_command int make_tags(_str params="")

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", "Options", "File Extension Setup...") to install support for Modula-2, dBASE, Cobol, and Fortan. See "tags.e" for information on adding support for other languages.

Parameters:

cmdline - is a string in the format [-t][-r | -d] [-o

OutputFile - ] [@]file1 [@]file2 ...

Returns: int

0 on success, nonzero on error.

Example:

make-tags   -t *.c *.asm
make-tags   @list1 *.pas

Category:

Search Functions

See Also:

push_tag, gui_make_tags


makeNload

int makeNload(_str module, boolean doLoad=true, boolean quiet=false)

Compiles (if necessary) and loads the Slick-C® module_name given.

Parameters:

module - Slick-C® module to build and load

doLoad - (default true) load module into interpreter?

Returns: int

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions


man

_command typeless man(_str param='')

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.

Returns: typeless

Returns 0 if successful.

Category:

Miscellaneous Functions


Marker Functions

_LineMarkerAdd
_LineMarkerAddB
_LineMarkerFindList
_LineMarkerRemove
_LineMarkerRemoveAllType
_LineMarkerRemoveType
_LineMarkerSetMousePointer
_LineMarkerSetStyleColor
_MarkerTypeAlloc
_MarkerTypeFree
_MarkerTypeGetFlags
_MarkerTypeGetPriority
_MarkerTypeSetCallbackMouseEvent
_MarkerTypeSetFlags
_MarkerTypeSetPriority
_StreamMarkerAdd
_StreamMarkerAddB
_StreamMarkerFindList
_StreamMarkerGet
_StreamMarkerRemove
_StreamMarkerRemoveAllType
_StreamMarkerRemoveType
_StreamMarkerSetLength
_StreamMarkerSetMessage
_StreamMarkerSetStartOffset
_StreamMarkerSetStyleColor
_StreamMarkerSetTextColor
_StreamMarkerSetType


match_length

int match_length(_str option="")

Returns: int

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'))

Category:

Search Functions

See Also:

_select_match, search, repeat_search, search_replace, save_search, restore_search, _search_case


math

_command void math(_str expr="")

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.

Parameters:

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

Category:

Miscellaneous Functions

See Also:

mathx, matho, mathb


mathb

_command void mathb(_str expr="")

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.

Category:

Miscellaneous Functions

See Also:

mathx, math, matho


matho

_command void matho(_str expr="")

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.

Category:

Miscellaneous Functions

See Also:

mathx, math, mathb


mathx

_command void mathx(_str expr="")

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.

Category:

Miscellaneous Functions

See Also:

matho, math, mathb


max

typeless max(typeless num1, typeless num2, ...)

Parameters:

num1 -

num2 -

Returns: typeless

Return the maximum value among the given pair or list of values. Uses the relational operator ">" to find the largest item.

Category:

Miscellaneous Functions


maximize_mdi

_command void maximize_mdi()

Maximizes the MDI window. Not support in UNIX version.

Applies To:

Edit Window

Category:

Window Functions


maximize_window

_command void maximize_window()

Maximizes an MDI child edit window.

Applies To:

Edit Window

Category:

Window Functions


maybe_complete

_command void maybe_complete(...)

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.

Parameters:

completion_info - 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".

Applies To:

Edit Window, Editor Control, Command Line

Category:

Completion Functions

See Also:

complete


maybe_delete_selection

int maybe_delete_selection()

Deletes the selection if a CUA selection style is being used and the selection is not locked.

Returns: int

Returns 1 if the selection was deleted. Otherwise, 0 is returned.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


maybe_find_file

_str maybe_find_file(var file_spec, _str file_no_path)

If file_spec is null, a path search for file_no_path is performed and the result is stored in file_spec.

Returns: _str

Returns 0 if successful. Otherwise 1 is returned.

Category:

File Functions


maybe_list_matches

_command boolean maybe_list_matches(_str completion_info='', _str notused='', boolean auto_select=false, boolean args_to_command=false, boolean doEditorCtl=false, _str first_arg_completion_info=null, boolean doAddToAutoCompletion=false, typeless &words=null, boolean doAddToArgumentCompletion=false)

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".

Parameters:

completion_info - Completion info

notused -

auto_select - Auto selection if one match

args_to_command - True if listing matches on the arguments to a command where the command name itself is not included.

Returns: boolean

Returns 0 if there are no matches, 1 if last arg.

Applies To:

Edit Window, Editor Control, Text Box

Category:

Completion Functions


maybe_normal_character

_command void maybe_normal_character()

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.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


maybe_quote_filename

_str maybe_quote_filename(_str filename)

Returns: _str

Returns filename, with quotes around it, if it contains a space character. Otherwise filename is returned.

Category:

File Functions


maybe_split_insert_line

_command void maybe_split_insert_line()

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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Edit Window Methods, Editor Control Methods


MaybeBuildTagFile

void MaybeBuildTagFile(_str lang='', boolean with_refs=false)

Maybe build a tag file for the given file extension. This takes advantage of the built-in _[ext]_maybeBuildTagFile callbacks, and will automatically build the tag file for that extension if possible.

In addition, this function cycles through all the tag files in the current extension and makes sure that they are up-to-date, if they are not, it will automatically rebuild the tag file.

Parameters:

lang - Language ID, see p_LangId

Category:

Tagging Functions


MDI Window Events

on_init_menu


MDI Window Methods

_arrange_icons
_cascade_windows
_draw_rect
_enabled
_get_window
_GetButtonBar
_LoadButtonBar
_menu_set
_move_window
_restore_draw_setup
_save_draw_setup
_ShowWindow
_text_width
_tile_windows
call_event
refresh


MDI Window Properties

p_active_form
p_backcolor
p_bbside
p_button_bar
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_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_menu_handle
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


mdisetfocus

_command void mdisetfocus()

Set focus on the editor. This command can be useful when you are trying to control an instance of SlickEdit from another application or using dde and you need to transfer focus to the editor to complete an operation.

Category:

Miscellaneous Functions


Menu Functions

_get_menu_state
_menu_add_filehist
_menu_add_hist
_menu_add_workspace_hist
_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


Menu Item Properties

p_categories
p_checked
p_command
p_message


menu_mdi_bind_all

_command void menu_mdi_bind_all()

Determines the key bindings for all menu items on the SlickEdit menu bar.

Category:

Menu Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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 Properties

p_categories
p_message


merge

_command int merge(_str arg1='')

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.

Command line usage: merge [options] <base> <rev1> <rev2> <out>

Command line options(case insensitive):

  • -bb - Base is a buffer name and should be loaded +b w/o absolute
  • -bbi - Base is a buffer id and should be loaded +b w/o absolute
  • -b1 - rev1 is a buffer name and should be loaded +b w/o absolute
  • -b1i - rev1 is a buffer id and should be loaded +b w/o absolute
  • -b2 - rev2 is a buffer name and should be loaded +b w/o absolute
  • -b2i - rev2 is a buffer id and should be loaded +b w/o absolute
  • -bout - output is a buffer name, and should not be deleted when the merge dialog is closed(saved for the user).
  • -bouti - output is a buffer id, and should not be deleted when the merge dialog is closed(saved for the user).
  • -smart - same as the "use smart merge" button on the dialog (uses the diff to try to resolve some conflicts)
  • -interleaved - same as turning on "interleaved output" on dialog
  • -q - quiet option:only shuts off "Merge complete x conflicts" message
  • -callersaves - If this option is used, the file is not actually saved after the user is prompted. A 1 is returned if the user chose to save the file. Returns 2 if the user chose not to save the file.

    Returns: int

    If successful, returns: 1 if there were conflicts. if callersaves option is specified, returns 1 or 2. 0 if no conflicts. Otherwise, a negative error code is returned. Note that "successful" implies nothing about the number of differences between the files, just that all files were loaded successfully, and the merge engine ran succesfully.

    Categories:

    Buffer Functions, File Functions

    See Also:

    diff


message

void message(_str msg)

Parameters:

string - is temporarily displayed on the message line. Message will disappear after a key is pressed.

Category:

Miscellaneous Functions

See Also:

sticky_message, _message_box, clear_message, messageNwait, popup_message, popup_imessage


messageNwait

void messageNwait(_str msg="")

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.

Category:

Keyboard Functions


min

typeless min(typeless num1, typeless num2, ...)

Parameters:

num1 -

num2 -

Returns: typeless

Return the minimum value among the given pair or list of values. Uses the relational operator ">" to find the largest item.

Category:

Miscellaneous Functions


min_abbrev

_str min_abbrev(_str word, _str word_list, typeless options)

Deprecated.

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(){}.

Parameters:

word - current word under cursor

word_list - space delimited list of words handled by syntax expansion

options - syntax expansion options = name_info(p_index)

Returns: _str

Returns completed word if successful. Otherwise '' is returned.

Category:

Miscellaneous Functions

See Also:

min_abbrev2


min_abbrev2

_str min_abbrev2(_str word, typeless &word_list, _str options, _str &aliasfilename, boolean findAliases=true, boolean noPrompt=false)

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(){}.

Parameters:

word - current word under cursor

word_list - array or hash table of words handled by syntax expansion

options - syntax expansion options = name_info(p_index)

aliasfilename - (reference) set to name of alias file

findAliases - Look for aliases and set aliasfilename

noPrompt - Do not prompt. Return semicolon delimited list of matches

Returns: _str

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, or if the user hit ESCAPE, otherwise,

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


Mini HTML Properties

p_active_form
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_PaddingX
p_PaddingY
p_parent
p_prev
p_view_id
p_window_id
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


-

_command void _(_str NofLines='')

Moves the cursor the specified number of lines up.

Parameters:

NofLines - Number of lines

Applies To:

Edit Window, Editor Control

Category:

CursorMovement Functions


Miscellaneous Functions

_assert
_bbhelp
_beep
_bottom_height
_bufname2ext
_bufnameNmode2ext
_calc_form
_callmethod
_choose_font
_clex_jspAddKeywordAttrs
_clex_jspGetConfig
_clex_jspSetConfig
_clex_xmlAddKeywordAttrs
_clex_xmlGetConfig
_clex_xmlSetConfig
_ConfigEnvVar
_const_value
_construct
_create_temp_view
_CreateExtension
_CreateLanguage
_cursor_shape
_date
_dbcs
_ddecommand
_dderequest
_deblink_selected
_decreate_mode
_default_color
_default_font
_default_option
_default_state_filename
_deleteel
_dllexport
_dump_var
_dx2lx
_dxy2lxy
_dy2ly
_el
_enum_name
_enum_names
_enum_value
_Ext2LangId
_ext2modename
_ext2modename2
_ext2wildcards
_ExtGetSetup
_ExtSetSetup
_ExtSetupToInfo
_fieldindex
_fieldname
_Filename2LangId
_findmethod
_font_param
_font_type
_for_each_control
_get_child_extents
_get_cmdname
_get_focus
_get_var
_GetCommentEditingFlags
_GetDocCommentFlags
_getfield
_gethostname
_GetLanguageSetupOptions
_GetLanguageSpecificOption
_GetSystemMetrics
_GetWildcardsForLanguage
_grid_height
_grid_width
_hsb_thumb_pos
_idle_time_elapsed
_inarray
_indexin
_ini_delete_section
_ini_delete_section2
_ini_find_section
_ini_get_hashtable_values
_ini_get_section
_ini_get_section_array
_ini_get_sections_list
_ini_get_value
_ini_get_value_expand_copy_from
_ini_list_sections
_ini_parse_line
_ini_put_section
_ini_replace_section
_ini_set_hashtable_values
_ini_set_value
_insertel
_instanceof
_isempty
_isfunptr
_isscalable_font
_kill_timer
_LangId2LexerName
_LangId2Modename
_LanguageCallbackProcessBuffer
_LanguageSetupToInfo
_lastel
_length
_LexerName2LangId
_list_processes
_lx2dx
_lx2lx
_lxy2dxy
_lxy2lxy
_ly2dy
_ly2ly
_makeempty
_map_xy
_message_box
_modename_eq
_modename2ext
_Modename2LangId
_ModenameEQ
_next_control
_nextel
_open_temp_view
_parse_project_command
_post_call
_prev_control
_print_cancel
_process_cd
_process_info
_resume
_rgb
_safe_hidden_window
_SccDisplayOutput
_set_focus
_set_foreground_syswindow
_set_foreground_window
_set_timer
_set_var
_setfield
_SetLanguageOption
_SetLanguageSetupOptions
_showbuf
_sort
_source_event_name
_spell_add
_spell_add_hist
_spell_clear
_spell_delete
_spell_option
_StackDump
_stdform
_stop_process
_suspend
_syshelp
_time
_top_height
_typename
_UpdateShowMatchingParen
_UTF8
_varformat
_win32s
abort
abs
alias
alias_cd
alt_argument
api_index
appmenu
ascii_table
auto_restore
batch_call_list
box
calculator
call
call_list
cancel
check_and_load_mode_support
chr
clear_message
clear_pbuffer
cmdclear_message
color
create_ext
createExtension
cursor_error
cursor_shape
dde
dderefresh
delay
deselect_all
display_hscroll
display_top
display_vscroll
doExpandSpace
dos
draw
dsay
edit_with
editor_name
enscript_command
env_match
error_pos
eval_exp
execute
exit
exit_list
exit_process
fexit
fileman_help
find_error
for_all
for_list
format_columns
get_env
getcwd
getpid
GetVCPPBinPath
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
justify
keyin_match_paren
launch_os_shell
line_numbers_set_width
line_numbers_show_colon
list_config
list_errors
list_source
list_sys_objects
list_tags
list_usersys_objects
machine
man
math
mathb
matho
mathx
max
maybe_normal_character
mdisetfocus
message
min
min_abbrev
min_abbrev2
mktemp
msdn_word_help
msg_ro
next_error
nls
nothing
on_timer
overwrite_existing
parse_error_re
parsecommand
pascal_space
popup_imessage
popup_message
pow
prev_error
prev_index
process_begin_line
process_down
process_enter
process_make_rc
process_rubout
process_up
range
read_ahead
read_behind
redo
refer_ext
reset_next_error
restore
run_selected
safe_exit
save_config
save_view
say
set
set_env
set_select
setup_file_options
setup_general
setupext
show_matching_paren
show_properties
show_selected
sign
spell_options
st
st_position_on_error
start
start_process
sticky_message
stop
stop_build
sub
toggle_process_tab_output
toolbars
trace
try_calling
undo_msg
version
vstudio_open_file
vstudio_open_solution
wh
word_chars
write_state_message
xcom
xnext_error2


mktemp

_str mktemp(int start=1, _str Extension='')

Returns: _str

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.

Category:

Miscellaneous Functions


mode_match

_str mode_match(_str name, boolean find_first)

Parameters:

name - mode name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next mode name which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions


modify_toggle

_command typeless modify_toggle()

Used in EMACS emulation. Toggles the buffer modified flag (p_modify property) which indicates whether the current buffer has been modified.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


mou_capture

void mou_capture(int grabXDisplay=0)

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

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

mou_release


mou_click

_command int mou_click(_str mark_name="", _str option="", boolean select_words=false)

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.

Applies To:

Text Box, Edit Window, Editor Control

Category:

Mouse Functions

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 mou_click_block()

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.

Applies To:

Text Box, Edit Window, Editor Control

Category:

Mouse Functions

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 mou_click_line()

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.

Applies To:

Text Box, Edit Window, Editor Control

Category:

Mouse Functions

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 typeless mou_click_menu()

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).

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions

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 typeless mou_click_menu_block()

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).

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions

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 typeless mou_click_menu_line()

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).

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions

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_col

int mou_col(int pixel_x)

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.

Category:

Mouse Functions


mou_copy_to_cursor

_command void mou_copy_to_cursor(_str movecopy_option="")

Copies current selection to cursor position.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


mou_extend_selection

_command void mou_extend_selection()

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

Category:

Mouse Functions

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)

Retrieve last mouse x, y position in pixels relative to screen.

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

p_scale_mode, mou_last_x, mou_last_x


mou_has_captured

int mou_has_captured()

Window currently using mou_capture.

Returns: int

Window ID for mouse capture, 0 if no window current has capture.

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

mou_capture, mou_release


mou_in_window

_str mou_in_window()

Returns: _str

Returns a non-zero value if the last mouse position read by get_event() or test_event() is within the current window. Use only in edit window. Checks whether mouse is in text area

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


mou_last_x

int mou_last_x(_str option="")

Parameters:

option - (optional). '' means to return pixels. 'M' means to return value in current windows scale mode (p_scale_mode).

Returns: int

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).

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

p_scale_mode, mou_last_y, mou_get_xy


mou_last_y

int mou_last_y(_str option="")

Parameters:

option - (optional). '' means to return pixels. 'M' means to return value in current windows scale mode (p_scale_mode).

Returns: int

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).

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

p_scale_mode, mou_last_x, mou_get_xy


mou_limit

int mou_limit(int x1, int y1, int x2, int y2)

(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.

Parameters:

x1 - left x

y1 - top y

x2 - right x

y2 - bottom y

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);

Applies To:

All Window Objects

Category:

Mouse Functions


mou_mode

int mou_mode(int mode=-1)

Gets and optionally sets the mouse event mode. The current new mouse event mode is returned.

Parameters:

mode - One of the following:

-1 Do not set mode. Just return current mode.
 0 Turn mode off.
 1 Turn mode on. When on, mouse button-up, and move events are returned by get_event() and test_event().

Returns: int

Current mouse event mode.

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

get_event, test_event


mou_move_to_cursor

_command void mou_move_to_cursor()

Copies current selection to cursor position.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


mou_paste

_command int mou_paste()

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 SlickEdit internal clipboard.

Returns: int

Returns 0 if successful. Other a non-zero number is returned.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


mou_push_tag

_command void mou_push_tag()

The mou_push_tag command places the cursor using the mouse position, pushes a bookmark, and then jumps to the symbol pointed to by the mouse. It can be used to navigate source code as if it were a hypertext.

Applies To:

Edit Window

Categories:

Search Functions, Mouse Functions

See Also:

mou_click, push_tag


mou_release

int mou_release()

Cancels last mou_capture so that mouse messages can be sent to all windows.

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

mou_capture


mou_select_line

_command void mou_select_line()

Selects the current line with a line type selection.

Category:

Mouse Functions

See Also:

mou_click, mou_click_block, mou_select_line, mou_click_line, mou_select_word


mou_select_word

_command void mou_select_word()

Selects the current word with a character type selection.

Applies To:

Edit Window, Editor Control, Text Box

Category:

Mouse Functions

See Also:

mou_click, mou_click_block, mou_select_line, mou_click_line, mou_select_word, mou_select_line


mou_set_pointer

void mou_set_pointer(int mp)

Set the mouse pointer used by the active window.

Parameters:

mp - Mouse pointer constant. One of MP_* constants in slick.sh.

Applies To:

All Window Objects

Category:

Mouse Functions

See Also:

p_mouse_pointer


mou_set_scroll_directions

void mou_set_scroll_directions(int &past_bottom, int &past_right, int &past_top, int &past_left, int &new_x, int &new_y, int mx, int my)

Set the scroll directions based on the position of the mouse relative to the current window.

Parameters:

past_bottom - Set to 'true' if the mouse is below the window

past_right - Set to 'true' if the mouse is to the right of the window

past_top - Set to 'true' if the mouse is above the window

past_left - Set to 'true' if the mouse is to the left of the window

new_x - Set to horizontal position bounding the mouse within the window

new_y - Set to vertical position bounding the mouse within the window

mx - Horizontal position of mouse

my - Vertical position of mouse

Category:

Mouse Functions


mou_show_menu

_str mou_show_menu(_str menu_name, _str button="")

If last_event was a mouse event, menu specified is display at the mouse cursor position. Otherwise menu is displayed at center of screen.

Returns: _str

Returns 0 if successful.

Categories:

Menu Functions, Mouse Functions

See Also:

on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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_drag

int mouse_drag(int(*move_callback)(int wid), _str move_picture='')

This is a generic function for dragging the mouse within an editor control. It can be used (for example) to move icons in the gutter.

The starting point for this function is typically in response to a lbutton_down event(). The mouse drag ends when we get a lbutton_up() event or the user hits escape.

Parameters:

move_callback - callback for move animation events

move_picture - picture to show in gutter as mouse moves

Returns: int

0 on success, COMMAND_CANCELLED_RC on cancel.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions

See Also:

debug_mouse_drag_instruction_pointer()


Mouse Functions

_LineMarkerSetMousePointer
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_has_captured
mou_in_window
mou_last_x
mou_last_y
mou_limit
mou_mode
mou_move_to_cursor
mou_paste
mou_push_tag
mou_release
mou_select_line
mou_select_word
mou_set_pointer
mou_set_scroll_directions
mou_show_menu
mouse_drag


mouse_move

event mouse_move()

Occurs when the mouse pointer moves within the window.

Categories:

Combo Box Events, Edit Window Events, Editor Control Events, Form Events, Image Events, List Box Events, Picture Box Events, Text Box Events


move_edge

_command void move_edge()

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.

Applies To:

Edit Window

Category:

Window Functions


move_lines_down

_command void move_lines_down(boolean do_smart_paste=true)

Moves current line or current selection down line. If no selection is active, a LINE selection is created for the current line. If a selection is active, it is changed to LINE selection and locked.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


move_lines_up

_command void move_lines_up()

Moves current line or current selection up one line. If no selection is active, a LINE selection is created for the current line. If a selection is active, it is changed to LINE selection and locked.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


move_mdi

_command void move_mdi()

Allows you to move the MDI window with the keyboard. Not supported by UNIX version.

Category:

Window Functions


move_text_backtab

_command void move_text_backtab()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods


move_text_tab

_command void move_text_tab()

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", "Options", "File Extension Setup...", select the Indent tab) to set the default Indent with tabs for an extension.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

indent_with_tabs, tabs, gui_tabs


move_to_cursor

_command int move_to_cursor(...)

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.

Returns: int

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, and SOURCE_DEST_CONFLICT_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


move_window

_command void move_window()

Allows you to move an MDI child window with the keyboard. Not supported by UNIX version.

Applies To:

Edit Window

Category:

Window Functions


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. 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® (if you need similar functionality in Slick-C® use the "fsay" macro function).

This functions parameters are identical to the C run-time printf function. Displays a debug message in a message box. This function is used to assist in debugging.

Category:

Miscellaneous Functions

See Also:

xprintf, mprintf, dfprintf


msdn_word_help

_command typeless msdn_word_help()

Displays SDK help from MSDN Libraries (Visual Studio, Platform SDK, any Help 2.0 collection) for the word at the cursor. This command requires that the macro variable "def_msdn_coll" be set to a preferred collection in the form ms-help://namespace where namespace is a valid Help 2.0 URL like MS.VSCC.v80. The namespaces installed on the machine can be listed and a preferred collection chosen by invoking the _msdn_collections_form. The configuration form can be acccessed by calling the msdn_configure_collection macro, or choosing 'Configure MSDN F1 Help' from the MDI help menu.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


msg_ro

void msg_ro()

Displays a message box indicating that the key pressed is not allowed in "Read only" mode.

Category:

Miscellaneous Functions

See Also:

read_only_mode


mt_match

_str mt_match(_str name, boolean find_first)

Parameters:

name - tag name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


name

_command int name(_str newName="", boolean doAbsolute=true)

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.

Returns: int

Returns 0 if successful.

Categories:

Edit Window Methods, File Functions

See Also:

gui_save_as, save


name2event

_str name2event(_str name)

Returns: _str

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')) {
             ...
         }

Category:

Keyboard Functions

See Also:

get_event, test_event, last_event, event2name, event2index, index2event, list_bindings, name2event, call_key, eventtab_index


name_file

int name_file(_str filename, boolean doAbsolute=true)

Renames current buffer to filename specified. filename is converted to absolute (exact path specification).

Returns: int

Returns 0 if successful. Otherwise a non-zero return code is returned.

Category:

Buffer Functions


name_index2funptr

typeless name_index2funptr(int index)

Convert the given function name index (see find_index) to a function pointer.

Parameters:

index - name index for function type

Returns: typeless

pointer to function corresponding to this name

Category:

Names Table Functions

See Also:

name_match, call_index, find_index


name_info

_str name_info(int index)

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.

Returns: _str

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));
}

Category:

Names Table Functions

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

typeless name_info_arg2(int command_index)

Returns: typeless

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));
}

Category:

Names Table Functions

See Also:

name_info


name_match

int name_match(_str name_prefix, int find_first, int name_type_flags=~0 &~IGNORECASE_TYPE)

Parameters:

name_prefix - Symbol name prefix to search for

find_first - Find first match (true) or next match?

name_type_flags - The name type flags are listed in the file "slick.sh".

PROC_TYPE
Matches global function
VAR_TYPE
Matches global variable
EVENTTAB_TYPE
Matches event table
COMMAND_TYPE
Matches command
CLASS_TYPE
Matches class name
INTERFACE_TYPE
Matches interface name
STRUCT_TYPE
Matches struct name
CONST_TYPE
Matches const name
ENUM_TYPE
Matches enumerated type
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.

Returns: int

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
}

Category:

Names Table Functions

See Also:

find_index, buf_match, file_match


name_name

_str name_name(int index)

Returns: _str

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)

Category:

Names Table Functions

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)

Returns: _str

Returns the name of the command bound to key in the root event table.

Category:

Keyboard Functions


name_type

int name_type(int index)

Returns: int

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));

Category:

Names Table Functions

See Also:

find_index, name_match, name_name, name_info, call_index, insert_name, set_name_info, delete_name, replace_name


Names Table Functions

_delete_unused
_find_or_add_picture
_insert_name_list
_update_picture
_update_template
_write_state
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


new

_command void new()

Creates an empty dialog box form for editing with the dialog editor.

Returns: void

Returns 0 if new form successfully created.

Applies To:

Edit Window

Category:

Buffer Functions


new_alias

_command int new_alias(_str name="", boolean showInAliasEditor=true)

Create a new extension specific alias containing the currently selected text.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


new_file

_command typeless new_file(_str mode_name="")

Creates an unnamed empty file in the specified editing mode.

Parameters:

mode_name - Mode name, default is Plain Text

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Buffer Functions

See Also:

edit


new_form

_command typeless new_form(_str form_name="")

Creates an empty dialog box form for editing with the dialog editor.

Parameters:

form_name - name of new form to create

Returns: typeless

Returns 0 if new form successfully created.

Applies To:

Edit Window

Category:

Form Functions


next_bookmark

_command int next_bookmark(_str direction='+')

Goes to the next bookmark set by one of the commands set_bookmark, push_bookmark, or push_tag.

Returns: int

Returns the bookmark ID on success. <0 on error.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

set_bookmark, toggle_bookmark, prev_bookmark, pb


next_buffer

_command void next_buffer(_str options="")

Switches to view of the next buffer within the current window.

Applies To:

Edit Window

Category:

Buffer Functions


next_char

_command int next_char()

Move the cursor right one character. If the cursor is at the end of the line, move down to the beginning of the next line.

Returns: int

0 on success, <0 if at then end of the file.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

right, down, prev_char, traverse_char


next_doc

_command void next_doc(_str options="")

Switches to the next window if One File per Window is on. Otherwise, switches to the next buffer.

Returns: void

prev_doc

Applies To:

Edit Window

Categories:

Buffer Functions, Window Functions


next_error

_command int next_error(_str resetMessages='', _str unusedArg2='', _str displayMessages='', _str lookingBackwards='')

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.

Parameters:

resetMessages - If set to 'R', reset error messages search

unusedArg2 - unused

displayMessages - Display error messages on the message bar?

lookingBackwards - If set to '-', search backwards for errors

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


next_full_word

_command void next_full_word()

Moves the cursor to the beginning of the next full word, regardless of the "Subword Navigation" setting.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_word, next_subword


next_hotspot

_command boolean next_hotspot()

Navigate from the current hotspot to the next hotspot.

Returns: boolean

true if we jumped to the hotspot, false otherwise

Applies To:

Edit Window, Editor Control

Category:

Bookmark Functions

See Also:

add_hotspot, prev_hotspot, clear_hotspots


next_level

_command typeless next_level()

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.

Returns: typeless

Returns 0 if successful. Common return value is TOO_MANY_MARKS_RC. On error, message displayed.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

prev_level, cut_level, cut_prev_level


next_paragraph

_command typeless next_paragraph()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

prev_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


next_proc

_command int next_proc(_str quiet="", _str flags="")

Places cursor on next function heading. If the quiet argument is given and is not "", no error message is displayed.

Returns: int

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

next_tag, prev_proc


next_ref

_command int next_ref(boolean preview_only=true, boolean quiet=false)

Repositions the cursor on the next item in the references tool window. If window is not active, it will do a prev-ref, followed by a next-ref to attempt to reposition on the current match.

Parameters:

preview_only - If true, show the reference only in the preview pane of the references tool window.

quiet - If true, do not display message box when there are no more references.

Returns: int

Returns 0 if successful. Otherwise NO_MORE_FILES_RC is returned. On error, message is displayed.

Applies To:

Edit Window,Editor Control

Categories:

Editor Control Methods, Edit Window Methods, Search Functions

See Also:

prev_ref, find, replace, gui_replace, gui_find, find_current, find_prev, find_next


next_sentence

_command void next_sentence()

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 first space at the end of sentence.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_paragraph, prev_paragraph, prev_sentence


next_sexp

_command int next_sexp()

Moves forward over the S-expression starting at the cursor position.

If the first significant character after the cursor is an opening delimiter, move past the matching closing delimiter. If the character begins a symbol, string, or number, move over that to the next group of characters. Consider spaces, commas, and semicolons as delimiters. The balanced expression commands move across comments as if they were whitespace.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

prev_sexp


next_sibling

_command int next_sibling(_str quiet='')

Navigate to the next sibling in the current buffer.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


next_statement

_command int next_statement(_str quiet='')

Navigate to the next statement in the current buffer.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


next_subword

_command void next_subword()

Moves the cursor to the beginning of the next subword, regardless of the "Subword Navigation" setting.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_word, next_full_word


next_tag

_command int next_tag(_str quiet="", _str flags="")

Places cursor on next tag definition, skipping any tags filtered out by the Defs tool window. If the quiet argument is given an is not "", no error message is displayed.

Returns: int

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

next_proc, prev_proc, prev_tag


next_tag_filea

_str next_tag_filea(_str(&list)[], int &i, boolean checkFiles=true, boolean openFileRead=false)

Parameters:

list - list (array) of tag files

i - (reference, initially 0) current array index

checkFiles - check if tag file is missing or corrupt?

openFileRead - open tag file for read?

Returns: _str

the next tag file in the given array of tag files.

Category:

Tagging Functions


next_window

_command void next_window(_str options="")

Switches to next window.

Applies To:

Edit Window

Category:

Window Functions

See Also:

prev_window, window_left, window_right, window_above, window_below


next_word

_command void next_word()

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", "Options", "General...", "More...", "Next Word Style..."). To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

prev_word


nls

_str nls(_str msg, ...)

Returns: _str

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.).

Category:

Miscellaneous Functions


Nofwindows

int Nofwindows()

Returns: int

Returns the number of MDI edit windows not including hidden windows.

Category:

Window Functions


normal_character

_command void normal_character()

Inserts or overwrites the last key pressed depending upon the insert state.

Category:

Keyboard Functions


nosplit_insert_line

_command void nosplit_insert_line()

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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Command Line Methods, Edit Window Methods, Editor Control Methods


nosplit_insert_line_above

_command void nosplit_insert_line_above()

If the visible cursor is on the command line, the command is executed. Otherwise a blank line is inserted before 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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Command Line Methods, Edit Window Methods, Editor Control Methods


nothing

_command void nothing()

Affects nothing.

Category:

Miscellaneous Functions


number2onoff

_str number2onoff(_str number)

Returns: _str

Returns 'off' if number=="0". Otherwise 'on' is returned.

Category:

String Functions


number2yesno

_str number2yesno(_str number)

Returns: _str

Returns 'N' if number=="0". Otherwise 'Y' is returned.

Category:

String Functions


oi2type

int oi2type(int oi)

Returns: int

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));

Category:

Names Table Functions


old_goto_bookmark

_command typeless old_goto_bookmark(_str bookmarkName='')

Deprecated. Use goto_bookmark().

Places the cursor at the buffer cursor position stored in the bookmark given by bookmarkName.

Note: This command no longer supports the + and - options.

Parameters:

bookmarkName - Name of bookmark on which to place cursor.

Returns: typeless

Zero on success.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_bookmark, pop_bookmark, set_bookmark, toggle_bookmark, goto_bookmark


old_list_buffers

int old_list_buffers(_str option='', boolean hide_current=false)

Displays the old 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.

Parameters:

option - if this string contains "-h", hidden buffers will be shown if this string contains "-l", the dialog will perform as the "Link Window" dialog

hide_current - if true, hides the current buffer from the list

Returns: int

Returns 0 if switched buffers successfully.

Applies To:

Edit Window

Category:

Buffer Functions


old_list_clipboards

_command typeless old_list_clipboards()

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", "Options", "More Options...", "Line Insert Style"). By default, they are inserted after the current line.

Returns: typeless

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.

Applies To:

Edit Window, Editor Control

Category:

Clipboard Functions

See Also:

paste


on_change

event on_change()

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.
Will usually be called with the index of the item changing as the second argument

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).

Applies To:

Text Box, Combo Box, List Box, Directory List Box, File List Box, Drive List, Vscroll Bar, Hscroll Bar, Spin, Tree View

Categories:

Combo Box Events, Directory List Box Events, Drive List Events, File List Box Events, Hscroll Bar Events, List Box Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_change2

event on_change2()

Combo Box -Occurs when the p_text property changes. No arguments are passed.

Applies To:

Combo Box

Category:

Combo Box Events


on_close

event on_close()

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.

Applies To:

Form

Category:

Form Events


on_create

event on_create()

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);
}

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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, Image Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_create2

event on_create2()

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.

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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, Image Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_destroy

event on_destroy()

All objects are sent an on_destroy event when the object is deleted with the _delete_window function.

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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, Image Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_destroy2

event on_destroy2()

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.

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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, Image Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_drop_down

event on_drop_down()

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;
void combo1.on_drop_down(int 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();
       }
    }
}

Applies To:

Combo Box

Category:

Combo Box Events


on_got_focus

event on_got_focus()

The on_got_focus event is sent to an object when it receives the input 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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_hsb_bottom

event on_hsb_bottom()

The on_hsb_bottom event is sent to an Edit Window when the horizontal thumb is placed in the farthest right position.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_line_down

event on_hsb_line_down()

The on_hsb_line_down event is sent when the right arrow of a horizontal scroll bar is pressed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_line_up

event on_hsb_line_up()

The on_hsb_line_up event is sent when the left arrow of a horizontal scroll bar is pressed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_page_down

event on_hsb_page_down()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_page_up

event on_hsb_page_up()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_thumb_pos

event on_hsb_thumb_pos()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_thumb_track

event on_hsb_thumb_track()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_hsb_top

event on_hsb_top()

The on_hsb_top event is sent to an Edit Window when the horizontal thumb is placed in the farthest left position.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_init_menu

event on_init_menu()

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.

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 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');
}

Applies To:

MDI Window, Form

Categories:

Form Events, MDI Window Events

See Also:

_menu_add_filehist, _menu_add_hist, _menu_add_workspace_hist, _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()

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);
           }

Category:

Keyboard Functions


on_load

event on_load()

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;
}

Applies To:

Form

Category:

Form Events


on_lost_focus

event on_lost_focus()

The on_lost_focus event is sent to an object when it loses input 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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_resize

event on_resize()

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.

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

Categories:

Check Box Events, Combo Box Events, Command Button Events, Directory List Box Events, Drive List Events, File List Box Events, Form Events, Frame Events, Gauge Events, Hscroll Bar Events, List Box Events, Radio Button Events, Spin Events, Text Box Events, Tree View Events, Vscroll Bar Events


on_scroll

event on_scroll()

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);
}

Applies To:

Hscroll Bar, Vscroll Bar

Categories:

Hscroll Bar Events, Vscroll Bar Events

See Also:

on_change


on_scroll_lock

event on_scroll_lock()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_select

event on_select()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_spin_down

event on_spin_down()

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.

Applies To:

Spin

Category:

Spin Events


on_spin_up

event on_spin_up()

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.

Applies To:

Spin

Category:

Spin Events


on_timer

event on_timer()

The on_timer event is returned by the get_event function when _set_timer is called with only the first argument.

Category:

Miscellaneous Functions


on_vsb_bottom

event on_vsb_bottom()

The on_vsb_bottom event is sent to an Edit Window when the horizontal thumb is placed in the bottom position.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_line_down

event on_vsb_line_down()

The on_vsb_line_down event is sent when the down arrow of a horizontal scroll bar is pressed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_line_up

event on_vsb_line_up()

The on_vsb_line_up event is sent when the up arrow of a horizontal scroll bar is pressed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_page_down

event on_vsb_page_down()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_page_up

event on_vsb_page_up()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_thumb_pos

event on_vsb_thumb_pos()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_thumb_track

event on_vsb_thumb_track()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


on_vsb_top

event on_vsb_top()

The on_vsb_top event is sent to an Edit Window when the vertical scroll bar thumb box is placed in the top position.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Events, Editor Control Events


one_tile

void one_tile()

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.

Applies To:

Edit Window

Category:

Window Functions

See Also:

one_window


one_window

_command void one_window()

Deletes all windows except the current one, which will be zoomed. No files will be closed.

Applies To:

Edit Window

Category:

Window Functions

See Also:

one_tile


open_form

_command typeless open_form(_str cmdline="")

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.

Parameters:

cmdline - is a string in the following format: [-new] form1 [form2 [form3 ...]]

Returns: typeless

Returns 0 if there are no errors.

Category:

Form Functions


open_menu

_command void open_menu(_str result="")

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.

Parameters:

cmdline - is a string in the format: [-show menu_name| -new [menu_name]]

Category:

Menu Functions


open_url

_command int open_url(_str URLFilename='')

Opens the file, specified by the given URL filename, for viewing.

Parameters:

URLFilename - URL filename to open. Currently, only URLs specified with the HTTP protocol are supported.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window

Category:

File Functions

See Also:

goto_url, open_url_in_assoc_app


open_url_in_assoc_app

_command void open_url_in_assoc_app ()

The open_url_in_assoc_app command attempts to intelligently open the URL the cursor is in:

  • First, attempt to use the associated application found in the File Extension Manager.
  • Second, attempt to use the associated application found in the registry (on Windows systems).
  • Third, open with the default web browser

Category:

Buffer Functions

See Also:

goto_url, open_url


or_re

void or_re(_str &pattern, _str error_re)

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.

Category:

Search Functions

See Also:

parse_error_re


overlay_block_selection

_command void overlay_block_selection()

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.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


overlay_clipboard

_command int overlay_clipboard(_str name='', boolean isClipboard=true)

Overlays the contents of the clipboard at the cursor. If cbname is given, then the internal clipboard with name cbname is inserted. The behavior is similar to overlays in ISPF.

IMPORTANT: cbname needs to start with an alphabetic character (a-z). numeric values for cbname are reserved for VI emulation.

Returns: int

Returns 0 if successful. Common return code is 1 (clipboard empty, or clipboard text too long for command line). On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Selection Functions, Text Box Methods


overwrite_existing

_str overwrite_existing(_str filename, _str title, int sv_flags=0)

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.

Returns: _str

Returns 0 if the user has selected to replace the existing file.

Category:

Miscellaneous Functions


p_active_form

int p_active_form

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();
   }

Applies To:

All Window Objects

Category:

All Windows Properties


p_ActiveCaption

_str p_ActiveCaption

Determines the caption for the active tab.

Applies To:

SSTab

Category:

SSTab Properties


p_ActiveColor

int p_ActiveColor

Determines the color to draw the caption for the current tab.

Applies To:

SSTab

Category:

SSTab Properties


p_ActiveEnabled

boolean p_ActiveEnabled

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.

Applies To:

SSTab

Category:

SSTab Properties


p_ActiveHelp

_str p_ActiveHelp

Determines the help for the active tab. See p_help property for syntax of help string.

Applies To:

Tree View

Category:

SSTab Properties


p_ActiveOrder

int p_ActiveOrder

Determines the order in which the tabs are displayed. The first tab is 0.

Applies To:

SSTab

Category:

SSTab Properties


p_ActivePicture

int p_ActivePicture

Determines the picture displayed to the left of the caption for the active tab. Set this to 0 for no picture.

Applies To:

SSTab

Category:

SSTab Properties


p_ActiveTab

int p_ActiveTab

Determines the which tab is the active.

Applies To:

SSTab

Category:

SSTab Properties


p_ActiveToolTip

int p_ActiveToolTip

The tooltip text for the active tab.

Applies To:

SSTab

Category:

SSTab Properties


p_adaptive_formatting_flags

int p_adaptive_formatting_flags

Returns a value representing the adaptive formatting settings which have already been obtained for this buffer. This value is a combination of the AdaptiveFormattingFlags.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_adefault

boolean p_adefault

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.

Applies To:

Command Button

Category:

Command Button Properties


p_after_pic_indent_x

int p_after_pic_indent_x

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;
}

Applies To:

List Box, Combo Box, Text Box

Categories:

List Box Properties, Combo Box Properties, Text Box Properties


p_alignment

int p_alignment

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.

Applies To:

Label, Radio Button, Check Box

Categories:

Label Properties, Radio Button Properties, Check Box Properties


p_AllowSave

boolean p_AllowSave

Determines whether the buffer displayed in an editor control may be saved. When on, the buffer will be Auto Saved or Reloaded.

Applies To:

Editor Control

Category:

Editor Control Properties


p_AlwaysColorCurrent

boolean p_AlwaysColorCurrent

Always color the current item in the tree control, or only when the tree has focus.

Applies To:

Tree View

Category:

Tree View Properties


p_attribute_casing

int p_attribute_casing

Determines the preferred style of casing for attributes for the current buffer. This property is available only when the control is displayed and is valid only in languages where attributes are used (e.g. HTML, XML).

values and respective results:

  1. WORDCASE_PRESERVE - does not change
  2. WORDCASE_LOWER - lowercase
  3. WORDCASE_UPPER - uppercase
  4. WORDCASE_CAPITALIZE - capitalize the first letter only

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_auto_select

boolean p_auto_select

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.

Applies To:

Text Box, Check Box

Categories:

Text Box Properties, Check Box Properties


p_auto_size

boolean p_auto_size

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.

Applies To:

Label, Text Box, Editor Control, List Box, File List Box, Directory List Box, Hscroll Bar, Vscroll Bar, Picture Box, Image, Spin

Categories:

Label Properties, Text Box Properties, Editor Control Properties, List Box Properties, File List Box Properties, Directory List Box Properties, Hscroll Bar Properties, Vscroll Bar Properties, Picture Box Properties, Image Properties


p_AutoSelectExtension

boolean p_AutoSelectExtension

Deprecated. Use p_AutoSelectLanguage

Determines whether the source language 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 have no extension. However, it is likely that this property will be useful for determining the language type of UNIX shell script files which typically have no file extension.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_TruncateLength, p_MaxLineLength, trunc


p_AutoSelectLanguage

boolean p_AutoSelectLanguage

Determines whether the source language 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 have no extension. However, it is likely that this property will be useful for determining the language type of UNIX shell script files which typically have no file extension.

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_TruncateLength, p_MaxLineLength, trunc


p_backcolor

int p_backcolor

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_bbside

int p_bbside

Returns non-zero BBSIDE_* constant indicating which side the current object is docked on, otherwise returns 0 if object is not docked. If the object is not a form (p_object==OI_FORM), then 0 is returned. This property is available only when the object is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties


p_begin_end_style

int p_begin_end_style

Determines the brace style of the current buffer. This property is available only when the control is displayed.

Example:

   // begin/end style 1
   p_begin_end_style = 0;
   if (x) {
      x = 5;
   }

   // begin/end style 2
   p_begin_end_style = VS_C_OPTIONS_STYLE1_FLAG;
   if (x)
   {
      x = 5;
   }

   // begin/end style 3
   p_begin_end_style = VS_C_OPTIONS_STYLE2_FLAG;
   if (x)
      {
      x = 5;
      }

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_binary

boolean p_binary

Determines the binary mode of the buffer attached to this window. Affects the _save_file() function. When on, all reformatting options given to the _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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_border_style

int p_border_style

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, Mini HTML, 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.

Applies To:

Form, Label, Text Box, Editor Control, List Box, File List Box, Directory List Box, Picture Box, Image, Mini HTML, Tree View

Categories:

Form Properties, Text Box Properties, Editor Control Properties, File List Box Properties, Directory List Box Properties, Picture Box Properties, Image Properties, Mini HTML Properties, Tree View Properties


p_BoundsEnd

int p_BoundsEnd

Sets the end of the bounds region in the editor. Any text past the end of the bounds region (in p_col > p_BoundsEnd) is treated as read-only. Used in ISPF mode, chiefly with column-oriented languages.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_BoundsStart


p_BoundsStart

int p_BoundsStart

Sets the start of the bounds region in the editor. Any text before the beginning of the bounds region (in p_col < p_BoundsStart) is treated as read-only. Used in ISPF mode, chiefly with column-oriented languages.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_BoundsEnd


p_buf_flags

int p_buf_flags

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":

VSBUFFLAG_HIDDEN
Affects Edit Window only. next_buffer and prev_buffer commands won't switch to this buffer.
VSBUFFLAG_THROW_AWAY_CHANGES
Affects Edit Window only. Allow quit without prompting for save when this buffer is modified.
VSBUFFLAG_KEEP_ON_QUIT
Affects Edit Window only. Don't delete buffer on quit.
VSBUFFLAG_REVERT_ON_THROW_AWAY
Affects Edit Window only. Replace buffer with copy on disk when the buffer is deleted with the quit command.
VSBUFFLAG_PROMPT_REPLACE
Indicates whether to prompt when replacing existing file on save.
VSBUFFLAG_DELETE_BUFFER_ON_CLOSE
Indicates whether the buffer should be deleted when a list box or editor control is deleted.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_buf_id

int p_buf_id

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);

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_buf_name

_str p_buf_name

Determines buffer name. The buffer name is used as the default name when a file is saved. When the p_DocumentName property is '', the buffer name is used as the display name.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_DocumentName


p_buf_size

int p_buf_size

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_buf_user

_str p_buf_user

Gets/sets buffer specific information. This function should be used only through the _GetBufferInfoHt() and _SetBufferInfoHt() api functions which allow you to set named buffer information.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_buf_width

int p_buf_width

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_buser

_str p_buser

Gets/sets buffer specific information. Currently this property is reserved for used by SlickEdit Inc. It may be removed in the future.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_button_bar

int p_button_bar

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);

Applies To:

MDI Window

Category:

MDI Window Properties


p_cancel

boolean p_cancel

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.

Applies To:

Command Button

Category:

Command Button Properties


p_caps

boolean p_caps

Returns true if capitalization mode is on.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_LangId, p_caps


p_caption

_str p_caption

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 may 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);
   }

Applies To:

Form, Label, Frame, Command Button, Radio Button, Check Box,

Categories:

Label Properties, Command Button Properties


p_CaptionClick

boolean p_CaptionClick

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.

Applies To:

Form

Category:

Form Properties


p_case_sensitive

boolean p_case_sensitive

Determines case sensitivity for searching in a Combo Box.

Category:

Combo Box Properties


p_categories

_str p_categories

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, 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.

Applies To:

Menu, Menu Item

Categories:

Menu Properties, Menu Item Properties


p_cb

CTL_COMBO p_cb

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;
}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_cb_active

int p_cb_active

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');
}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_cb_extendedui

boolean p_cb_extendedui

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');
}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_cb_list_box

CTL_LISTBOX p_cb_list_box

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;
}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_cb_picture

CTL_PICTURE p_cb_picture

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');

}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_cb_text_box

CTL_TEXT p_cb_text_box

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');
}

Applies To:

Combo Box, Drive List

Categories:

Combo Box Properties, Drive List Properties


p_char_height

int p_char_height

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.

Category:

Editor Control Properties


p_char_width

int p_char_width

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.

Applies To:

Editor Control, Edit Window, List Box, File List Box, Directory List Box

Categories:

Editor Control Properties, Edit Window Properties, List Box Properties


p_checked

boolean p_checked

True if this menu item is checked, false otherwise.

Applies To:

Menu Item

Category:

Menu Item Properties


p_child

int p_child

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_client_height

int p_client_height

Returns the client height of the window in pixels. This property may only be accessed when the control is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties


p_client_width

int p_client_width

Returns the client width of the window in pixels. This property may only be accessed when the control is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties


p_clip_controls

boolean p_clip_controls

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.

Applies To:

Form, Picture Box, Frame

Categories:

Form Properties, Picture Box Properties, Frame Properties


p_col

int p_col

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_CollapsePicture

int p_CollapsePicture

Determines the picture which is displayed at the far left of a all tree items with children that are not currently displayed.

Applies To:

Tree View

Category:

Tree View Properties

See Also:

p_ExpandPicture, p_LeafPicture


p_color_flags

int p_color_flags

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

_clex_find, _clex_load, _clex_skip_blanks


p_ColorEntireLine

boolean p_ColorEntireLine

Color the entire current line, not just the text on the current line

Applies To:

Tree View

Category:

Tree View Properties


p_command

_str p_command

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_HIGHLIGHTED_BUTTON, PSPIC_BUTTON, or PSPIC_AUTO_BUTTON, the command is executed on the active MDI edit window.

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_HIGHLIGHTED_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.

Applies To:

Picture Box, Image, Menu Item

Categories:

Picture Box Properties, Image Properties, Menu Item Properties


p_completion

_str p_completion

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
DIR_ARG
One directory name
MULTI_DIR_ARG
Multiple directories, separated by semicolons
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

Applies To:

Combo Box, Text Box

Categories:

Combo Box Properties, Text Box Properties


p_cursor_x

int p_cursor_x

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 closest character. This property is available only when the control is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_cursor_y

int p_cursor_y

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_DebugMode

boolean p_DebugMode

Determines whether the buffer has already been initialized for debugging.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_default

boolean p_default

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.

Applies To:

Command Button

Category:

Command Button Properties


p_delay

int p_delay

Determines the delay in milliseconds for incrementing or decrementing while you click and hold a spin control arrow.

Applies To:

Spin

Category:

Spin Properties


p_display_xlat

_str p_display_xlat

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. You can also edit and EBCDIC file by using the open dialog and specifying EBCDIC encoding.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_DocumentName

_str p_DocumentName

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_draw_mode

int p_draw_mode

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;
    fgcolor=_rgb(0x80,0x80,0x80);  /* Gray */
    bgcolor=0;  /* Not used since p_fill_style=PSFS_TRANSPARENT */
    x1=10;y1=10;x2=200;y2=100;
    _draw_rect(x1,y1,x2,y2,fgcolor,bgcolor,'e');
}

Applies To:

Form, MDI Window

Categories:

Form Properties, MDI Window Properties

See Also:

_draw_rect


p_draw_style

int p_draw_style

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;
    fgcolor=_rgb(0x80,0x80,0x80);  /* Gray */
    bgcolor=0;  /* Not used since p_fill_style=PSFS_TRANSPARENT */
    x1=10;y1=10;x2=200;y2=100;
    _draw_rect(x1,y1,x2,y2,fgcolor,bgcolor,'e');
}

Applies To:

Form, MDI Window

Categories:

Form Properties, MDI Window Properties

See Also:

_draw_rect


p_draw_width

int p_draw_width

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;
   fgcolor=_rgb(0x80,0x80,0x80);  /* Gray */
   bgcolor=0;  /* Not used since p_fill_style=PSFS_TRANSPARENT */
   x1=10;y1=10;x2=200;y2=100;
   _draw_rect(x1,y1,x2,y2,fgcolor,bgcolor,'e');
}

Applies To:

Form, MDI Window

Categories:

Form Properties, MDI Window Properties

See Also:

_draw_rect


p_DropDownList

int p_DropDownList

Whether the tab control features an arrow button which, when clicked, reveals a drop down list containing the names of all the tabs in alphabetical order.

Applies To:

SSTab

Category:

SSTab Properties


p_edit

boolean p_edit

Returns non-zero value if the object is being edited in the dialog editor. This property is only available when the control is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties


p_EditInPlace

boolean p_EditInPlace

Enable ability to edit tree cells in place.

Applies To:

Tree View

Category:

Tree View Properties


p_embedded

int p_embedded

Determines embedded language context mode? One of:

VSEMBEDDED_BOTH
VSEMBEDDED_IGNORE
VSEMBEDDED_ONLY

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_EmbeddedLexerName, _EmbeddedStart(), _EmbeddedEnd()


p_embedded_orig_values

typeless p_embedded_orig_values

Stores original values used for embedded language settings. This is a typeless container.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_EmbeddedCaseSensitive

_str p_EmbeddedCaseSensitive

Determines embedded language case sensitivity. This returns the case sensitivity property for the embedded language lexer or if the cursor is not in an embedded language context, it will return the same thing as p_LangCaseSensitive.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_embedded, p_EmbeddedLexerName, p_LangCaseSensitive


p_EmbeddedIdentifierChars

_str p_EmbeddedIdentifierChars

Determines embedded language identifier characters. This contains the set of identifier characters of the embedded language or "" if the cursor is not in an embedded language context.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_embedded, p_EmbeddedLexerName, p_identifier_chars


p_EmbeddedLexerName

_str p_EmbeddedLexerName

Determines embedded language context. This contains the name of the embedded language lexer name or "" if the cursor is not in an embedded language context.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_embedded, p_lexer_name, _EmbeddedStart(), _EmbeddedEnd()


p_enabled

boolean p_enabled

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);
}

Applies To:

All Window Objects

Category:

All Windows Properties


p_encoding

int p_encoding

Determines the default encoding that the buffer will be saved in. After opening a file, this property indicates the encoding of the original file.

Use the p_UTF8 property to check whether a buffer contains UTF-8.

VSCP_ACTIVE_CODEPAGE indicates that the buffer contains SBCS/DBCS active code page data. All other encodings indicate that the buffer contains UTF-8 data.

Encoding may be any one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC_SBCS
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE
VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_encoding_set_by_user

int p_encoding_set_by_user

Set to -1 if the buffer was loaded using with automatic encoding. Set to the encoding chosen if the user overrode automatic encoding processing. load_files(),_save_file(), and auto-reload set this property. This buffer property is needed so that auto-reloaded knows how to reload the buffer when it is modified by another application.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_encoding_translation_error

int p_encoding_translation_error

Set by load_files when a new file is loaded to indicate an encoding translation error. This allows the file to be loaded and for the user to get an error message. An encoding translation error can occur when translating file data to UTF-8 buffer data.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_eventtab

int p_eventtab

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;
   }

Applies To:

All Window Objects

Category:

All Windows Properties


p_eventtab2

int p_eventtab2

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;
   }

Applies To:

All Window Objects

Category:

All Windows Properties


p_ExpandPicture

int p_ExpandPicture

Determines the picture which is diplayed at the far left of a all tree items with children that are currently displayed.

Applies To:

Tree View

Category:

Tree View Properties

See Also:

p_CollapsePicture, p_LeafPicture


p_extension

_str p_extension

Deprecated. Use p_LangId

Determines the current file's language support. The string represents a unique, primary file extension generally associated with a language or editing mode.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_LangCaseSensitive, p_mode_name


p_file_date

_str p_file_date

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 opens files calls load_files). This property can only be accessed when the object is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_fill_style

int p_fill_style

This property is not fully supported yet. Its value should always be PSFS_TRANSPARENT.

Applies To:

Form, MDI Window

Categories:

Form Properties, MDI Window Properties


p_FirstActiveTab

int p_FirstActiveTab

Determins the first active tab when a form is displayed.

Applies To:

SSTab

Category:

SSTab Properties


p_fixed_font

boolean p_fixed_font

Returns non-zero value if the font is a fixed font. This property can only be accessed when the object is displayed.

Applies To:

Editor Control, Edit Window, File List Box, Directory List Box

Categories:

Editor Control Properties, Edit Window Properties, File List Box Properties, Directory List Box Properties


p_font_bold

boolean p_font_bold

Determines whether the font is bold.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_charset

int p_font_charset

Determines the character set used by the font. See VSCHARSET_*.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_height

int p_font_height

Returns height of font in pixels. This property can only be accessed when the object is displayed.

Applies To:

Editor Control, Edit Window, File List Box, Directory List Box

Categories:

Editor Control Properties, Edit Window Properties, File List Box Properties, Directory List Box Properties


p_font_italic

boolean p_font_italic

Determines whether the font is italic. Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_name

_str p_font_name

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_outline

boolean p_font_outline

Determines whether the font is an outline font. Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_printer

boolean p_font_printer

Determines whether the font is chosen from screen fonts or printer fonts.

Category:

All Windows Properties


p_font_size

_str p_font_size

Determines the font point size.

Example:

   p_font_name="Helvetica";
   p_font_size=18;   // 18 point size.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_strike_thru

boolean p_font_strike_thru

Determines whether the font has strike through. Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_transparent

boolean p_font_transparent

Determines whether the font has transparency. Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_underline

boolean p_font_underline

Determines whether the font is underlined. Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.

Applies To:

All Window Objects

Category:

All Windows Properties


p_font_width

int p_font_width

Returns height of font in pixels. This property can only be accessed when the object is displayed.

Applies To:

Editor Control, Edit Window, File List Box, Directory List Box

Categories:

Editor Control Properties, Edit Window Properties, File List Box Properties, Directory List Box Properties


p_forecolor

int p_forecolor

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_function_brace_on_new_line

boolean p_function_brace_on_new_line

Determines the whether an opening brace of a function goes on a new line for the current buffer. This property is available only when the control is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_GrabbarLocation

int p_GrabbarLocation

The location for the grabbar, one of the following values:

SSTAB_GRABBARLOCATION_TOP
SSTAB_GRABBARLOCATION_BOTTOM
SSTAB_GRABBARLOCATION_LEFT
SSTAB_GRABBARLOCATION_RIGHT

Applies To:

SSTab

Category:

SSTab Properties


p_Gridlines

int p_Gridlines

Show grid lines for multi-column tree control

Applies To:

Tree View

Category:

Tree View Properties


p_HasBuffer

boolean p_HasBuffer

Determines whether the current window has a buffer attatched

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_height

int p_height

Determines the height of a window in the scale mode of p_xyscale_mode.

Applies To:

All Window Objects

Category:

All Windows Properties


p_help

_str p_help

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_hex_field

boolean p_hex_field

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_hex_mode

boolean p_hex_mode

Determines whether text is displayed in hex or ASCII lines. You need to use the hex function to switch into or out of hex display mode because this function does more than just set this property. This property is available only when the control is displayed. Possible values:

  • HM_HEX_OFF - hex mode off
  • HM_HEX_ON - hex mode on
  • HM_HEX_LINE - hex mode on using line hex

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_hex_nibble

boolean p_hex_nibble

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_hex_Nofcols

int p_hex_Nofcols

When in hex mode (p_hex_mode), determines number of 4 byte columns of hex data.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_hex_toppage

int p_hex_toppage

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_hex_value_casing

int p_hex_value_casing

Determines the preferred style of casing for hex value elements for the current buffer. This property is available only when the control is displayed and is valid only in languages where value elements are used (e.g. HTML, XML).

values and respective results:

  1. WORDCASE_LOWER - lowercase
  2. WORDCASE_UPPER - uppercase

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_HighlightTab

int p_HighlightTab

Determines whether the tab control should highlight the component under the mouse or not.

Applies To:

SSTab

Category:

SSTab Properties


p_hwnd

long p_hwnd

Returns system dependent window handle for client area. On Windows, this is the HWND. This is 0 for an image control.

Applies To:

All Window Objects

Category:

All Windows Properties


p_hwndframe

long p_hwndframe

Returns system dependent window handle for window frame. On Windows, this is the same as the client area. This is 0 for an image control.

Applies To:

All Window Objects

Category:

All Windows Properties


p_identifier_chars

_str p_identifier_chars

Returns a string containing two parts:

  • First is the identifier start characters -- these are the valid leading characters for an identifier in the current language.
  • Second is the additional identifier characters -- these are other characters that are valid in identifiers in the current language.

    Character ranges are separated by a dash (-), and special characters (e.g. dash) can be escaped using backslash (\).

    Note:

    For many purposes, this property replaces p_word_chars which may contain other non-identifier characters.

    Example:

    For a typical language that allowed identifiers to start with an alphabetic character and continue with underscore or alphanumeric characters.

    A-Za-z _0-9

    Applies To:

    Editor Control, Edit Window

    Categories:

    Editor Control Properties, Edit Window Properties

    See Also:

    _clex_identifier_re(), _clex_identifier_notre(), _clex_identifier_chars(), _clex_is_identifier_char(), cur_identifier(), p_word_chars, p_EmbeddedIdentifierChars


p_increment

int p_increment

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.

Applies To:

Spin

Category:

Spin Properties


p_indent_case_from_switch

boolean p_indent_case_from_switch

Determines whether to indent a case statement from its parent switch statement. This property is available only when the control is displayed.

Example:

   // p_indent_case_from_switch = true
   switch (num) {
      case 1:
      case 2:
      default:
         break;
   }

   // p_indent_case_from_switch = false
   switch (num) {
   case 1:
   case 2:
   default:
      break;
   }

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_indent_style

int p_indent_style

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_indent_with_tabs

boolean p_indent_with_tabs

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_index

int p_index

Determines a name table index for the current buffer. The name_info(index) is a string of syntax expansion and 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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_init_style

int p_init_style

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.

Applies To:

Form

Category:

Form Properties


p_isbutton_bar

int p_isbutton_bar

Deprecated. Use p_bbside instead.
Returns non-zero value if the current object is a button bar. Currently, this can only be true for form objects (p_object==OI_FORM). This property is available only when the object is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties

See Also:

p_bbside


p_IsTempEditor

boolean p_IsTempEditor

Determines whether the current window was created by _CreateTempEditor2() which is used by _open_temp_view() and _create_temp_view().

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_KeepPictureGutter

boolean p_KeepPictureGutter

Determines whether the gutter should always be present even if there are no pictures in the gutter. This is needed for real time error notification since the gutter can flash too frequently.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_keyword_casing

int p_keyword_casing

Determines the preferred style of casing for keywords for the current buffer. This property is available only when the control is displayed.

values and respective results:

  1. WORDCASE_PRESERVE - does not change
  2. WORDCASE_LOWER - lowercase
  3. WORDCASE_UPPER - uppercase
  4. WORDCASE_CAPITALIZE - capitalize the first letter only

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_LangCaseSensitive

boolean p_LangCaseSensitive

Returns true if language is case sensitive. This property is read only.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_LangId, p_EmbeddedCaseSensitive


p_LangId

_str p_LangId

Determines the current file's language support. The string represents a unique, primary file extension generally associated with a language or editing mode.

Since:

13.0

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_LangCaseSensitive, p_mode_name, p_extension


p_large_change

int p_large_change

Determines the amount to change p_value when the mouse is clicked between the thumb box and the arrow.

Applies To:

Hscroll Bar, Vscroll Bar

Categories:

Hscroll Bar Properties, Vscroll Bar Properties


p_LastModified

int p_LastModified

Buffer time stamp.

The purpose of this property is to track whether a buffer has been modified, quit, or replaced since the last time it was queried. This allows threads or processes on timers to know whether the results they are working on are still valid.

This property is readonly and only available when the control is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_LCBufFlags

int p_LCBufFlags

Contains flags to control the line number display in the current buffer. The following flags, defined in slick.sh, are used with this property:

VSLCBUFFLAG_READWRITE
prefix area on/off
VSLCBUFFLAG_LINENUMBERS
Line numbers on/off
VSLCBUFFLAG_LINENUMBERS_AUTO
Line numbers automatic

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_LeafPicture

int p_LeafPicture

Determines the picture which is displayed at the far left of a all tree items which are leaf nodes (that can not have any children)

Applies To:

Tree View

Category:

Tree View Properties

See Also:

p_ExpandPicture, p_CollapsePicture


p_left_edge

int p_left_edge

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_LevelIndent

int p_LevelIndent

Determines the spacing in twips to indent to the right for each level of the tree.

Applies To:

Tree View

Category:

Tree View Properties


p_lexer_name

_str p_lexer_name

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_EmbeddedLexerName


p_line

int p_line

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.

Applies To:

Editor Control, Edit Window, List Box

Categories:

Editor Control Properties, Edit Window Properties, List Box Properties

See Also:

p_RLine


p_line_numbers_len

int p_line_numbers_len

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_LinesForceWrapped

boolean p_LinesForceWrapped

Read-only. True if lines have been "force wrapped"

Applies To:

Editor Control, Edit Window, List Box

Categories:

Editor Control Properties, Edit Window Properties, List Box Properties


p_LineStyle

int p_LineStyle

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

Applies To:

Tree View

Category:

Tree View Properties


p_margins

_str p_margins

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;

Applies To:

Edit Window

Category:

Edit Window Properties


p_max

int p_max

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.

Applies To:

Hscroll Bar, Vscroll Bar

Categories:

Hscroll Bar Properties, Vscroll Bar Properties


p_max_click

int p_max_click

Determines the maximum number of clicks allowed and may be one of the following values:

MC_SINGLE
Single clicks only.
MC_DOUBLE
Up to double click.
MC_TRIPPLE
Up to triple click.

Applies To:

Picture Box, Image

Categories:

Picture Box Properties, Image Properties


p_MaxLineLength

int p_MaxLineLength

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_TruncateLength, p_MaxLineLength, trunc, p_AutoSelectLanguage


p_mdi_child

int p_mdi_child

Returns non-zero value if the current object is an MDI edit window.

Applies To:

All Window Objects

Category:

All Windows Properties


p_menu_handle

int p_menu_handle

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.

Applies To:

Form, MDI Window

Categories:

Form Properties, MDI Window Properties


p_message

_str p_message

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.

Applies To:

Picture Box, Image, Menu, Menu Item

Categories:

Picture Box Properties, Image Properties, Menu Properties, Menu Item Properties


p_min

int p_min

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.

Applies To:

Hscroll Bar, Vscroll Bar

Categories:

Hscroll Bar Properties, Vscroll Bar Properties


p_modal

boolean p_modal

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.

Applies To:

Form

Category:

Form Properties


p_mode_eventtab

int p_mode_eventtab

Determines the language-specific event table for the current file. The binding for a key, mouse, and a few other events is determined by checking event tables for bindings in the following order.

  1. p_eventtab (window property)
  2. p_mode_eventtab (buffer property)
  3. Root event table (global stored in _default_keys variable)

This property is available only when the control is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_mode_name

_str p_mode_name

Determines the language name for the current file. p_LangId uniquely determines the language support, this string is used for display purposes and is intended to be more readable.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_modify

boolean p_modify

Determines whether the current buffer is modified. The p_modify propert is equivelent to setting the p_ModifyFlags to 0 or 1. Setting this property clears all the high order bits of the p_ModifyFlags property.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_ModifyFlags


p_ModifyFlags

int p_ModifyFlags

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. The p_modify property is equivalent to setting the p_ModifyFlags to 0 or 1. 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.

IMPORTANT:
SlickEdit now reserves all 32 bits for its own internal use. Users wanting to track buffer modifications in their own macros should use the p_LastModified property instead.

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;
}

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_modify, p_LastModified


p_mouse_pointer

int p_mouse_pointer

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_MouseActivate

int p_MouseActivate

Determines how the click to get focus policy. This property may be one of the following values:

MA_DEFAULT
Action depends on the control.
MA_ACTIVATE
Active the form, give the control focus, and process a click event.
MA_ACTIVATEANDEAT
Active the form and give the control focus.
MA_NOACTIVATE
Do not active the form and process the click event
MA_NOACTIVATEANDEAT
Do not active the form.

Applies To:

All Window Objects

Category:

All Windows Properties


p_multi_select

int p_multi_select

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.

Applies To:

List Box, Tree View

Categories:

List Box Properties, Tree View Properties


p_MultiRow

int p_MultiRow

Determines 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.

    Applies To:

    SSTab

    Category:

    SSTab Properties


p_name

_str p_name

Determines the name of the current object. Control names are looked up relative to the current form (p_active_form).

Applies To:

All Window Objects

Category:

All Windows Properties


p_NeverColorCurrent

boolean p_NeverColorCurrent

Never color the current item in the tree control.

Applies To:

Tree View

Category:

Tree View Properties


p_newline

_str p_newline

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_next

int p_next

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_no_select_color

boolean p_no_select_color

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.

Applies To:

List Box

Category:

List Box Properties


p_no_space_before_paren

boolean p_no_space_before_paren

Determines whether to insert a space before the opening parenthesis during syntax expansion for the current buffer. This property is available only when the control is displayed.

Example:

   // p_no_space_before_paren = false
      if (x == 5)
   // p_no_space_before_paren = true
      if(x == 5)

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_Nofhidden

int p_Nofhidden

Returns the total number of hidden lines in the current buffer. SlickEdit uses this property to quickly determine when special processing is needed for changing the cursor position and correctly scrolling.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_Noflines

int p_Noflines

Returns the number of lines in the current buffer. This property includes non-saveable lines (lines with the NOSAVE_LF flag set). Use the p_RNoflines property to get the number of saveable lines ("real lines").

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_RNoflines


p_NofNoSave

int p_NofNoSave

Returns the number of lines with the NOSAVE_LF line flag set. Use the _lineflags() function to change the line flags.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_NofSelDispBitmaps

int p_NofSelDispBitmaps

Returns the number of selective display bitmaps in the current buffer.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_Nofselected

int p_Nofselected

Determines the number of selected items in the list box.

Category:

List Box Properties


p_Nofstates

int p_Nofstates

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 find.bmp was not found");
       } else {
          _message_box("Error loading picture find.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

Applies To:

List Box

Category:

List Box Properties


p_NofTabs

int p_NofTabs

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.

Applies To:

SSTab

Category:

SSTab Properties


p_object

int p_object

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
OI_SSTAB
OI_DESKTOP
OI_SSTAB_CONTAINER
OI_EDITOR
OI_MINIHTML
OI_PRINT_PREVIEW
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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_object_modify

boolean p_object_modify

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_old_height

int p_old_height

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_old_width

int p_old_width

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_old_x

int p_old_x

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_old_y

int p_old_y

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.

Applies To:

All Window Objects

Category:

All Windows Properties


p_OldLineNumber

int p_OldLineNumber

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_Orientation

int p_Orientation

SSTab Control - Determines whether the tabs are displayed on the top or bottom of the SSTab control. This property may be one of the following:

  • SSTAB_OTOP
  • SSTAB_OBOTTOM

Image - Determines how the picture and caption are oriented. This property may be one of the following:

  • PSPIC_OHORIZONTAL - caption (if any) is positioned just right of picture
  • PSPIC_OVERTICAL - caption (if any) is rotated 90 degrees clockwise and positioned just below picture

Applies To:

SSTab, Image

Categories:

SSTab Properties, Image Properties


p_pad_parens

boolean p_pad_parens

Determines whether to insert a space between parenthesis during syntax expansion for the current buffer. This property is available only when the control is displayed.

Example:

    // p_pad_parens = false
    if (x == 5)
    // p_pad_parens = true
    if ( x == 5 )

Applies To:

Editor_Control, Edit_Window

Categories:

Editor Control Properties, Edit Window Properties


p_PaddingX

int p_PaddingX

SSTab - Determines the padding in pixels to the left and right of the tab caption.

Mini_HTML - Determines the padding in twips to the left and right of the text.

Applies To:

SSTab, Mini HTML

Categories:

SSTab Properties, Mini HTML Properties


p_PaddingY

int p_PaddingY

SSTab - Determines the padding in pixels above and below tab caption.

Mini_HTML - Determines the padding in twips above and below the text.

Applies To:

SSTab, Mini HTML

Categories:

SSTab Properties, Mini HTML Properties


p_parent

int p_parent

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.

Applies To:

All Window Objects

Category:

All Windows Properties

See Also:

_form_parent


p_Password

boolean p_Password

When true, hides actual characters typed in. This is typically used for hiding passwords.

Applies To:

Text Box, Combo Box

Categories:

Text Box Properties, Combo Box Properties


p_pic_indent_x

int p_pic_indent_x

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;
}

Applies To:

Combo Box, Text Box

Categories:

Combo Box Properties, Text Box Properties


p_pic_point_scale

int p_pic_point_scale

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;

}

Applies To:

Combo Box, Text Box, List Box

Categories:

Combo Box Properties, Text Box Properties, List Box Properties


p_pic_space_y

int p_pic_space_y

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;
}

Applies To:

Combo Box, Text Box, List Box

Categories:

Combo Box Properties, Text Box Properties, List Box Properties


p_picture

int p_picture

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.

Form - Determines the picture displayed on a docked tool window that is part of tab group.

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 find.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_HIGHLIGHTED_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 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;
}

// Another 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;
}

Applies To:

Combo Box, Text Box, List Box, Picture Box, Image

Categories:

Combo Box Properties, Text Box Properties, List Box Properties, Picture Box Properties, Image Properties


p_PictureOnly

boolean p_PictureOnly

Determines whether the tabs only display pictures and not captions. When true, captions are display as tool tip help.

Applies To:

SSTab

Category:

SSTab Properties


p_pointer_style

boolean p_pointer_style

Determines the preferred style of formatting a pointer declaration for the current buffer. This property is available only when the control is displayed.

Example:

   p_pointer_style = 0;
      char *p;
   p_pointer_style = VS_C_OPTIONS_SPACE_AFTER_POINTER;
      char* p;
   p_pointer_style = VS_C_OPTIONS_SPACE_SURROUNDS_POINTER;
      char * p;

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_prev

int p_prev

The window id of the previous window is returned. This property is available only when the control is displayed.

Applies To:

All Window Objects

Category:

All Windows Properties


p_ProtectReadOnlyMode

boolean p_ProtectReadOnlyMode

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_rawpos

_str p_rawpos

Returns 'A' if the current buffer buffer contains SBCS/DBCS data and that SlickEdit is running in UTF-8 mode. Otherwise, '' is returned. This property is read-only. This property is intended for use with the pos(), lastpos(), and parse functions in order to simplify supporting Unicode and SBCS/DBCS mode buffers.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_RBufSize

int p_RBufSize

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_ReadOnly

boolean p_ReadOnly

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 tests 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).

Applies To:

Editor Control, Edit Window, Text Box

Categories:

Editor Control Properties, Edit Window Properties, Text Box Properties

See Also:

p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly


p_readonly_mode

boolean p_readonly_mode

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 tests 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).

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly


p_readonly_set_by_user

boolean p_readonly_set_by_user

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_readonly_mode


p_redraw

boolean p_redraw

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
}

Applies To:

Label, Text Box, Edit Window, Editor Control, Frame, Drive List, Command Button, Radio Button, Check Box, Combo Box, List Box, File List Box, Directory List Box, Picture Box, Image

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Frame Properties, Image Properties, Label Properties, List Box Properties, Picture Box Properties, Radio Button Properties, Text Box Properties


p_rel_line

int p_rel_line

Returns the number of lines down from the top of the window. Sets the cursor on the line which is the specified number of lines down from the top line of the window.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_RLine

int p_RLine

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 it 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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_line


p_RNoflines

int p_RNoflines

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.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_Noflines


p_scale_mode

int p_scale_mode

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.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_scroll_bars

int p_scroll_bars

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.

Applies To:

Editor Control, List Box, File List Box, Directory List Box, Tree View

Categories:

Editor Control Properties, List Box Properties, Directory List Box Properties, Tree View Properties


p_scroll_left_edge

int p_scroll_left_edge

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.

Applies To:

Editor Control, Edit Window, List Box

Categories:

Editor Control Properties, Edit Window Properties, List Box Properties


p_sel_length

int p_sel_length

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.

Applies To:

List Box, Combo Box, Text Box

Categories:

List Box Properties, Combo Box Properties, Text Box Properties

See Also:

_get_sel, _set_sel, p_sel_start


p_sel_start

int p_sel_start

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.

Applies To:

List Box, Combo Box, Text Box

Categories:

List Box Properties, Combo Box Properties, Text Box Properties

See Also:

_get_sel, _set_sel, p_sel_length


p_selected

boolean p_selected

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.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_show_tabs

int p_show_tabs

Deprecated. This property is being dropped. Use the p_ShowSpecialChars property instead.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Properties, Editor Control Properties


p_showeof

boolean p_showeof

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.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Properties, Editor Control Properties


p_ShowRoot

boolean p_ShowRoot

Determines the picture which is diplayed at the far left of a all tree items with children.

Applies To:

Tree View

Category:

Tree View Properties


p_ShowSpecialChars

int p_ShowSpecialChars

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_FORMFEED
  • SHOWSPECIALCHARS_ALL

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Properties, Editor Control Properties


p_small_change

int p_small_change

Determines the amount to change p_value when the mouse is clicked on a scroll bar arrow.

Applies To:

Hscroll Bar, Vscroll Bar

Categories:

Hscroll Bar Properties, Vscroll Bar Properties


p_SoftWrap

boolean p_SoftWrap

Determines whether Soft Wrap is on or off. When on, lines longer than the window width are wrapped. This property is only available when the control is displayed.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_SoftWrapOnWord


p_SoftWrapOnWord

boolean p_SoftWrapOnWord

When Soft Wrap is on, determines whether lines are split on character or words.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties

See Also:

p_SoftWrap


p_SourceRecording

boolean p_SourceRecording

Determines whether macro source code is generated when macro recording is on and this editor control has focus.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Properties, Editor Control Properties


p_SpaceY

int p_SpaceY

Determines the extra spacing in twips between each line.

Applies To:

Tree View

Categories:

Hscroll Bar Properties, Vscroll Bar Properties


p_stretch

boolean p_stretch

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.

Applies To:

Picture Box, Image

Categories:

Image Properties, Picture Box Properties


p_style

int p_style

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_HIGHLIGHTED_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).

Applies To:

Check Box, Combo Box, Gauge, Picture Box, Image

Categories:

Check Box Properties, Combo Box Properties, Gauge Properties, Image Properties, Picture Box Properties


p_SwapColors

boolean p_SwapColors

Determines whether embedded and non-embedded colors should be swapped when displaying buffer text.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_SyntaxIndent

int p_SyntaxIndent

Determines the amount to indent when the tab key is pressed. This property is ignored in "Plain Text" and "Cobol" modes.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_tab_index

int p_tab_index

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.

Applies To:

Editor Control, Edit Window

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Editor Control Properties, File List Box Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_tab_stop

boolean p_tab_stop

Determines whether Tab and Shift+Tab keys switch focus to the control.

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

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Editor Control Properties, File List Box Properties, Gauge Properties, Hscroll Bar Properties, List Box Properties, Radio Button Properties, Text Box Properties, Vscroll Bar Properties


p_tabs

_str p_tabs

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);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_TabsPerRow

int p_TabsPerRow

Determines the number of tabs per row. This property is ignored if p_MultiRow is false.

Applies To:

SSTab

Category:

SSTab Properties


p_tag_casing

int p_tag_casing

Determines the preferred style of casing for tag elements for the current buffer. This property is available only when the control is displayed and is valid only in languages where tag elements are used (e.g. HTML, XML).

values and respective results:

  1. WORDCASE_PRESERVE - does not change
  2. WORDCASE_LOWER - lowercase
  3. WORDCASE_UPPER - uppercase
  4. WORDCASE_CAPITALIZE - capitalize the first letter only

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_template

int p_template

Returns: int

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.

Applies To:

Form

Category:

Form Properties


p_text

_str p_text

Determines the text of a combo box or text box. When this property is set, an on_change event will occur.

Applies To:

Combo Box, Text Box

Categories:

Combo Box Properties, Text Box Properties


p_TextWrapChangeNotify

int p_TextWrapChangeNotify

Set to true if current text change has occurred during a word wrap or XML wrap operation.

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_tile_id

int p_tile_id

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.

Applies To:

Edit Window

Category:

Edit Window Properties


p_tool_window

boolean p_tool_window

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.

Applies To:

Form

Category:

Form Properties


p_ToolbarBorder

int p_ToolbarBorder

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.

VSTBBORDER_BORDER
May display extra necessary border.
VSTBBORDER_GRABBARS
Displays double bars so that the toolbar (usually one where buttons can be added) can be dragged with the mouse.

Applies To:

Form

Category:

Form Properties


p_TruncateLength

int p_TruncateLength

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, _expand_tabsc_raw
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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_TruncateLength, p_MaxLineLength, trunc, p_AutoSelectLanguage


p_undo_steps

int p_undo_steps

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_undo_visible

boolean p_undo_visible

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.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Editor Control Properties, File List Box Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_user

typeless p_user

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.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_user2

typeless p_user2

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.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_UTF8

boolean p_UTF8

Determines whether the buffers data is UTF-8.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_value

int p_value

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 find.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_HIGHLIGHTED_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 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 find.bmp was not found");
       } else {
          _message_box("Error loading picture
find.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

Applies To:

Radio Button, Check Box, Hscroll Bar, Vscroll Bar, Picture Box, Image, Gauge

Categories:

Check Box Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, List Box Properties, Picture Box Properties, Radio Button Properties, Vscroll Bar Properties


p_value_casing

int p_value_casing

Determines the preferred style of casing for value elements for the current buffer. This property is available only when the control is displayed and is valid only in languages where value elements are used (e.g. HTML, XML).

values and respective results:

  1. WORDCASE_PRESERVE - does not change
  2. WORDCASE_LOWER - lowercase
  3. WORDCASE_UPPER - uppercase
  4. WORDCASE_CAPITALIZE - capitalize the first letter only

Applies To:

Editor Control, Edit Window

Categories:

Editor Control Properties, Edit Window Properties


p_view_id

int p_view_id

Deprecated. Use p_window_id.

This property has been deprecated. Use the p_window_id property instead.

Applies To:

All Window Objects

Category:

All Windows Properties


p_visible

boolean p_visible

Determines whether the control is visible. This property has no effect if the object is being edited (p_edit!=0).

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties

See Also:

_ShowWindow


p_width

int p_width

Determines the width of a window in the scale mode of p_xyscale_mode.

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_windent_x

int p_windent_x

Returns: int

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.

Applies To:

Edit Window, Editor Control, List Box

Categories:

Edit Window Properties, Editor Control Properties, List Box Properties


p_windent_y

int p_windent_y

Returns: int

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.

Applies To:

List Box

Category:

List Box Properties


p_window_flags

int p_window_flags

Returns: int

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.

Applies To:

Edit Window

Categories:

Edit Window Properties, Editor Control Properties, List Box Properties


p_window_id

int p_window_id

Determines the current object/current window. This property is one of the more important properties to understand. 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()
{
}

Applies To:

All Window Objects

Category:

All Windows Properties


p_window_state

_str p_window_state

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

Applies To:

MDI Window, Edit Window

Categories:

Edit Window Properties, MDI Window Properties


p_word_chars

_str p_word_chars

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.

Note:

In previous releases, p_word_chars had been used for searching for symbols under the cursor. As of SlickEdit 2008, you should not use p_word_chars and instead use p_identifier_chars, or the utility functions _clex_identifier_re() or _clex_identifier_chars(). These functions use the identifier characters set up in your color coding specification.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_word_wrap

boolean p_word_wrap

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.

Applies To:

Label

Category:

Label Properties


p_word_wrap_style

int p_word_wrap_style

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties

See Also:

p_margins, gui_justify, justify, gui_margins, margins


p_x

int p_x

Determines the x position of a window in the scale mode of p_xyscale_mode.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_xlat

boolean p_xlat

Indicates that the buffer contains SBCS/DBCS data and that it needs to be converted to UTF-8 because SlickEdit is running in UTF- 8 mode. This is always false if SlickEdit is not running in UTF-8 mode. This property is read-only.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Properties, Editor Control Properties


p_xyparent

int p_xyparent

Returns: int

Returns the window id that the window is clipped to. 0 is returned if the window is clipped to the screen.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_xyscale_mode

int p_xyscale_mode

Returns: int

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);

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


p_y

int p_y

Determines the y position of a window in the scale mode of p_xyscale_mode.

Applies To:

All Window Objects

Categories:

Check Box Properties, Combo Box Properties, Command Button Properties, Directory List Box Properties, Drive List Properties, Edit Window Properties, Editor Control Properties, File List Box Properties, Form Properties, Frame Properties, Gauge Properties, Hscroll Bar Properties, Image Properties, Label Properties, List Box Properties, MDI Window Properties, Picture Box Properties, Radio Button Properties, Spin Properties, Text Box Properties, Tree View Properties, Vscroll Bar Properties


page_down

_command void page_down()

Moves cursor to next page of text.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

page_up, page_left, page_right


page_left

_command void page_left()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

page_up, page_down, page_right


page_right

_command void page_right()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

page_up, page_down, page_left


page_up

_command void page_up()

Moves cursor to previous page of text.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

page_down, page_left, page_right


parse_error_re

void parse_error_re(_str &filename, _str &line, _str &col, _str &err_msg, typeless view_id='', _str alt_word='')

Parse error lines using regular expressions read from the ErrorRE.xml configuration file

Parameters:

filename - Output parameter for the file containing the error

line - Output parameter for the line number in filename

col - Output parameter for the column position on line in filename

err_msg - Output parameter for the error message

Category:

Miscellaneous Functions


parse_file

_str parse_file(_str &line, boolean returnQuotes=true, boolean support_single_quote=false)

Returns: _str

Parses first filename from string.

Categories:

File Functions, String Functions


parsecommand

_str parsecommand(_str command, _str line)

Returns: _str

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.

Category:

Miscellaneous Functions


pas_proc_search

int pas_proc_search(_str &procname, int find_first)

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.

Returns: int

Returns 0 if successful. Otherwise a non-zero value is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


pascal_enter

_command void pascal_enter()

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", "Options", "File Extension Setup...", select the Indent tab) to change the syntax expansion/indenting options.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


pascal_mode

_command void pascal_mode()

Activates PASCAL file editing mode. The ENTER and SPACE BAR bindings are changed as well as the tab and margin settings.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


pascal_space

_command void pascal_space()

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", "Options", "File Extension Setup...", select the Indent tab) to change the syntax expansion/indenting options.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


past_end_of_line

boolean past_end_of_line(boolean moveToEndIfPast=false)

Deteremine if the cursor is past the end of the current line

Parameters:

moveToEndIfPast - If true and cursor is past end of line, move cursor to the end of line

Returns: boolean

true if the cursor is past the end of the current line

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


paste

_command int paste(_str name='', boolean isClipboard=true)

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", "Options", "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.

Returns: int

Returns 0 if successful. Common return code is 1 (clipboard empty, or clipboard text too long for command line). On error, message is displayed.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Selection Functions, Text Box Methods


paste_next_clipboard

_command void paste_next_clipboard(int nextOrPrev=1)

Cycles clipboards and pastes next clipboard item to buffer. Item remains selected and ignores deselect paste option, this allows for quickly cycling through all clipboards.

Parameters:

nextOrPrev - - option to use next (default [greater than 0]) or previous clipboard (less than or equal to 0)

Applies To:

Edit Window, Editor Control

Category:

Clipboard Functions

See Also:

paste


paste_prev_clipboard

_command void paste_prev_clipboard()

Cycles clipboards and pastes next clipboard item to buffer. Item remains selected and ignores deselect paste option, this allows for quickly cycling through all clipboards.

Applies To:

Edit Window, Editor Control

Category:

Clipboard Functions

See Also:

paste


paste_replace_word

_command void paste_replace_word()

Replaces the current word (where cursor is) with the current clipboard. No selection is required.

Returns: void

Returns 0 if successful.

Category:

Clipboard Functions

See Also:

paste


path_exists

boolean path_exists(_str Path)

Returns:

Returns true when Path exists.

Category:

File Functions


path_search

_str path_search(_str filename, _str env_var="PATH", _str options="", _str dotExtList=null)

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.

Parameters:

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)

Returns: _str

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

Category:

File Functions


pathlen

int pathlen(_str filename)

Returns: int

Returns length of the path in the string filename including trailing backslash.

Category:

File Functions


pause_recording

_command void pause_recording()

Temporarily turns off macro recording so that some editor functions may be used before continuing macro recording.

Category:

Macro Programming Functions


pc_match

_str pc_match(_str name, boolean find_first)

Parameters:

name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next procedure or 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.

Category:

Completion Functions


pcbt_match

_str pcbt_match(_str name, boolean find_first)

Parameters:

name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next procedure, command name, or builtin which is a prefix match of name. find_first must be non-zero to initialize matching. Returns '' when no more matches are found.

Category:

Completion Functions


pcextension

_str pcextension(_str line)

Returns: _str

Returns extension from fileman_line without the dot. fileman_line must be in the column format of the file manager.

Category:

File Functions


pcfile

_str pcfile(_str line)

Returns: _str

Returns name with extension, but without path of fileman_line. fileman_line must be in the column format of the file manager.

Category:

File Functions


pcfilename

_str pcfilename(_str line)

Returns: _str

Returns filename field of fileman_line. fileman_line must be in the column format of the file manager.

Category:

File Functions


pcname

_str pcname(_str line)

Returns: _str

Returns name without extension or path of fileman_line. fileman_line must be in the column format of the file manager.

Category:

File Functions


pcpath

_str pcpath(_str line)

Returns: _str

Returns path of fileman_line. fileman_line must be in the column format of the file manager.

Category:

File Functions


pd

_command int pd(_str cmdline="", _str quiet="")

Adds the current working directory to the top of the directory stack and makes the supplied directory (cmdline) the new working directory. With no arguments (cmdline==''), swaps the current working directory with the top of the directory stack.

Parameters:

cmdline - directory to switch to

quiet - suppress messages

Returns: int

0 on success, <0 on error

Category:

File Functions

See Also:

cd, popd


pgetkey

_str pgetkey(...)

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.

Parameters:

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.

Category:

Keyboard Functions

See Also:

get_event


Picture Box Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Picture Box Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_clip_controls
p_command
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_max_click
p_mdi_child
p_message
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


+

_command void +(_str NofLines='')

Moves the cursor the specified number of lines down.

Parameters:

NofLines - Number of lines

Applies To:

Edit Window, Editor Control

Category:

CursorMovement Functions


plusminus

_command int plusminus(_str CheckCurLineOnly='')

Expands or collapses selective display blocks.

  • If the cursor is on a line that contains a "+" bitmap for selective display, expand the collapsed block.
  • If the cursor is on a line that contains a "-" bitmap for selective display, collapse the block.
  • otherwise, if the cursor is on a line that has no "+" or "-" bitmap, but the line is the first line of a block collapse the block, creating a new selective display region. The definition of the current block depends on the language.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_selection, hide_all_comments, hide_code_block, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs, def_plusminus_blocks


point

typeless point(_str option="P")

Returns: typeless

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 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 returned 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);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

goto_point, _QROffset, _GoToROffset


point_on_edge

boolean point_on_edge(int x, int y, int x1, int y1, int x2, int y2)

Returns: boolean

true if (x,y) is a point on the edge (x1, y1) to (x2, y2).

Category:

Window Functions


pop_all_bookmarks

_command typeless pop_all_bookmarks()

Clears all the pushed bookmarks.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_tag, push_bookmark, pop_bookmark, bookmark_stack


pop_bookmark

_command typeless pop_bookmark()

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.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_bookmark, set_bookmark, toggle_bookmark, sb, goto_bookmark, gb, push_tag, bookmark_stack


pop_destination

boolean pop_destination(boolean force=false, boolean closeBuffer=false)

Decrement the reference count for a file that was jumped to by a tagging or search operation.

Parameters:

force - force destination to be popped, independent of reference count.

closeBuffer - close the current buffer?

Returns: boolean

'true' if the reference count hit zero, 'false' if not in table or still referenced

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

def_autoclose_flags, push_destination, push_bookmark


popd

_command int popd(_str quiet="")

Removes the top directory from the directory stack and makes it the new working directory.

Parameters:

quiet - suppress messages

Returns: int

0 on success, <0 on error

Category:

File Functions

See Also:

cd, pushd


popup_imessage

_command void popup_imessage(_str string="")

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.

Parameters:

string - message to display

Category:

Miscellaneous Functions

See Also:

popup_message, _message_box, help, message, messageNwait, sticky_message, clear_message


popup_message

_command void popup_message(_str string="", typeless flags="", _str title="")

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.

Parameters:

string - message to display

flags - message box flags (MB_*)

title - message box title

Category:

Miscellaneous Functions

See Also:

popup_imessage, _message_box, help, message, messageNwait, sticky_message, clear_message


pos

int pos(_str needle, _str haystack="", int start=1, _str options="", _str wordchars=null)

Parameters:

needle - string to search for. If this is the only parameter it retrieves tagged expression information. (see example).

haystack - (optional) string to search within

start - (optional, default=1) specifies the position at which the search should begin.

options - (optional) Multiple options may be specified with the following meaning:

wordchars - (optional) Define the word characters set for the string, for use when you need to use regular expressions with word boundaries (example "[A-Za-z0-9]").

'I'
Ignore case.
'R'
Interpret search string needle as a regular expression. See section SlickEdit 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.
'L'
Interpret string as a Perl regular expression. See section Perl Regular Expressions.
'&'
Interpret string as a wildcard expression. See section Wildcard Expressions.
Y
Binary search. This allows start positions in the middle of a DBCS or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
A
Specifies an SBCS/DBCS active code page search. needle and haystack must be SBCS/DBCS active code page data and not UTF-8. This option has no effect unless SlickEdit is running in Unicode support mode. See "Unicode and SBCS/DBCS Macro Programming."

Returns: int

Returns the position of needle in haystack. If needle is not found, 0 is returned.

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.

       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'));

Category:

String Functions

See Also:

substr, lastpos


pow

double pow(double n, double p)

Returns: double

Returns np -- 'n' raised to the power of 'p'.

Category:

Miscellaneous Functions


prepeat_search

_str prepeat_search()

Repeat search function used as input to the process_list procedure.

Returns: _str

Returns 0 if search string found.

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


preprocess

_command void preprocess(_str define_names="")

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.

Example:

preprocess  NT386=1  WIN32S  UNIX=0

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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

typeless pretrieve_next(int retrieve_view_id, boolean &first_retrieve)

Returns: typeless

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.

Category:

Retrieve Functions

See Also:

pretrieve_prev, insert_retrieve


pretrieve_prev

_str pretrieve_prev(int retrieve_view_id, boolean &first_retrieve)

Returns: _str

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.

Category:

Retrieve Functions

See Also:

pretrieve_next, insert_retrieve


prev_bookmark

_command int prev_bookmark()

Goes to the previous bookmark set by one of the commands set_bookmark, push_bookmark, or push_tag.

Returns: int

Returns the bookmark ID on success. <0 on error.

Applies To:

Edit Window

Category:

Bookmark Functions


prev_buffer

_command void prev_buffer(_str options="")

Switches to view of the previous buffer within the current window.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


prev_char

_command int prev_char()

Move the cursor left one character. If the cursor is at the beginning of the line, move down to the end of the previous line.

Returns: int

0 on success, <0 if at then beginning of the file.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

left, up, next_char, traverse_char


prev_doc

_command void prev_doc(_str options="")

Switches to the previous window if One File per Window is on. Otherwise, switches to the previous buffer.

Returns: void

next_doc

Applies To:

Edit Window

Categories:

Buffer Functions, Window Functions


prev_error

_command int prev_error()

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.

Applies To:

Edit Window

Category:

Miscellaneous Functions

See Also:

start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


prev_full_word

_command void prev_full_word()

Moves the cursor to the beginning of the previous full word, regardless of the "Subword Navigation" setting.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

prev_word, prev_subword


prev_hotspot

_command boolean prev_hotspot()

Navigate from the current hotspot to the previous hotspot.

Returns: boolean

true if we jumped to the hotspot, false otherwise

Applies To:

Edit Window, Editor Control

Category:

Bookmark Functions

See Also:

add_hotspot, next_hotspot, clear_hotspots


prev_index

int prev_index(_str new_value="", _str option="D")

Returns: int

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.

Category:

Miscellaneous Functions

See Also:

last_index


prev_level

_command typeless prev_level()

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.

Returns: typeless

Returns 0 if successful. Common return values is TOO_MANY_MARKS_RC. On error, message displayed.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_level, cut_level, cut_prev_level


prev_paragraph

_command typeless prev_paragraph()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


prev_proc

_command int prev_proc(_str quiet="", _str flags="")

Places cursor on previous function heading. If the quiet argument is given and is not "", no error message is displayed.

Returns: int

Returns 0 if successful. Otherwise, a non-zero value is returned.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

prev_tag, next_proc


prev_ref

_command int prev_ref(boolean preview_only=true, boolean quiet=false)

Repositions the cursor on the previous item in the references tool window. If window is not active, it will do a next-ref, followed by a prev-ref to attempt to reposition on the current match.

Parameters:

preview_only - If true, show the reference only in the preview pane of the references tool window.

quiet - If true, do not display message box when there are no more references.

Returns: int

Returns 0 if successful. Otherwise NO_MORE_FILES_RC is returned. On error, message is displayed.

Applies To:

Edit Window,Editor Control

Categories:

Editor Control Methods, Edit Window Methods, Search Functions

See Also:

next_ref, find, replace, gui_replace, gui_find, find_current, find_prev, find_next


prev_sentence

_command void prev_sentence()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_paragraph, prev_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


prev_sexp

_command int prev_sexp()

Moves backward over the S-expression starting at the cursor position.

If the first significant character after the cursor is a closing delimiter, move to the matching opening delimiter. If the character begins a symbol, string, or number, move over that to the previous group of characters. Consider spaces, commas, and semicolons as delimiters. The balanced expression commands move across comments as if they were whitespace.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp


prev_sibling

_command int prev_sibling(_str quiet='')

Navigate to the previous sibling in the current buffer.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


prev_statement

_command int prev_statement(_str quiet='')

Navigate to the previous statement in the current buffer.

This function is part of statement tagging and only works well for languages that support statement-level tagging.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


prev_subword

_command void prev_subword()

Moves the cursor to the beginning of the previous subword, regardless of the "Subword Navigation" setting.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

prev_word, prev_full_word


prev_tag

_command int prev_tag(_str quiet="", _str flags="")

Places cursor on previous tag definition, skipping any tags filtered out by the Defs tool window. If the quiet argument is given an is not "", no error message is displayed.

Returns: int

0 on success, nonzero on error.

Applies To:

Edit Window, Editor Control

Category:

Search Functions


prev_window

_command void prev_window(_str options="")

Switches to previous window. Hidden windows are skipped.

Category:

Window Functions

See Also:

next_window, window_left, window_right, window_above, window_below


prev_word

_command void prev_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_word


print

_command typeless print(...)

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.

Returns: typeless

Returns 0 if successful.

Categories:

Buffer Functions, Selection Functions

See Also:

gui_print


printer_setup

_command void printer_setup()

Runs the operating system Print Setup dialog box.

Category:

Buffer Functions

See Also:

_printer_setup


process_begin_line

_command void process_begin_line()

New binding of HOME key when in process mode. When invoked while the cursor is on the last line of the build window, 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".

Category:

Miscellaneous Functions


process_down

_command void process_down()

New binding of DOWN key when in process mode. When invoked while the cursor is on the last line of the build window, the next command is retrieved from the "process-buffer". Otherwise the fundamental mode key DOWN key binding is executed.

Category:

Miscellaneous Functions


process_enter

_command void process_enter()

New binding of ENTER key when in process mode. When invoked while the cursor is on the last line of the build window, 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".

Category:

Miscellaneous Functions


process_events

void process_events(boolean &cancel, _str options="")

Parameters:

cancel -

options - Set to 'T' to process timer events.

Reads and dispatches all system messages until there are no more messages or the variable cancel_message_loop becomes non- zero.

If options contains "T", timer events will be processed.

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;
}

Category:

Keyboard Functions


process_list

_str process_list(_str search_fun, _str search_string, _str search_options, _str repeat_search_fun, _str action_fun)

process_list is a generic list processing function. The file manager uses this function to delete or select entries from the file list.

Parameters:

search_fun - Name of procedure to perform first search. The call looks like this:

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.

Returns: _str

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');
          }

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


process_make_rc

void process_make_rc(_str error_code, _str module, boolean quiet=false)

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.

Category:

Miscellaneous Functions


process_rubout

_command void process_rubout()

New binding of BACKSPACE key when in process mode. When invoked while the cursor is on the last line of the build window, 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".

Category:

Miscellaneous Functions


process_up

_command void process_up()

New binding of UP key when in process mode. When invoked while the cursor is on the last line of the build window, the previous command is retrieved from the ".process" buffer. Otherwise the fundamental mode UP key binding is executed.

Category:

Miscellaneous Functions


profile

_command void profile(_str option="")

This command is used to control the Slick-C® performance profiler.

To activate the profiler, execute the command "profile on". To stop collecting profiling information, execute the command "profile off". To view collected profiling data, execute the command "profile view". This will also stop profiling data collection. To profile a single Slick-C® command, just pass the command and it's arguments to the profile command. For example "profile list-tags".

The profiler has no effect on performance when it is inactive and only a minimal effect on performance when it is collecting data.

Profiling data can be saved and viewed at a later time by using the "profile save" and "profile load" commands, respectively.

Profiling results are displayed in a multi-column non-modal tree dialog. Each line in the tree represents one function, either a Slick-C® or an exported DLL function, which was called while we were collecting profiling data. All times are reported in milliseconds. The table columns represent the following information:

  • Function -- name of function called
  • Module -- the name of the module function comes from
  • Offset -- P-code offset of function within module
  • Calls -- number of calls to function
  • F+D Time -- total time in function and descendants
  • Percent -- percentage of total time spent in function and descendants
  • Avg F+D -- average time in function and descendants
  • Min F+D -- minimum time in function and descendants
  • Max F+D -- maximum time in function and descendants
  • Func Time -- total time in function only
  • Percent -- percentage of total time spent in function
  • Avg Time -- average time in function
  • Min Time -- minimum time in function
  • Max Time -- maximum time in function

Parameters:

option - [ on | off | view | load [file] | save [file] | <command> ]

Category:

Macro Programming Functions

See Also:

_SlickCProfiling


project_add_file

_command int project_add_file(_str newfilename="", boolean quiet=false, _str ProjectName=_project_name, _str &msg=null)

Adds a file or buffer to the current project.

Parameters:

newfilename - Name of file or buffer to add to the project. If "" is given, the current buffer is added to the project.

newfilename -

quiet - When false, messages are displayed.

ProjectName -

msg - Set to status message on error. Useful when quiet=true.

Returns: int

Returns 0 if successful.

Category:

Project Functions

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, workspace_organize


project_cd

_command void project_cd()

Set current working directory to current project working directory.

Category:

Project Functions


project_compile

_command int project_compile(_str buf_name="")

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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 SlickEdit's build window by default.

Returns: int

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 build window 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.

Categories:

Buffer Functions, Project Functions

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, workspace_organize


project_debug

_command int project_debug()

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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: int

Returns 0 if command queued successfully. On error, message is displayed.

Category:

Project Functions

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, workspace_organize


project_edit

_command void project_edit(_str activetab="")

Allows you to add files to project, change project commands, working directory and other project properties. Displays Project Properties dialog box.

Parameters:

activetab - Index of tab to show on the Project Properties dialog. May also contain the absolute path to the project to open.

Category:

Project Functions

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, workspace_organize


project_execute

_command typeless project_execute(_str cmdname='execute', boolean AccumulateErrors=false, boolean AutoNextError=true, int OverrideFlags=0, _str buf_name="")

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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: typeless

Returns 0 if command queued successfully. On error, message is displayed.

Category:

Project Functions

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, workspace_organize


project_file_match

_str project_file_match(_str name, boolean find_first)

Parameters:

name - file name prefix to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next file name in the current project which is a prefix match of name. Returns '' when no more matches are found.

Categories:

Buffer Functions, Completion Functions

See Also:

f_match, dir_match, wkspace_file_match


Project Functions

_project_command
_project_get_filename
_project_get_section
_ProjectWorkspaceFindFile
_WorkspaceFindAllProjectsWithFile
_WorkspaceFindProjectWithFile
project_add_file
project_cd
project_compile
project_debug
project_edit
project_execute
project_load
project_make
project_rebuild
project_user1
project_user2
project_usertool
toggle_build
toggle_project_tools
toggle_projects
workspace_cd
workspace_close
workspace_dependencies
workspace_insert
workspace_open
workspace_organize
workspace_properties
workspace_set_active


project_load

_command void project_load(_str projectOptions='')

List files in the current project and lets you quickly edit one or more.

Parameters:

projectOptions - Specifies which project files to load files from. By default it lets you select from all files in your workspace. If you give it the "-p" option, it will restrict the list to your current active project. Finally, you can give a specific project file (or list of project files).

Category:

Project Functions

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, workspace_organize


project_make

_command int project_make(_str cmdname='build', boolean AccumulateErrors=false, boolean AutoNextError=true, int OverrideFlags=0, _str buf_name="")

All of the compiling from within the editor commands may be accessed from the Project menu. Be sure to try the Build > Show Build menu item.

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 > Options > File Extension Setup, select the Advanced tab) select the extension and press the Extension Specific 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 SlickEdit's build window. This allows you to continue editing while your compiler runs. You can process the error messages as they appear in the ".process" build window instead of waiting until the compile(s) finish. The stop_process command (Build > Stop Build) may be used to send a control break signal to stop your compiler or program running in the build window.

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) or open the Build tool window (View > Toolbars > Build) 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 sgrep program we provide. For example, activate the build window ("Build > Show Build) and type "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 build window 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 build window buffer so that no error messages will be found.

Returns: int

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 build window 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.

Category:

Project Functions

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, workspace_organize


project_rebuild

_command typeless project_rebuild()

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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 SlickEdit's build window by default.

Returns: typeless

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 build window 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.

Category:

Project Functions

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, workspace_organize


project_user1

_command typeless project_user1()

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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: typeless

Returns 0 if command queued successfully. On error, message is displayed.

Category:

Project Functions

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, workspace_organize


project_user2

_command typeless project_user2()

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", "Options", "File Extension Setup...", select the Advanced tab) select the extension and press the Extension Specific 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: typeless

Returns 0 if command queued successfully. On error, message is displayed.

Category:

Project Functions

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, workspace_organize


project_usertool

_command typeless project_usertool(_str TargetName='user 1', boolean AccumulateErrors=false, boolean AutoNextError=true, int OverrideFlags=0, _str buf_name='')

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: typeless

Returns 0 if command queued successfully. On error, message is displayed.

Category:

Project Functions

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, workspace_organize


prompt

_str prompt(_str arg1='', _str msg='', ...)

immed_return_value
Defaults to ''
msg
Defaults to the name of the last command (_command) called
default_value
Defaults to ''
cursor_placement
Defaults to ''

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.

Category:

Keyboard Functions

See Also:

letter_prompt, get_string


prompt_cd

_command typeless prompt_cd()

Used in EMACS emulation. Displays the current directory and prompts for a directory to change to using the command line.

Category:

File Functions

See Also:

gui_cd


prompt_dir

_command typeless prompt_dir()

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.

Category:

File Functions

See Also:

fileman


prompt_for_key

_str prompt_for_key(_str prompt, var keytab_used, var k, var keyname, _str optionch='', _str noPrompt="", _str maxcount="", _str mustbe_mouse_event="")

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.

Returns: _str

Returns 0 if successful. Otherwise COMMAND_CANCELLED_RC is returned.

Category:

Keyboard Functions


psearch

_str psearch(_str string, _str options)

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.

Returns: _str

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


push_bookmark

_command typeless push_bookmark(_str markid='')

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.

Parameters:

markid - named selection to create bookmark on

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Categories:

Bookmark Functions, Edit Window Methods, Editor Control Methods

See Also:

pop_bookmark, set_bookmark, toggle_bookmark, goto_bookmark, bookmark_stack


push_clipboard_itype

_str push_clipboard_itype(_str mark_name, _str name="", int col=0, boolean utf8=false, _str lexername='')

Starts a new clipboard entry of type mark_kind. mark_kind may be 'LINE', 'BLOCK', or 'CHAR'.

Returns: _str

Returns 0 if successful.

Category:

Clipboard Functions


push_destination

void push_destination(int orig_wid=0, int orig_buf_id=0)

Increment the reference count for a file that was jumped to by a tagging or search operation.

Parameters:

orig_wid - ID of window that was jumped from

orig_buf_id - Buffer ID of file that was jumped from

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

def_autoclose_flags, pop_destination, pop_bookmark


push_ref

_command int push_ref(_str params="")

Push a bookmark then jump to references to the symbol under the cursor.

Returns: int

int

Category:

Tagging Functions


push_tag

_command typeless push_tag(_str proc_name='')

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", "Options", "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.

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.

Parameters:

proc_name - encoded tag name to find. See tag_tree_compose_tag.

Applies To:

Edit Window

Category:

Search Functions

See Also:

make_tags, find_tag, gui_make_tags, find_proc, push_tag, list_tags, bookmark_stack


put

_command typeless put(_str dest_filename="", _str save_flags="")

Writes selection to dest_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...").

Returns: typeless

Returns 0 if successful. Common return codes are TEXT_NOT_SELECTED_RC, and TOO_MANY_SELECTIONS_RC. On error, message is displayed.

Applies To:

Edit Window

Category:

Selection Functions

See Also:

gui_write_selection, get, gui_append_selection, append


q

_command int q(_str args="")

q is a convenient shorthand for the quit command for use from the command line.

Parameters:

args - list of files to close, may contain wildcards

Applies To:

Edit Window

Category:

Buffer Functions


qreplace

int qreplace(_str search_string, _str replace_string, typeless options, typeless search_mark="")

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 SlickEdit 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 SlickEdit 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=SlickEdit-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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.

,
Delimiter 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?" 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.
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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Returns: int

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.

Applies To:

Edit Window

Category:

Search Functions

See Also:

qsearch, find, replace, gui_find, gui_replace, find_next, find_prev


qsearch

_str qsearch(_str options, _str incremental="")

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 SlickEdit regular expression. See section SlickEdit 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=SlickEdit-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", "Options", "File Extension Setup...", select the Advanced tab).

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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.

,
Delimiter 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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Returns: _str

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.

Applies To:

Edit Window

Category:

Search Functions

See Also:

qreplace, find, replace, gui_find, gui_replace


query_replace

_command typeless query_replace()

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", "Options", "File Extension Setup...", select the Advanced tab).
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", "Options", "File Extension Setup...", select the Advanced tab).
Ctrl+C
Toggles case sensitivity.
Ctrl+M
Toggles searching within mark.
F1 or ?
Displays help on replace command.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

reverse_regex_search, replace_string, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


quick_mark_all_occurences

_command void quick_mark_all_occurences()

Find all occurences of the word at the cursor in the current file. Results are listed and highlighted. Comments and Strings are not searched. Used in Eclipse emulation.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

find


quit

int quit(int argc, char **argv)

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.

Returns: int

Returns 0 if successful. Possible return codes are 1 (concurrent process buffer must be exited), and COMMAND_CANCELLED_RC. On error, message is displayed.

Applies To:

Edit Window

Category:

Buffer Functions


quit_error_file

void quit_error_file(...)

Quits SlickEdit's temporary compiler error message output file. This procedure is called before compiler error messages are redirected.

Category:

Buffer Functions


quit_file

int quit_file()

Deletes the current buffer. This function is a hook function and may be replaced.

Applies To:

Edit Window

Category:

File Functions


quit_view

_command void quit_view()

Deletes the current window without prompting. The buffer attatched to the window is not deleted.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Window Functions


quote_key

_command void quote_key()

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.

Category:

Keyboard Functions


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Radio Button Properties

p_active_form
p_alignment
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


range

typeless range(int start_val, int end_val, int step_by=1)

Parameters:

start_val - start value (inclusive)

end_val - end_value (inclusive)

step_by - step amount, if step is default of 1 and the (start_value > end_value), automatically change step to -1;

Returns: typeless

Return a sc.lang.Range object for iterating over the given range of integers by the specified step amount.

Category:

Miscellaneous Functions


rbutton_double_click

event rbutton_double_click()

Occurs when the right mouse button is double clicked.

Category:

All Windows Properties


rbutton_down

event rbutton_down()

Occurs when the right mouse button is pressed. The rbutton_up event occurs when the right button is released.

Category:

All Windows Properties


rbutton_triple_click

event rbutton_triple_click()

Occurs when the right mouse button is triple clicked.

Category:

All Windows Properties


rbutton_up

event rbutton_up()

Occurs when the right button is released.

Category:

All Windows Properties


rc

typeless rc

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.

Category:

All Windows Properties


re_search

_command typeless re_search(_str commandName='')

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

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.


re_toggle

_command void re_toggle()

Toggles regular expression searching on/off. Effects command line style BRIEF emulation search commands. Used in BRIEF emulation.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

See Also:

case_toggle


read_ahead

int read_ahead()

Reads the number of lines specified in the variable "def_read_ahead_line" after the cursor when the disk is read.

Applies To:

Edit Window

Category:

Miscellaneous Functions


read_behind

int read_behind()

Reads the number of lines specified in the variable "def_read_ahead_line" before the cursor when the disk is read.

Applies To:

Edit Window

Category:

Miscellaneous Functions


read_format_line

_str read_format_line()

Returns: _str

Returns non-zero value and sets tab and word wrap options if format line is present. See section Format Line for more information.

Applies To:

Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

update_format_line


read_list

_command typeless read_list(_str filename='', _str arg2='', _str options='')

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.

Returns: typeless

Returns 0 if successful. Common return codes are FILE_NOT_FOUND_RC, and PATH_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window

Category:

File Functions


read_only_mode

_command void read_only_mode()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

fundamental_mode, c_mode, pascal_mode, slickc_mode, fileman_mode, read_only_mode_toggle


read_only_mode_toggle

_command void read_only_mode_toggle()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

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()

Ends macro recording if currently recording and executes the last recorded macro.

Displays message if a macro was defined.

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, record_macro_toggle, save_macro, gui_save_macro, record_macro_end_execute_key, execute_last_macro, execute_last_macro_key


record_macro_end_execute_key

_command void record_macro_end_execute_key()

Ends macro recording if currently recording and executes the last recorded macro for this key. This macro may be bound to an array of keys, such as Ctrl+0 through Ctrl+9, in order to have unique last recorded macros for each key.

Displays message if a macro was defined.

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, record_macro_toggle, save_macro, gui_save_macro, record_macro_end_execute, execute_last_macro, execute_last_macro_key


record_macro_toggle

_command void record_macro_toggle()

Starts or ends definition of a keyboard macro.

Displays a message that a keyboard macro is being recorded or terminated.

Category:

Macro Programming Functions

See Also:

start_recording, end_recording, save_macro, gui_save_macro, record_macro_end_execute, record_macro_end_execute_key, execute_last_macro, execute_last_macro_key


recycle_file

int recycle_file(_str filePath)

Uses a platform-specific method to send a file to the Trash or Recycle Bin.

If def_delete_uses_trash is FALSE (0), or a trash command is not available on the current platform, then delete_file is used.

Parameters:

filePath - Full path to file to be deleted

Returns: int

Returns 0 if successful. Error codes similar to those returned by delete_file.

Category:

File Functions

See Also:

delete_file


redo

_command typeless redo()

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.

Returns: typeless

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.

Category:

Miscellaneous Functions

See Also:

undo, undo_steps, undo_cursor


refactor_add_file

int refactor_add_file(int handle, _str filename, _str userIncludePath, _str systemIncludePath, _str defineOptions, _str compilerConfig)

Add a file to the refactoring transaction.

Parameters:

handle - Handle to transaction

filename - Filename to add

userIncludePath - User include path for this file

systemIncludePath - System include path for this file

defineOptions - #defines and #undefs for this file

compilerConfig - Compiler configuration name

Returns: int

0 on succes, <0 on error

Category:

Refactoring Functions


refactor_begin_transaction

int refactor_begin_transaction()

Begin a refactoring transaction.

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_commit_transaction, refactor_cancel_transaction


refactor_c_add_class_info

int VSAPI refactor_c_add_class_info(int handle, VSPSZ className, VSPSZ filename, int beginSeekPos, int endSeekPos)

Add class browse info to transaction

Parameters:

handle - Handle to transaction

className - Class name

filename - Filename to find symbol in

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_encapsulate

int refactor_c_encapsulate(int handle, _str filename, _str symbolName, _str getterName, _str setterName, _str methodName, int beginSeekPos, int endSeekPos, int formattingFlags, int syntaxIndent)

Encapsulate a field. Make a field private and make public getter and setter functions.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to encapsulate

getterName - Name of getter function to create

setterName - Name of setter function to create #param methodName Name of method declaration to insert getter and setter after

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

formattingFlags - formatting flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_extract_method

int refactor_c_extract_method(int handle, _str filename, _str symbolName, int &createCall, int beginSeekPos, int endSeekPos, _str &returnType, _str ¶mInfo, int flags, int syntaxIndent)

Analyze what is necessary to do in order to extract the code between 'beginSeekPos' and 'endSeekPos' into a separate function and replace the code with a call to the mew function.

Each line of parameter inforomation is a string of the form:

   name [tab] return_type [tab] reference [tab] required [newline]

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to extract method from

createCall - [reference] Set to 1/0, if function call can be created

beginSeekPos - Seek position to begin extraction at

endSeekPos - Seek position to end extraction at

returnType - [reference] Set to return type of extracted function

paramInfo - [reference] Set to list of parameters for new function

flags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_extract_method_finish

int refactor_c_extract_method_finish(int handle, _str filename, _str newName, int createMethodCall, _str paramInfo, _str commentInfo, int flags, int syntaxIndent)

Finish the extract method operation

Parameters:

handle - Handle to transaction

filename - Filename to do refactoring within

newName - Name for new function

createMethodCall - should the refactoring replace the selected code with a method call?

paramInfo - List of parameters for new function

commentInfo - Comments to insert for the new function

flags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_find_class_methods

int refactor_c_find_class_methods(int handle, _str filename, _str symbolName, int beginSeekPos, int endSeekPos)

Find methods that are members of this symbol's class The methods are stored internally and can be retrieved using refactor_c_get_num_class_methods() and refactor_c_get_class_method()

Parameters:

handle - Handle to transaction

filename - Filename to do refactoring within

symbolName - Name of reference to class

beginSeekPos - Begin Seek position of reference

endSeekPos - End Seek position of reference

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_get_class_method

int refactor_c_get_class_method(int handle, int index, _str &methodName)

Return signature of class i found by call to refactor_c_find_class_methods

Parameters:

handle - Handle to transaction

index - Index into internal list of class methods found by refactor_c_find_class_methods

methodName - Signature of name of method

Returns: int

number of class methods, <0 on error

Category:

Refactoring Functions


refactor_c_get_num_class_methods

int refactor_c_get_num_class_methods(int handle)

Return number of class methods found by call to refactor_c_find_class_methods

Parameters:

handle - Handle to transaction

Returns: int

number of class methods, <0 on error

Category:

Refactoring Functions


refactor_c_get_super_classes

int VSAPI refactor_c_get_super_classes(int handle, VSPSZ className, VSPSZ filename, int beginSeekPos, int endSeekPos, VSHREFVAR superClasses)

Get a list of the super classes that are associated with a given symbol's class

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class

beginSeekPos - Seek position of beginning of class reference

endSeekPos - Seek position of end of class reference

superClasses - String containing all super classes deliminated with @ and starts with number of classes. superClasses is in the form: number of classes [@] super_class_name [@] parent_class_name [@] super_class_name [@] parent_class_name [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_global_to_field

int refactor_c_global_to_field(int handle, _str filename, _str symbolName, int beginSeekPos, int endSeekPos, _str classFileName, _str className, _str fieldName, int flags)

Convert global variable to a static field

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of gvar to convert to static field

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

fieldName - New name for field

flags - Flags for access modifiers

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_local_to_field

int refactor_c_local_to_field(int handle, _str filename, _str symbolName, int beginSeekPos, int endSeekPos, _str fieldName, int flags)

Convert local variable to a field

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of lvar to convert to field

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

fieldName - New name for field

flags - Flags for access modifiers and make field static

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_modify_params

int VSAPI refactor_c_modify_params(int handle, VSPSZ symbolName, VSPSZ filename, int beginSeekPos, int endSeekPos, VSPSZ oldParamInfo, VSPSZ newParamInfo)

Get the parameter info for a function

Parameters:

handle - Handle to transaction

symbolName - Name of function

filename - Name of file containing function

beginSeekPos - Seek position of beginning of function reference

endSeekPos - Seek position of end of function reference

oldParamInfo - Original parameters

newParamInfo - What the user wants to change the parameters too. paramInfo is in the form: number of parameters [@] return_type of function [$] original parameter position( 0..numParameters-1) [@] parameter type string [@] parameter name string [@] default value [@] 'has_refs' or 'no_refs' [@] 'old' or 'new' (whether the parameter originally existed or was added through modify_params [$] next parameter's values ( see above )

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_modify_params_get_info

int VSAPI refactor_c_modify_params_get_info(int handle, VSPSZ symbolName, VSPSZ filename, int beginSeekPos, int endSeekPos, VSHREFVAR paramInfo)

Get the parameter info for a function

Parameters:

handle - Handle to transaction

symbolName - Name of function

filename - Name of file containing function

beginSeekPos - Seek position of beginning of function reference

endSeekPos - Seek position of end of function reference

paramInfo - String containing information about parameters paramInfo is in the form: number of parameters [@] return_type of function [$] original parameter position( 0..numParameters-1) [@] parameter type string [@] parameter name string [@] default value [@] 'has_refs' or 'no_refs' [@] 'old' or 'new' (whether the parameter originally existed or was added through modify_params [$] next parameter's values ( see above )

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_move_field

int refactor_c_move_field(int handle, _str filename, _str symbolName, _str className, _str classFileName, _str classDefFileName, int beginSeekPos, int endSeekPos)

Move a field. Move a static field from one class to another and fix all references.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to move

className - Name of class to move symbol to.

classFileName - Name of file that class declaration is in.

classDefFileName - Name of file that class definition is in.

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_move_method

int refactor_c_move_method(int nHandle, _str szSrcMethodName, _str szSrcClassName, _str szDstMethodName, _str szDstClassName, int nSrcIdx, int nDstIdx, _str tag_files[], int nReceiver, int nFlags)

Move a method. Move a method from one class to another and fix all references.

Parameters:

nHandle - Handle to transaction

szSrcMethodName - Name of method to move

szSrcClassName - Name of class to move method from.

szDstMethodName - Name of destination method

szDstClassName - Name of class to move method to.

nFlags - Flags for access modifiers

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_pull_up

int VSAPI refactor_c_pull_up(int handle, VSPSZ filename, VSPSZ className, int beginSeekPos, int endSeekPos, VSPSZ superClass, VSPSZ membersToMove, VSHREFVAR memberWorkingOn, VSPSZ superClassDefFilename)

Pull Up class member(s) to a super class

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class

beginSeekPos - Seek position of beginning of class reference

endSeekPos - Seek position of end of class reference

superClass - Name of superclass to move symbol to

membersToMove - Members of class to move to superclass

memberWorkingOn - (out)This is used for errors. This is the member being worked when error occurs

superClassDefFilename - File to move function definiitions into. membersToMove is in the form: number of members [@] member [@] member [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_pull_up_find_members

int VSAPI refactor_c_pull_up_find_members(int handle, VSPSZ filename, VSPSZ className, int beginSeekPos, int endSeekPos, VSPSZ destClassName, VSHREFVAR members, VSPSZ dependencyFiles)

Find the members of the given class and check for dependencies.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

beginSeekPos - Seek position of beginning of class reference.

endSeekPos - Seek position of end of class reference.

destClassName - Name of class to move members to.

members - (out)String containing members of class along with dependency information.

dependencyFiles - Files that contain function body definitions.

Returns: int

0 on success, <0 on error members is in the form: number of members [@] memberIndex [@] memberDescription [@] memberType [@] number of dependents [@] dependent index [@] isADependency(true or false) [@] dependentDescription [@] ... ... dependent index will be -1 if it is a global dependency that cannot be moved.

Category:

Refactoring Functions


refactor_c_push_down

int VSAPI refactor_c_push_down(int handle, VSPSZ filename, VSPSZ className, int beginSeekPos, int endSeekPos, VSPSZ derivedClass, VSPSZ membersToMove, VSHREFVAR memberWorkingOn, VSPSZ classDefInfoList, VSPSZ origClassDefFiles)

Push down class member(s) to a derived class

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class

beginSeekPos - Seek position of beginning of class reference

endSeekPos - Seek position of end of class reference

derivedClass - Name of derived class to move symbol to

membersToMove - Members of class to move to derived class

memberWorkingOn - (out)This is used for errors. This is the member being worked when error occurs

classDefInfoList - Classes and Files to move members to. Format: NumOfClasses @ className0 @ classFile0 @ classNameN @ classFileN @

origClassDefFiles - Files that contain the original class's function definitions and static initializers Format: NumOfFiles @ defFile0 @ defFileN @ membersToMove is in the form: number of members [@] member [@] member [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_push_down_find_class_in_file

int VSAPI refactor_c_push_down_find_class_in_file(int handle, VSPSZ className, VSPSZ filename, VSHREFVAR found)

Find a symbol with className in the compilation unit created by filename.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

found - (out)boolean indicating whether a symbol of className was found in the compilation unit created using filename.

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_push_down_find_members

int VSAPI refactor_c_push_down_find_members(int handle, VSPSZ filename, VSPSZ className, int beginSeekPos, int endSeekPos, VSPSZ destClassName, VSHREFVAR members, VSPSZ dependencyFiles)

Find the members of the given class and check for dependencies.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

beginSeekPos - Seek position of beginning of class reference.

endSeekPos - Seek position of end of class reference.

destClassName - Name of class to move members to.

members - (out)String containing members of class along with dependency information.

dependencyFiles - Files that contain function body definitions.

Returns: int

0 on success, <0 on error members is in the form: number of members [@] memberIndex [@] memberDescription [@] memberType [@] number of dependents [@] dependent index [@] isADependency(true or false) [@] dependentDescription [@] ... ... dependent index will be -1 if it is a global dependency that cannot be moved.

Category:

Refactoring Functions


refactor_c_rename

int refactor_c_rename(int handle, _str filename, _str symbolName, int beginSeekPos, int endSeekPos, _str newName, int flags)

Rename a symbol

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to rename

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

newName - New name for symbol

flags - Optional flags, bitset of VSREFACTOR_RENAME_* (above)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_replace_literal

int refactor_c_replace_literal(int handle, _str filename, _str literalName, _str constantName, int flags)

Replace a literal with a constant

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

literalName - Name of literal to convert to a constant

constantName - Name of constant

flags - Optional flags

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_standard_methods

int refactor_c_standard_methods(int handle, _str filename, _str symbolName, int startSeekPos, int endSeekPos, _str &className, int &existingClassMethods)

Analyzes a symbol to determine it's class and determine which of the standard methods are already implemented for that class.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name selected symbol

seekPos - Start seek position of symbol

seekPos - End seek position of symbol

className - Returns the name of the class that symbolName refers to

existingClassMethods - Returns flags indicating which methods are already implemented in the class. Uses bitset of VSREFACTOR_METHOD_* (above)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_standard_methods_finish

int refactor_c_standard_methods_finish(int handle, _str filename, _str symbolName, int startSeekPos, int endSeekPos, int methodsToCreate, int formattingFlags, int syntaxIndent)

Finish the create standard methods

Parameters:

handle - Handle to transaction

filename - Filename to do refactoring within

symbolName - Name of reference to class to add standard methods to

seekPosition - Start seek position of reference

seekPosition - End seek position of reference

methodsToCreate - Which methods to create, bitset of VSREFACTOR_METHOD_* (above)

formattingFlags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_c_static_to_instance_method

int refactor_c_static_to_instance_method(int nHandle, _str szMethodName, _str szClassName, _str szFileName, int nSeekPosition, int nFlags)

Replace a static method with an instance method.

Parameters:

nHandle - Handle to transaction

szMethodName - Name of static method to be converted to an instance method.

szClassName - Name of class the method is a member of.

szFilename - Filename to find the method in

nSeekPosition - Seek position of the method or position to start search

nFlags - Flags for access modifiers

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_cancel_transaction

int refactor_cancel_transaction(int handle)

Cancel a refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_begin_transaction, refactor_commit_transaction


refactor_commit_transaction

int refactor_commit_transaction(int handle)

End a refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_begin_transaction, refactor_cancel_transaction


refactor_config_add

int refactor_config_add(_str configName, _str configHeader, _str includePath)

Add a new C++ compiler configuration to the master refactoring configuration file.

Parameters:

configName - name for this configuration

configHeader - header file to configure the compiler

includePath - PATHSEP deliminated include file path

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_count, refactor_config_delete, refactor_config_delete_all, refactor_config_get_name, refactor_config_set_name, refactor_config_get_header, refactor_config_set_header, refactor_config_count_includes, refactor_config_get_include, refactor_config_add_include, refactor_config_delete_include, refactor_config_delete_all_includes


refactor_config_add_include

int refactor_config_add_include(_str configName, _str includePath, int includeIndex=-1)

Add a path to the include path

Parameters:

configName - name of configuration to modify

includePath - include path to add

includeIndex - where to insert path, -1 to insert at end of list

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count_includes, refactor_config_delete_include, refactor_config_delete_all_includes


refactor_config_add_jar

int refactor_config_add_jar(_str configName, _str jarPath, int jarIndex=-1)

Add a JAR to the system JAR list for the configuration

Parameters:

configName - name of configuration to modify

jarPath - path to JAR to add

jarIndex - where to insert JAR in list, -1 to insert at end

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_java, refactor_config_count_jars, refactor_config_delete_jar, refactor_config_delete_all_jars


refactor_config_add_java

int refactor_config_add_java(_str configName, _str sourcePath, _str jarPath)

Add a new Java compiler configuration to the master refactoring configuration file.

Parameters:

configName - name for this configuration

sourcePath - path to root of the JDK

jarPath - PATHSEP deliminated system JAR list

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_count, refactor_config_delete, refactor_config_delete_all, refactor_config_get_name, refactor_config_set_name, refactor_config_get_jar, refactor_config_count_jars, refactor_config_add_jar, refactor_config_delete_jar, refactor_config_delete_all_jars


refactor_config_close

int refactor_config_close()

Close the master refactoring [compiler] configuration file. If there are modifications, they will be discarded, unless you call refactor_config_save first.

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_open


refactor_config_count

int refactor_config_count()

Return the number of compiler configurations stored in the master refactoring configuration file.

Returns: int

number of configurations, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_delete, refactor_config_delete_all


refactor_config_count_includes

int refactor_config_count_includes(_str configName)

Return the number of include paths associated with the given configuration.

Parameters:

configName - name of configuration to query

Returns: int

number of include paths on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add


refactor_config_count_jars

int refactor_config_count_jars(_str configName)

Return the number of system JARs associated with the given configuration.

Parameters:

configName - name of configuration to query

Returns: int

number of JARs on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_java


refactor_config_delete

int refactor_config_delete(_str configName)

Delete the named configuration

Parameters:

configName -

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_count, refactor_config_delete_all, refactor_config_add


refactor_config_delete_all

int refactor_config_delete_all()

Delete all configurations

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_delete


refactor_config_delete_all_includes

int refactor_config_delete_all_includes(_str configName)

Delete all include paths from the given configuration.

Parameters:

configName - name of configuration to modify

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count_includes, refactor_config_add_include, refactor_config_delete_include


refactor_config_delete_all_jars

int refactor_config_delete_all_jars(_str configName)

Delete all system JARS from the given configuration.

Parameters:

configName - name of configuration to modify

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_java, refactor_config_count_jars, refactor_config_add_jar, refactor_config_delete_jar


refactor_config_delete_all_type

int refactor_config_delete_all_type(_str type)

Delete all configurations of type

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_delete


refactor_config_delete_include

int refactor_config_delete_include(_str configName, _str includePath)

Delete an include path from the given configuration.

Parameters:

configName - name of configuration to modify

includePath - include path to remove

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count_includes, refactor_config_add_include, refactor_config_delete_all_includes


refactor_config_delete_jar

int refactor_config_delete_jar(_str configName, _str jarPath)

Delete a JAR from the given configuration.

Parameters:

configName - name of configuration to modify

jarPath - path to JAR to remove

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_jar, refactor_config_count_jars, refactor_config_add_jar, refactor_config_delete_all_jars


refactor_config_get_header

int refactor_config_get_header(_str configName, _str &configHeader)

Retrieve the full path to the configuration header for the given configuration.

Parameters:

configName - name of configuration to query

configHeader - [reference] set to full path to configuration header

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count, refactor_config_set_header


refactor_config_get_include

int refactor_config_get_include(_str configName, int includeIndex, _str &includePath)

Get the full path to the specified include path

Parameters:

configName - name of configuration to query

includeIndex - index within include path to query

includePath - set to include path

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_add_include, refactor_config_delete_include, refactor_config_delete_all_includes


refactor_config_get_jar

int refactor_config_get_jar(_str configName, int jarIndex, _str &jarPath)

Get the full path to the specified system JAR

Parameters:

configName - name of configuration to query

jarIndex - index within system JAR list to query

jarPath - set to JAR path

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_java, refactor_config_add_jar, refactor_config_delete_jar, refactor_config_delete_all_jars


refactor_config_get_java_source

int refactor_config_get_java_source(_str name, _str &src)

Retrieve the root directory of the given Java configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

src - [reference] set to root directory of Java configuration

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add_java, refactor_config_count


refactor_config_get_name

int refactor_config_get_name(int configIndex, _str &configName)

Retrieve the name of the given configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configName - [reference] set to name of configuration

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count, refactor_config_set_name


refactor_config_get_type

int refactor_config_get_type(int configIndex, _str &configType)

Retrieve the type of the given configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configType - [reference] set to type of configuration

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_add_java, refactor_config_count


refactor_config_is_open

int refactor_config_is_open(_str xmlConfigFile)

See if the config file exists and is open

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_save, refactor_config_close


refactor_config_open

int refactor_config_open(_str xmlConfigFile)

Open the master refactoring [compiler] configuration file, either for reading or editing. The configuration file is an XML file conforming to vsrefactor.dtd.

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_save, refactor_config_close


refactor_config_save

int refactor_config_save(_str xmlConfigFile=null)

Save the master refactoring [compiler] configuration file. An alternate configuration file path may be specified.

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_open, refactor_config_close


refactor_config_set_header

int refactor_config_set_header(_str configName, _str configHeader)

Save the full path to the configuration header for the given configuration.

Parameters:

configName - name of configuration to query

configHeader - new path to configuration header

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count, refactor_config_get_header


refactor_config_set_name

int refactor_config_set_name(int configIndex, _str configName)

Rename the given configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configName - new name of configuration

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

refactor_config_add, refactor_config_count, refactor_config_get_name


refactor_encapsulate

_command int refactor_encapsulate()

Encapsulate a class field that is under the cursor. This will create getter and setter functions for the field, move the field to be private, and change all references to the field to use the getter and setter functions.

Category:

Refactoring Functions


refactor_extract_class

_command int refactor_extract_class()

Extract a set of methods and fields, etc into a new class.

Category:

Refactoring Functions


refactor_extract_method

_command typeless refactor_extract_method()

Extract a complete method from a fragment of code. Grabs the current selection.

Category:

Refactoring Functions


refactor_extract_super_class

_command int refactor_extract_super_class()

Extract a set of methods and fields, etc into a new superclass.

Create standard methods for a class under the cursor or a class that the cursor is inside. The standards methods include a constructor, copy constructor, destructor, and assignment operator.

Category:

Refactoring Functions


refactor_global_to_field

_command int refactor_global_to_field()

Convert a global variable to a static class field.

Category:

Refactoring Functions


refactor_instance_to_static

_command int refactor_instance_to_static()

Convert an instance variable to a static variable.

Category:

Refactoring Functions


refactor_local_to_field

_command int refactor_local_to_field()

Convert a local variable to a class field.

Category:

Refactoring Functions


refactor_modify_params

_command int refactor_modify_params()

Modify the parameter list of a function and update all references.

Category:

Refactoring Functions


refactor_move_field

_command int refactor_move_field()

Move the designated field to a different location.

Category:

Refactoring Functions


refactor_move_method

_command int refactor_move_method()

Move the designated method to a different location.

Category:

Refactoring Functions


refactor_options

_command int refactor_options()

Brings up the refactoring options dialog

Category:

Refactoring Functions


refactor_pull_up

_command int refactor_pull_up()

Pull the designated symbol up to a super class. Also allows pulling up of dependent members.

Category:

Refactoring Functions


refactor_push_down

_command int refactor_push_down()

Push the designated symbol down from the parent class into this class.

Category:

Refactoring Functions


refactor_quick_extract_method

_command int refactor_quick_extract_method(_str precise='')

Extract method.

Category:

Refactoring Functions


refactor_quick_rename

_command int refactor_quick_rename(_str precise='')

Rename a symbol and adjust all references.

Category:

Refactoring Functions


refactor_remove_file

int refactor_remove_file(int handle, _str filename)

Add a file to the refactoring transaction.

Parameters:

handle - Handle to transaction

filename - Filename to add

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


refactor_rename

_command int refactor_rename()

Rename a symbol and adjust all references.

Category:

Refactoring Functions


refactor_replace_literal

_command int refactor_replace_literal()

Replace a literal (string or number) constant with a constant.

Category:

Refactoring Functions


refactor_standard_methods

_command int refactor_standard_methods()

Create standard methods for a class under the cursor or a class that the cursor is inside. The standards methods include a constructor, copy constructor, destructor, and assignment operator.

Category:

Refactoring Functions


refactor_static_to_instance_method

_command int refactor_static_to_instance_method()

Convert a static method to an instance method.

Category:

Refactoring Functions


refactor_temp_to_query

_command int refactor_temp_to_query()

Replace a constant temporary variable with an expression.

Category:

Refactoring Functions


Refactoring Functions

refactor_add_file
refactor_begin_transaction
refactor_c_add_class_info
refactor_c_encapsulate
refactor_c_extract_method
refactor_c_extract_method_finish
refactor_c_find_class_methods
refactor_c_get_class_method
refactor_c_get_num_class_methods
refactor_c_get_super_classes
refactor_c_global_to_field
refactor_c_local_to_field
refactor_c_modify_params
refactor_c_modify_params_get_info
refactor_c_move_field
refactor_c_move_method
refactor_c_pull_up
refactor_c_pull_up_find_members
refactor_c_push_down
refactor_c_push_down_find_class_in_file
refactor_c_push_down_find_members
refactor_c_rename
refactor_c_replace_literal
refactor_c_standard_methods
refactor_c_standard_methods_finish
refactor_c_static_to_instance_method
refactor_cancel_transaction
refactor_commit_transaction
refactor_config_add
refactor_config_add_include
refactor_config_add_jar
refactor_config_add_java
refactor_config_close
refactor_config_count
refactor_config_count_includes
refactor_config_count_jars
refactor_config_delete
refactor_config_delete_all
refactor_config_delete_all_includes
refactor_config_delete_all_jars
refactor_config_delete_all_type
refactor_config_delete_include
refactor_config_delete_jar
refactor_config_get_header
refactor_config_get_include
refactor_config_get_jar
refactor_config_get_java_source
refactor_config_get_name
refactor_config_get_type
refactor_config_is_open
refactor_config_open
refactor_config_save
refactor_config_set_header
refactor_config_set_name
refactor_encapsulate
refactor_extract_class
refactor_extract_method
refactor_extract_super_class
refactor_global_to_field
refactor_instance_to_static
refactor_local_to_field
refactor_modify_params
refactor_move_field
refactor_move_method
refactor_options
refactor_pull_up
refactor_push_down
refactor_quick_extract_method
refactor_quick_rename
refactor_remove_file
refactor_rename
refactor_replace_literal
refactor_standard_methods
refactor_static_to_instance_method
refactor_temp_to_query
vsrefactor_copyright
vsrefactor_finalize
vsrefactor_initialize
vsrefactor_version


refer_ext

_str refer_ext(_str ext, _str file_name='', boolean currentObjectIsBuffer=false, boolean setAutoSelectLanguage=false)

Deprecated. Use _Filename2LangId()

Parameters:

ext - source file name extension

file_name - source file name with path

currentObjectIsBuffer - pass 'true' if if the current object is an editor control containing the file in question

setAutoSelectLanguage - if 'true' set p_AutoSelectLanguage

Returns: _str

Returns the language mode associated with the given file name extension. The Language Options dialog box allows you to map an extension that to a language mode. This function performs that translation, and will also use the [optional] buffer name to determine the language mode.

Category:

Miscellaneous Functions


reflow_paragraph

_command void reflow_paragraph()

Reflows the text of the current paragraph according to the margin settings. Paragraphs are assumed to be separated by at least one blank line. However, paragraphs in a Javadoc comment do not need to be terminated by a 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".

Returns: void

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

margins, gui_margins, reflow_selection, gui_justify, justify


reflow_region

_command typeless reflow_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

margins, reflow_paragraph


reflow_selection

_command typeless reflow_selection(typeless new_right_margin="")

Reflows the text within the selection according to the margin settings. Character selection is not supported.

Returns: typeless

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

margins, gui_margins, reflow_paragraph, gui_justify, justify


refresh

void refresh(_str option="A")

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.

Parameters:

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.

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


regex_replace

_command typeless regex_replace()

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", "Options", "File Extension Setup...", select the Advanced tab).
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", "Options", "File Extension Setup...", select the Advanced tab).
Ctrl+C
Toggles case sensitivity.
Ctrl+M
Toggles searching within mark.
F1 or ?
Displays help on replace command.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

See Also:

reverse_regex_search, regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


regex_search

_command typeless regex_search()

Used in EMACS emulation.

Returns: typeless

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", "Options", "File Extension Setup...", select the Advanced tab).
Ctrl+C
Toggles case sensitivity.
Ctrl+M
Toggles searching within mark.
Ctrl+Q
Quotes the next character typed.
Ctrl+O
Toggles incremental search mode.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

See Also:

reverse_regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


reindent_line

_str reindent_line(_str s, int syntax_indent)

Returns: _str

Returns line with leading spaces and/or tabs reformatted to adhere precisely to the users indent_with_tabs style (See indent_with_tabs command).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


relative

_str relative(_str filename, _str toDir=null, boolean addDotDots=true)

Returns: _str

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'

Category:

File Functions

See Also:

absolute


remove_duplicates

_command void remove_duplicates(_str ignore_case='')

Removes duplicate adjacent lines from the current buffer. Usually the buffer is sorted before calling this function.

If there is a selection active, this function will only remove duplicates within the selected lines.

Parameters:

ignore_case - 'i' for case sensitive

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


remove_highlight

_command void remove_highlight()

Delete (all) highlights under cursor if exists.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


remove_highlight_in_selection

_command void remove_highlight_in_selection(_str markid='')

Delete (all) overlapping highlights in selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


remove_trailing_spaces

_command void remove_trailing_spaces()

Remove trailing whitespace characters from end of lines.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


renumber

_command void renumber()

control line number mode, and immediately renumber lines

Categories:

Edit Window Functions, Editor Control Functions, Search Functions


repeat_key

_command void repeat_key(_str command_string='')

Repeat a key event the number of times specified.

To use, after calling this command, type the number of times you want to repeat a key, followed by the key itself. For instance, the following key sequence (without the dashes):

repeat_key - 68 - *
inserts 68 instances of '*' to the current cursor location as if the character was manually typed 68 times.

The key to be repeated is not limited to a single character, but can be a command bound to a key stroke (such as Ctrl+V).

This command can also be called from the command line, in which case it can take arguments in the following format:

repeat_key -[repeat num] [command name] [command arguments]

Category:

Keyboard Functions


repeat_search

int repeat_search(_str options, int start_col=0)

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).

Parameters:

options - 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 "SlickEdit 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.
'&'
Interpret string as a wildcard expression. See section Wildcard 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-regular-expression
Specifies a word search and sets the default word characters to those matched by the SlickEdit- 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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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.

start_col - 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.

Returns: int

Returns 0 if successful. Possible return codes are INVALID_OPTION_RC and STRING_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

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();
}

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

search, _select_match, match_length, search_replace, save_search, restore_search, _search_case


replace

_command int replace(_str string1='', _str string2=null, _str options=null)

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.

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", "Options", "File Extension Setup...", select the Advanced tab).

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.

$
Replaced occurrences are highlighted with modified color.

<
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 SlickEdit regular expression. In addition, the characters \ and # take on new meaning in the replace string. See SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).

W=SlickEdit-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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.

,
Delimiter 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?" 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.

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", "Options", "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.

Returns: int

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.

Example:

c/string1/string2[/options] or replace /string1/string2[/options]

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

i_search, reverse_i_search, gui_replace, gui_find, find


replace_line

void replace_line(_str line)

Sets the current line of the current buffer to line.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

get_line, insert_line, _delete_line


replace_line_raw

void replace_line_raw(_str line)

This function is identical to the replace_line function, except that the input string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS Macro Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


replace_name

int replace_name(int index, _str name, _str info="", int copy_index=0)

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.

Returns: int

If successful, the index of the name table entry is returned. Otherwise a negative error code is returned.

Category:

Names Table Functions

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_search_expression

_command void replace_search_expression(_str name='', boolean go=false)

Replace text in buffer using search string, replace string, and search options stored from an entry in the saved search expressions list.

Parameters:

name - Saved search expression name. If no name is passed in, a selection list is displayed to pick from the list of saved expressions.

go - Replace all without prompt.

Applies To:

Edit Window, Editor Control @categories Search_Functions

See Also:

find


replace_string

_command typeless replace_string()

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", "Options", "File Extension Setup...", select the Advanced tab).
Ctrl+C
Toggles case sensitivity.
Ctrl+M
Toggles searching within mark.
Ctrl+Q
Quotes the next character typed.
Ctrl+O
Toggles incremental search mode.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

See Also:

reverse_regex_search, regex_replace, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


reset_clipboards

_command void reset_clipboards()

Reset all internal clipboard data.

Category:

Clipboard Functions


reset_next_error

_command void reset_next_error(_str unused1='', _str unused2='', _str displayMessages='')

Sets the next_error command's start search position to the end of the build window (".process").

Category:

Miscellaneous Functions

See Also:

set_next_error


restore

_command typeless restore(_str options="", int alternate_view_id=0, _str relativeToDir=null, boolean restoreFiles=true, boolean restoringFromProject=false)

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", "Options", "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 SlickEdit to look for this file.

Category:

Miscellaneous Functions

See Also:

auto_restore, save_window_config


restore_all

_command void restore_all()

Set all editor windows to normal.

Applies To:

Edit Window

Category:

Window Functions


restore_mdi

_command void restore_mdi()

Restores the MDI window to its size before being iconized.

Category:

Window Functions


restore_path

_str restore_path(typeless mustExist="")

Returns: _str

Returns the directory used to store auto restore files (see auto_restore command).

Category:

File Functions


restore_pos

void restore_pos(typeless p)

Restores buffer position saved by save_pos procedure.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

_restore_pos2, save_pos, _save_pos2


restore_search

void restore_search(_str search_string, int flags, _str word_re, _str ReservedMore=null, int flags2=0)

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_BINARY
  • VSSEARCHFLAG_BRIEFRE
  • VSSEARCHFLAG_PRESERVE_CASE
  • VSSEARCHFLAG_WORDPREFIX
  • VSSEARCHFLAG_WORDSUFFIX
  • VSSEARCHFLAG_WORDSTRICT
  • VSSEARCHFLAG_HIDDEN_TEXT_ONLY
  • VSSEARCHFLAG_NOSAVE_TEXT
  • VSSEARCHFLAG_NOSAVE_TEXT_ONLY
  • VSSEARCHFLAG_PROMPT_WRAP

Parameters:

flags2 - currently contains flags for color coding. Constants are not yet defined for this.

Category:

Search Functions

See Also:

repeat_search, _select_match, match_length, search_replace, save_search, search, _search_case


restore_selection

void restore_selection(typeless mark)

Restores the active mark (mark showing) to mark. mark is freed.

Category:

Selection Functions

See Also:

save_selection


restore_window

_command void restore_window()

Restores an MDI child window.

Applies To:

Edit Window

Category:

Window Functions


resume

void resume(void)

Continues the last suspended search and replace.

Category:

Search Functions


resync

_command typeless resync()

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.

Applies To:

Edit Window

Category:

Buffer Functions

See Also:

compare, compare_options


Retrieve Functions

_append_retrieve
_reset_retrieve
_retrieve_list
_retrieve_next
_retrieve_next_form
_retrieve_prev
_retrieve_value
append_retrieve_command
insert_retrieve
pretrieve_next
pretrieve_prev
retrieve_next
retrieve_prev


retrieve_next

_command void retrieve_next()

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.

Category:

Retrieve Functions

See Also:

retrieve_prev


retrieve_prev

_command void retrieve_prev()

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.

Category:

Retrieve Functions

See Also:

retrieve_next


reverse_i_search

_command void reverse_i_search()

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", "Options", "File Extension Setup...", select the Advanced tab).

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.

Applies To:

Edit Window

Category:

Search Functions

See Also:

i_search, gui_find, find, replace, gui_replace


reverse_regex_search

_command typeless reverse_regex_search()

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", "Options", "File Extension Setup...", select the Advanced tab).
Ctrl+C
Toggles case sensitivity.
Ctrl+M
Toggles searching within mark.
Ctrl+Q
Quotes the next character typed.
Ctrl+O
Toggles incremental search mode.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

See Also:

regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


reverse_selection

_command void reverse_selection()

Reverse characters in selection

Displays message if text not marked.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

upcase_selection


revert

_command void revert(_str quiet="")

Revert the current buffer to the contents of the latest version on disk.

Parameters:

quiet - just reload the file, do not prompt

Applies To:

Edit Window

Category:

File Functions

See Also:

edit


revert_or_refresh

_command void revert_or_refresh()

Reverts or refreshes the current buffer to the contents of the latest version on disk. If the buffer has been modified, then we revert. If the file has not been modified, but has an earlier time stamp than the file on disk, then the file is refresh.

Applies To:

Edit Window

Category:

File Functions

See Also:

edit


rexx_mode

_command void rexx_mode()

Activates REXX file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


right

void right()

Moves the text cursor one position to the right.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

left


right_side_of_window

_command typeless right_side_of_window()

Moves the cursor to the right side of the window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

left_side_of_window


rmdir

int rmdir(_str path)

Removes directory specified by path.

Returns: int

Returns 0 if successful. Common return codes are PATH_NOT_FOUND_RC and ACCESS_DENIED_RC.

Category:

File Functions


root_keydef

_command void root_keydef()

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.

Category:

Keyboard Functions


rubout

_command void rubout(_str force_wrap='')

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


ruler

_command void ruler(_str cols='')

Insert an imaginary line containing a ruler line for keeping track of column positions.

Parameters:

cols - number of columns for ruler to extend to or user-defined ruler line text

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


run_selected

_command typeless run_selected()

Runs the form that is selected in the dialog editor.

Returns: typeless

Returns 0 if successful.

Category:

Miscellaneous Functions


safe_exit

_command typeless safe_exit(_str doNotExit='', _str endingSession=false)

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.

Parameters:

doExit - force exit when this macro is finished

endingSession - (Windows only) Is the user logging out rather than just closing SlickEdit?

Returns: typeless

Exits editor if successful. Common return codes are COMMAND_CANCELLED_RC, ACCESS_DENIED_RC, and INSUFFICIENT_DISK_SPACE_RC. On error, message is displayed.

Category:

Miscellaneous Functions


save

_command int save(_str cmdline='', int flags=-1)

Writes contents of the active buffer to the file name specified. If no file name is specified, the current buffer is used. The File Options dialog box ("Tools", "Options", "File Options...", select the Save or Backup tab) sets default options for the save command.

Parameters:

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.
+DD
When on, back up files using the backup history system. Delta backup files are derived from concatenating a backup directory with the path and same of the destination file and the .vsdelta extension. The default backup directory is the "vsdelta" subdirectory of your configuration directory.

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

Returns: int

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.

Applies To:

Edit Window

Category:

File Functions

See Also:

file, print, save_as


save_all

_command int save_all(int sv_flags=-1, boolean skip_unnamed_files=false, boolean only_save_workspace_files=false)

Saves all modified buffers.

Returns: int

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.

Category:

File Functions

See Also:

save_all_forms


save_all_forms

_command typeless save_all_forms()

Saves all modified forms currently being edited.

Returns: typeless

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.

Category:

File Functions

See Also:

save_all


save_as

_command int save_as(_str cmdline='', int sv_flags=-1)

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.

Parameters:

cmdline - is a string in the format: [-n] [-r] filename

Returns: int

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.

Applies To:

Edit Window

Category:

File Functions

See Also:

gui_save_as, save, name


save_config

_command int save_config()

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.

Returns: int

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.

Category:

Miscellaneous Functions

See Also:

write_state, gui_save_config


save_exit

_command typeless save_exit()

Saves all modified buffers and exits the editor.

Returns: typeless

Returns 0 if successful. Common return values are 1 (must exit build window) 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.

Applies To:

Edit Window

Category:

File Functions

See Also:

gui_save_as, save, name


save_file

int save_file(lstr_t *lstr_p)

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.

Applies To:

Edit Window

Category:

File Functions


save_form

_command typeless save_form()

Saves the form selected in the dialog editor.

Returns: typeless

Returns 0 if successful.

Category:

Form Functions


save_macro

_command typeless save_macro(_str macro_info='')

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)

Parameters:

cmdline - a string in the format: name flag_names

Returns: typeless

Returns 0 if successful.

Category:

Macro Programming Functions

See Also:

gui_save_macro, start_recording, end_recording, record_macro_toggle, record_macro_end_execute, execute_last_macro, execute_last_macro_key


save_pos

void save_pos(typeless &p, typeless useRealLineNumbers="")

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

restore_pos, _save_pos2, _restore_pos2


save_search

void save_search(_str &search_string, int &flags, _str &word_re, _str &ReservedMore="", int &flags2=0)

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.

Parameters:

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
  • VSSEARCHFLAG_HIDDEN_TEXT_ONLY
  • VSSEARCHFLAG_NOSAVE_TEXT
  • VSSEARCHFLAG_NOSAVE_TEXT_ONLY
  • VSSEARCHFLAG_PROMPT_WRAP

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();

Category:

Search Functions

See Also:

repeat_search, _select_match, match_length, search_replace, restore_search, search, _search_case


save_selection

int save_selection(var mark)

Returns: int

Saves the active selection in the variable mark. Returns non- zero value if a selection can not be allocated for saving the active selection.

Category:

Selection Functions


save_view

void save_view(int &view_id)

Stores the active view id in view_id and activates the view corresponding to the view id VSWID_HIDDEN (defined in "slick.sh"). This allows macros to switch buffers without affecting the original view's cursor position information.

Category:

Miscellaneous Functions


save_window_config

_command typeless save_window_config(boolean project_info_only=false, int alternate_view_id=0, boolean exiting_editor=false, _str relativeToDir=null)

Saves the auto restore information. All auto restore information is stored in the "vrestore.slk" file.

Returns: typeless

Returns 0 if successful.

Category:

File Functions

See Also:

restore, auto_restore


say

void say(_str string)

Write a string to the SlickEdit debug window.

Parameters:

string - string to display

Category:

Miscellaneous Functions


scroll_down

_command void scroll_down()

Scrolls the text page one line up.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


scroll_left

_command void scroll_left()

Scrolls the text page one column to right.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


scroll_right

_command void scroll_right()

Scrolls the text page one column to left.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


scroll_style

_command void scroll_style(_str cmdline='')

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.

Parameters:

cmdline - is a string in the format: [ C | V | H | S [number] ]

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.

Category:

CursorMovement Functions


scroll_up

_command void scroll_up()

Scrolls the text page one line down.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


search

int search(_str searchString, _str options="E", _str replaceString=null, int &Nofchanges=0)

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.

Parameters:

searchString - String to search for

options - A string of options having the following meaning:

'+'
(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 SlickEdit regular expression. See SlickEdit 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.
'L'
Interpret string as a Perl regular expression. See section Brief Regular Expressions.
'&'
Interpret string as a wildcard expression. See section Wildcard 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", "Options", "File Extension Setup...", select the Advanced tab).
'W=SlickEdit-regular-expression'
Specifies a word search and sets the default word characters to those matched by the SlickEdit- 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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
','
Delimiter to separate ambiguous options.
'&'
Interpret string as wildcard syntax (*,?) for searches.
'#'
Highlight matched occurances with highlight color.
'$'
Highlight replaced text with modified line color.
'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.

replaceString - Optional string to replace search string with.

Nofchanges - Count of number of replaces.

Returns: int

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.

Applies To:

Edit Window, Editor Control

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');

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

qreplace, repeat_search, _select_match, match_length, search_replace, save_search, restore_search, _search_case, _SearchInitSkipped, _SearchQSkipped, _SearchQNofSkipped


search_again

_command typeless search_again()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

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

_command typeless search_backward()

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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

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(_str option="")

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.

Category:

Search Functions


search_for_proc

_str search_for_proc(_str module_name, _str proc_name)

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

Returns: _str

Returns 0 if successful. Otherwise a string message is returned explaining the reason for failure.

Applies To:

Edit Window

Category:

Search Functions


search_forward

_command typeless search_forward(_str options='')

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", "Options", "File Extension Setup...", select the Advanced tab).
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.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

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


Search Functions

_clex_find
_clex_skip_blanks
_escape_re_chars
_find_form_eventtab
_find_formobj
_find_object
_find_tile
_GoToOldLineNumber
_GoToROffset
_is_background_tagging_enabled
_is_background_tagging_supported
_istagging_supported
_mffind
_mfreplace
_nrseek
_QBinaryLoadTagsSupported
_QROffset
_search_case
_SearchInitSkipped
_SearchQNofSkipped
_SearchQSkipped
_select_match
_SetAllOldLineNumbers
all
allnot
asm_proc_search
begin_statement
begin_statement_block
bookmark_all_occurrences
caps
case_toggle
clear_highlights
collapse_to_definitions
column_process_list
end_proc
end_statement
end_statement_block
end_tag
fileman_find
fileman_replace
find
find_current
find_matching_paren
find_next
find_prev
find_proc
get_replace_text
goto_line
goto_parent
goto_tag
grep_last
gui_find
gui_find_backward_regex
gui_find_proc
gui_find_regex
gui_goto_col
gui_goto_line
gui_make_tags
gui_push_tag
gui_replace
gui_replace_regex
gui_replace2
hide_all_comments
hide_code_block
hide_comments_and_code_blocks
hide_dotnet_regions
hide_selection
highlight_all_occurrences
i_search
java_proc_search
list_all_occurrences
make_tags
match_length
mou_push_tag
next_proc
next_ref
next_sibling
next_statement
next_tag
or_re
pas_proc_search
plusminus
prepeat_search
preprocess
prev_proc
prev_ref
prev_sibling
prev_statement
prev_tag
process_list
psearch
push_tag
qreplace
qsearch
query_replace
quick_mark_all_occurences
re_search
re_toggle
reflow_region
regex_replace
regex_search
renumber
repeat_search
replace
replace_string
restore_search
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_code_block
show_col1
show_current_proc
show_indent
show_paragraphs
show_procs
show_selection
toggle_all_outlining
toggle_find
toggle_find_symbol
toggle_search
translate_again
translate_backward
translate_forward
unnum


search_replace

int search_replace(_str replace_string, _str option="")

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.

Returns: int

Returns 0 if successful. Possible return codes are INVALID_OPTION_RC, and STRING_NOT_FOUND_RC. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

repeat_search, _select_match, match_length, search, save_search, restore_search, _search_case


seek

_command int seek(...)

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 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, 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

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

gui_seek, _QROffset, _GoToROffset


select_active

int select_active(_str markid='')

Returns: int

Returns MARK_SEARCH (constant defined in 'slick.sh') if the current buffer has a visible marked area. Otherwise 0 is returned.

Applies To:

Edit Window

Category:

Selection Functions


select_all

_command void select_all()

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.

Category:

File Functions

See Also:

dir, list, fileman


select_attr

_command typeless select_attr(_str result='')

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.

Category:

File Functions

See Also:

dir, list, fileman


select_block

_command void select_block()

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", "Options", "General...", select Select Styles Tab) to set the select style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_char, select_line


select_buffer

_command typeless select_buffer(_str buffer_name="")

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.

Applies To:

Edit Window

Categories:

Edit Window Methods, Selection Functions

See Also:

emacs_quit, edit


select_char

_command void select_char()

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", "Options", "General...", select Select Styles Tab) to set the select style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_block, select_line


select_code_block

_command int select_code_block()

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 selects larger code blocks.

Returns: int

0 for OK, 1 for error.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


select_edit_mode

void select_edit_mode(_str lang='', boolean bypass_buffer_setup=false, boolean map_xml_files=false)

Deprecated. Use _SetEditorLanguage().

Sets the language specific information such as tabs, margins, color coding, etc. to the specified language options.

Parameters:

lang - Optional language ID (see p_LangId)

bypass_buffer_setup - If true, only set the language name and ID but do not copy in language specific settings, such as tabs, or indent.

map_xml_files - Attempt to map XML files and HTML/JSP files to locate DTD, Scheme, or JSP tag libraries in order to identify custom tags.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


select_ext

_command void select_ext(_str extensions='')

Places the character '>' in column one for all files that have the extension specified. Used in fileman mode.

Category:

File Functions

See Also:

dir, list, fileman


select_full_word

_command void select_full_word()

Selects the text from the cursor to the end of the full word at the cursor or the next compound. To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_word, select_subword


select_it

void select_it(_str mark_name, _str mark, _str options='')

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.

Category:

Selection Functions


select_line

_command void select_line()

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 Visual 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", "Options", "General...", select Select Styles Tab) to set the select style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_block, select_char


select_mark

_command void select_mark()

Places the character '>' in column one for all the selected lines. Used in fileman mode.

Category:

File Functions

See Also:

dir, list, fileman


select_mode

_command void select_mode(_str mode_name='')

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).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


select_next_sexp

_command int select_next_sexp()

Select the next S-expression. If called repeatedly, extend the selection to the next S-expression.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, select_prev_sexp, cut_next_sexp, cut_prev_sexp


select_paragraph

_command typeless select_paragraph()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

prev_paragraph, prev_sentence, next_paragraph, cut_sentence, center_within_margins, reflow_region, margins, gui_margins


select_prev_sexp

_command int select_prev_sexp()

Select the next S-expression. If called repeatedly, extend the selection to the next S-expression.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, select_next_sexp, cut_next_sexp, cut_prev_sexp


select_proc

_command int select_proc(typeless count=0, int markid=-1, _str notQuiet='', SELECT_PROC_FLAGS options=def_select_proc_flags)

Selects current function contents and (optionally) function heading.

Parameters:

count - reserved

markid - Can be '' for active selection

notQuiet - show message box if not supported

options - select_proc options - specify SELECT_PROC_NO_COMMENTS to not include header comments in selection

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


select_reverse

_command void select_reverse()

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.

Category:

File Functions

See Also:

dir, list, fileman


select_subword

_command void select_subword()

Selects the text from the cursor to the end of the subword at the cursor or the next subword. To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_word, select_full_word


select_tag_file

_command typeless select_tag_file()

Used in EMACS emulation. Displays the Tag Files dialogs which allows you to configure the tag files used by the goto_tag, gui_push_tag, push_tag, and find_tag commands.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


select_toggle

_command void select_toggle()

Toggle between successive, increasingly large selections with each invocation.

Starting with no selection, creates an empty character selection, then selects the current word, then the current line, then the current code block, then a larger code block, then the current function, then the entire file, then deselect and start all over again.

Except for empty character selections and line selections, the selections are all locked so that the cursor remains stationary.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_char, select_whole_word, select_line, select_code_block, select_proc, select_all, deselect


select_tree

_str select_tree(_str(&cap_array)[]=null, _str(&key_array)[]=null, int(&pic_array_non)[]=null, int(&pic_array_cur)[]=null, boolean(&select_array)[]=null, typeless callback=null, typeless user_data=null, _str caption=null, int sl_flags=0, _str col_names=null, _str col_flags=null, boolean modal=true, _str help_item=null, _str retrieve_name=null)

Displays a selection list in a tree control.

Syntax:

   _str result=select_tree(captions_array, key_array,
                           non_current_pic_array, current_pic_array,
                           callback_function, user_data,
                           dialog_caption, flags,
                           column_names, column_flags, modal);

Flags: The selection tree supports the following flags defined in "slick.sh":

  • SL_ALLOWMULTISELECT Allow multiple items to be selected. Multiple items are separated with newline (\n) characters. Currently this function does not support items which contain newline characters.
  • SL_NOTOP Don't position cursor at top of list.
  • 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_DELETEBUTTON Display Delete button.
  • SL_DEFAULTCALLBACK Call the callback routine when default button invoked.
  • SL_COMBO Display combo box above tree control
  • SL_MUSTEXIST Selected item must exist.
  • SL_DESELECTALL Deselect all items in list box when initializing.
  • SL_NORETRIEVEPREV Don't retrieve last combo box value. By default, last combo box value is restored when initial_value not given. Has no effect if SL_COMBO not given
  • SL_COLWIDTH Compute column width settings and set up 'n' columns. Applies only if column_names are given
  • SL_SELECTPREFIXMATCH Effects SL_COMBO only. When typing in the combo box and text is a prefix match of the text in the list box, list box line is selected. If not given, it will do a match for any substring (can be overridden by "prefix" checkbox.
  • SL_CLOSEBUTTON Use Close instead of Cancel button
  • SL_CHECKLIST Use checkmarks for bitmaps. If bitmap arrays are specified, they will be overridden. If a select_array is specified, the selected items will be checked.

The following selection list flags are not supported by the selection tree dialog: SL_VIEWID, SL_FILENAME, SL_BUFID, SL_NOISEARCH, SL_NODELETELIST, SL_HELPCALLBACK

Callback: See example below for more information about call back function. The prototype for the callback function is as follows:

   _str select_tree_cb(int sl_event, typeless user_data, typeless info=null);
The callback_name argument specifies the address of a callback function to call for the following events. For backward compatibility, this parameter can be a global function name. Specify null or "" to specify no call back function.

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_ONINITFIRST First Dialog initialized callback, before autosizing
  • SL_ONCLOSE Dialog is about to be closed
  • SL_ONINIT Dialog box being initialized or reinitialized (loading items)
  • SL_ONDEFAULT Enter pressed and SL_DEFAULTCALLBACK flag was specified
  • SL_ONLISTKEY not supported
  • SL_ONDELKEY The Delete key was pressed in the list box, or they pressed the Delete button.
  • SL_ONUSERBUTTON not supported
  • SL_ONSELECT Selected item(s) changed. 'info' is the index of selected item.

For any sl_event, the form is closed if result!=''. When this occurs, the return value of selection list is the return value of the callback. If the return value from the callback is null, the normal processing for that event is short-circuited.

Controls:

  • The control name of the tree control is "ctl_tree".
  • The control name for the combo box is "ctl_search".
  • The control name for the default button is always "ctl_ok".
  • The control name for the message label is "ctl_message".
  • The control name for the prefix checkbox is "ctl_prefix".
  • The control name for the bottom panel is "ctl_bottom_pic"

You can add controls to the bottom of ths form dynamically through the callbacks. For SL_ONINITFIRST, add the controls to ctl_bottom_pic, and set it's height. The resize will take care of the rest. Catch SL_ONCLOSE to handle settings for the dynamic controls.

Parameters:

cap_array - Array of strings for item captions to insert into tree control

key_array - Parallel array of keys to be stored in user-data for each item in tree

pic_array_non - Parallel array of bitmaps to use for the non-current bitmap for each item in tree

pic_array_cur - Parallel array of bitmaps to use for the current bitmap for each item in tree

select_array - Parallel array of bitmaps to use for selecting nodes in the tree. If (sl_flags&SL_CHECKLIST), these nodes will be checked.

callback - Callback function, see callback details above

user_data - User data to pass along to callback function

caption - Dialog caption

sl_flags - bitset of SL_* selection list flags (see above)

col_names - Comma delimited list of column names for tree

col_flags - Comma delimited list of column flags for tree

modal - (default true) Display modal dialog?

help_item - Specifies help (p_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.

retrieve_name - Usually the name of the command which invoked this function or the type of item being prompted for. May be ''. Useful only if the combo box is displayed.

Returns: _str

Returns COMMAND_CANCELLED_RC if the dialog box is cancelled. If a key array was given, return the key(s) corresponding to the selections made, otherwise, return the item caption(s) separated by newline (\n) characters. Returns an empty string if nothing was selected. If the callback handles SL_DEFAULT, return whatever the user-defined callback returns.

Example:

This example simply displays a list of tag files.

   result = select_tree(tags_filenamea());

This is a more sophisticated example that displays a list of tags in the project tag file starting with the prefix 'b' and allows you to select multiple items from a multi-column tree control, sorting items by the columns of your choice.

   _command void test_select_tree()
   {
      _str captions[];
      _str keys[];
      int bitmaps[];
      int status=tag_read_db(_GetWorkspaceTagsFilename());
      if (status) {
         return;
      }
      status = tag_find_prefix("");
      while (!status && captions._length()<1000) {
         _str tag_name,tag_class,tag_type;
         _str file_id,file_name;
         int tag_flags,file_line;
         tag_get_info(tag_name,tag_type,file_name,file_line,tag_class,tag_flags);
         tag_get_detail(VS_TAGDETAIL_file_id,file_id);

         int leaf_flag=0;
         int pic_member=0;
         int i_access,i_type;
         tag_tree_filter_member(0,tag_type,(tag_class!='')?1:0,tag_flags,i_access,i_type);
         tag_tree_select_bitmap(i_access,i_type,leaf_flag,pic_member);
         keys[keys._length()]=(int)file_id*10000+(int)file_line;
         bitmaps[bitmaps._length()]=pic_member;

         captions[captions._length()]=tag_name"\t"tag_type"\t"tag_class"\t"file_name"\t"file_line;
         status = tag_next_prefix("");
      }

      _str result = select_tree(captions, keys, bitmaps, null,
                                test_select_cb, "Hello, world",
                                "This is a test, select something",
                                SL_COMBO
                                 | SL_CLOSEBUTTON
                                 | SL_SELECTCLINE
                                 | SL_DESELECTALL
                                 | SL_ALLOWMULTISELECT
                                 | SL_COLWIDTH
                                 | SL_SELECTPREFIXMATCH
                                 | SL_INVERT
                                 | SL_SELECTALL
                                 | SL_MUSTEXIST,
                                "Tag,Type,Class,File,Line",
                                (TREE_BUTTON_PUSHBUTTON|TREE_BUTTON_SORT)',' :+
                                (TREE_BUTTON_PUSHBUTTON|TREE_BUTTON_SORT)',' :+
                                (TREE_BUTTON_PUSHBUTTON|TREE_BUTTON_SORT)',' :+
                                (TREE_BUTTON_PUSHBUTTON|TREE_BUTTON_SORT_FILENAME)',' :+
                                (TREE_BUTTON_PUSHBUTTON|TREE_BUTTON_SORT_NUMBERS|TREE_BUTTON_AL_RIGHT),
                                false,
                                "?This is the help message");
   }

This is an example callback function.

   static _str test_select_cb(int reason, typeless user_data, typeless info=null)
   {
      switch (reason) {
      case SL_ONDEFAULT:
         select_tree_message("Default message");
         break;
      case SL_ONINIT:
         select_tree_message("Filtering...");
         break;
      case SL_ONINITFIRST:
         select_tree_message(user_data);
         break;
      case SL_ONSELECT:
         _str caption=ctl_tree._TreeGetCaption(info);
         parse caption with caption "\t" .;
         select_tree_message(caption);
         break;
      }
      return '';
   }

This is an example of a callback function that adds custom controls.

   static _str test_select_option_cb(int reason, typeless user_data, typeless info=null)
   {
      switch (reason) {
      case SL_ONINITFIRST:
         if ( def_ask_a_question) {
            bottom_wid := _find_control("ctl_bottom_pic");
            checkb_wid := _create_window(OI_CHECK_BOX, bottom_wid, "Do not show these options again", 0, 30, bottom_wid.p_width, 270, CW_CHILD);
            bottom_wid.p_height = 300;
            bottom_wid.p_visible = bottom_wid.p_enabled = true;
            checkb_wid.p_name = "ctlhideoptions";
         }
         break;
      case SL_ONCLOSE:
         wid := p_active_form._find_control('ctlhideoptions');
         if (wid && wid.p_value) {
            def_ask_a_question = false;
            _config_modify_flags(CFGMODIFY_DEFVAR)
         }
         break;
      }
      return '';
   }

Category:

Forms


select_whole_word

_command void select_whole_word(...)

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_word


select_word

_command void select_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

select_whole_word, select_subword, select_compound_word


Selection Functions

_adjust_block_selection
_alloc_selection
_begin_select
_begin_select_compare
_compare_selection
_copy_to_cursor
_delete_selection
_delete_temp_view
_deselect
_duplicate_selection
_end_select
_end_select_compare
_fill_selection
_free_selection
_get_reflow_pos
_get_selinfo
_isnull_selection
_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
_tprint_selection
add
align_selection_center
align_selection_left
align_selection_right
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_lines_down
copy_lines_up
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
force_reindent
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_lines_down
move_lines_up
move_to_cursor
new_alias
overlay_block_selection
overlay_clipboard
paste
print
put
reflow_selection
restore_selection
reverse_selection
save_selection
select_active
select_block
select_buffer
select_char
select_code_block
select_full_word
select_it
select_line
select_paragraph
select_proc
select_subword
select_tag_file
select_toggle
select_whole_word
select_word
set_mark_select
shift_selection_left
shift_selection_right
sort_on_selection
sort_within_selection
togglecase_selection
tprint
unindent_selection
upcase_selection


Selective Display

all
allnot
collapse_to_definitions
copy_selective_display
hide_all_comments
hide_code_block
hide_comments_and_code_blocks
hide_dotnet_regions
hide_selection
plusminus
preprocess
selective_display
show_all
show_braces
show_code_block
show_col1
show_current_proc
show_indent
show_paragraphs
show_procs
show_selection
toggle_all_outlining


semicolonfiles_match

_str semicolonfiles_match(_str name, boolean find_first)

Parameters:

name - file name to search for

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Categories:

Completion Functions, File Functions

See Also:

f_match


set

_command int set(_str cndline='', boolean doExpand=true)

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.

Parameters:

cmdline - is a string in the format: env_var [=] value

Applies To:

Edit Window

Category:

Miscellaneous Functions


set_bookmark

_command typeless set_bookmark(_str arg1='', boolean quiet=false)

This function is used to set a bookmark on the current line.

Parameters:

arg1 - command line options string of the form:

option bookmark_name
where option is:
  • -n -- Use new smaller dialog to prompt for just bookmark name
  • -q -- do not prompt for bookmark name
  • -r -- set bookmark without prompting
  • -m -- do not set duplicate mark
and bookmark_name is the name of the bookmark to create.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_bookmark, pop_bookmark, toggle_bookmark, goto_bookmark


set_command

void set_command(_str command_text, int start_sel=-1, int end_sel=-1, _str prompt=null)

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);

Applies To:

Text Box, Combo Box

Categories:

Combo Box Methods, Text Box Methods

See Also:

command_state, command_toggle, left, right, _delete_char, rubout, execute, get_command


set_env

int set_env(_str EnvVarName, _str value=null)

Assigns value to the environment variable name. If value is not given, the environment variable is removed from the environment.

Returns: int

Returns 0 if successful. Otherwise, INTERPRETER_OUT_OF_MEMORY_RC is returned.

Category:

Miscellaneous Functions

See Also:

env_match, get_env


set_eventtab_index

void set_eventtab_index(int eventtab_index, int key_index, int index, int key_index2=VSEV_NULL)

This functions binds a command, procedure, or event table to an event or range of events.

Parameters:

eventtab_index - is an index to an event table which is simply array of VSEVENT_BINDING structures. array of integers.

key_index - Integer representation of the key. Use event2index() to convert a key string to a key index.

index - Index into the names table of the command, procedure, or event table.

key_index2 - Integer representation of the key. Use event2index() to convert a key string to a key index. When specified, key_index must be greater than or equal to key_index2. There are some useful special range key names.

VSEV_RANGE_FIRST_CHAR_KEY
First character key. This is character code 0. No shift flags may be combined with this.
VSEV_RANGE_LAST_CHAR_KEY
Last character key. This is character code 0x1ffffff. No shift flags may be combined with this.
VSEV_RANGE_FIRST_NONCHAR_KEY
First non unicode character key. No shift flags may be combined with this.
VSEV_ALL_RANGE_LAST_NONCHAR_KEY
Last non unicode character key with all shift flags.
VSEV_RANGE_FIRST_MOUSE
First mouse event. Shift flags may be combined with this.
VSEV_RANGE_LAST_MOUSE
Last mouse event. Shift flags may be combined with this.
VSEV_ALL_RANGE_LAST_MOUSE
Last mouse event with all shift flags.
VSEV_RANGE_FIRST_ON
First ON event. No shift flags may be combined with this.
"VSEV_RANGE_LAST_ON
Last ON event. No shift flags may be combined with this.

Example:

// "vsevents.sh" needs to be included.
index=find_index('cmdline_toggle');

root_eventtab_index=find_index('default_keys',EVENTTAB_TYPE);
// Bind the fundamental mode escape key to command toggle.
// The 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);

// Unbind all character keys. This effects keys
// like a-z, punctuation, and foreign language characters.
// Keys like Alt+A which are not unicode characters are not effected.
set_eventtab_index(root_eventtab_index,VSEV_RANGE_FIRST_CHAR_KEY,0,VSEV_RANGE_LAST_CHAR_KEY)

// Unbind all non-character keys including keys like Enter, Backspace, Ctrl+Shift+Alt+Enter, Alt+A
set_eventtab_index(root_eventtab_index,VSEV_RANGE_FIRST_NONCHAR_KEY,0,VSEV_ALL_RANGE_LAST_NONCHAR_KEY)

// Unbind all mouse events in any shift key combination.
set_eventtab_index(root_eventtab_index,VSEV_RANGE_FIRST_MOUSE,0,VSEV_ALL_RANGE_LAST_MOUSE)

// Unbind all Ctrl+mouse events.
set_eventtab_index(root_eventtab_index,VSEV_RANGE_FIRST_MOUSE|VSEVFLAG_CTRL,0,VSEV_ALL_RANGE_LAST_MOUSE|VSEVFLAG_CTRL)

Category:

Keyboard Functions


set_mark_select

void set_mark_select(_str ch)

Replaces the first character of each line of the marked text with ch.

Category:

Selection Functions


set_name_info

int set_name_info(int index, _str info)

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.

Returns: int

Returns 0 if successful. Otherwise, INTERPRETER_OUT_OF_MEMORY_RC is returned. Pending message set.

Category:

Names Table Functions

See Also:

find_index, name_match, name_name, name_type, name_info, call_index, insert_name, delete_name, replace_name


set_next_error

_command int set_next_error(_str beQuiet='', _str gotoEndOfLine='')

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.

Parameters:

beQuiet - do not display message box on error

gotoEndOfLine - jump to end of line containing message

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

reset_next_error, cursor_error, next_error


set_scroll_pos

_str set_scroll_pos(int left_edge, int cursor_y)

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


set_select

void set_select(_str ch)

Replaces the first character of each line of the current buffer with ch.

Category:

Miscellaneous Functions


set_var

_command typeless set_var(_str cmdline='')

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.

Parameters:

cmdline - is a string in the format: variable [new_value]

Category:

Macro Programming Functions

See Also:

gui_set_var, _set_var, _get_var


setAdaptiveFormattingFlags

void setAdaptiveFormattingFlags(_str langID, int value)

Sets the adaptive formatting flags for this language. This value is available on the GUI on the Adaptive Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


SETagInsertInDatabase

int VSAPI SETagInsertInDatabase(const slickedit::SEString &tag_name, unsigned short tag_type, const slickedit::SEString &file_name, unsigned int line_no, const slickedit::SEString &class_name, unsigned int tag_flags, const slickedit::SEString &signature=slickedit::NULLString, const slickedit::SEString &class_parents=slickedit::NULLString, const slickedit::SEString &template_sig=slickedit::NULLString)

API function for inserting a tag entry with supporting info

Parameters:

tag_name - name of entry

type_id - type of tag, (see VS_TAGTYPE_*)

file_name - path to file that is located in

line_no - line number that tag is positioned on

class_name - name of class that tag belongs to

tag_flags - tag attributes (see VS_TAGFLAG_*)

signature - (optional) arguments and return type

class_parents - (optional) class parents

template_signature - (optional) template signature

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


SETagInsertOccurrence

int VSAPI SETagInsertOccurrence(const slickedit::SEString &occur_name, const slickedit::SEString &file_name=slickedit::NULLString)

Insert a new occurrence into the word index.

Parameters:

occur_name - Word to be indexed

file_name - Path of file occurrence is located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


SETagOccurrencesEnd

int VSAPI SETagOccurrencesEnd()

Clean up after inserting a series of occurrencess from a single file for update. Doing this allows the tag database engine to remove any occurrences from the database that are no longer valid.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


SETagOccurrencesStart

int VSAPI SETagOccurrencesStart(const slickedit::SEString &file_name)

Set up for inserting a series of occurrencess from a single file for update. Doing this allows the tag database engine to detect and handle updates more effeciently, even in the presence of duplicates.

Parameters:

file_name - full path of file

Returns: int

0 on success, <0 on error.int VSAPI

Category:

Tagging Functions


SETagSetClassParents

int VSAPI SETagSetClassParents(const slickedit::SEString &class_name, const slickedit::SEString &class_parents)

Specify what classes and interfaces a given file derives from. This will create an entry for 'class_name' if it does not already exist.

Fully qualified class names are preferred, but un-qualified class names may be used also, however, they may not be resolved correctly if there are duplicates with the same name.

Parameters:

class_name - Fully qualified class name

class_parents - a semi-colon seperated list of class names.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


SETagSetFileDate

int VSAPI SETagSetFileDate(const slickedit::SEString &fileName, const slickedit::SEString &fileDate=slickedit::NULLString, int fileType=0, const slickedit::SEString &includedBy=slickedit::NULLString)

Set the date of tagging for the given file. If the date is not specified, use the file modification time found on disk. This function has the side effect of positioning the file iterator on the given file name.

Parameters:

fileName - File path of source file to setting tagging date for.

fileDate - (20 bytes, optional) Modification date of file when tagged. Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms)

fileType - Type of file to search for, source vs. reference

includedBy - (optional) File path of source file which includes pszFilename

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions


setAliasFilename

void setAliasFilename(_str langID, _str value)

Sets the alias filename value for this language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setAttributeCase

void setAttributeCase(_str langID, int value)

Sets the attribute case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new attribute case setting for language

Category:

LanguageSettings API


setAutoBracket

void setAutoBracket(_str langID, int value)

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setAutoCaseKeywords

void setAutoCaseKeywords(_str langID, boolean value)

Sets whether or not we want to auto-case keywords for this language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setAutoCompleteMinimumLength

void setAutoCompleteMinimumLength(_str langID, int value)

Sets the minimum length required for autocomplete to be triggered for this language. This value is available on the AutoComplete form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setAutoCompleteOptions

void setAutoCompleteOptions(_str langID, int value)

Sets the autocomplete options for this language. This value controls the options which are available on the AutoComplete form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setAutoCorrelateStartEndTags

void setAutoCorrelateStartEndTags(_str langID, boolean value)

Sets the auto correlate start/end tags setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new auto correlate start/end tags setting for language

Category:

LanguageSettings API


setAutoInsertLabel

void setAutoInsertLabel(_str langID, boolean value)

Sets the auto-insert label setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new auto-insert label setting for language

Category:

LanguageSettings API


setAutoSymbolTranslation

void setAutoSymbolTranslation(_str langID, boolean value)

Sets the auto symbol translation setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new auto symbol translation setting for language

Category:

LanguageSettings API


setAutoValidateOnOpen

void setAutoValidateOnOpen(_str langID, boolean value)

Sets the auto validate on open setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new auto validate on open setting for language

Category:

LanguageSettings API


setBackspaceUnindents

void setBackspaceUnindents(_str langID, boolean value)

Sets whether backspace at the beginning of the line unindents the line for this language. This value is available on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setBeginEndComments

void setBeginEndComments(_str langID, boolean value)

Sets the begin/end comments setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new begin/end comments setting for language

Category:

LanguageSettings API


setBeginEndPairs

void setBeginEndPairs(_str langID, _str value)

Sets the Begin/End pairs for this language. This value is available on the GUI on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setBeginEndStyle

void setBeginEndStyle(_str langID, int value)

Sets the begin/end style for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new begin/end style setting for language

Category:

LanguageSettings API


setBounds

void setBounds(_str langID, _str value)

Set the bounds for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new bounds for language

Category:

LanguageSettings API


setCaps

void setCaps(_str langID, int value)

Set the caps for the given language. The possible values are as follows:

  • CM_CAPS_OFF - does not change the caps
  • CM_CAPS_ON - converts keywords to upper case
  • CM_CAPS_AUTO - uses _GetCaps to determine if there are any lowerase letters in the file. If so, turns caps off. If not, caps is turned on.

Parameters:

langID - language ID (see p_LangId)

value - new caps for language

Category:

LanguageSettings API


setCobolSyntax

void setCobolSyntax(_str langID, int value)

Sets the COBOL syntax setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new COBOL syntax setting for language

Category:

LanguageSettings API


setCodehelpFlags

void setCodehelpFlags(_str langID, int value)

Sets the codehelp flags for this language. The options for this value are available on the GUI on the Context Tagging form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setColorFlags

void setColorFlags(_str langID, int value)

Set the color flags for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new color flags for language

Category:

LanguageSettings API


setCommentEditingFlags

void setCommentEditingFlags(_str langID, int value)

Sets the comment editing flags for this language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setCommentWrapOptions

void setCommentWrapOptions(_str langID, _str value)

Sets the comment wrap options for this language. This value is controlled by the options available on the Comments form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setCuddleElse

void setCuddleElse(_str langID, boolean value)

Sets the cuddle else setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new cuddle else setting for language

Category:

LanguageSettings API


setDelphiExpansions

void setDelphiExpansions(_str langID, boolean value)

Sets the delphi expansion setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new delphi expansion setting for language

Category:

LanguageSettings API


setDocCommentFlags

void setDocCommentFlags(_str langID, _str value)

Sets the doc comment flags for this language. This value is controlled by the options available on the Comments form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setFunctionBeginOnNewLine

void setFunctionBeginOnNewLine(_str langID, boolean value)

Sets the function brace on new line setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new function brace on new line setting for language

Category:

LanguageSettings API


setHexMode

void setHexMode(_str langID, int value)

Set the hex mode for the given language. Possible values:

  • HM_HEX_OFF - hex mode off
  • HM_HEX_ON - hex mode on
  • HM_HEX_LINE - hex mode on using line hex

Parameters:

langID - language ID (see p_LangId)

value - new hex mode for language

Category:

LanguageSettings API


setHexValueCase

void setHexValueCase(_str langID, int value)

Sets the hex value case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new hex value case setting for language

Category:

LanguageSettings API


setIndentCaseFromSwitch

void setIndentCaseFromSwitch(_str langID, boolean value)

Sets the indent case from switch setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new indent case from switch setting for language

Category:

LanguageSettings API


setIndentFirstLevel

void setIndentFirstLevel(_str langID, int value)

Sets the indent first level setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new indent first level setting for language

Category:

LanguageSettings API


setIndentStyle

void setIndentStyle(_str langID, int value)

Set the indent style for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new indent style for language

Category:

LanguageSettings API


setIndentWithTabs

void setIndentWithTabs(_str langID, boolean value)

Set the indent with tabs setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new indent with tabs setting for language

Category:

LanguageSettings API


setInsertBeginEndImmediately

void setInsertBeginEndImmediately(_str langID, boolean value)

Sets the insert braces immediately setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new insert braces immediately setting for language

Category:

LanguageSettings API


setInsertBlankLineBetweenBeginEnd

void setInsertBlankLineBetweenBeginEnd(_str langID, boolean value)

Sets the insert blank line between braces setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new insert blank line between braces setting for language

Category:

LanguageSettings API


setInsertRealIndent

void setInsertRealIndent(_str langID, boolean value)

Sets whether we insert real indent for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setInsertRightAngleBracket

void setInsertRightAngleBracket(_str langID, boolean value)

Sets the insert right angle bracket setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new insert right angle bracket setting for language

Category:

LanguageSettings API


setKeyTableName

void setKeyTableName(_str langID, _str value)

Set the key table name for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new key table name for language

Category:

LanguageSettings API


setKeywordCase

void setKeywordCase(_str langID, int value)

Sets the keyword case for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new keyword case setting for language

Category:

LanguageSettings API


setLangInheritsFrom

void setLangInheritsFrom(_str langID, _str value)

Sets the inheritance value for this language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setLanguageDefinitionOptions

void setLanguageDefinitionOptions(_str langID, VS_LANGUAGE_SETUP_OPTIONS &setup)

Sets the options contained in a VS_LANGUAGE_SETUP_OPTIONS struct for the given language. Internally, these values are contained in def-language-.

Parameters:

langID - language of interest

setup - struct to populate

Category:

LanguageSettings API


setLexerName

void setLexerName(_str langID, _str value)

Set the lexer name for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new lexer name for language

Category:

LanguageSettings API


setLineNumbersFlags

void setLineNumbersFlags(_str langID, int value)

Set the line numbers flags for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new line numbers flags for language

Category:

LanguageSettings API


setLineNumbersLength

void setLineNumbersLength(_str langID, int value)

Set the line numbers length for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new line numbers length for language

Category:

LanguageSettings API


setLoadAsBinary

void setLoadAsBinary(_str langID, boolean value)

Sets whether files in this language are loaded as binary. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setLoadExpandTabsToSpaces

void setLoadExpandTabsToSpaces(_str langID, int value)

Sets whether tabs are expanded to spaces when files in this language are loaded. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setLowercaseFilenamesWhenInsertingLinks

void setLowercaseFilenamesWhenInsertingLinks(_str langID, boolean value)

Sets the lowercase filename when inserting links setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new lowercase filename when inserting links setting for language

Category:

LanguageSettings API


setMainStyle

void setMainStyle(_str langID, int value)

Sets the MAIN style setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new MAIN style setting for language

Category:

LanguageSettings API


setMargins

void setMargins(_str langID, _str value)

Set the margins for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new margins for language

Category:

LanguageSettings API


setMenuIfNoSelection

void setMenuIfNoSelection(_str langID, _str value)

Sets the the name of the menu used for right-click context menus when there is no selection. This value is available on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setMenuIfSelection

void setMenuIfSelection(_str langID, _str value)

Sets the the name of the menu used for right-click context menus when there is a selection. This value is available on the General form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setMinimumAbbreviation

void setMinimumAbbreviation(_str langID, int value)

Sets the minimum abbreviation setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new minimum abbreviation setting for language

Category:

LanguageSettings API


setModeName

void setModeName(_str langID, _str value)

Set the mode name for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new mode name for language

Category:

LanguageSettings API


setMultilineIfExpansion

void setMultilineIfExpansion(_str langID, boolean value)

Sets the multiline IF expansion setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new multiline IF expansion setting for language

Category:

LanguageSettings API


setNoSpaceBeforeParen

void setNoSpaceBeforeParen(_str langID, boolean value)

Sets the no space before parenthesis setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new no space before parenthesis setting for language

Category:

LanguageSettings API


setNumberingStyle

void setNumberingStyle(_str langID, int value)

Sets the numbering style for this language. This value is available on the Formatting options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setonoff

boolean setonoff(boolean &number, _str string)

Sets name to 1 or 0 corresponding to value='on' or value='off'.

Returns: boolean

Returns false if input value is valid. Displays message if value is not 'on' or 'off'.

Category:

String Functions


setPadParens

void setPadParens(_str langID, boolean value)

Sets the pad parentheses setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new pad parentheses setting for language

Category:

LanguageSettings API


setPointerStyle

void setPointerStyle(_str langID, int value)

Sets the pointer style for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new pointer style setting for language

Category:

LanguageSettings API


setQuickBrace

void setQuickBrace(_str langID, boolean value)

Sets the quick brace setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new quick brace setting for language

Category:

LanguageSettings API


setQuotesForNumericValues

void setQuotesForNumericValues(_str langID, boolean value)

Sets the quotes for numeric values setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new quotes for numeric values setting for language

Category:

LanguageSettings API


setQuotesForSingleWordValues

void setQuotesForSingleWordValues(_str langID, boolean value)

Sets the quotes for single word values setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new quotes for single word values setting for language

Category:

LanguageSettings API


setRubyStyle

void setRubyStyle(_str langID, int value)

Sets the ruby style setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new ruby style setting for language

Category:

LanguageSettings API


setSaveAsBinary

void setSaveAsBinary(_str langID, boolean value)

Sets whether files in this language are saved as binary. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSaveEOLFormat

void setSaveEOLFormat(_str langID, _str value)

Sets the format used to translate EOL characters when files in this language are saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSaveExpandTabsToSpaces

void setSaveExpandTabsToSpaces(_str langID, int value)

Sets whether tabs are expanded to spaces when files in this language are saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSaveStripTrailingSpaces

void setSaveStripTrailingSpaces(_str langID, int value)

Sets whether files in this language are have their trailing spaces stripped when saved. This value is available on the File Options form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value values:

                           A - Automatic
                           D - DOS
                           M - Mac
                           U - Unix

Category:

LanguageSettings API


setShowTabs

void setShowTabs(_str langID, int value)

Set the show tabs setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new show tabs setting for language

Category:

LanguageSettings API


setSmartPaste

void setSmartPaste(_str langID, boolean value)

Sets the smartpaste value for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSmartTab

void setSmartTab(_str langID, int value)

Sets the smart tab value for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSoftWrap

void setSoftWrap(_str langID, boolean value)

Set the soft wrap setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new soft wrap setting for language

Category:

LanguageSettings API


setSoftWrapOnWord

void setSoftWrapOnWord(_str langID, boolean value)

Set the soft wrap on word setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new soft wrap on word setting for language

Category:

LanguageSettings API


setSurroundOptions

void setSurroundOptions(_str langID, int value)

Sets the surround options for this language. This value is available on the GUI on the Indent form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSymbolColoringOptions

void setSymbolColoringOptions(_str langID, int value)

Sets the symbol coloring options for this language. This value is controlled by options which are available on the View form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setSyntaxExpansion

void setSyntaxExpansion(_str langID, boolean value)

Sets the syntax expansion setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new syntax expansion setting for language

Category:

LanguageSettings API


setSyntaxIndent

void setSyntaxIndent(_str langID, int value)

Sets the syntax indent for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new syntax indent for language

Category:

LanguageSettings API


setTabs

void setTabs(_str langID, _str value)

Set the tabs for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new tabs for language

Category:

LanguageSettings API


setTagCase

void setTagCase(_str langID, int value)

Sets the tag case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new tag case setting for language

Category:

LanguageSettings API


setTruncateLength

void setTruncateLength(_str langID, int value)

Set the truncate length for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new truncate length for language

Category:

LanguageSettings API


setup_file_options

_command typeless setup_file_options(_str showTab='')

The setup_file_options command ("Tools", "Options", "File Options...") displays the File Options dialog box.

Parameters:

showTab - tab number to display initially (load, save, backup, autosave, filters)

Category:

Miscellaneous Functions


setup_general

_command void setup_general(_str showTab='')

The setup_general command ("Tools", "Options", "General...") displays the General Options dialog box.

Parameters:

showTab - tab number to display initially (general, search, select, chars, more, exit, memory)

Category:

Miscellaneous Functions


setupext

_command typeless setupext(_str extOptions='')

The setupext command ("Tools", "Options", "File Extension Setup...") displays the Language Options section of the options dialog.

Category:

Miscellaneous Functions


setUseAdaptiveFormatting

void setUseAdaptiveFormatting(_str langID, boolean value)

Sets the adaptive formatting value for this language, which controls whether adaptive formatting is turned on. This value is available on the GUI on the Adaptive Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setUseColorNames

void setUseColorNames(_str langID, boolean value)

Sets the use color names setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new use color names setting for language

Category:

LanguageSettings API


setUseContinuationIndentOnFunctionParameters

void setUseContinuationIndentOnFunctionParameters(_str langID, boolean value)

Sets the continuation indent on function parameters setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new continuation indent on function parameters setting for language

Category:

LanguageSettings API


setUseDivTagsForAlignment

void setUseDivTagsForAlignment(_str langID, boolean value)

Sets the use div tags for alignment setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new use div tags for alignment setting for language

Category:

LanguageSettings API


setUsePathsForFileEntries

void setUsePathsForFileEntries(_str langID, boolean value)

Sets the use paths for file entries setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new use paths for file entries setting for language

Category:

LanguageSettings API


setValueCase

void setValueCase(_str langID, int value)

Sets the single word value case setting for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new single word value case setting for language

Category:

LanguageSettings API


setWordChars

void setWordChars(_str langID, _str value)

Set the word characters for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new word characters for language

Category:

LanguageSettings API


setWordWrapStyle

void setWordWrapStyle(_str langID, int value)

Set the word wrap style for the given language.

Parameters:

langID - language ID (see p_LangId)

value - new word wrap style for language

Category:

LanguageSettings API


setXMLWrapOptions

void setXMLWrapOptions(_str langID, _str value)

Sets the xml wrap flags for this language. This value is available on the GUI on the Formatting form for each applicable language.

Parameters:

langID - language ID (see p_LangId)

value - new value

Category:

LanguageSettings API


setyesno

boolean setyesno(boolean &number, _str string)

Sets name to 1 or 0 corresponding to value='Y','Yes' or value='N','No'.

Returns: boolean

Returns false if input value is valid. Displays message if value is not 'Y', 'Yes','N', or 'No'.

Category:

String Functions


shell

int shell(_str program, _str options="", _str shell_processor="", int &process_id=null)

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. A negative return code indicates one of the OS or SlickEdit return codes listed in "rc.sh".

Parameters:

options - defaults to '' and may be one or more of the following:

'Q'
Run program without showing console window. DO NOT USE WITH 'W' OPTION.
'P'
Do not search for SlickEdit batch programs.
'A'
Run program asynchronously.
'W'
Run slkwait program to wait for a key press before closing application. DO NOT USE WITH 'Q' OPTION. 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.
'B'
Allow user to break by pressing Ctrl+Alt+Shift (Windows only).

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");

Category:

File Functions


shift_prefix

_command typeless shift_prefix(...)

Defines an alternative SHIFT key. For example, after binding this command to the '~' key, pressing '~' F1 is identical to Shift+F1.

Category:

Keyboard Functions

See Also:

ctrl_prefix, alt_prefix, esc_alt_prefix


shift_selection_left

_command void shift_selection_left(...)

Shifts selection left the number of character specified. Character selections are treated the same as line selections.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


shift_selection_right

_command void shift_selection_right(...)

Shifts selection right the number of characters specified. Character selections are treated the same as line selections.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions


show

_command typeless show(_str cmdline="", ...)

Displays a dialog box or menu you specify.

Parameters:

cmdline - is a string in the format: [option] object_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 SlickEdit Application Window. This allows the MDI Window to be displayed on top of the form.
-desktop
Use the desktop as the form's parent. 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 are 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.

Returns: typeless

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);
}

#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;
}

Applies To:

All Window Objects

Categories:

Form Functions, Menu Functions


show_all

_command void show_all()

Displays all lines in the current buffer. Resets selective display.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, 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


show_braces

_command typeless show_braces(_str maxNestLevel="")

Creates nested selective display based on the braces {}.

Parameters:

maxNestLevel - optionally specifies the limit on the nesting. Must be at least one.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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_code_block

_command void show_code_block()

Unhides lines in current code block. The definition of the current block depends on the language.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_code_block, hide_selection, hide_all_comments, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


show_col1

_command typeless show_col1()

Hides lines in the current buffer which do not contain a non-blank (space or tab) character in column one.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, selective_display


show_current_proc

_command void show_current_proc()

Hides lines in the current buffer which are not part of the current function.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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_procs


show_indent

_command void show_indent(_str maxNestLevel="")

Creates nested selective display based on leading spaces on lines.

Parameters:

maxNestLevel - optionally specifies the limit on the nesting. Must be at least one.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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_matching_paren

_command int show_matching_paren(_str select_block='', boolean search_backward=true)

Searches for the closest open parenthesis [, {, or ( that is at or before the cursor location and then temporarily places the cursor on the matching end parenthesis for a short period of time.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions

See Also:

find_matching_paren, keyin_match_paren


show_paragraphs

_command void show_paragraphs(...)

Show first line of each paragraph.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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_point

_command typeless show_point()

Used in EMACS emulation. Displays the cursor seek position, buffer size, decimal character code at cursor, and hexadecimal character code at cursor.

Applies To:

Edit Window

Category:

Edit Window Methods


show_procs

_command typeless show_procs(_str seldisp_flags="")

Hides lines in the current buffer which are not part of a function definition heading.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

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(_str showSelected='')

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.

Category:

Miscellaneous Functions


show_selected

_command void show_selected(_str showProperties='')

Brings the selected form being edited with the dialog editor to the front of the window Z-order and gives it the input focus.

Category:

Miscellaneous Functions


show_selection

_command void show_selection(_str markid="")

Show all lines in current selection.

Parameters:

markid - 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.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_code_block, hide_all_comments, hide_selection, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


shrink_window

_command typeless shrink_window()

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.

Applies To:

Edit Window

Category:

Window Functions

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


sign

int sign(typeless x, boolean zeroIsPositive=false)

Returns the sign (+1, 0, -1) of number.

Parameters:

x - Integer or float.

zeroIsPositive - (optional). Set to true if you want 0 to be considered a positive number (+1). Defaults to false.

Returns: int

+1 for positive signed value, -1 for negative signed value, 0 for zero value.

Category:

Miscellaneous Functions


signal_handler

int signal_handler(_str option, int index=-1)

Returns: int

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.

Category:

Keyboard Functions


size_mdi

_command void size_mdi()

Allows you to size the MDI window with the keyboard. Not supported by UNIX version.

Category:

Window Functions


size_window

_command void size_window()

Allows you to size an MDI child window with the keyboard. Not supported by UNIX version.

Applies To:

Edit Window

Category:

Window Functions


slick_enter

_command void slick_enter()

New binding of ENTER key when in Slick-C® mode. Handles syntax expansion and indenting for files with e, sh, and cmd extensions.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


slick_paren

_command void slick_paren()

(C mode only) Open Parenthesis

Handles syntax expansion or auto-function-help for Slick-C® mode. Use the C Options dialog box ("Tools", "Options", "File Extension Setup...", select "e" extension, "Options...") to change the main style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


slick_path_search

_str slick_path_search(_str name, _str options="")

Used for searching for SlickEdit executables, Slick-C® macros, help files, and miscellaneous 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.

Returns: _str

If successful, a complete file specification for filename is returned. Otherwise '' is returned.

Category:

File Functions

See Also:

path_search, include_search


slick_semicolon

_command void slick_semicolon()

Handles syntax expansion for one-line if and while statements. Just type "if", then semicolon, and it expands to "if (<cursor here>) <next hotspot>;

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


slick_space

_command void slick_space()

New binding of SPACE key when in Slick-C® mode. Handles syntax expansion and indenting for files with e, sh, or cmd extension.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


slickc_debug

_command void slickc_debug(_str option="")

This command is used to control the Slick-C® debugging.

To activate Slick-C debugging, execute the command "slickc_debug on". To stop Slick-C debugging, execute the command "slickc_debug off".

To activate Slick-C debugging and spawn another instance of SlickEdit to attach and control the debugging session, execute the command "slickc_debug attach". This is the most common way to launch the debugger.

The debugger has no effect on performance when it is inactive and only a minimal effect on performance when it is running.

To enable debugging for a single Slick-C command and terminate the debugger when the command completes, just pass the command name.

Parameters:

option - [ attach | on | off | <command> ]

Category:

Macro Programming Functions

See Also:

_SlickCProfiling


slickc_mode

_command void slickc_mode()

Activates Slick-C® file editing mode. The ENTER and SPACE BAR bindings are changed as well as the tab and margin settings.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


sort_buffer

_command int sort_buffer(_str cmdline='')

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
-FN
Sort filenames by name part only
-FC
Sort filenames as strings using file case sensitivity

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

Parameters:

cmdline - is a string in the format: [ A | D] [ E | I ] [ -N | -F | -FN | -FC ]

Returns: int

Returns 0 if successful. Common return codes are 1 (you tried to sort the build window), NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC. On error, message displayed.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

sort_on_selection, sort_within_selection, gui_sort


sort_on_selection

_command int sort_on_selection(_str cmdline='', _str markid='')

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
-FN
Sort filenames by name part only
-FC
Sort filenames as strings using file case sensitivity

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

Parameters:

cmdline - is a string in the format: [ A | D] [ E | I ] [ -N | -F | -FN | -FC ]

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

sort_buffer, sort_within_selection, gui_sort


sort_within_selection

_command typeless sort_within_selection(_str cmdline='')

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).
U
Remove duplicate lines.
-N
Sort numbers
-F
Sort filenames
-FN
Sort filenames by name part only
-FC
Sort filenames as strings using file case sensitivity

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

Parameters:

cmdline - is a string in the format: [ A | D] [ E | I ] [U] [ -N | -F | -FN | -FC ]

Returns: typeless

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.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

sort_buffer, sort_on_selection, gui_sort


spell_check

_command void spell_check(...)

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.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

spell_check_source, spell_check_word, spell_check_files


spell_check_files

_command void spell_check_files()

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.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

spell_check, spell_check_source, spell_check_files


spell_check_source

_command void spell_check_source(...)

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.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

spell_check, spell_check_word, spell_check_files


spell_check_word

_command void spell_check_word()

Spell checks the word at the cursor position.

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

spell_check, spell_check_source, spell_check_files


spell_options

_command typeless spell_options()

Displays Spell Options dialog box.

Category:

Miscellaneous Functions


spill_file_path

_command typeless spill_file_path(_str path="")

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.

Category:

File Functions


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Spin Properties

p_active_form
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_delay
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_increment
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


split

void split(_str delimited_string, _str delimiter, _str(&string_array)[])

Split a delimited string and insert it into an array.

Parameters:

delimited_string - Delimited string to turn into an array

delimiter - Delimiter that separates string parts

string_array - Array to recieve string parts minus delimiters

Category:

String Functions

See Also:

join, split2array


split2array

STRARRAY split2array(_str delimited_string, _str delimiter)

Split a delimited string and return it as an array.

Parameters:

delimited_string - Delimited string to turn into an array

delimiter - Delimiter that separates string parts

Category:

String Functions

See Also:

join, split


split_insert_line

_command void split_insert_line()

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.

Applies To:

Edit Window, Editor Control, Command Line

Categories:

Edit Window Methods, Editor Control Methods


split_line

_command void split_line()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


SSTab Methods

_clickLocation
_deleteActive
_getTabInfo
_setEnabled
sstGetTabCaption
sstGetTabHelp
sstGetTabToolTip


SSTab Properties

p_active_form
p_ActiveCaption
p_ActiveColor
p_ActiveEnabled
p_ActiveHelp
p_ActiveOrder
p_ActivePicture
p_ActiveTab
p_ActiveToolTip
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_DropDownList
p_edit
p_enabled
p_eventtab
p_eventtab2
p_FirstActiveTab
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_GrabbarLocation
p_height
p_help
p_HighlightTab
p_hwnd
p_hwndframe
p_isbutton_bar
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_MultiRow
p_name
p_next
p_NofTabs
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_Orientation
p_PaddingX
p_PaddingY
p_parent
p_PictureOnly
p_prev
p_TabsPerRow
p_view_id
p_window_id
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


sstGetTabCaption

_str sstGetTabCaption(int tabNumber)

Retrieves the caption from a tab in a tab control.

Parameters:

tabNumber - which tab to retrieve information for (0 - p_NofTabs - 1)

Returns: _str

_str caption of tab

Applies To:

SSTab

Category:

SSTab Methods


sstGetTabHelp

_str sstGetTabHelp(int tabNumber)

Retrieves the help from a tab in a tab control.

Parameters:

tabNumber - which tab to retrieve information for (0 - p_NofTabs - 1)

Returns: _str

_str help of tab

Applies To:

SSTab

Category:

SSTab Methods


sstGetTabToolTip

_str sstGetTabToolTip(int tabNumber)

Retrieves the tooltip from a tab in a tab control.

Parameters:

tabNumber - which tab to retrieve information for (0 - p_NofTabs - 1)

Returns: _str

_str tooltip of tab

Applies To:

SSTab

Category:

SSTab Methods


st

_command typeless st(_str module_name="")

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.

Returns: typeless

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.

Categories:

Macro Programming Functions, Miscellaneous Functions


st_position_on_error

_str st_position_on_error(_str errfile="")

Parses Slick-C® Translator error message. Cursor is placed on the error if one exists.

Returns: _str

Returns 0 if successful. Otherwise 1 is returned.

Category:

Miscellaneous Functions


start

_command typeless start(_str cmdline="")

Passes cmdline to operating system start command. This command is not supported by the UNIX version.

Category:

Miscellaneous Functions


start_process

_command typeless start_process(boolean OpenInCurrentWindow=false, boolean doSetFocus=true, boolean quiet=false, boolean uniconize=true)

Starts or activates the build window. The build window is a command shell running inside an editor buffer. The default command shell is defined by the COMSPEC (UNIX: SHELL) environment variable.

Returns: typeless

Returns 0 if successful. however, this does not mean that the command shell will execute successfully. A non-zero return code means that the build window 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.

Category:

Miscellaneous Functions

See Also:

stop_process, next_error, exit_process, set_next_error, reset_next_error, cursor_error, clear_pbuffer


start_recording

_command typeless start_recording()

Starts macro recording. Slick-C® macro code will be generated until end_recording, record_macro_toggle, record_macro_end_execute, or record_macro_end_execute_key is executed.

Category:

Macro Programming Functions

See Also:

end_recording, record_macro_toggle, save_macro, gui_save_macro, record_macro_end_execute, record_macro_end_execute_key, execute_last_macro, execute_last_macro_key


sticky_message

void sticky_message(_str msg)

Parameters:

string - is displayed on the message line. Message will remain on the message line until another message is displayed or clear_message is called.

Category:

Miscellaneous Functions

See Also:

message, clear_message, messageNwait, _message_box, popup_message, popup_imessage


stop

void stop()

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.

Category:

Miscellaneous Functions

See Also:

exit, _suspend, _resume


stop_build

_command void stop_build()

Sends a Ctrl+Break signal to the build window created by the start_process command.

Category:

Miscellaneous Functions

See Also:

start_process, next_error, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


stranslate

_str stranslate(_str original, _str replace_with, _str search_for, _str search_options="")

Replaces all occurrences of a search string within a string.

Parameters:

original - String to modify

replace_with - String to replace occurrences of search_for with

search_for - String to search for. May be a regular expression

search_options - Search options. See pos for valid options.

Returns: _str

Returns original with all occurrences of search_for replaced with replace_with. See pos function for information on valid search search_options.

Category:

String Functions

See Also:

pos


strappend

void strappend(_str &dest, _str source)

Parameters:

dest - [reference] destination string

source - source string

Returns: void

Appends source string to end of dest string. This function performs faster than using the statement "dest=dest:+source;".

Category:

String Functions


strcmp

int strcmp(_str s1, _str s2)

Perform a Unicode (or DBCS) string compare. Compare is typically Unicode except for OEM's which may start the editor in non-Unicode mode.

Parameters:

s1 - String 1

s2 - String 2

Returns: int

1
s1>s2
0
s1==s2
-1
s1

Category:

String Functions

See Also:

stricmp


stricmp

int stricmp(_str s1, _str s2)

Perform a case insensitive Unicode (or DBCS) string compare. Compare is typically Unicode except for OEM's which may start the editor in non-Unicode mode.

Parameters:

s1 - String 1

s2 - String 2

Returns: int

1
s1>s2
0
s1==s2
-1
s1

Category:

String Functions

See Also:

strcmp


strieq

boolean strieq(_str s1, _str s2)

Parameters:

s1 - input string 1

s2 - input string 2

Returns: boolean

Returns true if string1 matches string2 when compared case insentive.

Category:

String Functions


String Functions

_a2e
_asc
_chr
_dbcsIsLeadByte
_dbcsStartOfDBCS
_dbcsSubstr
_e2a
_escape_re_chars
_expand_tabsc
_expand_tabsc_raw
_GetBufferContents
_GetFileContents
_maybe_e2a
_parse_line
_rawLength
_rawSubstr
_rawText
_strBeginChar
_text_colc
_UTF8Chr
asc
center
dec2hex
env_case
eq_value2name
expand_tabs
field
get_match_substr
get_message
indent_string
isalnum
isalpha
isdigit
ishexnum
isinteger
isnumber
isprint
join
last_char
lastpos
length
lowcase
number2onoff
number2yesno
parse_file
pos
setonoff
setyesno
split
split2array
stranslate
strappend
strcmp
stricmp
strieq
strip
strip_filename
strip_last_word
strip_options
strrev
substr
text_col
togglecase
translate
trunc
upcase
verify
word


strip

_str strip(_str string, _str ltb="B", _str strip_char=" \t")

Parameters:

string - input string

ltb - leading, trailing, or both

strip_char - character to strip

Returns: _str

Returns string stripped of leading and/or trailing strip_char. 'ltb' may be one of 3 values with the following meaning:

  1. 'L' -- Remove leading strip_char
  2. 'T' -- Remove trailing strip_char
  3. 'B' -- (Default) Remove both leading and trailing strip_char

If strip_char is omitted, both tabs and spaces are stripped.

Example:

   strip(' abc ') :== 'abc'
   strip(' abc ','L')   :== 'abc '
   strip(' abc ','T')   :== ' abc'
   strip('  '\t'abc '\t,'B',' ') :== \t'abc '\t

Category:

String Functions


strip_filename

_str strip_filename(_str name, _str options)

Returns: _str

Returns filename with part stripped. P=Path, D=Drive, E=Extension, N=Name.

Categories:

File Functions, String Functions


strip_last_word

_str strip_last_word(_str &line)

Parameters:

line - line to parse

Returns: _str

Returns the last space delimited word in line. The last word and trailing spaces are deleted from line.

Category:

String Functions


strip_options

_str strip_options(_str name, _str &options, boolean StripLeadingOnly=false, boolean IgnoreQuotedStrings=false)

Returns: _str

Returns cmdline without words that start with the characters '-', '+', or '['. The variable Options is set to stripped option words.

Category:

String Functions


strrev

_str strrev(_str string, int utf8=-1)

Parameters:

string - Input string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that input and output string are SBCS/DBCS. 1 specifies that input and output string are UTF-8.

Returns: _str

Returns string with characters reversed.

Example:

   strrev('ABc')  == 'cBA'
   strrev('abc123')  == '321cba'

Category:

String Functions

See Also:

lowcase, upcase


sub

_command typeless sub()

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.

Category:

Miscellaneous Functions

See Also:

shell, execute, dos


substr

_str substr(_str string, int start, int length=-1, _str pad=" ")

Parameters:

string - input string

start - start position

length - number of characters to get, default is to get to end of string

pad - padding character if 'start+length' goes beyond end of string

Returns: _str

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 '

Category:

String Functions


sur_text

void sur_text(_str options='')

sur_text is a Slick-C® function that can only be used inside of a surround-with template. sur_text is used to indicate where the selected text should be placed and can be used multiple times within a single surround-with template. sur_text can take several parameters, which can appear in any order. The available parameters are:

  • -beautify -- (Default for C, Java, and others) Beautify the results of the template expansion.
  • -nobeautify -- (Default for HTML, XML and others) Do not attempt to beautify the results of the template expansion.
  • -deselect -- (Default) Do not leave the text selected/
  • -begin <text>-- Prefix each line of the selection with text.
  • -end <text> -- Suffix each line of the selection with text.
  • -ignore -- The -begin, -indent, -lowcase, -stripbegin and -upcase options will ignore any chars. when finding the beginning of the selected line.
  • -lowcase -- Convert each line of the selection to upper case
  • -upcase -- Convert each line of the selection to lower case
  • -indent -- Indent each line of selection.
  • -notext -- Do not paste any text.
  • -select -- Leave the text selected
  • -stripbegin <text> -- If any line begins with text, text will be removed from the line. This option is applied before -begin.
  • -stripend <text> -- If any line ends with text, text will be removedm the line. This option is applied before -end.

This function can also be used during alias expansion to indicate where the surrounding text should be inserted in order to invoke dynamic surround immediately after expanding an alias.

Category:

Editor Control Methods

See Also:

surround_with, expand_alias


surround_with

_command int surround_with(_str prefix='', _str markid='', boolean prompt=true)

Surrounds the selected block of text with a control structure or tag.

To create or modify a surround-with template:

  1. Bring up the Extension Options dialog box ("Tools", "Options", "File Extension Setup...")
  2. Select the language extension you wish to modify
  3. Select the "General" tab
  4. Press the "Aliases..." button. This will display the Alias Editor dialog box
  5. Check the "Surround With" checkbox
  6. surround-with templates are created and modified the same way as other aliases with the addition of the %\m sur_text% option

sur_text is a Slick-C® function that can only be used inside of a surround-with template. sur_text is used to indicate where the selected text should be placed and can be used multiple times within a single surround-with template. sur_text can take several options. Please see sur_text for more information.

Parameters:

prefix - Specifies the name of the surround-with template to use. If no argument is given or if multiple possible templates are found, the user is prompted to select the template they wish to use.

markid - Specifies the selection block to use.

prompt - if false and multiple matches are found, it is handled as if no matches were found

Returns: int

zero if a surround with template was expanded

Category:

Editor Control Methods

See Also:

sur_text, Alias Facility


switch_buffer

void switch_buffer(int, int, int)

This procedure is called just after 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.

Category:

Buffer Functions


symbol_coloring_errors_toggle

_command void symbol_coloring_errors_toggle(_str onoff="")

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


symbol_coloring_next_scheme

_command void symbol_coloring_next_scheme()

Cycle to the next symbol coloring scheme to be used with the current file.

Categories:

Edit Window Methods, Editor Control Methods


symbol_coloring_prev_scheme

_command void symbol_coloring_prev_scheme()

Cycle to the previous symbol coloring scheme to be used with the current file.

Categories:

Edit Window Methods, Editor Control Methods


symbol_coloring_set_scheme

_command void symbol_coloring_set_scheme(_str name="")

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


symbol_coloring_toggle

_command void symbol_coloring_toggle(_str onoff="")

Modify the symbol coloring scheme to be used with the current file.

Parameters:

name - Symbol coloring scheme to switch to

Categories:

Edit Window Methods, Editor Control Methods


tab

void tab()

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.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

backtab, tabs


tabify_region

_command typeless tabify_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

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 tabs(_str cmdline="")

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 ...

Parameters:

cmdline - is a string in the format: [+t1]: [+t2]: [+t3] ...

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

ctab, cbacktab, move_text_tab, gui_tabs


tag_browse_info_dump

void tag_browse_info_dump(struct VS_TAG_BROWSE_INFO cm, _str where="", int level=0)

Print tag browse info to the SlickEdit debug window.

Parameters:

cm - browse info structure

where - string representing where this was printed from

Category:

Tagging Functions

See Also:

say


tag_browse_info_equal

boolean tag_browse_info_equal(struct VS_TAG_BROWSE_INFO &cm1, struct VS_TAG_BROWSE_INFO &cm2, boolean case_sensitive=true)

Compare two tag browse info sets for equality.

Parameters:

rt1 - first tag browse info to compare

rt2 - first tag browse info to compare

case_sensitive - case sensitive comparison?

Returns: boolean

true if equal, false otherwise

Category:

Tagging Functions


tag_browse_info_init

void tag_browse_info_init(struct VS_TAG_BROWSE_INFO &cm)

Initialize a symbol browser tag information structure.

Parameters:

cm - tag browse info structure to initialize

Category:

Tagging Functions


tag_check_access_level

int tag_check_access_level(int context_flags, int tag_flags)

Determines access to a tag

Parameters:

context_flags - VS_TAGCONTEXT_

tag_flags - Tag flags indicating symbol attributes, see tag_insert_simple for details.

Returns: int

Returns 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.

Category:

Tagging Functions

See Also:

tag_check_context_flags, tag_insert_simple


tag_check_cached_context

int VSAPI tag_check_cached_context(int list_tags_flags)

Check if the list of symbols for the current file are already up-to-date. Switch to one of the cached file lists if necessary.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

list_tags_flags - (optional) statement level tagging option

Returns: int

1 if the context is up-to-date, 0 otherwise.

Category:

Tagging Functions

See Also:

tag_current_context, tag_get_context, tag_check_cached_locals


tag_check_cached_locals

int VSAPI tag_check_cached_locals(int start_seekpos, int end_seekpos, int context_id, int list_all_option)

Check if the list of symbols for the current file and position are already up-to-date. Switch to one of the cached local variable lists if necessary.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

start_seekpos - start seek position of function to search

end_seekpos - end seek position of function to search

context_id - context item to search for locas in

list_all_option - list all locals, or only in scope?

Returns: int

1 if the locals are up-to-date, 0 otherwise.

Category:

Tagging Functions

See Also:

tag_check_cached_context, tag_get_local


tag_check_context

int tag_check_context()

Check if the current buffer position is still within the current context

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

One of the following codes:

0
The context is not set or totally wrong (maybe changed buffers)
-1
The context info loaded, but the cursor is out of "current" context
1
The context is within the tag definition
2
The context is within the scope of the tag/function

Category:

Tagging Functions

See Also:

tag_current_context, tag_get_context


tag_check_context_flags

boolean tag_check_context_flags(int context_flags, int tag_flags, _str type_name)

Returns true if the tag having the given tag_flags and type matches the requirements set by the given context flags.

Parameters:

context_flags - VS_TAGCONTEXT_

tag_flags - Tag flags indicating symbol attributes, see tag_insert_simple for details.

type_name - tag type (from tag details)

Returns: boolean

Returns true if the tag with the given type and flags passes the context flags, otherwise, returns false.

Category:

Tagging Functions

See Also:

tag_check_access_level, tag_get_type, tag_insert_simple


tag_check_for_class

int tag_check_for_class(_str tag_name, _str outer_class, boolean case_sensitive, _str(&tag_files)[])

Look up tag_name and see if it is a class or struct name. If so, return the signature of the template in template_sig. The current object must be an editor control or current buffer.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name to check if it is a template class.

outer_class - Name of class that tag belongs to.

case_sensitive - Speciifies case_sensitive comparison

tag_files - (Input) Tag files to search

Returns: int

1 if a match was found, 0 of none found.

Category:

Tagging Functions

See Also:

tag_check_for_template, tag_check_for_define, tag_check_for_package, tag_check_for_typedef


tag_check_for_define

int tag_check_for_define(_str tag_name, int line_no, _str(&tag_files)[], _str &alt_tag_name)

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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name to check if it is a macro define.

line_no - If found in current context, define must be before 'line'

tag_files - (Input) Tag files to search

alt_tag_name - Returns value of #define macro.

Returns: int

Returns the number of matches was found, 0 of none found.

Category:

Tagging Functions

See Also:

tag_check_for_package, tag_check_for_template, tag_check_for_enum, tag_check_for_typedef


tag_check_for_enum

int tag_check_for_enum(_str symbol, _str class_name, _str(&tag_files)[], boolean case_sensitive)

Lookup 'symbol' and see if it could be an enumerated type. If so, return 1, otherwise return 0.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

symbol - symbol to investigate

class_name - namespace or class to search

tag_files - (reference to _str[]) tag files to search

case_sensitive - use case-sensitive comparisons?

Returns: int

1 if 'symbol' could be an enum, 0 otherwise, <0 on error.

Category:

Tagging Functions


tag_check_for_package

int tag_check_for_package(_str tag_name, _str(&tag_files)[], boolean exact_match, boolean case_sensitive, ...)

Look up tag_name and see if it is a package, namespace, module or unit.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name to check if it is a package or package prefix.

tag_files - (reference to _str[]) list of tag files to search

exact_match - Look for exact match rather than prefix match

case_sensitive - Specifies case sensitive comparison

Returns: int

Returns non-zero value if the given tag is a package name or the prefix of a package name. Otherwise returns 0.

Category:

Tagging Functions

See Also:

tag_check_for_define, tag_check_for_template, tag_check_for_typedef, tag_tree_type_is_package


tag_check_for_template

int tag_check_for_template(_str tag_name, _str outer_class, boolean case_sensitive, _str(&tag_files)[], _str &template_sig)

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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name to check if it is a template class.

outer_class - Name of class that tag belongs to.

case_sensitive - Speciifies case_sensitive comparison

tag_files - (Input) Tag files to search

template_sig - (Output) returns signature of template_sig

Returns: int

1 if a match was found and sets template_sig, 0 of none found.

Category:

Tagging Functions

See Also:

tag_check_for_class, tag_check_for_define, tag_check_for_package, tag_check_for_typedef


tag_check_for_typedef

int tag_check_for_typedef(_str symbol, _str(&tag_files)[], boolean case_sensitive, _str namesapce_name=null)

Lookup tag_name and see if it could be a typedef symbol. If so, return 1, otherwise return 0.

This function ignores class scope. Simply put, if tag_name 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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name to check if it is a typedef

tag_files - (Input) Tag files to search

case_sensitive - use case-sensitive comparisons?

namespace_name - namespace or class to search

Returns: int

Returns 1 if tag_name could be a typedef. Returns 0 if tag_name is not a typedef. <0 on error.

Category:

Tagging Functions

See Also:

tag_check_for_define, tag_check_for_package, tag_check_for_template


tag_check_friend_relationship

int tag_check_friend_relationship(_str class_name, _str friend_list)

Parameters:

class_name - class which tag is coming from

friend_list - list of classes that are friendly to our context

Returns: int

Returns true if the given given class is among the friends on the given friend list. Otherwise it returns false. Since this language feature is specific to C++, the check is always case sensitive.

Category:

Tagging Functions


tag_clear_context

int tag_clear_context(_str file_name=null)

Clears all context information.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

file_name - Name of file to initialize context for

Returns: int

0 on success, <0 or error.

Category:

Tagging Functions

See Also:

tag_insert_context


tag_clear_embedded

void tag_clear_embedded()

Clear the list of embedded context information.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Category:

Tagging Functions


tag_clear_locals

int tag_clear_locals(int local_id)

Kill all locals after 'local_id', not including 'local_id'

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

local_id - id for the local variable to start removing at Use '0' to remove all locals.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_num_of_locals, tag_insert_local2


tag_clear_matches

int tag_clear_matches()

Clears all tags out of the match set.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_match, tag_insert_match_fast


tag_close_all

_command typeless tag_close_all()

Close all currently open tag databases.

Returns: typeless

0 on success, <0 on error.

Category:

Tagging Functions

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_all_db

int tag_close_all_db()

Closes all open tag databases.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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=null, boolean leave_open=false)

Close the current or specified tag database.

Parameters:

file_name - Explicite filename of database to close otherwise the current open database is closed.

leave_open - Leave the tag file open read-only

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_close_all_db, tag_create_db, tag_current_db, tag_flush_db, tag_open_db, tag_read_db


tag_close_db2

int tag_close_db2(_str dbfilename=null)

Deprecated. Use tag_close_db() instead with caching options.

Close the given tag database (or the current one). This does not technically close the database, it only switches it to being open for read-only. This is useful to clean up after writing to a database. Use tag_close_db to permanently close a database.

Higher level than tag_close_db. Closes the database for write options, leaving it open for read options, caching anything that was buffered.

Parameters:

dbfilename - (optional) name of tag database, default is current

Returns: int

0 on success, <0 on error.

Since:

3.0

Category:

Tagging Functions

See Also:

tag_close_db()


tag_context_match_tags

int tag_context_match_tags(var errorArgs, _str &tag_name, boolean exact_match, boolean case_sensitive, boolean find_parents, int &num_matches, int max_matches, ...)

The current object must be an editor control positioned on the tag that you wish to find matches for, with the edit mode selected.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

errorArgs - Array of strings for return code

tag_name - Name of occurrence to match against

exact_match - Exact match or prefix match?

case_sensitive - Case sensitive tag search?

find_parents - Find instances of this tag in parent classes

num_matches - (output) number of matches found

max_matches - maximum number of matches to find

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

0 on success, <0 on error, >0 on Context Tagging® error.

Category:

Tagging Functions


tag_create_db

int tag_create_db(_str file_name, int db_type=VS_DBTYPE_tags)

Create a tag database, with standard tables, index, and types.

Parameters:

file_name - file path where to create new database If file_name exists, it will be truncated.

db_type - if not given, creates tag database. if (db_type==VS_DBTYPE_references), then creates a tag references database.

Returns: int

Returns database handle >= 0 on success, <0 on error.

Since:

3.0

Category:

Tagging Functions

See Also:

tag_close_all_db, tag_close_db, tag_current_db, tag_flush_db, tag_open_db, tag_read_db


tag_current_context

int tag_current_context()

Return the index of the current context item.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

Returns the index of the current context tag, calculated using the current buffer seek position. Returns <0 on error or 0 if no current context.

Category:

Tagging Functions

See Also:

tag_check_cached_context, tag_get_context, tag_nearest_context


tag_current_context_name

int tag_current_context_name()

Return the index of the current context item whose name and name location matches the symbol under the cursor.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

<0 on error, 0 if no current context.

Category:

Tagging Functions

See Also:

tag_current_context, tag_set_context_name_location


tag_current_db

_str tag_current_db()

Return the name of the database currently open

Returns: _str

name of database, or the empty string on error.

Category:

Tagging Functions


tag_current_local

int tag_current_local()

Return the index of the current local variable.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

Returns 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.

Category:

Tagging Functions

See Also:

tag_get_local2, tag_insert_local2


tag_current_local_name

int tag_current_local_name()

Return the index of the current local item whose name and name location matches the symbol under the cursor.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

<0 on error, 0 if no current local.

Category:

Tagging Functions

See Also:

tag_current_local, tag_set_local_name_location


tag_current_statement

int tag_current_statement()

Return the index of the current context item, including statements and preprocessing.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

Returns the index of the current context tag, calculated using the current buffer seek position. Returns <0 on error or 0 if no current context.

Category:

Tagging Functions

See Also:

tag_check_cached_context, tag_get_context, tag_nearest_context, tag_current_context


tag_current_version

int tag_current_version()

Return the version of the tags database currently open.

Returns: int

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 See VS_REF_LATEST_VERSION

Category:

Tagging Functions

See Also:

tag_close_all, tag_close_db, tag_create_db, tag_current_db, tag_flush_db, tag_open_db, tagsdb_version


tag_dispose_async_tagging_result

int tag_dispose_async_tagging_result(_str fileName, int bufferId)

Dispose of the last asynchronous tagging job which was completed.

Parameters:

fileName - Name of file to dispose of results for

bufferId - ID of editor buffer

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_end_context

int tag_end_context(int context_id, int end_line_no, int end_seekpos)

Set the end positions of the context with the given context ID.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

context_id - Context ID [ from 1 to tag_get_num_of_context() ] of context tag to set end position of.

end_line_no - ending line number of tag within file

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_context


tag_end_local

int tag_end_local(int context_id, int end_line_no, int end_seekpos)

Set the end positions of the local with the given local ID.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

local_id - Local ID [ from 1 to tag_get_num_of_locals() ] of local tag to set end position of.

end_line_no - ending line number of tag within file

end_seekpos - seek position where the tag ends. Technically, this is the seek position of the last character in the tag. Using a C local variable, "int a;" for example, this is the seek position of the of the semicolon.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_local, tag_insert_local2


tag_ext_inherits_from

int tag_ext_inherits_from(_str parent, _str ext=null)

Deprecated. use _LanguageInheritsFrom()

Does the current extension match or inherit from the given extension?

If 'ext' is not specified, the current object must be an editor control.

Parameters:

parent - extension to compare to

ext - current language (default=p_LangId)

Returns: int

'true' if the extension matches, 'false' otherwise.

Category:

Tagging Functions


tag_filter_type

int tag_filter_type(int type_id, int filter_flags, _str type_name=null, int tag_flags=0)

Filter the given tag type based on the given filter flags

Parameters:

type_id - tag type ID

filter_flags - 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 - Look up type ID using this name

tag_flags - Check tag flags for VS_TAGFLAG_maybe_var

Returns: int

Returns 1 if the type is allowed according to the flags, 0 if not.

Category:

Tagging Functions

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=null, boolean normalize=false, boolean case_sensitive=true, _str cur_class_name=null)

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.

Parameters:

class_name - (Output) Name of class

search_class_name - Specific class to search for (prefix search)

normalize - Attempt to qualify search_class_name

case_sensitive -

cur_class_name - Name of current class in context

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_class, tag_next_class


tag_find_closest

int tag_find_closest(_str tag_name, _str file_name, int line_no, boolean case_sensitive=false)

Retrieve tag in the given file closest to the given line number. Use tag_get_info to extract the details about the tag.

Parameters:

tag_name - Tag name to search for

file_name - Full path to file containing tag

line_no - Line that tag is expected to be present on

Returns: int

0 on success, <0 on error, or BT_RECORD_NOT_FOUND_RC if no such tag.

Category:

Tagging Functions

See Also:

tag_find_equal, tag_next_equal


tag_find_context

int tag_find_context(_str tag_name, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Deprecated. Use tag_find_context_iterator(), which is re-entrant.

Find the first context entry with the given tag prefix. Use tag_get_context to extract defaults about the tag.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function. This is considered as a write operation because it uses an iterator to traverse the items in the context.

Parameters:

tag_name - Tag name or prefix of tag name

exact - Search for exact match or prefix match

case_sensitive - Case sensitive string comparison?

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

Returns context ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_get_class, tag_next_class


tag_find_context_iterator

int tag_find_context_iterator(_str tag_name, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Find the first context entry with the given tag prefix. Use tag_get_context to extract defaults about the tag.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - Tag name or prefix of tag name

exact - Search for exact match or prefix match

case_sensitive - Case sensitive string comparison?

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

Returns context ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_get_class, tag_next_class


tag_find_equal

int tag_find_equal(_str tag_name, boolean case_sensitive=false, _str class_name=null)

Retrieve the first tag with the given tag name. Use tag_get_info to extract the details about the tag.

Parameters:

tag_name - Name of tag to search for

case_sensitive - Case sensitive tag name comparison

class_name - Class name to search for tag in

Returns: int

0 on success, <0 on error, or BT_RECORD_NOT_FOUND_RC if no such tag.

Category:

Tagging Functions

See Also:

tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix


tag_find_ext_callback

int tag_find_ext_callback(_str callback_name, _str ext=null)

Deprecated. use _FindLanguageCallbackIndex()

This function is used to look up an extension-specific callback function.

Return the names table index for the callback function for the current language, or a language we inherit behavior from. The current object should be an editor control.

Parameters:

callback_name - name of callback to look up, with a '%s' marker in place where the extension would be normally located.

ext - current language (default=p_LangId)

Returns: int

Names table index for the callback. 0 if the callback is not found or not callable.

Category:

Tagging Functions


tag_find_extension

int tag_find_extension(_str &lang, _str search_for=null)

Deprecated. Use tag_find_language().

API function for finding what languages are tagged in this database, typically, there is only one. Note that if files are added and removed from a project, stale language types may be left around. Languages are determined by the language ID for the file, as represented by p_LangId.

Parameters:

lang - (reference) set to first language found

search_for - (optional) language ID to search for

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

p_LangId, tag_get_extension, tag_next_extension, tag_set_extension


tag_find_file

int tag_find_file(_str &file_name, _str search_file=null)

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.

Parameters:

file_name - (Output) Full path of file containing tags

search_for - Specific file to search for (prefix search)

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_file, tag_find_in_file, tag_next_file


tag_find_friends_of_class

int tag_find_friends_of_class(_str class_name, _str(&tag_files)[], _str &friend_list)

Find all the friends of the given class in the current context and tag files.

Parameters:

class_name - class to find friends of

tag_files - List of tag files to search

friend_list - (reference) set to list of friends, separated by VS_TAGSEPARATOR_parents

Returns: int

0 on success, <0 on error. Having no friends is considered as a success.

Category:

Tagging Functions


tag_find_friends_to_tag

int tag_find_friends_to_tag(_str tag_name, _str class_name, _str(&tag_files)[], _str &friend_list)

Find all the classes which are friendly towards the given tag name or it's class or outer classes.

Parameters:

tag_name - tag to find friends to

class_name - class to find friends to

tag_files - List of tag files to search

friend_list - (reference) set to list of friends, separated by VS_TAGSEPARATOR_parents

Returns: int

0 on success, <0 on error. Having no friends is considered as a success.

Category:

Tagging Functions


tag_find_global

int tag_find_global(int type_id, int mask, int nzero)

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.mask != 0). Tag names are ordered lexicographically, case insensitive. Use tag_get_info to extract the details about the tag.

Parameters:

type_id - Tag type ID. See tag_get_type for a list of all standard tag types. if (type_id<0), returns tags with ID>VS_TAGTYPE_LASTID

mask - Tag flags indicating symbol attributes, see tag_insert_simple for details.

nzero - if 1, succeed if mask & tag.flags != 0 if 0, succeed if mask & tag.flags == 0

Returns: int

0 on success, <0 on error.

Example:

The following would be used to find the first inline global function.

  tag_find_global(VS_TAGTYPE_function, VS_TAGFLAG_inline, true);

Category:

Tagging Functions

See Also:

tag_get_type, tag_next_global


tag_find_in_class

int tag_find_in_class(_str class_name)

Find the first tag belonging to the given class. Use tag_get_info to extract the details about the tag.

Parameters:

class_name - name of class, containing tags

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_get_class, tag_get_info, tag_next_in_class, tag_next_class


tag_find_in_file

int tag_find_in_file(_str file_name)

Find the first tag in the given file. Tags are returned unsorted. Use tag_get_info to extract the details about the tag.

Parameters:

file_name - full path of file containing tags

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

Retrieve the name of the first file included by file_name

Parameters:

file_name - Full path of "main" source file

include_name - (Output) Full path of included file

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

Retreive the name of first the source file that included (directly or indirectly), the given file (expected to be an include file).

Parameters:

file_name - Full path of file that was included

included_by - (Output) full path of source file

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_find_include_file, tag_set_date, tag_insert_tag, tag_next_include_file, tag_next_included_by


tag_find_language

int tag_find_language(_str &lang, _str search_for=null)

API function for finding what languages are tagged in this database, typically, there is only one. Note that if files are added and removed from a project, stale language types may be left around. Languages are determined by the language ID for the file, as represented by p_LangId.

Parameters:

lang - (reference) set to first language found

search_for - (optional) language ID to search for

Returns: int

0 on success, <0 on error.

Since:

13.0

Category:

Tagging Functions

See Also:

p_LangId, tag_get_language, tag_next_language, tag_set_language


tag_find_local

int tag_find_local(_str tag_prefix, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Deprecated. Use tag_find_local_iterator() because it is reentrant.

Find the first local tag with the given tag prefix, or if 'exact', with the exact tag name. Use case-sensitive match if case_sensitive != 0. Use tag_get_local2 to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function. This is considered as a write operation because it uses an iterator to traverse the items in the context.

Parameters:

tag_prefix - tag name or prefix of tag name

exact - search for exact match or prefix match

case_sensitive - case sensitive string comparison?

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

Local ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_get_local, tag_get_local2, tag_next_local


tag_find_local_iterator

int tag_find_local_iterator(_str tag_prefix, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Find the first local tag with the given tag prefix, or if 'exact', with the exact tag name. Use case-sensitive match if case_sensitive != 0. Use tag_get_local2 to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_prefix - tag name or prefix of tag name

exact - search for exact match or prefix match

case_sensitive - case sensitive string comparison?

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

Local ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_get_local, tag_get_local2, tag_next_local


tag_find_occurrence

int tag_find_occurrence(_str tag_name, boolean exact_match=true, boolean case_sensitive=false)

Find the first occurrence with the given tag name or tag prefix. Use tag_get_occurrence (below) to get details about the occurrence.

Parameters:

tag_name - Tag name or prefix to search for

exact_match - Exact (word) match or prefix match (0)

case_sensitive - Case sensitive search?

Returns: int

0 on success, BT_RECORD_NOT_FOUND_RC if not found, <0 on error.

Category:

Tagging Functions


tag_find_prefix

int tag_find_prefix(_str tag_prefix, boolean case_sensitive=false, _str class_name=null)

Retrieve the first tag with the given tag name (case-insensitive). Use tag_get_info to extract the details about the tag.

Parameters:

tag_prefix - tag name prefix to search for

case_sensitive - Case sensitive tag name comparison

class_name - Class name to search for tag in

Returns: int

0 on success, <0 on error, or if no such tag.

Category:

Tagging Functions

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)

Find the first location in which the given tag is referenced. The tag is identified by its unique ID, see tag_match_instance().

Parameters:

inst_id - Unique ID of tag instance.

ref_type - (Output) Reference type (see VS_REFTYPE_*)

file_name - (Output) Full path of file the tag is located in

line_no - (Output) Line number of tag within file

Returns: int

Returns instance ID (> 0) of context of reference, 0 if unknown, or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

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 (container/item relationships).

Parameters:

inst_id - Unique ID of tag instance.

ref_type - (Output) reference type (see VS_REFTYPE_*)

file_name - (Output) Full path of file the tag is located in

line_no - (Output) Line number of tag within file

Returns: int

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.

Category:

Tagging Functions

See Also:

tag_get_instance_info, tag_match_instance, tag_next_refer_to


tag_find_regex

int tag_find_regex(_str tag_regex, _str options='')

Retrieve the next tag with the a tag name matching the given regular expression with the given matching options. Use tag_get_info to extract the details about the tag.

Parameters:

tag_regex - tag name regular expression to search for

search_options - search options, passed on to pos()

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

pos, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix, tag_next_regex


tag_find_tag

int tag_find_tag(_str tag_name, _str type_name, _str class_name, _str arguments=null)

Retrieve first tag with the given tag name, type, and class (all are necessary to uniquely identify a tag). If class_name is unknown, simply use NULL. Use tag_get_info to extract the details about the tag.

Parameters:

tag_name - name of tag to search for

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

class_name - name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

arguments - function arguments to attempt to match. Ignored if they result in no matches.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_find_equal, tag_find_prefix, tag_get_detail, tag_get_info, tag_next_tag


tag_find_type

int tag_find_type(_str &type_name, _str search_for=null)

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.

Parameters:

type_name - (Output) full path of type containing tags

search_for - Specific type to search for (prefix search)

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_type, tag_next_type


tag_flush_db

int tag_flush_db()

Flush all unwritten data to disk for the database.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_close_all_db, tag_close_db, tag_create_db, tag_current_db, tag_open_db, tag_read_db


tag_get_async_locals_bounds

int tag_get_async_locals_bounds(int &startSeekpos, int &endSeekpos)

Get the start and end seek position bounds for the last completed tagging job. This is only needed, in general, for local variable tagging.

Parameters:

startSeekpos - (output) start seek position

endSeekpos - (output) end seek position

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_get_async_tag_database

int tag_get_async_tag_database(_str &tagDatabase)

Return the tag database to be updated, associated with last completed tagging job.

Parameters:

tagDatabase - full path to tag database to open and update

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_get_async_tagging_job

int tag_get_async_tagging_job(_str fileName, int taggingFlags, int bufferId, _str fileDate, int lastModify, _str tagDatabase=null, int startLine=1, int startSeekPos=0, int stopSeekPos=0)

Check if there is an asynchronous tagging operation already queued for the given file. If there is a job running or queued then cancel the job if the file has been modified.

Category:

Tagging Functions


tag_get_async_tagging_result

int tag_get_async_tagging_result(_str &fileName, int &taggingFlags, int &bufferId, int &lastModified)

Check the result of an asynchronous tagging operation, in order to report our progress as we create a tag file in the background, or update the current context or locals in the background, or update the tagging for other buffers in the background.

Parameters:

fileName - (output) set to name of file tagged

taggingFlags - (output) set to tagging flags (VSLTF_*) for operation

bufferId - (output) set to buffer Id of file which was tagged

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_get_browse_info

int tag_get_browse_info(_str params, struct VS_TAG_BROWSE_INFO &cm, boolean quiet=false, struct VS_TAG_BROWSE_INFO(&all_choices)[]=null, boolean return_choices=false, boolean filterDuplicates=true, boolean filterPrototypes=true, boolean filterDefinitions=false, boolean force_tag_search=false, boolean filterFunctionSignatures=false, VS_TAG_RETURN_TYPE(&visited):[]=null, int depth=0)

Get tag information struct for the symbol under the cursor

Parameters:

params - find tag options (-e [ext] or -sc for Slick-C®)

cm - (output) symbol information

quiet - if true, just return status, no message boxes

all_choices - (output) array of choices

return_choices - return tag choices instead of prompting?

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_get_cache_size

int tag_get_cache_size()

Returns: int

Return the actual amount of memory being used for the tag file cache. The actual tagging cache size is determined dynamically based on the amount of memory available at startup as well as the settings for def_tagging_cache_size and def_tagging_cache_max.

Since:

14.0.2

Category:

Tagging Functions


tag_get_class

int tag_get_class(int class_id, _str &class_name)

Retreive the name of the first class included in this tag database.

Parameters:

class_id - id of class/package, from tag_get_detail()

class_name - (Output) name of class

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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 &type_name, _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)

Retrieve information about the given context ID.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

context_id - Context ID [ from 1 to tag_get_num_of_context() ] of context tag to retrieve information about.

tag_name - (Output) tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) Full path of file the tag is located in

start_line_no - (Output) Start line number of tag within file

start_seekpos - (Output) Start seek position of tag within file

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) Start seek position of tag inner scope

end_line_no - (Output) ending line number of tag within file

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)Tag flags indicating symbol attributes, see tag_insert_simple for details.

arguments - (Output) arguments or formal parameters

return_type - (Output) Return type and/or value of symbol or constant. See VS_TAGSEPARATOR_equals for more details.

Returns: int

0 on success, or <0 on error.

Category:

Tagging Functions

See Also:

tag_clear_context, tag_current_context, tag_find_context, tag_get_detail2, tag_get_num_of_context, tag_next_context, tag_get_context_simple


tag_get_context_simple

int tag_get_context_simple(int context_id, _str &tag_name, _str &type_name, _str &file_name, int &line_no, _str &class_name, int &tag_flags, _str &arguments, _str &return_type)

Retrieve minimal information about the given context ID.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

context_id - Context ID [ from 1 to tag_get_num_of_context() ] of context tag to retrieve information about.

tag_name - (Output) tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) Full path of file the tag is located in

start_line_no - (Output) Start line number of tag within file

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)Tag flags indicating symbol attributes, see tag_insert_simple for details.

arguments - (Output) arguments or formal parameters

return_type - (Output) Return type and/or value of symbol or constant. See VS_TAGSEPARATOR_equals for more details.

Returns: int

0 on success, or <0 on error.

Category:

Tagging Functions

See Also:

tag_clear_context, tag_current_context, tag_find_context, tag_get_detail2, tag_get_num_of_context, tag_next_context, tag_get_context


tag_get_current_context

int tag_get_current_context(_str &cur_tag_name, int &cur_flags, _str &cur_type_name, int &cur_type_id, _str &cur_context, _str &cur_class, _str &cur_package)

Determine the name of the current class or package context. The current object needs to be an editor control.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

cur_tag_name - name of the current tag in context

cur_flags - Tag flags indicating symbol attributes, see tag_insert_simple for details.

cur_type_name - type (VS_TAGTYPE_*) of the current tag

cur_type_id - type ID (VS_TAGTYPE_*) of the current tag

cur_context - class name representing current context

cur_class - This parameter is broken. It only returns the class if the class is in a package. cur_context minus the package name

cur_package - only package name for the current context

Returns: int

0 if no context, context ID >0 on success, <0 on error.

Category:

Tagging Functions


tag_get_date

int tag_get_date(_str file_name, _str &modify_date, _str included_by=null)

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 cooridinates (YYYYMMDDHHMMSSmmm). This function has the side effect of finding and position the file iterator on the given file name, returns BT_RECORD_NOT_FOUND_RC if file_name is not in the database.

Parameters:

file_name - name of file to update date of tagging for

modify_date - (Output) Modification date of file when tagged. Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms).

included_by - name of file that 'file_name' was included by

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions

See Also:

tag_get_file, tag_find_file, tag_next_file, tag_set_date


tag_get_db_comment

_str tag_get_db_comment()

Return the database description/title.

Returns: _str

database description, null terminated, or the empty string on error.

Category:

Tagging Functions

See Also:

tag_set_db_comment


tag_get_db_flags

int tag_get_db_flags()

Return the database flags VS_DBFLAG_

Returns: int

<0 on error, flags bitset on success.

Category:

Tagging Functions


tag_get_detail

void tag_get_detail(int tag_detail, var result)

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.

Parameters:

tag_detail - ID of default to extract. One of the following:

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.

Category:

Tagging Functions

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 item_id, var result)

Get the given detail type for the given item either as a context tag, local tag, or part of a match set.

For synchronization, macros should perform a tag_lock_matches(false) or tag_lock_context(false) prior to invoking this function.

Parameters:

tag_detail - ID of detail to extract. One of the following:

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_name_linenum
(int) line number symbol name is on
VS_TAGDETAIL_context_name_seekpos
(int) seek position of symbol name
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_name_linenum
(int) line number symbol name is on
VS_TAGDETAIL_local_name_seekpos
(int) seek position of symbol name
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_name_linenum
(int) line number symbol name is on
VS_TAGDETAIL_match_name_seekpos
(int) seek position of symbol name
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.

item_id - context_id, local_id, or match_id

result - (Output) value of detail is returned here

Category:

Tagging Functions

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_embedded

int tag_get_embedded(int i, int &start_seekpos, int &end_seekpos)

Retrieve the embedded context information for the given position 'i' (first is 0).

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

i - index of embedded context to retrieve

start_seekpos - (Output) set to start seek position for embedded context

end_seekpos - (Output) set to end seekposition for embedded context

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_get_extension

int tag_get_extension(_str file_name, _str &lang)

Deprecated. Use tag_get_language()

API function for retrieving the language type for the given filename. This corresponds to the p_LangId property of file_name, not necessarily the literal file extension.

Parameters:

file_name - Name of file to set language property for

lang - (Output) p_LangId property for file_name

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions

See Also:

p_LangId, 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)

Retreive the name of the file with the given file ID.

Parameters:

file_id - ID of file, from tag_get_detail()

file_name - (Output) Full path of file containing tags

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

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.

Parameters:

tag_name - (Output) Tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) Full path of file the tag is located in

line_no - (Output) line number of tag within file set to 0 if not defined.

class_name - (Output) name of class that tag is present in, uses concatenation (as defined by language rules) to specify names of inner classes (see insert, above). set to empty string if not defined.

tag_flags - (Output) Tag flags indicating symbol attributes, see tag_insert_simple for details.

Category:

Tagging Functions

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)

Retrieve the set of parent classes for a given class.

This function has the side effect of position the class iterator on the given class. Returns BT_RECORD_NOT_FOUND_RC if class_name is not in the database.

Parameters:

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.

Returns: int

0 on success, < 0 on error. Returns BT_RECORD_NOT_FOUND_RC if class_name is not in the database.

Category:

Tagging Functions


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)

Extract the supplementary information associated with a tag instance.

Parameters:

inst_id - Unique ID of instance to get info about. Use tag_match_instance() to get this ID.

inst_name - (Output) Name of tag instance (case insensitive)

inst_type - (Output) Tag type name. See tag_get_type for a list of all standard tag types.

inst_flags - (Output) Reference attributes (see VS_REFFLAG_*)

inst_class - (Output) class associated with tag (zero for global)

inst_args - (Output) Arguments associated with tag (eg. function args)

file_name - (Output) Name of file where tag instance is located

line_no - (Output) Line which tag instance is on

Category:

Tagging Functions

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_language

int tag_get_language(_str file_name, _str &lang)

API function for retrieving the language type for the given filename. This corresponds to the p_LangId property of file_name, not necessarily the literal file extension.

Parameters:

file_name - Name of file to set language property for

lang - (Output) p_LangId property for file_name

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Since:

13.0

Category:

Tagging Functions

See Also:

p_LangId, tag_get_file, tag_find_file, tag_next_file, tag_set_language


tag_get_local

int tag_get_local(int local_id, _str &tag_name, _str &type_name, _str &file_name, int &line_no, _str &class_name, int &tag_flags, _str &arguments, _str &return_type)

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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

local_id - Local ID [ from 1 to tag_get_num_of_locals() ] of local variable to retrieve information about.

tag_name - (Output) tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) full path of file the tag is located in

line_no - (Output) start line number of tag within file

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) Tag flags indicating symbol attributes, see tag_insert_simple for details.

arguments - (Output) arguments or formal parameters

return_type - (Output) constant value or return type

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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 &type_name, _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)

Retrieve complete information about the given local ID.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

local_id - local ID to look up (from tag_insert_local)

tag_name - (Output) tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) full path of file the tag is located in

start_linenum - (Output) start line number of tag within file

start_seekpos - (Output) start seek position of tag within file

scope_linenum - (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_linenum.

scope_seekpos - (Output) Seek position where the scope of the tag begins in file_name. See explanation above.

end_linenum - (Output) ending line number of tag within file

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, pass the empty string for this value.

tag_flags - (Output) Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (Output) arguments or formal parameters

return_type - (Output) Return type and/or value of symbol or constant. See VS_TAGSEPARATOR_equals for more details.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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 match_id, _str &tag_file, _str &tag_name, _str &type_name, _str &file_name, int &line_no, _str &class_name, int &tag_flags, _str &arguments, _str &return_type)

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.

For synchronization, macros should perform a tag_lock_matches(false) prior to invoking this function.

Parameters:

match_id - Match ID [ from 1 to tag_get_num_of_matches() ] of tag match to retrieve information about.

tag_file - (Output) tag file that match came from

tag_name - (Output) Tag string (native case)

type_name - (Output) Tag type name, see tag_get_type.

file_name - (Output) Full path of file the tag is located in

line_no - (Output) Start line number of tag within file

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) Tag flags indicating symbol attributes, see tag_insert_simple for details.

arguments - (Output) arguments or formal parameters

return_type - (Output) constant value or return type

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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_match_info

int tag_get_match_info(int match_id, VS_TAG_BROWSE_INFO &cm)

Populate the given symbol struct with all the known information corresponding to the given match ID in the current match set.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

match_id - match ID

cm - (output) symbol information

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_match


tag_get_next_argument

int tag_get_next_argument(_str params, int &arg_pos, _str &argument, _str ext=null)

Disect the next argument (starting at 'arg_pos') from the given parameter list (params). Place the result in 'argument'. This is designed to handle both C/C++ style, comma separated argument lists, and Pascal/Ada semicolon separated argument lists.

If you do not know the number of bytes to allocate to 'argument', call this with 'argument' as NULL, and calculate ('arg_pos' - 'orig_pos' + 1).

Parameters:

params - complete parameter list to parse

arg_pos - current position in argument list use 0 to find first argument

argument - [output] set to the next argument in the argument list

ext - current file extension

Returns: int

Returns the position where the argument begins in 'params'. Note, this may differ from the original value of 'arg_pos' if there are leading spaces. Returns STRING_NOT_FOUND_RC and sets 'argument' to the empty string if there are no more arguments in the parameter list.

Category:

Tagging Functions


tag_get_num_async_tagging_jobs

int tag_get_num_async_tagging_jobs(_str jobKind="A")

Parameters:

jobKind - The kind of job to return the number of. Currently, only "A" (All) is supported.

  • "A" for all jobs
  • "U" for unfinished jobs
  • "Q" for just queued jobs
  • "F" for finished jobs
  • "R" for running jobs
  • "T" for the number of threads running

Returns: int

Return the number of background tagging jobs queued, finished, and running.

Category:

Tagging Functions


tag_get_num_of_context

int tag_get_num_of_context()

Return the total number of context tags.

For synchronization, macros should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

The total number of context tags.

Category:

Tagging Functions

See Also:

tag_insert_context


tag_get_num_of_embedded

int tag_get_num_of_embedded()

Returns: int

Return the number of embedded contexts in the current buffer.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Category:

Tagging Functions


tag_get_num_of_locals

int tag_get_num_of_locals()

Return the total number of local variables

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Returns: int

the number of local variables

Category:

Tagging Functions

See Also:

tag_insert_local2


tag_get_num_of_matches

int tag_get_num_of_matches()

Return the total number of search matches

For synchronization, macros should perform a tag_lock_matches(false) prior to invoking this function.

Returns: int

the total number of matches

Category:

Tagging Functions

See Also:

tag_insert_match, tag_insert_match_fast


tag_get_occurrence

void tag_get_occurrence(_str &occur_name, _str &file_name)

Retrieve information about the current occurrence, as defined by tag_find_occurrence/tag_next_occurrence.

Parameters:

occur_name - (output) Word to be indexed

file_name - (output) Path of file occurrence is located in

Category:

Tagging Functions


tag_get_type

int tag_get_type(int type_id, _str &type_name)

Retrieve the tag type name for the given type ID.

Parameters:

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
    VS_TAGTYPE_cursor       43/cursor      Database result set cursor
    VS_TAGTYPE_tag          44/tag         SGML or XML tag type (like a class)
    VS_TAGTYPE_taguse       45/taguse      SGML or XML tag instance (like an object)
    VS_TAGTYPE_statement    46/statements  generic statement
    VS_TAGTYPE_annotype     47/annotype    Java annotation type or C# attribute class
    VS_TAGTYPE_annotation   48/annotation  Java annotation or C# attribute instance
    VS_TAGTYPE_call         49/call        Function/Method call
    VS_TAGTYPE_if           50/if          If/Switch statement
    VS_TAGTYPE_loop         51/loop        Loop statement
    VS_TAGTYPE_break        52/break       Break statement
    VS_TAGTYPE_continue     53/continue    Continue statement
    VS_TAGTYPE_return       54/return      Return statement
    VS_TAGTYPE_goto         55/goto        Goto statement
    VS_TAGTYPE_try          56/try         Try/Catch/Finally statement
    VS_TAGTYPE_pp           57/pp          Preprocessing statement
    VS_TAGTYPE_block        58/block       Statement block
    VS_TAGTYPE_mixin        59/mixin       D language mixin construct
    VS_TAGTYPE_target       60/target      Ant build target
    VS_TAGTYPE_assign       61/assign      Assignment statement

type_name - (Output) full path of type containing tags

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_get_detail, tag_find_type, tag_next_type


tag_get_type_id

int tag_get_type_id(_str type_name)

Get the database type id corresponding to the given string.

Parameters:

type_name - type name to look up

Returns: int

<0 if not found, type ID > 0 on success

Category:

Tagging Functions


tag_insert_async_tagging_result

int tag_insert_async_tagging_result(_str fileName, int taggingFlags, int bufferId)

Insert the tags which were gathered by the asynchronous parsing for this tagging job. This applies to updating tag databse, the current context, or for updating local variables. Note that becuase of embedded code sections, there may be more work still required after this method is complete if there are embedded code blocks which also require tagging work.

Parameters:

fileName - Name of file to update tagging results for

taggingFlags - tagging options flags (bitset of VSLTF_*)

bufferId - ID of editor buffer to update tagging for

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_insert_context

int VSAPI tag_insert_context(int outer_context, VSPSZ tag_name, VSPSZ tag_type, VSPSZ file_name, int start_line_no, int start_seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, VSPSZ class_name, int tag_flags, VSPSZ signature)

Add a tag and its context information to the context list. 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().

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

outer_context - context ID for the outer context (eg. class/struct)

tag_name - tag string

tag_type - string specifying tag_type

file_name - full path of file the tag is located in

start_line_no - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_line_no - start line number of start of tag inner scope

scope_seekpos - start seek position of tag inner scope

end_line_no - (optional) ending line number of tag within file

end_seekpos - (optional) end seek position of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (optional) see VS_TAGFLAG_* above.

signature - (optional) tag signature (return type, arguments, etc)

Returns: int

sequence number (context_id) of tag context on success, or <0 on error.

Category:

Tagging Functions


tag_insert_embedded

int tag_insert_embedded(int start_seekpos, int end_seekpos)

Insert the start and end seek positions, and optionally the file extension information for an embedded context.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

start_seekpos - start seek position of embedded context

end_seekpos - end seek position of embedded context

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_insert_file_end

int tag_insert_file_end()

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

Set up for inserting a series of tags from a single file for update. Doing this allows the tag database engine to detect and handle updates more effeciently, even in the presence of duplicates.

Parameters:

file_name - full path of file the tags are located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

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.

Parameters:

inst_name - name of tag instance (case insensitive)

inst_type - Tag type name. 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 (eg. function args)

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.

Returns: int

tag instance ID (>0) on success, <0 on error.

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);

Category:

Tagging Functions

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 type_name, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

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.

The context for the a local 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_local().

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

tag_name - tag string

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

file_name - full path of file the tag is located in (p_buf_name)

line_no - start line number of tag within file

class_name - (optional) 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 - (optional) Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (optional) 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.

Returns: int

sequence number (local_id) of local variable on success, or <0 on error.

Category:

Tagging Functions

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_end_local


tag_insert_local2

int tag_insert_local2(_str tag_name, _str type_name, _str file_name, int line_no, int seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, _str class_name, int tag_flags, _str signature)

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 a local 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_local().

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

tag_name - tag string

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

file_name - full path of file the tag is located in (p_buf_name)

start_linenum - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_linenum - 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_linenum.

scope_seekpos - Seek position where the scope of the tag begins in file_name. See explanation above.

end_linenum - (optional) ending line number of tag within file

end_seekpos - (optional) 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 - (optional) 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 - (optional) Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (optional) 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.

Returns: int

sequence number (local_id) of local variable on success, or <0 on error.

Category:

Tagging Functions

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_set_local_name_location, tag_end_local


tag_insert_match

int tag_insert_match(_str tag_file, _str tag_name, _str type_name, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

Add a search match tag and its information to the matches list.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tag_file - (optional) full path of tag file match came from

tag_name - tag string

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

file_name - full path of file the tag is located in

line_no - start line number of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (Optional) Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (optional) tag signature (return type, arguments, etc)

Returns: int

sequence number (match_id) of matching tag on success, or <0 on error.

Category:

Tagging Functions


tag_insert_match2

int tag_insert_match2(_str tag_file, _str tag_name, _str type_name, _str file_name, int line_no, int seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, _str class_name, int tag_flags, _str signature)

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.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tag_file - (optional) full path of tag file match came from

tag_name - tag string

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

file_name - full path of file the tag is located in (p_buf_name)

start_linenum - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_linenum - 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_linenum.

scope_seekpos - Seek position where the scope of the tag begins in file_name. See explanation above.

end_linenum - (optional) ending line number of tag within file

end_seekpos - (optional) 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 - (optional) 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 - (optional) Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (optional) 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.

Returns: int

sequence number (match_id) of matching tag on success, or <0 on error.

Category:

Tagging Functions

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, 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)

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.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(false) prior to invoking this function.

Parameters:

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.

Returns: int

sequence number (match_id) of matching tag on success, or <0 on error.

Category:

Tagging Functions

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_occurrence

int tag_insert_occurrence(_str occur_name, _str file_name)

Insert a new occurrence into the word index.

Parameters:

occur_name - Word to be indexed

file_name - Path of file occurrence is located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_insert_reference

int tag_insert_reference(int refto_id, int refby_id, _str ref_file, int ref_type, _str file_name, int line_no)

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.

Parameters:

refto_id - unique ID of tag referenced from tag_insert_instance or tag_match_instance.

refby_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 of references (browse database or object) file

ref_type - type of reference. One of the following:

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

Insert the given tag with the accompanying information into the database. This function is identical to vsTagInsert, except that rather than passing in a tag type, you pass in an int, using one of the standard types defined above (see VS_TAGTYPE_*).

If a record with the same tag name, type, file, *and* class already exists in the database, the line number will be updated.

Parameters:

tag_name - tag string

type_id - Tag type ID. See tag_get_type for a list of all standard tag types. Will return an error if (tag_type <= 0 || tag_type > VSTAGTYPE_LASTID).

file_name - full path of file the tag is located in

line_no - (optional) line number of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (optional) Tag flags indicating symbol attributes.

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 or data
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)
VS_TAGFLAG_linkage
01 level var in COBOL linkage section
VS_TAGFLAG_partial
For C# partial class, struct, or interface
VS_TAGFLAG_ignore
Tagging should ignore this tag/statement
VS_TAGFLAG_forward
Forward class/interface/struct/union declaration
VS_TAGFLAG_opaque
Opaque enumerated type (unlike C/C++ enum)

signature - (optional) 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.

Returns: int

0 on success, <0 on error.

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 natural
 * ordering, and the class's compareTo method is referred to as
 * its natural comparison method.

 */
 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.

Category:

Tagging Functions

See Also:

tag_insert_file_end, tag_insert_file_start, tag_insert_tag


tag_insert_tag

int tag_insert_tag(_str tag_name, _str type_name, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

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, type_name is a string, allowing you to insert tags with user defined tag types.

Parameters:

tag_name - tag string

type_name - string specifying tag type. If the string is not a standard type, a new type will be created and inserted in the tag database. See tag_get_type.

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 - (optional) line number of tag within file

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 - Tag flags indicating symbol attributes, see tag_insert_simple for details.

signature - (optional) 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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_file_end, tag_insert_file_start, tag_insert_simple


tag_is_parent_class

int tag_is_parent_class(_str parent_class, _str child_class, _str(&tag_files)[], boolean case_sensitive, boolean normalize, ...)

Determine if parent_class is a parent of child_class, that is, does child_class derive either directly or transitively from parent_class.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

parent_class - class to check if it is a parent (base class)

child_class - class to check if it is derived from parent

tag_files - (reference to _str[]) tag files to search

case_sensitive - case sensitive (1) or case insensitive (0)

normalize - attempt to normalize class name or take as-is?

parent_file - (optional) path to file containing the parent class

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

1 if 'child_class' derives from 'search_class', otherwise 0.

Category:

Tagging Functions

See Also:

tag_find_class, tag_get_inheritance


tag_is_same_package

boolean tag_is_same_package(_str class1, _str class2, boolean case_sensitive)

Check if the given class is in the same package as the other class.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

class1 - first class name, qualified

class2 - second class name, qualified

case_sensitive - case sensitive comparison for package names?

Returns: boolean

true if two classes are in the same package scope, otherwise false.

Category:

Tagging Functions

See Also:

tag_check_for_package


tag_join_class_name

_str tag_join_class_name(_str class_name, _str outer_class, _str(&tag_files)[], boolean case_sensitive, boolean allow_anonymous=false)

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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

class_name - name of class to join (inner_class)

outer_class - name of outer class or package to join

tag_files - (reference, read-only array of strings) list of tag files to search

case_sensitive - Specifies search case sensitivity.

allow_anonymous - Allow class_name to be an anonymous class.

Returns: _str

Returns static string if outer_class :: class_name was found in the context or tag database, otherwise returns '';

Category:

Tagging Functions

See Also:

tag_split_class_name


tag_join_matches

void tag_join_matches()

Transfer the contents of the current match set to the previous match set, and pop it off of the stack. This is similar to tag_pop_matches(), except that the contents of the match set are not thrown away.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Category:

Tagging Functions

See Also:

tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_matches, tag_pop_context, tag_push_context, tag_push_matches


tag_list_any_symbols

void tag_list_any_symbols(int tree_wid, int tree_index, _str tag_name, _str(&tag_files)[], int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive)

List any symbols, reguardless of context or scope (excluding locals) matching the given prefix expression.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

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 - (Input) 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.

vnum_matches - (Input, Output) number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match

case_sensitive - Specifies search case sensitivity

Category:

Tagging Functions

See Also:

tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_class_context

int tag_list_class_context(int tree_wid, int tree_index, _str(&tag_files)[], _str tag_name, _str class_name, int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive, ...)

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.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files - (Input) List of tags files to search.

tag_name - Name of class to search for matches

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.

vnum_matches - (Input, Output) Number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match (0)

case_sensitive - Specifies search case sensitivity.

friend_list - (optional) List of friends to the current context

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

1 if the definition of the given class class_name is found, othewise returns 0, indicating that no matches were found.

Category:

Tagging Functions

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

int tag_list_class_locals(int tree_wid, int tree_index, _str(&tag_files)[], _str tag_name, _str class_name, int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive, ...)

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.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert matches under

tag_files - symbol prefix to match

tag_name - name of class to search for matches

class_name - (reference to _str[]) tag files to search

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

context_flags - VS_TAGCONTEXT_*, tag context filter flags

vnum_matches - (Input, Output) number of matches

max_matches - maximum number of matches allowed

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

friend_list - (optional) List of friends to the current context

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

1 if the definition of the given class class_name is found, othewise returns 0, indicating that no matches were found.

Category:

Tagging Functions

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

int tag_list_class_tags(int tree_wid, int tree_index, _str(&tag_files)[], _str tag_name, _str class_name, int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive, ...)

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.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - Window ID of tree control to insert into, 0 indicates to insert into a match set, see tag_insert_match

tree_index - Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files - (Input) 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 {@l;ink 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.

vnum_matches - (Input, Output) Number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match (0)

case_sensitive - Specifies search case sensitivity.

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

1 if the definition of the given class class_name is found, othewise returns 0, indicating that no matches were found.

Category:

Tagging Functions

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, _str(&tag_files)[], int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive, ...)

List the global symbols visible in the given list of tag files matching the given tag filters and context flags.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - Window ID of tree control to insert into, 0 indicates to insert into a 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 - (Input) 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.

vnum_matches - (Input, Output) Number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match (0)

case_sensitive - Specifies search case sensitivity.

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Category:

Tagging Functions

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, _str(&tag_files)[], int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive, ...)

List the symbols imported into this context matching the given tag filters and context flags.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(false) prior to invoking this function.

Parameters:

tree_wid - Window ID of tree control to insert into, 0 indicates to insert into a 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 - (Input) 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.

vnum_matches - (Input, Output) Number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match (0)

case_sensitive - Specifies search case sensitivity.

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Category:

Tagging Functions

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 prefix, _str(&tag_files)[], var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive)

List the packages matching the given prefix expression.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(false) prior to invoking this function.

Parameters:

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert matches under

prefix - symbol prefix to match

tag_files - (reference to _str[]) tag files to search

vnum_matches - (Output) number of matches

max_matches - maximum number of matches allowed

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

Category:

Tagging Functions


tag_list_duplicate_matches

int tag_list_duplicate_matches(_str proc_name, _str(&tag_files)[])

Find all tags in the given tag databases matching the given tag name, and possibly class or type specification. Places matches in the current match set.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

taglist - List of tag information, composed

filelist - List of corresponding filenames

proc_name - Composed tag name to search for

tag_files - List of tag files to search

Returns: int

0 on succes, <0 on error.

Category:

Tagging Functions


tag_list_duplicate_tags

int tag_list_duplicate_tags(_str(&taglist)[], _str(&filelist)[], _str proc_name, _str(&tag_files)[])

Find all tags in the given tag databases matching the given tag name, and possibly class or type specification. Places matches in taglist and filelist, which are parallel arrays.

Parameters:

taglist - List of tag information, composed

filelist - List of corresponding filenames

proc_name - Composed tag name to search for

tag_files - List of tag files to search

Returns: int

0 on succes, <0 on error.

Category:

Tagging Functions


tag_list_file_occurrences

int tag_list_file_occurrences(int tree_wid, int tree_index, _str tag_name, int exact_match, int case_sensitive, int &num_refs, int max_refs)

List the files containing 'tag_name', matching by prefix or case-sensitive, as specified. Terminates search if a total of max_refs are hit. Items are inserted into the tree, with the user data set to the file path.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - window id of tree control to insert into

tree_index - index, usually TREE_ROOT_INDEX to insert under

tag_name - name of tag to search for

exact_match - exact match or prefix match

case_sensitive - case sensitive match, or case-insensitive

num_refs - (Input, Output) number of references found so far

max_refs - maximum number of items to insert

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_list_globals_of_type

void tag_list_globals_of_type(int tree_wid, int tree_index, _str(&tag_files)[], int type_id, int mask, int nonzero, var vnum_matches, int max_matches)

List the global symbols of the given type. See tag_find_global for more details.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(false) prior to invoking this function.

Parameters:

tree_wid - Window ID of tree control to insert into, 0 indicates to insert into a match set, see tag_insert_match.

tree_index - Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files - (Input) Tag files to search

type_id - Tag type ID. See tag_get_type for a list of all standard tag types. if (type_id<0), returns tags with ID>VS_TAGTYPE_LASTID

mask - Tag flags indicating symbol attributes, see tag_insert_simple for details.

nonzero - if 1, succeed if mask & tag.flags != 0 if 0, succeed if mask & tag.flags == 0

vnum_matches - (Input, Output) number of matches

max_matches - Maximum number of matches allowed

Category:

Tagging Functions

See Also:

tag_find_global, tag_get_type, tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_in_class

int tag_list_in_class(_str prefix, _str search_class, int tree_wid, int tree_index, _str(&tag_files)[], int &num_matches, int max_matches, int filter_flags, int context_flags, boolean exact_match, boolean case_sensitive, _str(&template_args):[]=null, _str friend_list=null, typeless &visited=null, int depth=0)

Attempt to locate the given symbol in the given class by searching first locals, then the current file, then tag files, looking strictly for the class definition, not just class members. Recursively looks for symbols in inherited classes and resolves items in enumerated types to the correct class scope (since enums do not form a namespace). The order of searching parent classes is depth-first, preorder (root node searched before children).

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. Returns 1 if the definition of the given class 'search_class' is found, othewise returns 0, indicating that no matches were found.

The current object must be an editor control or the current buffer.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

prefix - symbol prefix to match

search_class - name of class to search for matches

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert items under, ignored if (tree_wid == 0)

tag_files - (reference to _str[]) tag files to search

num_matches - (Input, Output) number of matches

max_matches - maximum number of matches allowed

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

context_flags - VS_TAGCONTEXT_*, tag context filter flags

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

template_args - (Input) hash table of template arguments

friend_list - (Input) List of friends to the current context

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

1 if the definition of the symbol is found, 0 otherwise, <0 on error.

Category:

Tagging Functions


tag_list_in_file

void tag_list_in_file(int tree_wid, int tree_index, _str prefix, _str(&tag_files)[], _str file_name, int filter_flags, int context_flags, var vnum_matches, int max_matches, boolean exact_match, boolean case_sensitive)

List the symbols found in files having the given 'base' filename and passing the given pushtag and context flags.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(false) prior to invoking this function.

Parameters:

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set, see tag_insert_match.

tree_index - Parent tree node index to insert item under, ignored if tree_wid is zero.

prefix - Tag name or prefix of tag name to search for.

tag_files - (Input) 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.

vnum_matches - (Input, Output) Number of matches

max_matches - Maximum number of matches allowed

exact_match - Specifies exact match or prefix match (0)

case_sensitive - Specifies search case sensitivity.

Category:

Tagging Functions

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 type_name, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

API function for inserting a tag entry with supporting info into the given list control.

Parameters:

list_wid - Window ID of the list control.

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.

type_name - Tag type name. 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 - Full path to 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 - Tag flags indicating symbol attributes, see tag_insert_simple for details.

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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_list_occurrences

int tag_list_occurrences(_str file_name, _str tag_name=null, boolean case_sensitive=true, int start_seekpos=0, int stop_seekpos=0)

Default function for matching occurrences and inserting them into the database. Simply searches for words that are not in comments, strings, numbers, keywords, line numbers, or preprocessing, using the color coding engine.

Parameters:

file_name - Name of buffer to search for occurrences in

tag_name - Name of identifier to search for, null of anything

case_sensitive - Case sensitive identifier search?

start_seekpos - Seek position to start searching at, 0 means TOP

stop_seekpos - Seek position to end searching at, 0 means EOF

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_list_symbols_in_context

int tag_list_symbols_in_context(_str prefix, _str search_class, int tree_wid, int tree_index, _str(&tag_files)[], _str search_file, int &num_matches, int max_matches, int pushtag_flags, int context_flags, boolean exact_match, boolean case_sensitive, typeless &visited=null, int depth=0)

Match the given symbol based on the current context information. Order of searching is:

  1. local variables in current function
  2. members of current class, including inherited members
  3. globals found in the current file
  4. globals imported explicitely from current file
  5. globals, (not static variables), found in other files
  6. any symbol found in this file
  7. any symbol found in any tag file
Failing that, it repeats steps (1-6) with pushtag_flags set to -1, thus disabling any filtering, unless 'strict' is true. The current object must be an editor control or current buffer.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

prefix - symbol prefix to match

search_class - name of class to search for matches

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert items under, ignored if (treewid == 0)

tag_files - (reference to _str[]) tag files to search

search_file - file to search for matches in (for imports)

num_matches - (reference) number of matches

max_matches - maximum number of matches allowed

pushtag_flags - VS_TAGFILTER_*, tag filter flags

context_flags - VS_TAGCONTEXT_*, tag context filter flags

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

visited - hash table of prior results

depth - depth of recursive search

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_locations_clear

void tag_locations_clear()

Reset the internal reference locations variable. For SlickEdit Tools

Category:

Tagging Functions


tag_lock_context

void tag_lock_context(boolean doWrite=false)

Set a thread synchronization lock on the contents of the current context, that is, the symbols found in the current file.

Category:

Tagging Functions


tag_lock_matches

void tag_lock_matches(boolean doWrite=false)

Set a thread synchronization lock on the current set of matches.

Category:

Tagging Functions


tag_match

_str tag_match(_str name, int find_first, _str lang="")

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.

Parameters:

name - tag name or tag prefix to search for

find_first - Find first item (1) or find next (0), or terminate (2).

lang - language ID (p_LangId)

Returns: _str

0 on success, nonzero on error.

Since:

2.0

Category:

Tagging Functions

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, int case_sensitive)

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.

Parameters:

inst_name - Name of tag (symbol) instance (case insensitive)

inst_type - Tag type name. 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 (eg. function args)

file_name - Name of file where tag instance is located

line_no - line which tag instace is on

case_sensitive - Specifies search case sensitivity.

Returns: int

The ID of the the most exact match available, or <0 on error.

Category:

Tagging Functions

See Also:

tag_find_refer_by, tag_insert_instance, tag_next_refer_by, tag_next_refer_to


tag_match_occurrences_in_file

int tag_match_occurrences_in_file(var errorArgs, int tree_wid, int tree_index, _str tag_name, boolean case_sensitive, _str file_name, int line_no, int filter_flags, int start_seekpos, int stop_seekpos, int &num_matches, int max_matches, typeless &visited=null, int depth=0)

Match occurrences of the given tag name in the current buffer, starting at the specified start seek position and continuing until the specified stop seek position.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

errorArgs - (Output) error message parameters

tree_wid - window ID of tree control to insert into

tree_index - index of item in tree to insert under

tag_name - name of tag to search for

case_sensitive - case sensitive search?

file_name - path of file match tag is in

line_no - real line number match tag is located on

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

start_seekpos - starting seekpos, 0 means beginning of file

stop_seekpos - ending seekpos, 0 means EOF

num_matches - (Output) number of occurrence matches found

max_matches - maximum number of occurrences to find

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

0 on success, <0 on error, >0 on Context Tagging® error.

Category:

Tagging Functions


tag_match_occurrences_in_file_get_positions

int tag_match_occurrences_in_file_get_positions(var errorArgs, var seekPositions, _str tag_name, boolean case_sensitive, _str file_name, int line_no, int filter_flags, int start_seekpos, int stop_seekpos, int &num_matches, int max_matches, typeless &visited=null, int depth=0)

Match occurrences of the given tag name in the current buffer, starting at the specified start seek position and continuing until the specified stop seek position.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

errorArgs - (Output) error message parameters

seekPositions - (Output) seek positions of occurrences

tree_index - index of item in tree to insert under

tag_name - name of tag to search for

case_sensitive - case sensitive search?

file_name - path of file match tag is in

line_no - real line number match tag is located on

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

start_seekpos - starting seekpos, 0 means beginning of file

stop_seekpos - ending seekpos, 0 means EOF

num_matches - (Output) number of occurrence matches found

max_matches - maximum number of occurrences to find

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

0 on success, <0 on error, >0 on Context Tagging® error.

Category:

Tagging Functions


tag_match_symbol_in_context

int tag_match_symbol_in_context(_str prefix, _str search_class, int tree_wid, int tree_index, _str(&tag_files)[], int &num_matches, int max_matches, int filter_flags, int context_flags, boolean exact_match, boolean case_sensitive, boolean strict, boolean find_parents, boolean find_all, ...)

Deprecated.

Match the given symbol based on the current context information. Order of searching is:

  1. local variables in current function
  2. members of current class, including inherited members
  3. globals found in the current file
  4. globals imported explicitely from current file
  5. globals, (not static variables), found in other files
  6. any symbol found in this file
  7. any symbol found in any tag file
Failing that, it repeats steps (1-6) with filter_flags set to -1, thus disabling any filtering, unless 'strict' is true. The current object must be an editor control or current buffer.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

prefix - symbol prefix to match

search_class - name of class to search for matches

tree_wid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert items under, ignored if (tree_wid == 0)

tag_files - (reference to _str[]) tag files to search

num_matches - (Input, Output) number of matches

max_matches - maximum number of matches allowed

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

context_flags - VS_TAGCONTEXT_*, tag context filter flags

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

strict - strict match, or allow any match?

find_parents - find parents of the given class?

find_all - find all instances, for each level of scope

search_file - (optional) file to search for matches in (for imports)

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_list_symbols_in_context


tag_match_uses_in_file

int tag_match_uses_in_file(var errorArgs, int tree_wid, int tree_index, boolean case_sensitive, _str file_name, int line_no, _str alt_file_name, int alt_line_no, int filter_flags, int caller_id, int start_seekpos, int stop_seekpos, int &num_matches, int max_matches)

Match occurrences of the given tag name in the current buffer, starting at the specified start seek position and continuing until the specified stop seek position.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

errorArgs - (Output) error message parameters

tree_wid - window ID of tree control to insert into

tree_index - index of item in tree to insert under

tag_name - name of tag to search for

case_sensitive - case sensitive search?

file_name - path of file match tag is in

line_no - real line number match tag is located on

alt_file_name - alternate path of file match tag is in

alt_line_no - alternate real line number match tag is located on

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

caller_id - context ID of item to look for uses in

start_seekpos - starting seekpos, 0 means beginning of file

stop_seekpos - ending seekpos, 0 means EOF

num_matches - (Input, Output) number of occurrence matches found

max_matches - maximum number of occurrences to find

Returns: int

0 on success, <0 on error, >0 on Context Tagging® error.

Category:

Tagging Functions


tag_nearest_context

int tag_nearest_context(int linenum, int filter_flags=VS_TAGFILTER_ANYTHING, boolean find_tag_below=false)

Return the index of the nearest context item.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

linenum - line number to check context on

filter_flags - Tag filter flags. See tag_filter_type for more details.

find_tag_below - find the nearest context item below the current line

Returns: int

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 linenum 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.

Category:

Tagging Functions

See Also:

tag_check_cached_context, tag_current_context, tag_get_context


tag_next_class

int tag_next_class(_str &class_name, _str search_class=null, boolean normalize=false, boolean case_sensitive=true, _str cur_class_name=null)

Retreive the name of the next class included in this tag database.

Parameters:

class_name - (Output) Name of class

search_for - class name to search for (prefix search)

normalize - Normalize the class name (find what package it belongs to)

ignore_case - Specifies search case sensitivity.

cur_class_name - name of current class in context

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_find_class, tag_get_class


tag_next_context

int tag_next_context(_str tag_name, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Deprecated. Use tag_next_context_iterator(), which is re-entrant.

Find the next context entry with the given tag prefix, or if exact, with the exact tag name. Use case-sensitive match if case_sensitive != 0. Should be called only after first calling tag_find_context. Use tag_get_context to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function. This is considered as a write operation because it uses an iterator to traverse the items in the context.

Parameters:

tag_name - tag name or prefix of tag name

exact - Specifies exact match or prefix match

case_sensitive - Specifies search case sensitivity.

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

context ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_find_context, tag_get_context


tag_next_context_iterator

int tag_next_context_iterator(_str tag_name, int startIndex, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Find the next context entry with the given tag prefix, or if exact, with the exact tag name. Use case-sensitive match if case_sensitive != 0. Should be called only after first calling tag_find_context. Use tag_get_context to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_name - tag name or prefix of tag name

startIndex - start searching after the given context ID

exact - Specifies exact match or prefix match

case_sensitive - Specifies search case sensitivity.

pass_through_anonymous - Pass through anonymous classes

class_name - Class to find item in

Returns: int

context ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_find_context, tag_get_context


tag_next_equal

int tag_next_equal(boolean case_sensitive=false, _str class_name=null, boolean skip_duplicates=false)

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.

Parameters:

case_sensitive - Case sensitive tag name comparison

class_name - Class name to search for tag in

skip_duplicates - Skip tags with same name, type and class.

Returns: int

0 on success, <0 on error, or if no such tag.

Category:

Tagging Functions

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 &lang)

Deprecated. Use tag_next_language().

API function for finding the next language tagged in this database. See tag_find_extension (above).

Parameters:

language - (reference) set to next language ID found

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

p_LangId, tag_find_extension, tag_get_extension, tag_set_extension


tag_next_file

int tag_next_file(_str &file_name)

Retreive the name of the next file included in this tag database.

Parameters:

file_name - (Output) full path of file containing tags

Returns: int

0 on success, <0 on error

Category:

Tagging Functions


tag_next_global

int tag_next_global(int type_id, int mask, int non_zero)

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.

Parameters:

type_id - First tag type ID. See tag_get_type for a list of all standard tag types. if (type_id<0), returns tags with ID>VS_TAGTYPE_LASTID

mask - Tag flags indicating symbol attributes, see tag_insert_simple for details.

non_zero - if 1, succeed if mask & tag.flags != 0 if 0, succeed if mask & tag.flags == 0

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_get_type, tag_find_equal


tag_next_in_class

int tag_next_in_class()

Find the next tag in 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.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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()

Find the next tag in the current 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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

Retrieve the name of the next file included by file_name.

Parameters:

file_name - Full path of "main" source file

include_name - (Output) full path of included file

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

Retreive the name of next the source file that included (directly or indirectly), the given file (expected to be an include file).

Parameters:

file_name - Full path of file that was included

included_by - (Output) Full path of source file including file_name.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

See Also:

tag_find_include_file, tag_next_include_file, tag_next_included_by, tag_set_date, tag_insert_tag


tag_next_language

int tag_next_language(_str &lang)

API function for finding the next language tagged in this database. See tag_find_language (above).

Parameters:

language - (reference) set to next language ID found

Returns: int

0 on success, <0 on error.

Since:

13.0

Category:

Tagging Functions

See Also:

p_LangId, tag_find_language, tag_get_language, tag_set_language


tag_next_local

int tag_next_local(_str tag_prefix, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Deprecated. Use tag_next_local_iterator() because it is reentrant.

Find a the next local tag with the given tag prefix, or if 'exact', with the exact tag name. Use case-sensitive match if case_sensitive != 0. Should be called only after calling tag_find_local. Use tag_get_local2 to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function. This is considered as a write operation because it uses an iterator to traverse the items in the context.

Parameters:

tag_prefix - Tag name or prefix of tag name

exact - Specifies exact match or prefix match

case_sensitive - Specifies search case sensitivity.

pass_through_anonymous - Pass through anonymous classes?

class_name - Name of class that tag belongs to.

Returns: int

Local ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_find_local, tag_get_local, tag_get_local2


tag_next_local_iterator

int tag_next_local_iterator(_str tag_prefix, int startIndex, boolean exact, boolean case_sensitive, boolean pass_through_anonymous=false, _str class_name=null)

Find a the next local tag with the given tag prefix, or if 'exact', with the exact tag name. Use case-sensitive match if case_sensitive != 0. Should be called only after calling tag_find_local. Use tag_get_local2 to extract details about the tag.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tag_prefix - Tag name or prefix of tag name

startIndex - start searching after the given context ID

exact - Specifies exact match or prefix match

case_sensitive - Specifies search case sensitivity.

pass_through_anonymous - Pass through anonymous classes?

lass_name - Name of class that tag belongs to.

Returns: int

Local ID of tag if found, <0 on error or not found.

Category:

Tagging Functions

See Also:

tag_find_local, tag_get_local, tag_get_local2


tag_next_occurrence

int tag_next_occurrence(_str tag_name, boolean exact_match=true, boolean case_sensitive=false)

Find the next occurrence with the given tag name or tag prefix. Use tag_get_occurrence (below) to get details about the occurrence.

Parameters:

tag_name - Tag name or prefix to search for

exact_match - Exact (word) match or prefix match (0)

case_sensitive - Case sensitive search?

Returns: int

0 on success, BT_RECORD_NOT_FOUND_RC if not found, <0 on error.

Category:

Tagging Functions


tag_next_prefix

int tag_next_prefix(_str tag_prefix, boolean case_sensitive=false, _str class_name=null, boolean skip_duplicates=false)

Retrieve the next tag with the given prefix (case-insensitive). Should be called only after calling vsTagGetTagPrefix(). Should be called only after calling tag_find_prefix. Use tag_get_info to extract the details about the tag.

Parameters:

tag_prefix - Prefix of tag name to search for.

case_sensitive - Specifies search case sensitivity.

class_name - Name of class that tag belongs to.

skip_duplicates - Skip tags with same name, type and class.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

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.

Parameters:

inst_id - Unique identifier of calling function.

ref_type - (Output) Type of reference, see tag_insert_reference.

file_name - (Output) Full path of file the tag is located in

line_no - (Output) Line number of tag within file

Returns: int

Returns instance ID (> 0) of context of reference, 0 if unknown, or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

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.

Parameters:

inst_id - Unique ID of tag instance.

ref_type - (Output) Type of reference, see tag_insert_reference.

file_name - (Output) Full path of file the tag is located in

line_no - (Output) Line number of tag within file

Returns: int

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.

Category:

Tagging Functions

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='')

Retrieve the next tag with the a tag name matching the given regular expression with the given matching options. Should be called only after calling tag_find_regex().

Parameters:

tag_regex - Regular expression for tag name to search for

search_options - Options passed to () for evaluating regular expression.

Returns: int

0 on success, <0 on error, or if no such tag.

Category:

Tagging Functions

See Also:

pos, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix, tag_next_regex


tag_next_tag

int tag_next_tag(_str tag_name, _str type_name, _str class_name, _str arguments=null)

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.

Parameters:

tag_name - Name of tag to search for

type_name - Tag type name. See tag_get_type for a list of all standard tag types.

class_name - name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

arguments - Function parameters to attempt to match to resolve overloading. Ignored if there are no matches.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions

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)

Retreive the name of the next type included in this tag database.

Parameters:

type_name - (Output) Tag type name. See tag_get_type for a list of all standard tag types.

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if no more.

Category:

Tagging Functions

See Also:

tag_get_type, tag_find_type


tag_normalize_classes

int tag_normalize_classes(_str class_parents, _str cur_class_name, _str file_name, _str(&tag_files)[], boolean allow_locals, boolean case_sensitive, _str &normal_parents, _str &normal_types, _str &normal_files)

For each item in 'class_parents', normalize the class and place it in 'normal_parents', along with the tag type, placed in 'normal_types'.

Parameters:

class_parents - list of class names, seperated by semicolons

cur_class_name - class context in which to normalize class name

file_name - source file where reference to class name is

tag_files - Array of tag files to search

allow_locals - allow local classes in list

case_sensitive - case sensitive tag search?

normal_parents - (output) list of normalized class names

normal_types - (output) list of tag types found for normalized class names

normal_files - (output) list of tag files parent classes are found in

depth - (optional) depth of recursive search

visited - (optional) hash table of prior results

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_occurrences_end

int tag_occurrences_end()

Clean up after inserting a series of occurrences from a single file for update. Doing this allows the tag database engine to remove any occurrences from the database that are no longer valid.

Returns: int

0 on success, <0 on error.int VSAPI

Category:

Tagging Functions


tag_occurrences_start

int tag_occurrences_start(_str file_name)

Set up for inserting a series of occurrences from a single file for update. Doing this allows the tag database engine to detect and handle updates more effeciently, even in the presence of duplicates.

Parameters:

file_name - full path of file the tags are located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_open_db

int tag_open_db(_str file_name)

Open an existing tag database and return a handle to the database. This function opens the database for read-write access. . BSC files can not be opened read-write, use tag_read_db instead.

Parameters:

file_name - File name of tag database to open.

Returns: int

database handle >= 0 on success, <0 on error.

Since:

3.0

Category:

Tagging Functions

See Also:

tag_create_db(), tag_read_db(), tag_close_db(), tag_flush_db(), tag_current_db(), tag_close_all_db()


tag_pop_context

void tag_pop_context()

Transfers the current match set to the context set and pop it off of the match set stack.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(true) prior to invoking this function.

Category:

Tagging Functions

See Also:

tag_insert_match, tag_insert_match_fast, tag_pop_matches, tag_push_matches


tag_pop_matches

void tag_pop_matches()

Clear the current match set and pop it off of the stack.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Category:

Tagging Functions

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()

Push the current match set onto the stack of match sets and transfer the context set to the top of the match set stack.

For synchronization, macros should perform a tag_lock_matches(true) and tag_lock_context(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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()

Push the current match set onto the stack of match sets and initialize the new stack top to an empty match set

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_context, tag_pop_matches, tag_push_context


tag_pushtag_match

int tag_pushtag_match(int tree_wid, int tree_index, int progress_wid, _str member_filter, _str class_filter, _str(&tag_files)[], int filter_flags, int &num_matches, int max_matches, boolean regex_match, boolean exact_match, boolean case_sensitive)

Match symbols in all tag files against the given member and class filters.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

tree_wid - Window ID of the tree control

tree_index - Tree index to insert items under

progress_wid - Window id of progress label

member_filter - Prefix or regular expression for symbols

class_filter - Regex or prefix for class names

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.

num_matches - (Input, Output) number of matches found

max_matches - maximum number of matches to find

regex_match - perform regular expression match?

exact_match - exact match or prefix match?

case_sensitive - Case sensitive match or case-insensitive?

Returns: int

0 on success, 1 if list was truncated, <0 on error.

Since:

5.0a

Category:

Tagging Functions

See Also:

tag_match


tag_qualify_symbol_name

int tag_qualify_symbol_name(_str &qualified_name, _str search_name, _str context_class, _str context_file, _str(&tag_files)[], boolean case_sensitive, ...)

Qualify the given class symbol by searching for symbols with its name in the current context/scope. This is used to resolve partial class names, often found in class inheritance specifications. The current object must be an editor control or current buffer.

Parameters:

qualified_name - (output) "qualified" symbol name

qualified_max - number of bytes allocated to qualified_name

search_name - name of symbol to search for

context_class - current class context (class name)

context_file - current file name

tag_files - list of tag files to search

case_sensitive - case sensitive tag search?

visited - (optional) hash table of prior results

depth - (optional) depth of recursive search

Returns: int

qualified name if successful, 'search_name' on error.

Category:

Tagging Functions


tag_read_db

int tag_read_db(_str file_name)

Open an existing tag database and return a handle to the database. This function opens the database for read-only access. The database type (tags, references, BSC file) is automatically detected.

Parameters:

file_name - file name of tag database to open.

Returns: int

database handle >= 0 on success, <0 on error.

Category:

Tagging Functions

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_register_type

int tag_register_type(int type_id, _str pszTypeName, int is_container=0, _str description=null, int filterFlags=VS_TAGFILTER_ANYTHING)

Register a new OEM-defined type.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM <= type_id <= VS_TAGTYPE_MAXIMUM

pszTypeName - Tag type name

is_container - 1=tag type is a container (i.e. can have members)

description - (optional) description of the new tag type

filterFlags - (optional) VS_TAGFILTER_

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_remove_from_class

int tag_remove_from_class(_str class_name, boolean remove_class=false)

Remove all tags associated with the given class from the database.

Parameters:

class_name - Full name of the class the tag is associated with if NULL, all non-class tags are removed.

remove_class - if non-zero, the class is removed from the database, in addition to the tags associated with the class.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_remove_tag


tag_remove_from_file

int tag_remove_from_file(_str file_name, boolean remove_file=true)

Remove all references from the given references (browse database or object) file from the database. This is an effective, but costly way to perform an incremental update of the data imported from a references file. First remove all items associated with that file, then insert them again.

Parameters:

file_name - full path of file the reference info came from

remove_file - if non-zero, the file is removed from the database

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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_match

int tag_remove_match(int i)

Remove one match from the match set.

For synchronization, macros should perform a tag_lock_matches(true) prior to invoking this function.

Parameters:

match_id - ID of match to remove from match set

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_remove_tag

int tag_remove_tag()

Deprecated.

Remove the current tag (most recently retrieved tag) from the database.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_remove_from_file, tag_remove_from_class


tag_rename_file

int tag_rename_file(_str file_name, _str new_file_name)

Rename the given file.

Parameters:

file_name - name of file to update date of tagging for

new_file_name - new file name

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_restart_async_tagging

void tag_restart_async_tagging()

Restart background tagging threads.

Category:

Tagging Functions


tag_return_type_dump

void tag_return_type_dump(struct VS_TAG_RETURN_TYPE &rt, _str tag='', int level=0)

Dump a return type structure to the debug window.

Parameters:

rt - return type to dump

tag - prefix to append to output lines (usually function name)

Parma:

level indentation level for 'isay'

Category:

Tagging Functions

See Also:

say, isay


tag_return_type_equal

boolean tag_return_type_equal(struct VS_TAG_RETURN_TYPE &rt1, struct VS_TAG_RETURN_TYPE &rt2, boolean case_sensitive=true)

Compare two return type info sets for equality. This function does not support templates and ignore the match_tag.

Parameters:

rt1 - first return type to compare

rt2 - second return type to compare

case_sensitive - case sensitive comparison?

Returns: boolean

true if equal, false otherwise

Category:

Tagging Functions


tag_return_type_init

void tag_return_type_init(struct VS_TAG_RETURN_TYPE &rt)

Initialize a return type information structure.

Parameters:

rt - return type structure to initialize

Category:

Tagging Functions


tag_return_type_merge_templates

void tag_return_type_merge_templates(struct VS_TAG_RETURN_TYPE &rt, struct VS_TAG_RETURN_TYPE &outer_rt)

Merge the template arguments for the return type represented by 'outer_rt' with the template arguments for the return type represented by 'rt'. This is used to handle nested templates.

Parameters:

rt - return type to merge template arguments to

outer_rt - return type to mrege template arguments from

Category:

Tagging Functions


tag_return_type_string

_str tag_return_type_string(struct VS_TAG_RETURN_TYPE &rt, boolean printArgNames=true)

Parameters:

rt - return type structure to convert

printArgNames - print template arguments

Returns: _str

Create a string representation for the given return type.

Category:

Tagging Functions


tag_set_cache_size

int tag_set_cache_size(int cache_size, int cache_max)

Specify the amount of memory to use for the database cache.

Parameters:

cache_size - Amount of memory in bytes.

cache_max - maximum amount of memory to allow cache to use dynamically set depending on the machine's available memory.

Returns: int

0 on success, <0 on error. The minimum size cache allowed is 512k.

Since:

3.0

Category:

Tagging Functions


tag_set_context_name_location

int tag_set_context_name_location(int context_id, int name_line_no, int name_seekpos)

Set the name and line number positions for the symbol name of the context with the given context ID.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

context_id - Context ID [ from 1 to tag_get_num_of_context() ]

name_line_no - line number that symbol name is located on

name_seekpos - Seek position of the first character of the symbol name

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_context, tag_end_context, tag_get_detail2


tag_set_context_parents

int tag_set_context_parents(int context_id, _str parents)

Set the class inheritance for the given context tag.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_context, tag_get_detail2, tag_insert_context, tag_set_inheritance


tag_set_context_template_signature

int tag_set_context_template_signature(int local_id, _str template_args)

Set the template signature for the given context tag.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

context_id - Context ID [ from 1 to tag_get_num_of_context() ] of context tag representing class or struct to set inheritance relationships for.

template_signature - Template signature for the tag, in language specific format, normally delimited by commas.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

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=null)

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.

Parameters:

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 - Modification date when tagged, read from disk if modify_date is NULL. Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms).

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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)

Sets the database description/title for the currently open database

Parameters:

comment - Description or title of this database

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_db_comment


tag_set_db_flags

int tag_set_db_flags(int flags)

Sets the database flags VS_DBFLAG_

Parameters:

flags - bitset of VS_DBFLAG_

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_set_embedded_language

void tag_set_embedded_language()

Store the language identifier for this embedded code block in the current tag database.

Since:

13.0

Category:

Tagging Functions

See Also:

_EmbeddedStart(), _EmbeddedEnd(), tag_set_language


tag_set_extension

int tag_set_extension(_str file_name, _str lang)

Deprecated. Use tag_set_language()

API function for setting the language type for the given filename. This corresponds to the p_LangId property of 'file_name', not necessarily the literal file extension.

Parameters:

file_name - File path of source file to set language property for. See VS_TAGSEPARATOR_file for more details about constructing this value.

lang - p_LangId property for file_name.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

p_LangId, tag_get_extension, tag_get_file, tag_find_file, tag_next_file


tag_set_inheritance

int tag_set_inheritance(_str class_name, _str parents)

Modify the set of parent classes for a given class. Use the NULL or empty string to indicate that class_name is a base class.

Parameters:

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_set_language

int tag_set_language(_str file_name, _str lang)

API function for setting the language type for the given filename. This corresponds to the p_LangId property of 'file_name', not necessarily the literal file extension.

Parameters:

file_name - File path of source file to set language property for. See VS_TAGSEPARATOR_file for more details about constructing this value.

lang - p_LangId property for file_name.

Returns: int

0 on success, <0 on error.

Since:

13.0

Category:

Tagging Functions

See Also:

p_LangId, tag_get_language, tag_get_file, tag_find_file, tag_next_file


tag_set_local_name_location

int tag_set_local_name_location(int local_id, int name_line_no, int name_seekpos)

Set the name and line number positions for the local symbol name with the given local ID.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

local_id - Local ID [ from 1 to tag_get_num_of_locals() ]

name_line_no - line number that symbol name is located on

name_seekpos - Seek position of the first character of the symbol name

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_local, tag_end_local, tag_get_detail2


tag_set_local_parents

int tag_set_local_parents(int local_id, _str parents)

Set the class inheritance for the given local tag.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_local2, tag_get_detail2, tag_insert_local, tag_set_inheritance


tag_set_local_template_signature

int tag_set_local_template_signature(int local_id, _str template_args)

Set the template signature for the given local tag.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

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.

template_signature - Template signature for this local tag, in language specific format, normally delimited by commas.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_get_local2, tag_get_detail2, tag_insert_local, tag_set_inheritance


tag_sort_context

int tag_sort_context()

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.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_context


tag_sort_locals

int tag_sort_locals()

Sort the local 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 local variables, this function computes the outer contexts.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_insert_local2


tag_split_class_name

void tag_split_class_name(_str class_name, var inner_name, var outer_name, boolean outer_first_only=false)

Decompose a class name into its outer component and inner class name only. This is strictly a string function, no file I/O or searching is involved.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

class_name - Class name to split. See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details.

inner_name - (Output) 'inner' class name (class name only)

outer_name - (Output) 'outer' class name (class_name - inner_name)

outer_first_only - When true, set outer_name to just the name of the outer class rather than the qualified class name.

Category:

Tagging Functions

See Also:

tag_join_class_name


tag_stop_async_tagging

void tag_stop_async_tagging()

Stop background tagging threads.

Category:

Tagging Functions


tag_transfer_context

int tag_transfer_context(_str file_name)

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.

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

file_name - typically p_buf_name, absolute path of buffer

Returns: int

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.

Category:

Tagging Functions

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 nzero, _str category_name, int &in_count)

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.

Parameters:

type_id - Type id (see tag_get_type) If (type_id<0), inserts global tags with any user defined tag types.

mask - Tag flags indicating symbol attributes, see tag_insert_simple for details.

nzero - add member if (mask & tag_flags) is zero or nonzero?

category_name - tag category to add members from

in_count - (reference, input, output), number of items inserted

Returns: int

0 on error, <0 on error.

Category:

Tagging Functions

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 nzero, _str category_name, int &in_count)

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.

Parameters:

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 flags indicating symbol attributes, see tag_insert_simple for details.

nzero - add member if (mask & tag_flags) is zero or nonzero?

category_name - tag category to add members from

in_count - (Input, Output), number of items inserted. See tag_tree_add_members_of for more information about how this relates to refresh operations and prompting.

Returns: int

0 on error, <0 on error.

Category:

Tagging Functions

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 &in_count)

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_cbrowser_low_refresh
During a refresh operation, stop at this many items.
def_cbrowser_high_refresh
First prompt at this level, if not refresh operation.
def_cbrowser_flood_refresh
Prompt at every multiple of this level.

Parameters:

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.

in_count - (Input/Output) Number of items inserted.

Returns: int

0 on success, < 0 on error.

Category:

Tagging Functions

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_list1, _str arg_list2, boolean unqualify)

Compare the two argument lists, this method works for both Delphi/Pascal/Ada style arguments and C/C++/Java style arguments.

Parameters:

arg_list1 - Argument list number 1

arg_list2 - Argument list number 2

unqualify - Loose comparison, peel off class qualifications

Returns: int

0 if they match, nonzero otherwise.

Category:

Tagging Functions

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 type_name, int tag_flags=0, _str arguments="", _str return_type="")

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

Parameters:

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.

type_name - Tag type name, see tag_get_type for standard tag types

tag_flags - Tag flags indicating symbol attributes, see tag_insert_simple for details.

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.

Returns: _str

String representation for the tag passed in.

Category:

Tagging Functions

See Also:

tag_tree_decompose_tag


tag_tree_decompose_caption

void tag_tree_decompose_caption(_str caption, _str &member_name, _str &class_name=null, _str &arguments=null, _str &template_args=null)

Parse member name out of caption generated using tag_tree_make_caption().

Parameters:

caption - generated tag caption

member_name - (Output) tag name only

class_name - Class name

arguments - Function arguments

template_args - Template arguments

Category:

Tagging Functions


tag_tree_decompose_tag

void tag_tree_decompose_tag(_str proc_name, _str &tag_name, _str &class_name, _str &type_name, int &tag_flags, _str &arguments=null, _str &return_type=null)

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.

Parameters:

proc_name - Encoded tag from tag_tree_compose_tag on an extension specific tag search function.

tag_name - (Output) the name of the tag

class_name - (Output) class/container the tag belongs to

type_name - (Output) Tag type name. See tag_get_type for a list of all standard tag types.

tag_flags - (Output) Tag flags indicating symbol attributes, see (Output) tag_insert_simple for details.

arguments - 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.

Category:

Tagging Functions

See Also:

tag_tree_compose_tag


tag_tree_filter_member

int tag_tree_filter_member(int filter_flags, _str type_name, int in_class, int tag_flags, int &i_access, int &i_type)

Deprecated. Use tag_tree_filter_member2

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 symbol 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.

Parameters:

filter_flags - Filtering options flags, see tag_tree_filter_member2.

type_name - Tag type, See tag_get_type.

in_class - if 1, treat as a class member, (class_name != '')

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.

Returns: int

0 if the item is filtered out, 1 if it passes the filters.

Category:

Tagging Functions

See Also:

tag_get_info, tag_get_type, tag_tree_filter_member2, tag_tree_insert_tag


tag_tree_filter_member2

int tag_tree_filter_member2(int filter_flags_1, int filter_flags_2, _str type_name, int in_class, int tag_flags, int &i_access, int &i_type)

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 symbol 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.

Parameters:

filter_flags_1 - 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)

filter_flags_2 - 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

type_name - tag type (from tag_get_type)

in_class - if 1, treat as a class member, (class_name != '')

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_annotation
annotation or attribute
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
CB_type_tag
HTML/XML tag
CB_type_statement
general statement type
CB_type_annotype
annotation class type
CB_type_assign
assignment statement
CB_type_call
function call statement
CB_type_if
if or switch statement
CB_type_loop
for/while/do loop statement
CB_type_break
break or exit statement
CB_type_continue
continue statement
CB_type_return
return or throw statement
CB_type_goto
goto statement
CB_type_try
try statement
CB_type_preprocessing
preprocessing statement

Returns: int

0 if the item is filtered out, 1 if it passes the filters.

Category:

Tagging Functions

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)

Pretty-print function arguments to output buffer

Parameters:

signature - Return type and parameters of tag, as stored in the database, including VS_TAGSEPARATOR_args to separate the return type from the parameters.

Returns: _str

The output is returned in a staticly allocated string pointer.

Category:

Tagging Functions

See Also:

tag_get_detail, tag_tree_make_caption


tag_tree_get_bitmap

int tag_tree_get_bitmap(int filter_flags_1, int filter_flags_2, _str type_name, _str class_name, int tag_flags, int &leaf_flag, int &pic_member)

Simple to use, but very fast entry point for selecting the bitmap to be displayed in the tree control corresponding to the given tag information. You must call tag_tree_prepare_expand() prior to calling this function.

Parameters:

filter_flags_1 - first part of symbol browser filter flags

filter_flags_2 - second part of symbol browser filter flags

type_name - tag type name

class_name - tag class name, just checked for null/empty

tag_flags - Tag flags indicating symbol attributes, see tag_insert_simple for details.

leaf_flag - (Output) -1 implies leaf item, 0 or 1 container

pic_member - (Output) set to picture index of bitmap

Returns: int

0 on success, <0 on error, >0 if filtered out.

Category:

Tagging Functions


tag_tree_insert_context

int tag_tree_insert_context(int tree_wid, int treeIndex, int filter_flags, int include_tab, int force_leaf, int tree_flags, int show_statements)

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.

For synchronization, perform a tag_lock_context(false) prior to invoking this function.

Parameters:

tree_wid - Window ID of the tree control to insert into.

treeIndex - Parent tree node index to insert item under.

filter_flags - Tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

include_tab - append class name after signature if 1, prepend class name with :: if 0. 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 - tree flags to set for this item

show_statements - show statements in "Defs" tab

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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, ...)

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.

Parameters:

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 - append class name after signature if 1, prepend class name with :: if 0. 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/define/template signature

include_class - include class name

user_info - Per-node user data for tree control

Returns: int

tree index on success, <0 on error.

Category:

Tagging Functions

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_info

int tag_tree_insert_info(int tree_wid, int tree_index, VS_TAG_BROWSE_INFO &cm, boolean include_tab=false, int force_leaf=0, int tree_flags=TREE_ADD_AS_CHILD, typeless user_info=null)

API function for inserting a tag entry with supporting info into the given tree control.

Parameters:

tree_wid - window ID of the tree control to insert into.

tree_index - parent tree node index to insert item under.

cm - (input) symbol information

include_tab - append class name after signature if 1, prepend class name with :: if 0. See tag_tree_make_caption for further explanation.

force_leaf - if < 0, force leaf node, otherwise choose by type. Normally "container" tag types, such as classes or structs are automatically inserted as non-leaf nodes.

tree_flags - flags passed to _TreeAddItem.

user_info - per-node user data for tree control

Returns: int

tree index of new item on success, <0 on error.

Category:

Tagging Functions

See Also:

tag_tree_insert_tag, tag_get_match_info


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 type_name, _str file_name, int line_no, _str class_name, int tag_flags, _str signature, ...)

API function for inserting a tag entry with supporting info into the given tree control.

Parameters:

tree_wid - Window ID of the tree control to insert into.

tree_index - Parent tree node index to insert item under.

include_tab - append class name after signature if 1, prepend class name with :: if 0. See tag_tree_make_caption for further explanation.

force_leaf - if < 0, force leaf node, otherwise choose by 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.

type_name - Tag type name. 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 - Path to file that is located in

line_no - Line number that tag is positioned on. 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 - Tag flags indicating symbol attributes, see tag_insert_simple for details.

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.

user_info - Per-node user data for tree control

Returns: int

tree index of new item on success, <0 on error.

Category:

Tagging Functions

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_insert_tag_outline

int tag_tree_insert_tag_outline(int tree_wid, int tree_index, int include_tab, int tree_flags, const char *pszTagName, const char *pszTypeName, const char *pszFileName, int line_no, const char *pszClassName=0, int tag_flags=0, const char *pszSignature=0, const char *pszTemplateArgs=0, const char *pszNodeText=0, VSHVAR hvarUserInfo=0)

Internal function for inserting a tag entry with supporting info into the given tree control using the outline view rendering style.

Parameters:

tree_wid - window ID of the tree control

tree_index - parent index to insert item under

include_tab - append class name after signature if 1, prepend class name with :: if 0

force_leaf - if < 0, force leaf node, otherwise choose by type

tree_flags - flags passed to vsTreeAddItem

pszTagName - name of entry

pszTypeName - type of tag, (see VS_TAGTYPE_*)

pszFileName - path to file that is located in

line_no - line number that tag is positioned on

pszClassName - name of class that tag belongs to

tag_flags - tag attributes (see VS_TAGFLAG_*)

pszSignature - arguments and return type

pszTemplateArgs - template signature

hvarUserInfo - per-node user data for tree control

Returns: int

tree index on success, <0 on error.

Category:

Tagging Functions


tag_tree_make_caption

_str tag_tree_make_caption(_str member_name, _str type_name, _str class_name, int flags, _str arguments, boolean include_tab=false)

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). The result is returned as a pointer to a static character array.

This function is highly optimized, since it is one of the most critical code paths used by the symbol browser.

Parameters:

member_name - Name of tag (symbol).

type_name - Tag type (from 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.

flags - Set of tag attribute flags. See tag_insert_simple for more information about the tag flags.

arguments - Tag argumetns (from tag_get_detail).

include_tab - append class name after signature if 1, prepend class name with :: if 0.

Returns: _str

Caption formatted in standard form as normally presented in symbol browser.

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)

Category:

Tagging Functions

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=true, boolean include_args=true, boolean include_tab=false)

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

For synchronization, macros should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

match_type - VS_TAGMATCH_

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 - If 0, does not include class name

include_args - if 0, does not include function signature

include_tab - append class name after signature if 1, prepend class name with :: if 0

Returns: _str

Caption formatted in standard form as normally presented in symbol browser.

Category:

Tagging Functions

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, int filter_flags2=0)

This function is called to prepare this module 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 only by vsTagTreeAddClassMember(). This mitigates the parameter passing overhead normally required by vsTagTreeAddClassMember.

Parameters:

form_wid - Window ID of form containing the class tree view

tree_index - Tree parent node index which items will be inserted under.

tree_wid - Window ID of symbol browser 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.

filter_flags2 - Extended filter flags. For details, see tag_tree_filter_member2.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions

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_register_cb_type

int tag_tree_register_cb_type(int type_id, int cb_type, int pic_member_public=0, int pic_member_protected=0, int pic_member_private=0, int pic_member_package=0)

Register a new OEM-defined CB type.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM <= type_id <= VS_TAGTYPE_MAXIMUM

cb_type - Symbol browser type index for picture indices, in range CB_type_LAST+1 ...

pic_member_public - Picture index of bitmap for public scope symbol

pic_member_protected - Picture index of bitmap for protected scope symbol

pic_member_private - Picture index of bitmap for private scope symbol

pic_member_package - Picture index of bitmap for package scope symbol

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_tree_select_bitmap

void tag_tree_select_bitmap(int i_access, int i_type, int &leaf_flag, int &pic_member)

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_member.

Parameters:

i_access - Nenber 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

Category:

Tagging Functions

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)

This function sets the user data for the given node in the given tree calculated using the algorithm designed for the symbol 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

Parameters:

tree_wid - Window ID of the tree control to set user info for

tree_index - Parent tree node index of node in tree to set info at

tag_file_id - Unique numeric ID for tag file, 0 for 'current' tag file. Each tag file displayed in the symbol 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 - file ID from tag_get_detail of item being added to tree (0 for current)

line_no - line number at which tag occurs

Category:

Tagging Functions

See Also:

_TreeSetUserInfo, tag_get_detail, tag_tree_insert_tag, tag_tree_prepare_expand


tag_tree_type_is_class

int tag_tree_type_is_class(_str type_name)

Speed-demon way to determine if the given type is a class, struct, or union (class, struct, union).

Parameters:

type_name - String specifying tag's type name (from tag_get_info)

Returns: int

1 if the item is a class, 0, otherwise.

Category:

Tagging Functions

See Also:

tag_get_type


tag_tree_type_is_data

int tag_tree_type_is_data(_str type_name)

Speed-demon way to determine if the given type is a variable type. (var, gvar, lvar, param, prop).

Parameters:

type_name - string specifying tag's type name (from tag_get_info)

Returns: int

Returns 1 if the item is a func, 0, otherwise.

Category:

Tagging Functions


tag_tree_type_is_func

int tag_tree_type_is_func(_str type_name)

Speed-demon way to determine if the given type is a function or procedure type. (proc, proto, func, constr, or destr).

Parameters:

type_name - string specifying tag's type name (from tag_get_info)

Returns: int

1 if the item is a func, 0, otherwise.

Category:

Tagging Functions

See Also:

tag_get_type


tag_tree_type_is_package

int tag_tree_type_is_package(_str type_name)

Speed-demon way to determine if the given type is a package, library, or program (package, lib, prog).

Parameters:

type_name - String specifying tag's type name (from tag_get_info)

Returns: int

1 if the item is a package, 0 otherwise.

Category:

Tagging Functions

See Also:

tag_get_type


tag_tree_type_is_statement

int tag_tree_type_is_statement(_str type_name)

Determine whether the type is a statement

Parameters:

type_name - string specifying tag's type name (from tag_get_info)

Returns: int

1 if the item is a statement, 0, otherwise.

Category:

Tagging Functions


tag_tree_unregister_cb_type

void tag_tree_unregister_cb_type(int type_id)

Unregister a OEM-defined CB type.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM <= type_id <= VS_TAGTYPE_MAXIMUM

Category:

Tagging Functions


tag_type_get_description

_str tag_type_get_description(int type_id)

Get the optional text description of the given type ID (for screen display)

Parameters:

type_id - Tag type ID, in range 0-VS_TAGTYPE_MAXIMUM

Returns: _str

Description of the given type ID

Category:

Tagging Functions


tag_type_get_filter

int tag_type_get_filter(int type_id)

Get the filter flags for given type ID.

Parameters:

type_id - Tag type ID, in range 0-VS_TAGTYPE_MAXIMUM

Returns: int

Filter flags for type ID.

Category:

Tagging Functions


tag_type_set_description

void tag_type_set_description(int type_id, _str description)

Set the description for the given type ID.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM (greater than or equal to) type_id (greater than or equal to) VS_TAGTYPE_MAXIMUM

description - Tag type description

Category:

Tagging Functions


tag_type_set_filter

void tag_type_set_filter(int type_id, int filter_flags)

Set the filter flags for given type ID.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM <= type_id <= VS_TAGTYPE_MAXIMUM

filter_flags - New tag filter flags, only insert tags passing this filter. See tag_filter_type for more details.

Category:

Tagging Functions


tag_unlock_context

void tag_unlock_context()

Release the thread synchronization lock on the contents of the current context, that is, the symbols found in the current file.

Category:

Tagging Functions


tag_unlock_matches

void tag_unlock_matches()

Release the thread synchronization lock on the current set of matches.

Category:

Tagging Functions


tag_unregister_type

void tag_unregister_type(int type_id)

Unregister a OEM-defined type.

Parameters:

type_id - Tag type ID, in range VS_TAGTYPE_OEM <= type_id <= VS_TAGTYPE_MAXIMUM

Category:

Tagging Functions


tag_update_context

int tag_update_context()

Update the tags in the current context.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


tag_update_locals

int tag_update_locals(int find_all)

Update the locals in the current function or set of nested functions.

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

find_all - Find all locals, or just up to cursor position?

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


Tagging Functions

_do_list_members
_EmbeddedEnd
_EmbeddedExtension
_EmbeddedStart
_ext_codehelp_flags
_ext_surround_flags
_FindLanguageCallbackIndex
_GetCodehelpFlags
_GetEmbeddedLangId
_GetSurroundModeFlags
_is_background_tagging_enabled
_is_background_tagging_supported
_istagging_supported
_LanguageInheritsFrom
_QBinaryLoadTagsSupported
_QTaggingSupported
_SetLanguageInheritsFrom
auto_codehelp_key
codehelp_complete
def_ctags_flags
def_plusminus_blocks
ext_inherits_from
find_ext_callback
find_refs
find_tag
grep_tag
list_symbols
MaybeBuildTagFile
next_tag_filea
push_ref
tag_browse_info_dump
tag_browse_info_equal
tag_browse_info_init
tag_check_access_level
tag_check_cached_context
tag_check_cached_locals
tag_check_context
tag_check_context_flags
tag_check_for_class
tag_check_for_define
tag_check_for_enum
tag_check_for_package
tag_check_for_template
tag_check_for_typedef
tag_check_friend_relationship
tag_clear_context
tag_clear_embedded
tag_clear_locals
tag_clear_matches
tag_close_all
tag_close_all_db
tag_close_db
tag_close_db2
tag_context_match_tags
tag_create_db
tag_current_context
tag_current_context_name
tag_current_db
tag_current_local
tag_current_local_name
tag_current_statement
tag_current_version
tag_dispose_async_tagging_result
tag_end_context
tag_end_local
tag_ext_inherits_from
tag_filter_type
tag_find_class
tag_find_closest
tag_find_context
tag_find_context_iterator
tag_find_equal
tag_find_ext_callback
tag_find_extension
tag_find_file
tag_find_friends_of_class
tag_find_friends_to_tag
tag_find_global
tag_find_in_class
tag_find_in_file
tag_find_include_file
tag_find_included_by
tag_find_language
tag_find_local
tag_find_local_iterator
tag_find_occurrence
tag_find_prefix
tag_find_refer_by
tag_find_refer_to
tag_find_regex
tag_find_tag
tag_find_type
tag_flush_db
tag_get_async_locals_bounds
tag_get_async_tag_database
tag_get_async_tagging_job
tag_get_async_tagging_result
tag_get_browse_info
tag_get_cache_size
tag_get_class
tag_get_context
tag_get_context_simple
tag_get_current_context
tag_get_date
tag_get_db_comment
tag_get_db_flags
tag_get_detail
tag_get_detail2
tag_get_embedded
tag_get_extension
tag_get_file
tag_get_info
tag_get_inheritance
tag_get_instance_info
tag_get_language
tag_get_local
tag_get_local2
tag_get_match
tag_get_match_info
tag_get_next_argument
tag_get_num_async_tagging_jobs
tag_get_num_of_context
tag_get_num_of_embedded
tag_get_num_of_locals
tag_get_num_of_matches
tag_get_occurrence
tag_get_type
tag_get_type_id
tag_insert_async_tagging_result
tag_insert_context
tag_insert_embedded
tag_insert_file_end
tag_insert_file_start
tag_insert_instance
tag_insert_local
tag_insert_local2
tag_insert_match
tag_insert_match_fast
tag_insert_match2
tag_insert_occurrence
tag_insert_reference
tag_insert_simple
tag_insert_tag
tag_is_parent_class
tag_is_same_package
tag_join_class_name
tag_join_matches
tag_list_any_symbols
tag_list_class_context
tag_list_class_locals
tag_list_class_tags
tag_list_context_globals
tag_list_context_imports
tag_list_context_packages
tag_list_duplicate_matches
tag_list_duplicate_tags
tag_list_file_occurrences
tag_list_globals_of_type
tag_list_in_class
tag_list_in_file
tag_list_insert_tag
tag_list_occurrences
tag_list_symbols_in_context
tag_locations_clear
tag_lock_context
tag_lock_matches
tag_match
tag_match_instance
tag_match_occurrences_in_file
tag_match_occurrences_in_file_get_positions
tag_match_symbol_in_context
tag_match_uses_in_file
tag_nearest_context
tag_next_class
tag_next_context
tag_next_context_iterator
tag_next_equal
tag_next_extension
tag_next_file
tag_next_global
tag_next_in_class
tag_next_in_file
tag_next_include_file
tag_next_included_by
tag_next_language
tag_next_local
tag_next_local_iterator
tag_next_occurrence
tag_next_prefix
tag_next_refer_by
tag_next_refer_to
tag_next_regex
tag_next_tag
tag_next_type
tag_normalize_classes
tag_occurrences_end
tag_occurrences_start
tag_open_db
tag_pop_context
tag_pop_matches
tag_push_context
tag_push_matches
tag_pushtag_match
tag_qualify_symbol_name
tag_read_db
tag_register_type
tag_remove_from_class
tag_remove_from_file
tag_remove_match
tag_remove_tag
tag_rename_file
tag_restart_async_tagging
tag_return_type_dump
tag_return_type_equal
tag_return_type_init
tag_return_type_merge_templates
tag_return_type_string
tag_set_cache_size
tag_set_context_name_location
tag_set_context_parents
tag_set_context_template_signature
tag_set_date
tag_set_db_comment
tag_set_db_flags
tag_set_embedded_language
tag_set_extension
tag_set_inheritance
tag_set_language
tag_set_local_name_location
tag_set_local_parents
tag_set_local_template_signature
tag_sort_context
tag_sort_locals
tag_split_class_name
tag_stop_async_tagging
tag_transfer_context
tag_tree_add_members_in_category
tag_tree_add_members_in_section
tag_tree_add_members_of
tag_tree_compare_args
tag_tree_compose_tag
tag_tree_decompose_caption
tag_tree_decompose_tag
tag_tree_filter_member
tag_tree_filter_member2
tag_tree_format_args
tag_tree_get_bitmap
tag_tree_insert_context
tag_tree_insert_fast
tag_tree_insert_info
tag_tree_insert_tag
tag_tree_make_caption
tag_tree_make_caption_fast
tag_tree_prepare_expand
tag_tree_register_cb_type
tag_tree_select_bitmap
tag_tree_set_user_info
tag_tree_type_is_class
tag_tree_type_is_data
tag_tree_type_is_func
tag_tree_type_is_package
tag_tree_type_is_statement
tag_tree_unregister_cb_type
tag_type_get_description
tag_type_get_filter
tag_type_set_description
tag_type_set_filter
tag_unlock_context
tag_unlock_matches
tag_unregister_type
tag_update_context
tag_update_locals
tags_filename
tags_filenamea
tagsdb_version
toggle_cbrowser
toggle_context
toggle_defs
toggle_find_symbol
toggle_properties
toggle_refs
toggle_symbol
toggle_tagging
VS_TAGSEPARATOR_args
VS_TAGSEPARATOR_class
VS_TAGSEPARATOR_equals
VS_TAGSEPARATOR_package
VS_TAGSEPARATOR_parents
VS_TAGSEPARATOR_throws


tags_filename

_str tags_filename(_str lang="", boolean includeSlickC=true)

Return a list of tag files associated with the given (optional) extension. If the extension given is the empty string, and the current object is an editor control, get the extension from the p_LangId property. If the current object is not an editor control, retrieve all tag files and project tag files, reguarless of extension relationship.

Note: The new version of this function tags_filenamea is used more often, and is slightly more efficient because it returns its results as an array.

Parameters:

ext - If not '', the workspace tag file and all tag files for the extension specified by ext. If this is '', all extension specific tag files are returned except optionally the tag files for Slick-C®.

includeSlickC - Specifies whether the tag files for Slick-C® should be returned. This option has no effect if ext!=''.

Returns: _str

string containing FILESEP separted tag file paths.

Category:

Tagging Functions

See Also:

tags_filenamea, next_tag_filea


tags_filenamea

STRARRAY tags_filenamea(_str ext="")

Return the array tag files associated with the given (optional) extension. If the extension given is the empty string, and the current object is an editor control, get the extension from the p_LangId property. If the current object is not an editor control, retrieve all tag files and project tag files, reguarless of extension relationship.

Parameters:

ext - (optional) file extension (language) to get tags for

Returns: STRARRAY

array of strings containing each tag file path.

Example:

typeless tag_files = tags_filenamea();
int i=0;
for(;;) {
   _str tf = next_tag_filea(tag_files,i,false,true);
   if (tf=='') break;
   messageNwait("tag file: "tf);
}

Category:

Tagging Functions

See Also:

tags_filename, next_tag_filea


tagsdb_version

void tagsdb_version()

Display the effective version of the tagsdb.dll

Category:

Tagging Functions


test_event

_str test_event(_str options="")

Deprecated. Use _IsKeyPending or

Parameters:

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.

Returns: _str

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.

Category:

Keyboard Functions

See Also:

get_event, last_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


Text Box Events

lbutton_double_click
lbutton_down
lbutton_triple_click
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
_rubout
_save_draw_setup
_set_sel
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
append_cut
append_to_clipboard
ArgumentCompletionUpdateTextBox
autocomplete
AutoCompleteUpdateInfo
begin_line
begin_line_text_toggle
brief_delete
brief_end
brief_home
brief_paste
call_event
cap_selection
cap_word
cbacktab
command_state
copy_full_word
copy_subword
copy_to_clipboard
copy_word
ctab
cua_select
cursor_left
cursor_right
cut
cut_code_block
cut_end_line
cut_full_word
cut_line
cut_prev_word
cut_subword
cut_whole_word
cut_word
delete_code_block
delete_end_line
delete_full_word
delete_line
delete_prev_full_word
delete_prev_subword
delete_prev_word
delete_subword
delete_whole_word
delete_word
end_line
end_line_text_toggle
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
overlay_clipboard
paste
refresh
right
set_command
transpose_chars
transpose_lines
transpose_words


Text Box Properties

p_active_form
p_after_pic_indent_x
p_auto_select
p_auto_size
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_completion
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_parent
p_Password
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


text_col

int text_col(_str string, int column=0, _str option="L")

Remarks column does not have a default value. The 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

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

expand_tabs, _expand_tabsc, _text_colc, _expand_tabsc_raw


textBoxDialog

int textBoxDialog(_str FormCaption, int Flags, int TextBoxWidth, _str HelpItem, _str ButtonNCaptionList="", _str RetrieveName="", _str prompt1="", _str promptN="", ...)

Displays one or more text boxes, combo boxes, or check boxes on a modal dialog.

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 Visual 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 the index of the button pressed (e.g. for buttons in order OK, Cancel -- 1=OK, 2=Cancel), and the _param1.._paramN global variables are set to the responses to text1..textN respectively.

The limit on the number of prompts/values is 9.

Parameters:

FormCaption - 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. The input view has Name:[Initial_Value] pairs, one-per-line.
TB_VIEWID_OUTPUT
The return value will be a view id containing the responses. The output view has the Value of each item, one-per-line. IMPORTANT: The value of the button pressed (e.g. OK, Cancel, etc.) is not included in the output view. If you are including custom buttons, and you need to know which button was pressed by the user, then do NOT use the TB_VIEWID_OUTPUT flag -- use _param1.._paramN global variables instead and check the return result for which button was pressed (1=first button, 2=second button, etc.).
TB_QUERY_COMPAT
The return value will be a view id containing the responses in the format of the QUERY.

TextBoxWidth - Specifies width of the text box in twips. 1440 twips is 1 inch on the display. Specify 0 for the default text box width.

HelpItem - 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 help index item listed in "vslickindex.xml" In addition, you may specify a unique keyword for any windows .chm help file by specifying a string in the format: HelpIndexItem:help_filename. Specify "" for no help.

ButtonNCaptionList - ButtonNCaptionList in the following format:

ButtonList[\tCaption1[\nCaption2[\nCaptionN]]]
Where ButtonList is in the format:
<Caption[:controlName]>[,...]
Note:
If you supply a button list, it is up to you to make your own cancel and help buttons. If you have a button with the control name '_cancel', it will automatically be set up as the cancel button. A button with the control name '_help' will automatically be set up as the help button.

If the caption starts with "-html ", it will be rendered as sunken HTML text.

The same _ok.lbutton_up function will run for all the buttons when they are pressed, unless the control name is specified as _help or _cancel.

Specify "" for default OK, Cancel, Help buttons, and no captions. Default to "".

RetrieveName - Specify the name of the command that called this function or a name for what is being prompted for. Defaults to "".

prompt1 - You may specify 1 or more prompt string arguments.

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.
-checkbox
Prompt is a check box instead of a text box.
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.
If -checkbox option is used to create a checkbox, then valid initial values are:
0 (not checked), 1 (checked). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO2STATE style.
If -checkbox3 or -checkbox3a option is used, then valid initial values are:
0 (not checked), 1 (checked), 2 (grayed). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO3STATEA style where values cycle through: 0, 2, 1.
If checkbox3b option is used, then valid initial values are:
0 (not checked), 1 (checked), 2 (grayed). Default initial value is 0. This style of checkbox corresponds to a PSCH_AUTO3STATEB style where values cycle through: 0, 1, 2.

promptN - Specify 1 or more prompt arguments. See prompt1.

Returns: int

COMMAND_CANCELLED_RC if the dialog box is cancelled. INVALID_ARGUMENT_RC if more than the maximum number of prompts. If ButtonNCaptionList!="", then return value is the number of the button that was pressed. Button numbers start at 1.

Example:

 int textBoxForm( title ,flags
                  ,text_box_width , help_item [,
                  [,retrieve_name
                  [,prompt1 [,prompt2, ... promptN ]]]] )

   // Display dialog with left, right, paragraph margin settings
   parse p_margins with left_ma right_ma new_para_ma
   _str new_para_ma = strip(new_para_ma)
   int result = textBoxDialog("Margins",     // Form caption
                              0,             // Flags
                              0,             // Use default textbox width
                              "gui_margins", // Help item
                              "",            // Buttons and captions
                              "gui_margins", // Retrieve Name
                              "-E1 _check_margins Left Margin:"left_ma,
                              "Right Margin:"right_ma,
                              "New Paragraph Margin:"new_para_ma);
   if (result!=COMMAND_CANCELLED_RC) {
      p_margins=_param1' '_param2' '_param3
   }

   // Display dialog that confirms to remove a file from current project
   // and provides a check box to also delete from disk which is initially
   // unchecked.
   int result = textBoxDialog("Confirm Remove", // Form caption
                              0,                // Flags
                              0,                // Use default textbox width
                              "",               // Help item
                              "Yes,No,Cancel:_cancel\tRemove file from project?",
                              "",               // Retrieve Name
                              "-CHECKBOX Delete permanently from disk":0)
   if (result==COMMAND_CANCELLED_RC) {
      // User clicked "Cancel" or hit ESC
   } else if ( result==1 ) {
      // User clicked "Yes"
      // _param1 stores value of check box (0=unchecked, 1=checked)
   } else if ( result==2 ) {
      // User clicked "No"
   }

Category:

Forms


tile_windows

_command void tile_windows(_str option="V")

Resizes and moves MDI edit windows so that they do not overlap.

Category:

Window Functions

See Also:

cascade_windows


toggle_all_outlining

_command typeless toggle_all_outlining()

Toggles selective display on and off. If selective display is not on, this will hide lines in the current buffer which are not part of a function definition heading and collapse comment blocks. If selective display is active, it will do a unhide everything.

Applies To:

Edit Window, Editor Control

Categories:

Search Functions, Selective Display

See Also:

all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_col1, show_procs, show_all, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


toggle_annotations_browser

_command void toggle_annotations_browser()

Toggles the display of the Code Annotations tool window.

Category:

Toolbar Functions


toggle_bookmark

_command typeless toggle_bookmark()

This function is used to toggle setting a bookmark on the current line.

Applies To:

Edit Window

Category:

Bookmark Functions

See Also:

push_bookmark, pop_bookmark, set_bookmark, goto_bookmark


toggle_bookmarks

_command void toggle_bookmarks()

Toggles the display of the Bookmarks tool window.

Categories:

Toolbar Functions, Bookmark Functions


toggle_breakpoints

_command void toggle_breakpoints()

Toggles the display of the Breakpoints tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_build

_command void toggle_build()

Toggles the display of the Build tool window.

Categories:

Toolbar Functions, Project Functions


toggle_call_stack

_command void toggle_call_stack()

Toggles the display of the Call Stack tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_cbrowser

_command void toggle_cbrowser()

Toggles the display of the Symbols tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_classes

_command void toggle_classes()

Toggles the display of the Loaded Classes tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_clipboards

_command void toggle_clipboards()

Toggles the display of the Clipboards tool window.

Category:

Toolbar Functions


toggle_comment

_command void toggle_comment(boolean godown=false, boolean deselect=true)

HS2. Toggles comments of current line or selection. If there is no active selection, it comments the current line. If at least 1 uncommented line is contained in the selection, it's commented blank lines are omitted when doing commenting check.

Returns: void

void

Applies To:

Edit Window, Editor Control

Category:

Edit Window Functions


toggle_context

_command void toggle_context()

Toggles the display of the Current Context tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_debug

_command void toggle_debug()

Toggles the display of the Debug toolbar.

Categories:

Toolbar Functions, Debugger Commands


toggle_debug_sessions

_command void toggle_debug_sessions()

Toggles the display of the Debug Sessions tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_defs

_command void toggle_defs()

Toggles the display of the Defs tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_deltasave

_command void toggle_deltasave()

Toggles the display of the Backup History tool window.

Categories:

Toolbar Functions, File Functions


toggle_exceptions

_command void toggle_exceptions()

Toggles the display of the Exceptions tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_files

_command void toggle_files()

Toggles the display of the Files tool window.

Categories:

Toolbar Functions, Buffer Functions


toggle_filetabs

_command void toggle_filetabs()

Toggles the display of the File Tabs tool window.

Categories:

Toolbar Functions, Buffer Functions


toggle_find

_command void toggle_find()

Toggles the display of the Find and Replace tool window.

Categories:

Toolbar Functions, Search Functions


toggle_find_symbol

_command void toggle_find_symbol()

Toggles the display of the Find Symbol tool window.

Categories:

Toolbar Functions, Tagging Functions, Search Functions


toggle_ftp

_command void toggle_ftp()

Toggles the display of the FTP Client tool window.

Category:

Toolbar Functions


toggle_ftpopen

_command void toggle_ftpopen()

Toggles the display of the FTP tool window.

Category:

Toolbar Functions


toggle_html

_command void toggle_html()

Toggles the display of the HTML toolbar.

Category:

Toolbar Functions


toggle_locals

_command void toggle_locals()

Toggles the display of the Locals tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_members

_command void toggle_members()

Toggles the display of the Members tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_memory

_command void toggle_memory()

Toggles the display of the Memory tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_messages

_command void toggle_messages()

Toggles the display of the Message List tool window.

Category:

Toolbar Functions


toggle_open

_command void toggle_open()

Toggles the display of the Open tool window.

Categories:

Toolbar Functions, Buffer Functions


toggle_output

_command void toggle_output()

Toggles the display of the Output tool window.

Category:

Toolbar Functions


toggle_process_tab_output

_command void toggle_process_tab_output()

Toggles whether or not the build window should be displayed in an editor window or just in the Build tool window. When this option is toggled from off to on, the build window is activated.

Category:

Miscellaneous Functions

See Also:

stop_process, start_process


toggle_project_tools

_command void toggle_project_tools()

Toggles the display of the Project Tools toolbar.

Categories:

Toolbar Functions, Project Functions


toggle_projects

_command void toggle_projects()

Toggles the display of the Projects tool window.

Categories:

Toolbar Functions, Project Functions


toggle_properties

_command void toggle_properties()

Toggles the display of the Symbol Properties tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_refs

_command void toggle_refs()

Toggles the display of the References tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_registers

_command void toggle_registers()

Toggles the display of the Registers tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_search

_command void toggle_search()

Toggles the display of the Search results tool window.

Categories:

Toolbar Functions, Search Functions


toggle_stack

_command void toggle_stack()

Toggles the display of the Slick-C(R) Stack tool window.

Category:

Toolbar Functions


toggle_standard

_command void toggle_standard()

Toggles the display of the Standard toolbar.

Category:

Toolbar Functions


toggle_symbol

_command void toggle_symbol()

Toggles the display of the Preview tool window.

Categories:

Toolbar Functions, Tagging Functions


toggle_tagging

_command void toggle_tagging()

Toggles the display of the Context Tagging(R) toolbar.

Categories:

Toolbar Functions, Tagging Functions


toggle_threads

_command void toggle_threads()

Toggles the display of the Threads tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_variables

_command void toggle_variables()

Toggles the display of the Autos tool window.

Categories:

Toolbar Functions, Debugger Commands


toggle_watch

_command void toggle_watch()

Toggles the display of the Watch tool window.

Categories:

Toolbar Functions, Debugger Commands


togglecase

_str togglecase(_str string, int utf8=-1)

Parameters:

string - Input string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that input and output string are SBCS/DBCS. 1 specifies that input and output string are UTF-8.

Returns: _str

Returns string with case converted on all strings, lower to upper, and upper to lower.

Example:

   togglecase('ABc') == 'abC'
   togglecase('abc') == 'ABC'

Category:

String Functions

See Also:

lowcase, upcase, togglecase_selection


togglecase_selection

_command void togglecase_selection(_str notused='', typeless filter_name='', boolean doRaw=false)

Toggles the case of characters within a selection.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

lowcase_selection, upcase_selection


Toolbar Functions

toggle_annotations_browser
toggle_bookmarks
toggle_breakpoints
toggle_build
toggle_call_stack
toggle_cbrowser
toggle_classes
toggle_clipboards
toggle_context
toggle_debug
toggle_debug_sessions
toggle_defs
toggle_deltasave
toggle_exceptions
toggle_files
toggle_filetabs
toggle_find
toggle_find_symbol
toggle_ftp
toggle_ftpopen
toggle_html
toggle_locals
toggle_members
toggle_memory
toggle_messages
toggle_open
toggle_output
toggle_project_tools
toggle_projects
toggle_properties
toggle_refs
toggle_registers
toggle_search
toggle_stack
toggle_standard
toggle_symbol
toggle_tagging
toggle_threads
toggle_variables
toggle_watch


toolbars

_command void toolbars(_str formName='1')

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 symbol 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.

Category:

Miscellaneous Functions


top

void top()

Places cursor at first line and first column of buffer

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

bottom


top_left_of_window

_command void top_left_of_window()

Places cursor at top left of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

bottom_of_window


top_of_buffer

_command void top_of_buffer()

Places cursor at first line and first column of buffer. If the "Preserve Column on Top/Bottom" option ("Tools", "Options", "More Options...") is on, the cursor is placed at the top of the buffer and the column positon is unchanged.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

bottom_of_buffer, def_top_bottom_push_bookmark, def_top_bottom_style


top_of_window

_command void top_of_window()

Places cursor at top of window.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

bottom_of_window


tprint

_command typeless tprint(...)

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.

Parameters:

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.

Returns: typeless

Returns 0 if successful.

Categories:

Buffer Functions, Selection Functions

See Also:

gui_print


trace

void trace()

Reserved word.

Category:

Miscellaneous Functions


translate

_str translate(_str string, _str output_table, _str input_table, _str pad="", int compliment=0, boolean binary=false)

Parameters:

string - Input string

output_table - table of characters to replace matches with

input_table - table of characters to look for

pad - pad character if length(output_table) < length(input_table)

compliment - Replace char with 'pad' character if it matches input table

binary - When true, input string is treated as an array of bytes (dbcs or utf8 characters are not special).

Returns: _str

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.

If 'compliment' is given and not zero, characters matching the input table will be preserved, and all *other* characters will be replaced with the pad character.

Example:

   translate('bottom_of_window','-','_')  =='bottom-of-window'
   translate('bottom_of_window','','_','*')  =='bottom*of*window'
   translate('bottom_of_window') =='BOTTOM_OF_WINDOW'

Category:

String Functions

See Also:

stranslate


translate_again

_command typeless translate_again()

Used in BRIEF emulation. Repeats the last search and replace performed by the translate_forward or translate_backward command.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

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 typeless translate_backward()

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.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

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 typeless translate_forward(_str old_direction='')

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.

Applies To:

Edit Window

Categories:

Edit Window Methods, Search Functions

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


transpose_chars

_command void transpose_chars()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

transpose_words, transpose_lines


transpose_lines

_command void transpose_lines()

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.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

transpose_words, transpose_chars


transpose_sexp

_command int transpose_sexp()

Transpose the current S-expression with the next one.

Returns: int

Returns 0 if successful, <0 on error.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_sexp, prev_sexp, cut_next_sexp, cut_prev_sexp


transpose_words

_command typeless transpose_words()

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", "Options", "File Extension Setup...", select the Advanced tab).

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

transpose_words, transpose_lines


traverse_char

int traverse_char(_str direction)

Move the cursor to the next or previous character, wrapping to the next or previous line as necessary.

Returns: int

0 on success, <0 if at then beginning of the file.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

next_char, prev_char


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
_SetEditInPlaceCompletion
_TreeAddItem
_TreeAddListItem
_TreeAdjustLastColButtonWidth
_TreeAppendColButtonInfo
_TreeAppendColButtonSorting
_TreeAppendColButtonWidths
_TreeBeginUpdate
_TreeBottom
_TreeCopy
_TreeCurIndex
_TreeCurLineNumber
_TreeDelete
_TreeDeleteColButton
_TreeDeselectAll
_TreeDeselectLine
_TreeDoesItemHaveChildren
_TreeDown
_TreeEndUpdate
_TreeFindSelected
_TreeGetCaption
_TreeGetColButtonInfo
_TreeGetCurCaption
_TreeGetCurCoord
_TreeGetDepth
_TreeGetFirstChildIndex
_TreeGetIndexFromLineNumber
_TreeGetIndexFromPoint
_TreeGetInfo
_TreeGetNextIndex
_TreeGetNextSiblingIndex
_TreeGetNumChildren
_TreeGetNumColButtons
_TreeGetParentIndex
_TreeGetPrevIndex
_TreeGetPrevSiblingIndex
_TreeGetSelInfo
_TreeGetTextForCol
_TreeGetUserInfo
_TreeMoveDown
_TreeMoveUp
_TreePageDown
_TreePageUp
_TreeRefresh
_TreeRestoreNodes
_TreeRetrieveColButtonInfo
_TreeRetrieveColButtonSorting
_TreeRetrieveColButtonWidths
_TreeSaveNodes
_TreeScroll
_TreeSearch
_TreeSelectAll
_TreeSelectLine
_TreeSetAllFlags
_TreeSetCaption
_TreeSetColButtonInfo
_TreeSetCurIndex
_TreeSetInfo
_TreeSetUserInfo
_TreeSortCaption
_TreeSortCol
_TreeSortUserInfo
_TreeTop
_TreeUp


Tree View Properties

p_active_form
p_AlwaysColorCurrent
p_backcolor
p_bbside
p_border_style
p_child
p_client_height
p_client_width
p_CollapsePicture
p_ColorEntireLine
p_edit
p_EditInPlace
p_enabled
p_eventtab
p_eventtab2
p_ExpandPicture
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_Gridlines
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_LeafPicture
p_LevelIndent
p_LineStyle
p_mdi_child
p_mouse_pointer
p_MouseActivate
p_multi_select
p_name
p_NeverColorCurrent
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
p_parent
p_prev
p_scale_mode
p_scroll_bars
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


trunc

_command void trunc(_str value='')

Displays and optionally sets the p_TruncateLength property. See p_TruncateLength property for more information.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions


try_calling

int try_calling(int index)

If proc_index is a valid index to a procedure that exists, proc_index is called with no arguments.

Category:

Miscellaneous Functions

See Also:

call_root_key


type2oi

int type2oi(int type)

Returns: int

Returns name type given converted to the corresponding object index.

Category:

Names Table Functions

See Also:

oi2type


unbind_key

_command typeless unbind_key(_str keyName='')

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.

Parameters:

cmdline - is a string in the format: max_keystrokes [-r | -m]

Returns: typeless

Returns 0 if successful. Otherwise COMMAND_CANCELLED_RC is returned. On error, message is displayed.

Category:

Keyboard Functions

See Also:

bind_to_key


undo

_command typeless undo()

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", "Options", "File Options...", select Load Tab, Select "Use UNDO", Set "Max Undo Steps").

If the current buffer has 0 undoable steps, the current line is restored to its original value before the cursor moved onto it.

If def_undo_with_cursor is false, this behaves the same as undo_cursor. This is because most emulations actually need undo_cursor, but we want the older funcitonality to be available.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

redo, undo_steps, undo_cursor


undo_cursor

_command typeless undo_cursor()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


undo_msg

_str undo_msg(int status)

Returns: _str

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.

Category:

Miscellaneous Functions


undo_steps

_command typeless undo_steps(_str numSteps="")

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.

Categories:

Edit Window Methods, Editor Control Methods


Unicode Functions

_UTF8Asc
_UTF8ToMultiByte


unindent_line

_command void unindent_line()

Unindents the current line one indent level. Indenting will be with tab or space characters depending upon the Indent With Tabs setting ("Tools", "Options", "File Extension Setup...", select the Indent tab). Set the Syntax Indent for each level using the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Indent tab). If Syntax Indent is grayed, the tab settings are used for all tab related operations including this command.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

indent_line, unindent_selection


unindent_selection

_command typeless unindent_selection()

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", "Options", "File Extension Setup...", select the Indent tab). Set the Syntax Indent for each level using the Extension Options dialog box ("Tools", "Options", "File Extension Setup...", select the Indent tab). If Syntax Indent is grayed, the tab settings are used for all tab related operations including this command.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

indent_selection


unlist_all

_command typeless unlist_all()

Deletes all lines of the current buffer. The lines may be retrieved with the command paste. Used in fileman mode

Category:

File Functions

See Also:

_lbclear


unlist_attr

_command typeless unlist_attr(_str result='')

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

Category:

File Functions

See Also:

fileman_attr


unlist_ext

_command typeless unlist_ext(_str extension='')

Deletes lines of files with the specified extension. Used in fileman mode.

Category:

File Functions


unlist_search

_command typeless unlist_search(_str search_string='', _str arg2='', _str search_options='')

Prompted search and delete line. Used in fileman mode.

Category:

File Functions


unlist_select

_command void unlist_select()

Lines beginning with the character '>' are deleted. Used in fileman mode.

Category:

File Functions


unload

_command void unload(_str filename='')

Unloads module specified. If the module is currently running it may not be unloaded. Do not specify a path for module_name.

Prior to unloading the module, it will invoke the _on_unload_module_XXX callbacks with a single argument indicating the Slick-C® module to be unloaded.

Category:

Macro Programming Functions

See Also:

load, gui_load, gui_unload


unnum

_command void unnum()

remove line numbers from source

Categories:

Edit Window Functions, Editor Control Functions, Search Functions


unsurround

_command void unsurround()

Locate the enclosing block statement for the line the cursor is currently located on and attempt to un-surround that statement.

Category:

Editor Control Methods


untabify_region

_command typeless untabify_region()

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

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 up(int Noflines=1, boolean doScreenLines=false)

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.

Parameters:

Noflines - Number of lines to move up

doScreenLines - When true, cursor up to previous soft wrap line or previous line.

Returns: int

Returns 0 if successful. Otherwise TOP_OF_FILE_RC is returned.

Example:

    status=up();
    if (status==TOP_OF_FILE_RC) {
         message(get_message(status));
    }

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

down


upcase

_str upcase(_str string, int utf8=-1)

Parameters:

string - Input string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that input and output string are SBCS/DBCS. 1 specifies that input and output string are UTF-8.

Returns: _str

Returns string converted to upper case.

Example:

   upcase('ABc')  == 'ABC'
   upcase('abc')  == 'ABC'

Category:

String Functions

See Also:

lowcase, upcase_selection, upcase_word


upcase_selection

_command void upcase_selection(_str notused='', typeless filter_name='', boolean doRaw=false)

Translates characters within selection into upper case.

Applies To:

Edit Window, Editor Control

Category:

Selection Functions

See Also:

lowcase_selection, upcase, upcase_word


upcase_word

_command typeless upcase_word()

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", "Options", "File Extension Setup...", select the Advanced tab).

Returns: typeless

Returns 0 if successful. Returns 1 if no word exists at cursor. On error, message is displayed.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

lowcase_word, cap_word, upcase, upcase_selection


update_format_line

typeless update_format_line(...)

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

read_format_line


v_match

_str v_match(_str name, boolean find_first)

Parameters:

name - variable name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

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.

Category:

Completion Functions


vera_paren

_command void vera_paren()

(C mode only) Open Parenthesis

Handles syntax expansion or auto-function-help for C/C++ mode and several other C-like languages. Use the C Options dialog box ("Tools", "Options", "File Extension Setup...", select C extension, "Options...") to change the main style.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


verify

_str verify(_str string, _str reference, _str option="", int start=1)

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

Category:

String Functions


version

_command void version()

Displays version of editor in message box.

Note to OEMs: You can override the version() command in order to display your own custom About dialog box. Do NOT override the vsversion() command, which is the default About dialog, because you may need its information to debug problems.

Category:

Miscellaneous Functions


view_formfeed_toggle

_command typeless view_formfeed_toggle()

Toggles formfeed display on/off.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_line_numbers_toggle

_command typeless view_line_numbers_toggle()

Toggles line number display on/off. This command does more than just set the p_line_numbers_len property.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, p_ShowSpecialChars, line_numbers_set_width, line_numbers_show_colon


view_nlchars_toggle

_command typeless view_nlchars_toggle()

Toggles newline character display on/off.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_spaces_toggle

_command typeless view_spaces_toggle()

Toggles space display on/off.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_specialchars_toggle

_command typeless view_specialchars_toggle()

Toggles display of all special characters such as tabs, spaces, newline and more on/off.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_tabs_toggle

_command typeless view_tabs_toggle()

Toggles tab display on/off.

Returns: typeless

Applies To:

Editor Control, Edit Window

Categories:

Edit Window Methods, Editor Control Methods

See Also:

view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


visit_file

_command typeless visit_file(_str line="")

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.

Applies To:

Edit Window

Category:

Edit Window Methods

See Also:

edit, gui_visit_file


VS_REF_LATEST_VERSION

#define VS_REF_LATEST_VERSION VS_TAG_LATEST_VERSION

This constant represents the latest version of the references database format implemented in the DLL tagsdb.dll. See tag_current_version.

Category:

Tagging Functions


VS_TAG_LATEST_VERSION

#define VS_TAG_LATEST_VERSION 12001

This constant represents the latest version of the tagging database format implemented in the DLL tagsdb.dll. See tag_current_version.

Category:

Tagging Functions


VS_TAGSEPARATOR_args

#define VS_TAGSEPARATOR_args "\1"

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*".

Category:

Tagging Functions

See Also:

tag_get_detail, tag_insert_tag


VS_TAGSEPARATOR_class

#define VS_TAGSEPARATOR_class ":"

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.

Category:

Tagging Functions

See Also:

tag_find_class, tag_get_class, tag_next_class, tag_insert_tag


VS_TAGSEPARATOR_equals

#define VS_TAGSEPARATOR_equals "="

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".

Category:

Tagging Functions

See Also:

tag_get_detail, tag_insert_tag


VS_TAGSEPARATOR_file

#define VS_TAGSEPARATOR_file '\1'

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.

Category:

Tagging Functions


VS_TAGSEPARATOR_package

#define VS_TAGSEPARATOR_package "/"

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 isA/B.

Category:

Tagging Functions

See Also:

tag_find_class, tag_get_class, tag_next_class, tag_insert_tag


VS_TAGSEPARATOR_parents

#define VS_TAGSEPARATOR_parents ";"

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.

Category:

Tagging Functions

See Also:

tag_get_inheritance, tag_set_inheritance


VS_TAGSEPARATOR_throws

#define VS_TAGSEPARATOR_throws "\2"

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.

Category:

Tagging Functions

See Also:

tag_get_detail, tag_insert_tag


vsActivateView

int VSAPI vsActivateView(int view_id)

This function has been deprecated. It has the same effect as calling vsActivateWindow().

Applies To:

All Window Objects

Category:

Window Functions


vsActivateWindow

int VSAPI vsActivateWindow(int window_id)

Determines the current window.

Parameters:

window_id - ID of window

Returns: int

Applies To:

All Window Objects

Example:

      int window_id;
      // Remember the current window id
      window_id=vsPropGetI(0,VSP_WINDOWID);
      // Switch to hidden window id
      vsActivateWindow(VSWID_HIDDEN);
      //Switch back to original window
      vsActivateWindow(window_id);

Category:

Window Functions

See Also:

vsPropGetI, vsPropSetI


vsAlloc

void*VSAPI vsAlloc(int len)

Allocates memory. The memory is not initialized with zeros. Use the vsFree function to free memory allocated by this function.

Parameters:

len - Number of bytes to allocated.

Returns: void*VSAPI

If successful, returns a pointer to len allocated bytes of memory. Otherwise 0 is returned.

Category:

Miscellaneous Functions

See Also:

vsFree, vsRealloc


vsAllocColor

VSCOLORINDEX VSAPI vsAllocColor(int wid, int fg=0x000000, int bg=0xffffff, int fontFlags=0, VSCOLORINDEX parentColor=0)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

fg - [optional] foreground color to set, default is black

bg - [optional] background color to set, default is white

fontFlags - [optional] bitset of VSFONTFLAG_*, default is plain

parentColor - [optional] color to inherit fg, bg, or font attributes from

Returns: VSCOLORINDEX

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsFreeColor, vsSetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsAllocSelection

int VSAPI vsAllocSelection(int AllocBookmark=0)

Returns: int

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.

Category:

Selection Functions

See Also:

vsFreeSelection


vsArg

VSHVAR VSAPI vsArg(int ParamNum)

Returns: VSHVAR

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.

Category:

Miscellaneous Functions

See Also:

vsHvarGetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetB, vsHvarSetI, vsHvarSetZ, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


VSArgumentCompletionFlags

Control the default behavior of text box argument and command line auto completion. This value is a bitset of the flags defined by VSARGUMENT_COMPLETION_*. The default is for everything to be enabled, including the use of TAB and S_TAB to cycle up and down through the list.

  • VSARGUMENT_COMPLETION_ENABLE
  • VSARGUMENT_COMPLETION_NO_TAB_NEXT
  • SARGUMENT_COMPLETION_COMMANDLINE
  • VSARGUMENT_COMPLETION_UNC_PATHS

Default:

VSARGUMENT_COMPLETION_ALL_OPTIONS

Category:

Configuration Variables


vsASCIIToEBCDIC

void VSAPI vsASCIIToEBCDIC(const char *pSrcBuf, char *pDestBuf, int SrcBufLen=-1)

Converts ASCII text to EBCDIC. pSrcBuf maybe the same as pDestBuf (OK if pSrcBuf==pDestBuf).

Parameters:

pSrcBuf - Buffer contain ASCII data to be converted.

pDestBuf - Destination buffer for EBCDIC.

SrcBufLen - Number of bytes in pSrcBuf.

Category:

Unicode Functions


vsBeginChar

int VSAPI vsBeginChar(int wid, int doBeginChar=1, int *pCharLen=0, int beginComposite=1, unsigned *pUTF32Array=0, int *pUTF32ArrayLen=0)

Retrieves the current character and/or places the cursor at the beginning of the current character.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

doBeginChar - When non-zero, cursor position is adjusted if necessary.

pCharLen - Set to number of bytes in current UTF-8 character.

beginCompsite - When non-zero, operation supports composite characters.

pUTF32Array - (Output) If the buffer is UTF-8, this is set to the UTF-32 characters in the current character. If the buffer is not UTF-8, the current DBCS character is placed in the first entry and the array length is set to 1. The DBCS lead byte is in the first 8 bits (array[0]&0xff).

pUTF32ArrayLen - Number of UTF-32 characters placed in pUTF32Array.

Returns: int

Returns 0 if the cursor is already at the beginning of the current character. Otherwise, a non-zero value is returned.

Category:

Unicode Functions


vsBeginLine

void VSAPI vsBeginLine(int wid)

Places cursor at column 1 of current line.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

vsEndLine


vsBeginSelect

int VSAPI vsBeginSelect(int wid, int markid=-1, int LockSelection=1)

Parameters:

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). 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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsEndSelect


vsBeginSelectCompare

int VSAPI vsBeginSelectCompare(int wid, int markid=-1)

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsEndSelectCompare


vsBookmarkAdd

int VSAPI vsBookmarkAdd(const char *pszBookmarkName, int markid, int vsbmflags=VSBMFLAG_SHOWTOOLTIP | VSBMFLAG_STANDARD | VSBMFLAG_SHOWPIC, int RealLineNumber=-1, int col=0, long BeginLineROffset=0, char *pszLineData=0, char *pszFilename=0, char *pszDocumentName=0)

Adds a new bookmark.

Parameters:

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.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkFind

int VSAPI vsBookmarkFind(const char *pszBookmarkName, int vsbmflags=VSBMFLAG_STANDARD)

Finds bookmark index.

Parameters:

pszBookmarkName - Name of bookmark to find. vsbmflags One or more of these flags must be in the bookmark found.

Returns: int

Returns index of boomark 0..vsBookmarkQCount() or -1 to indicate the bookmark was not found.

Category:

Bookmark Functions

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)

Retrieves information for a bookmark.

Parameters:

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.

Returns: int

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.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkQCount

int VSAPI vsBookmarkQCount()

Returns: int

Returns the number of bookmarks.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkRemove

void VSAPI vsBookmarkRemove(int i, int free_markid=1)

Deletes a bookmark.

Parameters:

i - Index of bookmark where 0<=i<vsBookmarkQCount().

free_markid - When non-zero, vsFreeSelection is called for the markid belonging to this bookmark.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkRestore

void VSAPI vsBookmarkRestore(int wid, int vsbmflags=-1)

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.

Parameters:

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.

Category:

Bookmark Functions

See Also:

vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBottom

void VSAPI vsBottom(int wid)

Places text cursor at end of last line of buffer. wid identifies the object to be operated on. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

vsTop


vsBPMAdd

int VSAPI vsBPMAdd(int wid, int RealLineNum, int flags, void *puserdata=0)

Deprecated. Use vsLineMarker* functions

Adds a break point.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

RealLineNum - Real line number (VSP_RLINE).

flags - One of the flags below:

  • VSBPFLAG_BREAKPOINT
  • VSBPFLAG_EXEC
  • VSBPFLAG_STACKEXEC
  • VSBPFLAG_BREAKPOINTDISABLED

puserdata - Optional pointer to user data. Use this to store debugger specific information.

Returns: int

Returns an index to a break point which is valid input to vsBPMGet().

Category:

Deprecated Breakpoint Functions


vsBPMAddB

int VSAPI vsBPMAddB(const char *pszBufName, int LineNum, int flags, void *puserdata=0)

Deprecated. Use vsLineMarker* functions Adds a break point. You can use this function to set a break point in a file that has not yet been loaded (deferred break point). When the file is loaded, the break point will be displayed.

Parameters:

pszBufName - Name of file or buffer.

RealLineNum - Real line number (VSP_RLINE).

flags - One of the flags below:

  • VSBPFLAG_BREAKPOINT
  • VSBPFLAG_EXEC
  • VSBPFLAG_STACKEXEC
  • VSBPFLAG_BREAKPOINTDISABLED

puserdata - Optional pointer to user data. Use this to store debugger specific information.

Returns: int

Returns an index to a break point which is valid input to vsBPMGet().

Category:

Deprecated Breakpoint Functions


vsBPMClearAll

void VSAPI vsBPMClearAll()

Deprecated. Use vsLineMarker* functions Clears (deletes) all break points of any kind. Use this function when your debugger terminates to exit debug mode.

Category:

Deprecated Breakpoint Functions


vsBPMClearAllBreakPoints

void VSAPI vsBPMClearAllBreakPoints()

Deprecated. Use vsLineMarker* functions Clears (deletes) all break points. Also clears all disabled break points. Execution and stack break points remain unchanged.

Category:

Deprecated Breakpoint Functions


vsBPMGet

int VSAPI vsBPMGet(int BreakPointIndex, int *pRealLineNum=0, int *pflags=0, void **ppuserdata=0, int *pBufID=0, void *preserved1=0, void *preserved2=0)

Deprecated. Use vsLineMarker* functions Retrieves various information for a break point.

Parameters:

BreakPointIndex - Index to a break point from
vsBPMAdd(),
vsBPMAddB(), or
vsBPMNext().

pRealLineNum - Set to real line number (VSP_RLINE) of breakpoint.

pflags - Set to flags of break point.

ppuserdata - Set to pointer to user data.

PBufID - Set to buffer id or a negative number if this break point if for a file which has not been loaded.

Category:

Deprecated Breakpoint Functions


vsBPMNext

int VSAPI vsBPMNext(int BreakPointIndex)

Deprecated. Use vsLineMarker* functions

Parameters:

BreakPointIndex - Previous break point index or -1 to find first break point.

Returns: int

Returns next break point of -1 to indicate that there are no more.

Category:

Deprecated Breakpoint Functions


vsBPMQDefaultPicture

int VSAPI vsBPMQDefaultPicture(int wid, int LineNum, int RealLineNum, int OldLineNum, int reserved=0)

Deprecated. Use vsLineMarker* functions

Parameters:

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).

Returns: int

Index into names table of picture or 0 to indictate no picture. Calls the callback function defined by vsCallbackSet(VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP,...)

Category:

Deprecated Breakpoint Functions


vsBPMQPicture

int VSAPI vsBPMQPicture(int flags)

Deprecated. Use vsLineMarker* functions

Parameters:

flags - Specifies the one or more of the VSBPFLAG_??? flags. You can add your own.

Returns: int

Returns the debug bitmap index which gets displayed for the specified debug flags.

Category:

Deprecated Breakpoint Functions

See Also:

vsBPMSetPicture


vsBPMQShowBreakPointsFor

int VSAPI vsBPMQShowBreakPointsFor(int wid)

Deprecated. Use vsLineMarker* functions

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns non-zero value if break points are displayed for the editor control specified. 0 indicates that break points are hidden.

Category:

Deprecated Breakpoint Functions


vsBPMRemove

void VSAPI vsBPMRemove(int BreakPointIndex)

Deprecated. Use vsLineMarker* functions

Parameters:

BreakPointIndex - Index to a break point from
vsBPMAdd(),
vsBPMAddB(), or
vsBPMNext().

Returns: void

Deletes break point of any kind.

Category:

Deprecated Breakpoint Functions


vsBPMSetAll

void VSAPI vsBPMSetAll(int flags, int mask)

Deprecated. Use vsLineMarker* functions Adds or removes the debug flags specified for all lines which have debug flags.

Parameters:

flags - Zero or more of the the VSBPFLAG_??? flags.

mask - One or more of the the VSBPFLAG_??? flags. Only these debug flags are effected.

Returns: void

Returns 0 if successful. It is possible but very unlikely that you could run out of memory.

Category:

Deprecated Breakpoint Functions


vsBPMSetPicture

void VSAPI vsBPMSetPicture(int flags, int index)

Deprecated. Use vsLineMarker* functions Determines the debug bitmap which gets displayed for the specified debug flags.

Parameters:

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.

Category:

Deprecated Breakpoint Functions

See Also:

vsBPMQPicture


vsBPMShowBreakPoints

void VSAPI vsBPMShowBreakPoints(int onoff)

Deprecated. Use vsLineMarker* functions

This function is no longer supported.

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.

Parameters:

onoff - Specifies whether to show break points.

Category:

Deprecated Breakpoint Functions


vsBPMShowBreakPointsFor

void VSAPI vsBPMShowBreakPointsFor(int wid, int onoff)

Deprecated. Use vsLineMarker* functions

This function is no longer supported.

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

onoff - Specifies whether to show break points.

Category:

Deprecated Breakpoint Functions


vsBufCreate

int VSAPI vsBufCreate(const char *pszTempOption="+t", const char *pszLoadOptions=0, int reserved1=0, long reserved2=0)

Parameters:

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.

Returns: int

Creates an empty buffer and returns the buffer id if successful (0 is a valid buffer id). Otherwise a negative error code is returned.

Categories:

Buffer Functions, Edit Window Functions, Editor Control Functions, File Functions

See Also:

vsBufEdit


vsBufCreateTempView

void VSAPI vsBufCreateTempView(int buf_id, int *pTempWindowId, int *pOrigWindowId)

Parameters:

buf_id - Buffer to attach to the new window.

pTempWindowId - Set to id of newly created window.

pOrigWindowId - Set to current window id. There is always a valid current window id. Since many functions in the VSE API require a window id, you need to play some tricks when you have a buffer id.

Returns: void

If successful, returns 0 and the temp window/buffer is active. Otherwise a negative error code is returned.

Example:

int ColorFlags;
int orig_window_id,orig_buf_id;
vsBufCreateTempView(buf_id,&temp_window_id,&orig_window_id);

ColorFlags=vsPropGetI(VSWID_HIDDEN,VSP_COLORFLAGS)

vsBufDeleteTempView(temp_window_id,orig_window_id);

Category:

Buffer Functions

See Also:

vsBufDeleteTempView


vsBufDeleteTempView

void VSAPI vsBufDeleteTempView(int TempWindowId, int OrigWindowId)

This function deletes the window but does not delete the buffer attached to that window.

Parameters:

TempWindowId - Window id to delete. Buffer is not deleted.

OrigWindowId - Window to activate after deleting TempWindowId.

Category:

Buffer Functions

See Also:

vsBufCreateTempView


vsBufEdit

int VSAPI vsBufEdit(const char *pszFilename, const char *pszLoadOptions="", int IgnoreNotFound=1, const char *pszLoadOptions2="", int quiet=0)

Parameters:

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", "Options", "File Extension Setup...", select the Indent tab, 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.

Returns: int

Returns buffer id if successful (0 is a valid buffer id). Otherwise a negative error code is returned.

Categories:

Buffer Functions, Edit Window Functions, Editor Control Functions, File Functions

See Also:

vsBufCreate


vsBufGetDocumentName

char*VSAPI vsBufGetDocumentName(int buf_id, char *pszDocumentName, int MaxDocumentName, int *pMaxDocumentNameLen=0, int defaultToBufferName=1)

Gets the document name to be displayed to the user.

Parameters:

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 "".

Returns: char*VSAPI

Returns pszDocumentName.

Category:

Buffer Functions


vsBufGetLineNumFromOffset

int VSAPI vsBufGetLineNumFromOffset(int buf_id, long Offset, int *pRLineNum=0)

Converts the offset (not ROffset) into a line number and optionally a real line number.

Parameters:

buf_id - Buffer id returned by vsPropGetI(wid,VSP_BUF_ID), vsBufEdit, or vsBufMatch.

Offset - Byte offset into buffer including no save buffer data (lines with the VSLF_NOSAVE flag set).

pRLineNum - If specified, set to real line number (excludes lines with the VSLF_NOSAVE flag set).

Returns: int

Returns the line number which contains the offset specified

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


vsBufGetName

char*VSAPI vsBufGetName(int buf_id, char *pszBufName, int MaxBufName, int *pMaxBufNameLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns buffer name corresponding to buffer id specified. Returns pszBufName.

Category:

Buffer Functions


vsBufGetNofLines

int VSAPI vsBufGetNofLines(int buf_id)

Returns the number of lines in a buffer including no save lines (lines with the VSLF_NOSAVE flag set).

Parameters:

buf_id - Buffer id returned by vsPropGetI(wid,VSP_BUF_ID), vsBufEdit, or vsBufMatch.

Returns: int

Returns number of lines in buffer including no save lines (lines with the VSLF_NOSAVE flag set).

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


vsBufGetNofNoSaveLines

int VSAPI vsBufGetNofNoSaveLines(int buf_id)

Returns the number of no save lines in a buffer (lines with the VSLF_NOSAVE flag set).

Parameters:

buf_id - Buffer id returned by vsPropGetI(wid,VSP_BUF_ID), vsBufEdit, or vsBufMatch.

Returns: int

Returns the number of no save lines in a buffer (lines with the VSLF_NOSAVE flag set).

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


vsBufName2Caption

void VSAPI vsBufName2Caption(int wid, char *pszCaption, int MaxCaptionLen, char state, int *pMaxCaptionLen=0)

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" where nnn is the buffer id of the buffer.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods


vsBufQData

void*VSAPI vsBufQData(int buf_id)

This function should only be used by OEM's to store some data per buffer and not by users writing macros.

Parameters:

buf_id - Buffer id returned by vsPropGetI(wid,VSP_BUF_ ID), vsBufEdit, or vsBufMatch.

Returns: void*VSAPI

Returns pointer to OEM buffer data set by the vsBufSetData function.

Category:

Buffer Functions

See Also:

vsBufSetData


vsBufRefresh

void VSAPI vsBufRefresh(int buf_id, int flags=VSREFRESH_BUFTEXT)

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.

Parameters:

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.

Category:

Buffer Functions


vsBufSetData

void VSAPI vsBufSetData(int buf_id, void *pdata)

This function should only be used by OEM's to store some data per buffer and not by users writing macros.

Parameters:

buf_id - Buffer id returned by vsPropGetI(wid,VSP_BUF_ ID), vsBufEdit, or vsBufMatch.

pdata - Pointer to buffer specific data.

Returns: void

Sets pointer to OEM buffer data.

Category:

Buffer Functions

See Also:

vsBufQData


VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP

19 VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP

int (VSAPI *pfnQDefaultBitmap)(int wid,int LineNum,int RealLineNum,int OldLineNum,int reserved);
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.

Parameters:

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).

Returns: 19

Returns index into the names table of the picture or 0 to indicate no picture.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_BREAKPOINT_LINE_DELETED

34 VSCALLBACK_APP_BREAKPOINT_LINE_DELETED

int (VSAPI * vspfnBreakPointLinedDeleted)(int BreakPointIndex, int flags, void *puserdata);
This callback gets called when the line that any kind a break point is on is deleted.

Parameters:

BreakPointIndex - Index of break point being deleted.

flags - Flags for this break point.

puserdata - Pointer to user data for this break point.

Returns: 34

Return 0 to delete the break point.

Example:

static int VSAPI CallbackBreakPointLineDeleted(int BreakPointIndex, int
flags, void *puserdata)
{
     if (! (flags &
            (VSBPFLAG_BREAKPOINT|VSBPFLAG_BREAKPOINTDISABLED) ) ) {
            // Don't delete this because it is an execution or
            // stack executing break point.
            return(1);
     }
     ..
     return(0);
}

Category:

Editor Control Callback Functions


VSCALLBACK_APP_DELETE_WINDOW

32 VSCALLBACK_APP_DELETE_WINDOW

void (VSAPI *pfnDeleteWindow)(int wid,int modal)
This callback gets called before a dialog window gets deleted. It may also get called for a control window that gets deleted.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_DISPATCH_MESSAGE

23 VSCALLBACK_APP_DISPATCH_MESSAGE

void (VSAPI *pfnDispatchMessage)(int BeginEnd,MSG *pmsg);
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 SlickEdit in a threaded environment.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ

18 VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ

void (VSAPI *pfnKeyOrMouseEventRead)(int event);

Parameters:

event - SlickEdit event. See vsevents.h. 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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MENU_ADD_FILE_HISTORY

7 VSCALLBACK_APP_MENU_ADD_FILE_HISTORY

void (VSAPI *pfnMenuAddFileHistory)(const char *pszFilename);
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.

Parameters:

pszFilename - Absolute name of file

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY

8 VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY

void (VSAPI *pfnMenuAddWorkspaceHistory)(const char *pszFilename);
The MENU_ADD_WORKSPACE_HISTORY callback is called when a SlickEdit workspace is opened.

Parameters:

pszFilename - Absolute name of workspace file

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MESSAGEBOX

20 VSCALLBACK_APP_MESSAGEBOX

int (VSAPI *pfnMessageBox)(const char *pszMessage,const char *pszTitle,int vsmb_flags);
Displays a simple message box and prompts the user. This callback must implement all features of the vsMessageBox function. See vsMessageBox.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB

27 VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB

void (VSAPI *pfnMFFindActivateToolbarAndSearchTab)();
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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE

28 VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE

int (VSAPI *pfnMFFindIsToolbarVisible)();

Returns:

Returns non-zero value if the toolbar containg the editor control output window used for multi-file search output is currently visible.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MFFIND_QEDITOR_CTL_WID

29 VSCALLBACK_APP_MFFIND_QEDITOR_CTL_WID

int (VSAPI *pfnMFFindQEditorCtlWID)();

Returns:

Returns non-zero value if the toolbar containg the editor control output window used for multi-file search output is currently visible.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_MODAL_WAIT

22 VSCALLBACK_APP_MODAL_WAIT

void (VSAPI *pfnModalWait)(int BeginEnd,int parent_wid,int reserved,void *preserved);
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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_POPUP_MENU

9 VSCALLBACK_APP_POPUP_MENU

void (VSAPI *pfnPopupMenu)(const char *pszMenuName,int menu_handle);
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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_POPUP_MENU2

31 VSCALLBACK_APP_POPUP_MENU2

void (VSAPI *pfnPopupMenu2)(const char *pszMenuName,int vtpm_flags,int x,int y);
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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_QUERY_END_SESSION

6 VSCALLBACK_APP_QUERY_END_SESSION

int (VSAPI *pfnQueryEndSession)();
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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_READ_ONLY_ERROR

17 VSCALLBACK_APP_READ_ONLY_ERROR

int (VSAPI *pfnReadOnlyError)();
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.

Returns: 17

Returns 0 to indicate that no default processing is necessary. A non- zero value indicates that the default processing should take place.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_REFRESH_BREAKPOINTS

33 VSCALLBACK_APP_REFRESH_BREAKPOINTS

void (VSAPI * vspfnRefreshBreakPoints)(int BPMRefreshFlags);
This callback gets called when a break point is deleted because the line it was on was deleted, and when the line number for a break point changes.

Parameters:

BPMRefreshFlags - Flags for this break point. One or more of the following flags:

VSBPMREFRESH_LINENUMBERS_CHANGED
Breakpoint line number changed because lines were inserted or deleted
VSBPMREFRESH_BREAKPOINTS_AUTO_DELETED
Breakpoint was deleted because lines were deleted

Category:

Editor Control Callback Functions


VSCALLBACK_APP_TAG_FILE_ADD_REMOVE

25 VSCALLBACK_APP_TAG_FILE_ADD_REMOVE

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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_TAG_FILE_MODIFIED

26 VSCALLBACK_APP_TAG_FILE_MODIFIED

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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_APP_TAG_FILE_REFRESH

24 VSCALLBACK_APP_TAG_FILE_REFRESH

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 SlickEdit in a threaded environment.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_APP_ADD_BUFFER

10 VSCALLBACK_AR_APP_ADD_BUFFER

void (VSAPI *pfnAddBuffer)(int buf_id, const char *pszBufName, int buf_flags);

The ADD_BUFFER callback is called when a buffer is added.

WARNING: It is not safe to access editor buffer data during this callback.

Parameters:

buf_id - Buffer id.

pszBufName - Name of new editor buffer.

buf_flags - Current value of VSP_BUFFLAGS property. You might to use this to check whether the buffer is hidden or not.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_APP_DELETE_BUFFER

2 VSCALLBACK_AR_APP_DELETE_BUFFER

void (VSAPI *pfnDeleteBuffer)(int buf_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.

Parameters:

buf_id - Buffer id.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_APP_RENAME_BUFFER

12 VSCALLBACK_AR_APP_RENAME_BUFFER

void (VSAPI *pfnRenameBuffer)(int buf_id,
                                   const char *pszOldBufName,
                                   const char *pszNewBufName,
                                   int buf_flags);
The RENAME_BUFFER callback is called when the vsName function is called. Note that this function does not hook the VSP_BUFNAME property.

Parameters:

buf_id - Buffer id.

pszOldBufName - Old name of buffer.

pszNewBufName - New 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.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_APP_RENAME_DOCUMENT

13 VSCALLBACK_AR_APP_RENAME_DOCUMENT

void (VSAPI *pfnRenameDocument)(int buf_id,
                                   const char *pszOldDocName,
                                   const char *pszNewDocName,
                                   int buf_flags);
The RENAME_DOCUMENT callback is called when the docname() Slick-C® macro function is called. Note that this function does not hook the VSP_DOCUMENTNAME property.

Parameters:

buf_id - Buffer id.

pszOldDocName - Old document name of buffer.

pszNewDocName - New document 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.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_APP_SELECT_MODE

4 VSCALLBACK_AR_APP_SELECT_MODE

void (VSAPI *pfnSelectMode)(int buf_id,int wid,const char *pszExtension);

The SELECT_MODE callback is called when Slick-C® function _SetEditorLanguage 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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_DRAW_LINE

11 VSCALLBACK_AR_BUF_DRAW_LINE

void (VSAPI *pfnDrawLine)(int buf_id, int wid, int y, int height, int LineNum,int RealLineNum, int PastBottomOfFile, int SoftWrap)

The DRAW_LINE callback is called when lines are drawn for a buffer.

WARNING: It is not safe to access editor buffer data during this callback.

Parameters:

buf_id - Buffer id.

wid - Window id of editor control. 0 specifies the current object.

y - y coordinate origin of drawn line.

height - Height of the drawn line (not the same as the font height).

LineNum - Line number of drawn line.

RealLineNum - Real line number of drawn line. This will differ from LineNum when you have NOSAVE lines in your buffer. See vsSetLineFlags.

PastBottomOfFile - (boolean). Set to true if drawn line is past the bottom of the file (i.e. between the last line of file and the bottom of the editor control window). 1

SoftWrap - (boolean). Set to true if drawn line is soft-wrapped. This will be false for the first "line", and true for all other "lines" that are part of the soft-wrapped line.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_DRAW_LINE_START_FINISH

14 VSCALLBACK_AR_BUF_DRAW_LINE_START_FINISH

void (VSAPI *pfnDrawLineStartFinish)(int buf_id, int wid, int start)

The DRAW_LINE_START_FINISH callback is called before starting to draw lines for a buffer (start=1), and when finished drawing lines for a buffer (start=0).

This callback is useful when you have some GUI widget (e.g. gutter, trough, etc.) that you must keep in sync line-by-line with the editor control window. See also VSCALLBACK_AR_BUF_DRAW_LINE callback.

WARNING: It is not safe to access editor buffer data during this callback.

Parameters:

buf_id - Buffer id.

wid - Window id of editor control. 0 specifies the current object.

start - (boolean). Set to true (1) when starting to draw lines. Set to false (0) when finished drawing lines.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_LINES_DELETED

1 VSCALLBACK_AR_BUF_LINES_DELETED

void (VSAPI *pfnDeleteLine)(int buf_id,int FirstLinenum,int Noflines)

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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_LINES_DELETED2

9 VSCALLBACK_AR_BUF_LINES_DELETED2

void (VSAPI *pfnDeleteLine)(int buf_id,int FirstLinenum,int Noflines,int JoinLineCase)

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.

Parameters:

buf_id - Buffer id.

AfterLineNum - Line number (VSP_LINE and not VSP_RLINE) Lines we inserted after this line.

Noflines - Number of lines inserted.

SplitLineCase - A non-zero value indicates that a line has been inserted due to a split operation instead of an insert line operation.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_LINES_INSERTED

0 VSCALLBACK_AR_BUF_LINES_INSERTED

void (VSAPI *pfnInsertLine)(int buf_id,int AfterLineNum,int Noflines)

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.

Parameters:

buf_id - Buffer id.

AfterLineNum - Line number (VSP_LINE and not VSP_RLINE) Lines we inserted after this line.

Noflines - Number of lines inserted.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_LINES_INSERTED2

8 VSCALLBACK_AR_BUF_LINES_INSERTED2

void (VSAPI *pfnInsertLine)(int buf_id,int AfterLineNum,int Noflines,int SplitLineCase)

The REPLACE_TEXT callback is called when any text is replaced into a buffer.

WARNING: It is not safe to access editor buffer data during this callback.

Parameters:

buf_id - Buffer id.

StartOffset - Byte offset (including lines with NOSAVE data) of first byte being replaced.

InsertNofBytes - Number of bytes being inserted.

DeleteNofBytes - Number of bytes being deleted.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_REPLACE_TEXT

7 VSCALLBACK_AR_BUF_REPLACE_TEXT

void (VSAPI *pfnReplaceText)(int buf_id,long StartOffset,long InsertNofBytes,long DeleteNofBytes)

The REPLACE_TEXT callback is called when any text is replaced into a buffer.

WARNING: It is not safe to access editor buffer data during this callback.

Parameters:

buf_id - Buffer id.

StartOffset - Byte offset (including lines with NOSAVE data) of first byte being replaced.

InsertNofBytes - Number of bytes being inserted.

DeleteNofBytes - Number of bytes being deleted.

Category:

Editor Control Callback Functions


VSCALLBACK_AR_BUF_TEXT_CHANGE

3 VSCALLBACK_AR_BUF_TEXT_CHANGE

void (VSAPI *pfnTextChange)(int buf_id,int wid, long StartMod,long EndMod);

The following buffer related API calls are allowed during this callback: vsBufGetNofLines(), vsBufGetLineNumFromOffset(), vsBufGetNofNoSaveLines().

Category:

Editor Control Callback Functions


VSCALLBACK_BUF_QDEBUGBITMAP

13 VSCALLBACK_BUF_QDEBUGBITMAP

int (VSAPI *pfnQDebugBitmap)(int buf_id,int LineNum,int RealLineNum,int OldLineNum,int wid);

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.

Parameters:

buf_id - Buffer id.

RealLineNum - Real line number (VSP_RLINE).

OldLineNum - Old line number set by vsSetAllOldLineNumbers.

Category:

Editor Control Callback Functions


VSCALLBACK_BUF_SET_LINE_COLOR

14 VSCALLBACK_BUF_SET_LINE_COLOR

int (VSAPI *pfnSetLineColor)(int buf_id,int wid, int linenum,int LineFlags,
                                  VSCOLORINDEX *pColor,int ColorLen,char *pTempLine,int reserved);

Parameters:

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.

Syntax Color Coding Sample Code for Select Mode Callback

Returns: 14

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 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

SlickEdit has four layers of color: syntax color, undoable buffer color, undoable line insert/modify color, and intra-line difference color (version >=4.0).

Example:

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

#include
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.
}

Category:

Editor Control Callback Functions


VSCALLBACK_WIN_CMDLINE_FUNCTIONS

3 VSCALLBACK_WIN_CMDLINE_FUNCTIONS

pfn is &VSCMDLINE_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.

Category:

Editor Control Callback Functions


VSCALLBACK_WIN_FONT_CHANGE

39 VSCALLBACK_WIN_FONT_CHANGE

void (VSAPI * vspfnChangeFont)(int wid, VSPSZ pszFontName, int FontWidth, int FontHeight, int CharSet);

The FONT_CHANGE callback function is used to notify of a font change in an editor control window.

Actual font name and metrics being used by an editor control window. This can be different from what the window properties report (e.g. VSP_FONTNAME, VSP_FONTWIDTH, etc.) because the operating system will often map a font differently when it is used.

Note:
This callback is not called the first time an editor control is created. Use vsGetWindowFontInfo after calling vsCreateEditorCtl to retrieve font name and metrics when an editor control window is created.

Parameters:

wid - Editor control window id.

pszFontName - Actual font name used to draw text.

FontWidth - Font width in pixels.

FontHeight - Font height in pixels. This is significant when a WidthxHeight font is selected (e.g. "Terminal 8x12" on Windows).

pCharSet - Character set. Windows only. Indicates the character set of the font. These character sets map directly onto the Windows character sets. See VSCHARSET_??? constants defined in "vs.h".

Category:

Editor Control Callback Functions


VSCALLBACK_WIN_GET_MESSAGE

5 VSCALLBACK_WIN_GET_MESSAGE

void (VSAPI *pfnGetMessage)(int wid,char *pszMsg,int MaxStringLen);
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.

Parameters:

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.

Category:

Miscellaneous Defines


VSCALLBACK_WIN_GOTFOCUS

1 VSCALLBACK_WIN_GOTFOCUS

void (VSAPI *pfnGotFocus)(int wid);
The GOTFOCUS callback function is called any time the editor control receives keyboard focus.

Parameters:

wid - Window id of editor control.

Category:

Editor Control Callback Functions


VSCALLBACK_WIN_LOSTFOCUS

2 VSCALLBACK_WIN_LOSTFOCUS

void (VSAPI *pfnLostFocus)(int wid);
The LOSTFOCUS callback function is called any time the editor
control loses keyboard focus.

Parameters:
wid - Window id of editor control.

Category:
Editor Control Callback Functions


VSCALLBACK_WIN_MESSAGE

4 VSCALLBACK_WIN_MESSAGE

void (VSAPI *pfnMessage)(int wid,const char *pszMsg,int Immediate);
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.

Parameters:

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.

Category:

Editor Control Callback Functions


VSCALLBACK_WIN_UPDATE_EDITOR_STATUS

0 VSCALLBACK_WIN_UPDATE_EDITOR_STATUS

void (VSAPI *VSPFNUPDATEEDITORSTATUS)(int wid,int RefreshFlags,int linenum,
                                      int col,const char *pModeName,
                                      int ModeNameLen,int StatusFlags,
                                      int reserved);
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.

Parameters:

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)

Category:

Editor Control Callback Functions


vsCallbackActivate

void VSAPI vsCallbackActivate(int wid)

Updates global function pointer callbacks for message line and command line to those callbacks registered to the editor control specified. vsCallbackActivate forces immediate update of callbacks for the following:

  • VSCALLBACK_WIN_CMDLINE_FUNCTIONS
  • VSCALLBACK_WIN_MESSAGE
  • VSCALLBACK_WIN_GET_MESSAGE

    • VSE's implementation of the above editor control callbacks require global callback data. vsExecute updates the global callback data. However if you use vsCallIndex you might want to activate the callbacks.

    Parameters:

    wid - Window id of editor control. 0 specifies the current object.

    Applies To:

    Edit Window, Editor Control

    Categories:

    Edit Window Methods, Editor Control Methods, Miscellaneous Functions

    See Also:

    vsCallbackSet, vsCallbackRemove


vsCallbackAdd

int VSAPI vsCallbackAdd(int id, VSCALLBACK_AR vscallback, void *pfn, int reserved1=0, int reserved2=0)

Adds a callback function.

Parameters:

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_DELETE_TEXT
  • VSCALLBACK_AR_BUF_INSERT_TEXT
  • VSCALLBACK_AR_BUF_REPLACE_TEXT
  • VSCALLBACK_AR_BUF_LINES_INSERTED2
  • VSCALLBACK_AR_BUF_LINES_DELETED2
  • VSCALLBACK_AR_BUF_TEXT_CHANGE
  • VSCALLBACK_AR_BUF_DRAW_LINE
  • VSCALLBACK_AR_APP_DELETE_BUFFER
  • VSCALLBACK_AR_APP_SELECT_MODE
  • VSCALLBACK_AR_APP_ADD_BUFFER
  • VSCALLBACK_AR_APP_RENAME_BUFFER
  • VSCALLBACK_AR_APP_RENAME_DOCUMENT

pfn - Pointer to callback function. Make sure you remove your callback function with vsCallbackRemove if you unload a DLL which contains your callback function.

Returns: int

Returns 0 if successful. Otherwise NOT_ENOUGH_MEMORY_RC is returned. The break pointer manager defines VSCALLBACK_AR_BUF_LINES_INSERTED, VSCALLBACK_AR_BUF_LINES_DELETED, and VSCALLBACK_AR_APP_DELETE_BUFFER.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, Miscellaneous Functions

See Also:

vsCallbackSet, vsCallbackRemove


vsCallbackRemove

int VSAPI vsCallbackRemove(int id, VSCALLBACK_AR vscallback, void *pfn)

Removes a callback function. Make sure you call this function if you unload a DLL which has a callback function.

Parameters:

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

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, Miscellaneous Functions

See Also:

vsCallbackSet, vsCallbackAdd


vsCallbackSet

void VSAPI vsCallbackSet(int id, VSCALLBACK vscallback, void *pfn)

Sets a callback function.

Parameters:

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_WIN_FONT_CHANGE
  • 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_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
  • VSCALLBACK_APP_DELETE_WINDOW
  • VSCALLBACK_APP_REFRESH_BREAKPOINTS
  • VSCALLBACK_APP_BREAKPOINT_LINE_DELETED

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.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, Miscellaneous Functions

See Also:

vsCallbackAdd, vsCallbackRemove


vsCallIndex

void VSAPI vsCallIndex(int wid, int index, int Nofargs, VSARGTYPE *pArgList)

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);

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions

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)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

event - An event returned by vsLastEvent or a event constant from "vsevents.h".

pszShowKeys - Previous prefix key message.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Keyboard Functions


vsCheckLineLengths

int VSAPI vsCheckLineLengths(int wid, int AllowedLineLen, char *pszLineNumbers=0, int MaxLineNumbersLen=0, int FromCursor=0, int *pMaxLineLen=0, int CountTrailingBlanks=0, int reserved2=0)

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsCheckTimeout

int VSAPI vsCheckTimeout()

Check if a timeout set using _SetTimeout() has expired. This is a software timeout. Nothing will happen when the timeout passes, it's up to you to call _CheckTimeout() yourself and handle the situtation.

Returns: int

'true' if the timeout is expired.

Category:

Miscellaneous Functions


vsClexFind

int VSAPI vsClexFind(int wid, int clexflags, char option='O', int direction=1)

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.

Parameters:

clexflags - Determines the language elements to search or to test for. May be one or more of the following flags, which are defined in "slick.sh." Use the OR operator to specify more than one flag.

  • VSCLEXFLAG_OTHER
  • VSCLEXFLAG_KEYWORD
  • VSCLEXFLAG_NUMBER
  • VSCLEXFLAG_STRING
  • VSCLEXFLAG_COMMENT
  • VSCLEXFLAG_PPKEYWORD
  • VSCLEXFLAG_LINENUM
  • VSCLEXFLAG_SYMBOL1
  • VSCLEXFLAG_SYMBOL2
  • VSCLEXFLAG_SYMBOL3
  • VSCLEXFLAG_SYMBOL4
  • VSCLEXFLAG_FUNCTION

options - 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:
  • VSCFG_WINDOW_TEXT
  • VSCFG_MODIFIED_LINE
  • VSCFG_INSERTED_LINE
  • VSCFG_KEYWORD
  • VSCFG_LINENUM
  • VSCFG_NUMBER
  • VSCFG_STRING
  • VSCFG_COMMENT
  • VSCFG_PPKEYWORD
  • VSCFG_PUNCTUATION
  • VSCFG_LIBRARY_SYMBOL
  • VSCFG_OPERATOR
  • VSCFG_USER_DEFINED
D
Return the detailed color constant (NOT CLEXFLAG) which corresponds to the symbol under the cursor. The clexflags argument is ignored. This option is very similar to the 'G' option above, except that it also recognizes the following specialized colors:
  • VSCFG_LINE_COMMENT
  • VSCFG_DOCUMENTATION
  • VSCFG_IDENTIFIER
E
Searches for embedded source. Returns 0 if succesful. Otherwise, STRING_NOT_FOUND_RC is returned. The clexflags argument is ignored.
S
Searches for non-embedded source. Returns 0 if succesful. Otherwise, STRING_NOT_FOUND_RC is returned. The clexflags argument is ignored.

The option parameter may include a '-' (dash) character to enable the 'O' and 'N' options to search backwards.

Returns: int

Example:

// Find start of comment or string
status = vsClexFind(0,VSCLEXFLAG_COMMENT|VSCLEXFLAG_STRING);
if (status) {
   return status;
}
color = vsClexFind(0,0,'G');
if (color==VSCFG_COMMENT) {
   ...
}
// Assuming already in comment, find non-comment character
status = vsClexFind(0,VSCLEXFLAG_COMMENT,'N');
// Assuming already in comment, find non-comment character backwards
status = vsClexFind(0,VSCLEXFLAG_COMMENT,'N',-1);

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsClexSkipBlanks


vsClexSkipBlanks

int vsClexSkipBlanks(int wid, VSPSZ options)

Starts from cursor position and skips over spaces, tabs, and comments.

Parameters:

options - may contain one or more of the following option letters:

-
Search backwards
m
Search within selection
h
Search through hidden lines.
c
Skip spaces within comments
q
Quick mode, does not test for embedded code

Returns: int

Returns 0 if non-blank character is found, nonzero otherwise. 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).

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

_clex_find, p_color_flags, _clex_load


vsClipboardQNofInternal

int VSAPI vsClipboardQNofInternal(void)

Returns: int

Returns number of internal clipboards.

Category:

Clipboard Functions


vsColWidthClear

int VSAPI vsColWidthClear(int wid)

Clears all column settings.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns 0 if successful.

Applies To:

List Box, Tree View

Categories:

List Box Methods, Tree View Methods


vsColWidthGet

int VSAPI vsColWidthGet(int wid, int i, int *pwidth)

Gets column width setting for column i. Column text is separated with a tab character.

Parameters:

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.

Returns: int

Returns 0 if successful.

Applies To:

List Box, Tree View

Categories:

List Box Methods, Tree View Methods


vsColWidthSet

int VSAPI vsColWidthSet(int wid, int i, int width)

Sets column width of column i. Column text is separated with a tab character.

Parameters:

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.

Returns: int

Returns 0 if successful.

Applies To:

List Box, Tree View

Categories:

List Box Methods, Tree View Methods


vsCommandFind

int VSAPI vsCommandFind(int wid, const char *pszFindString, const char *pszOptions="")

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.

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


vsCommandIndexForKey

int VSAPI vsCommandIndexForKey(int wid, int event)

Returns command index of command bound to the specified event (key)

Parameters:

wid - Window id of window that is the context for the key. This is important because some key bindings are "document mode" dependent

event - The key or key sequence we want to find the bound command for. Values come from vsevents.h

Returns: int

0 if no command is bound to this key, otherwise it returns the command index

Category:

Names Table Functions


vsCommandName

void VSAPI vsCommandName(int wid, const char *pszFilename)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pszFilename - New buffer name. Filename is converted to absolute.

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.

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, File Functions


vsCommandReplace

int VSAPI vsCommandReplace(int wid, const char *pszFindString, const char *pszReplaceString, const char *pszOptions="")

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.

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions


vsCommandReplaceQNofChanges

int VSAPI vsCommandReplaceQNofChanges()

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").

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, File Functions


vsCommandSave

int VSAPI vsCommandSave(int wid, const char *pszOutputFilename=0, const char *pszOptions=0)

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.

Parameters:

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. 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.

Returns: int

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");

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, File Functions


vsConcurProcessInputDirect

void VSAPI vsConcurProcessInputDirect(VSPSZ pszBuf)

Bypasses the editor's process buffer and inputs directly into running process from pszBuf. This input occurs out-of-band, which means that any input data waiting to be sent from the editor's process buffer will not be sent before the data in pszBuf.

Currently only supported on UNIX.

Parameters:

pszBuf - Char buffer to input direct to process

Category:

Miscellaneous Functions


vsConcurProcessIsThisBuffer

int VSAPI vsConcurProcessIsThisBuffer(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns non-zero value if the buffer in the editor control specified has a concurrent process attatched to it.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


vsConcurProcessQCol

int VSAPI vsConcurProcessQCol(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns concurrent process read column if the current line of the buffer in the editor control specified has the concurrent process read point.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


vsConcurProcessQExited

int VSAPI vsConcurProcessQExited()

Returns: int

Returns non-zero value if the concurrent process command shell has exited.

Category:

Miscellaneous Functions


vsConcurProcessQReadExited

int VSAPI vsConcurProcessQReadExited()

Returns: int

Processes data in concurrent process buffer and returns non-zero value if the concurrent process command shell has exited.

Category:

Miscellaneous Functions


vsConcurProcessQReadRunning

int VSAPI vsConcurProcessQReadRunning()

Returns: int

Processes data in concurrent process buffer and returns non-zero value if the concurrent process is still running.

Category:

Miscellaneous Functions


vsConcurProcessQRunning

int VSAPI vsConcurProcessQRunning()

Returns: int

Returns non-zero value if the concurrent process is still running.

Category:

Miscellaneous Functions


vsConfigPath

VSPSZ VSAPI vsConfigPath(int NoLocalConfigOption=0)

Parameters:

NoLocalConfigOption - When NoLocalConfigOption==0, the user configuration directory is returned.

When NoLocalConfigOption==1, the user configuration directory is returned if it exists. Otherwise "" is returned.

When NoLocalConfigOption==2, the user configuration directory is returned if it exists. Otherwise the "bin" directory is returned.

Returns: VSPSZ

Return absolute path of users local configuration directory with trailing file separator.

Category:

File Functions

See Also:

vsInit


vsCopyToCursor

void VSAPI vsCopyToCursor(int wid, int markid=-1, int MustBeMinusOne=-1)

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.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


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, void *pvwidget=0)

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 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.

Parameters:

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.

Returns: int

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.

Categories:

Editor Control Functions, Window Functions

See Also:

vsDestroyEditorCtl


vsCreateSWTForm

int VSAPI vsCreateSWTForm(VSSYSHWND hwndparent, int x, int y, int width, int height, int BorderStyle=VSBDS_NONE, int visible=1, void *pvwidget=0, int reserved1=0)

Create a SWT form. An SWT form is used as an intermediary between an OEM window and the editor control. Even though the name is "SWT", derived from SWT used by Eclipse, it can be used to interface between any supported OS and the editor control.

Parameters:

hwndparent - native parent window. This is HWND for Windows, Widget for Motif, Window for X11.

x -

y -

width -

height -

visible -

preserved -

reserved1 -

Returns: int

Category:

Form Functions


vsCreateTempView

int VSAPI vsCreateTempView(int *pTempWindowId, int *pOrigWindowId=0, const char *pszReserved=0)

This function creates an editor window 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 vsActivateWindow and/or the VSP_WINDOWID property to switch windows. The call vsPropGetI(0,VSP_WINDOWID) returns the current window id.

Parameters:

pTempWindowId - Set to newly created window id. pOrigWindowId Set to current window id. There is always a valid current window id.

Returns: int

If successful, returns 0 and the temp window/buffer is active. Otherwise a negative error code is returned.

Example:

int status, temp_window_id, orig_window_id;
status=vsCreateTempView(&temp_window_id,&orig_window_id);
if (status) {
    return(status);
}
vsInsertLine(0,"Insert text into temp window");
// Free window and buffer
vsDeleteTempView(temp_window_id);
vsActiveWindow(orig_window_id);

Categories:

Buffer Functions, File Functions

See Also:

vsDeleteTempView, vsOpenTempView


vsCreateViewFromBuffer

int VSAPI vsCreateViewFromBuffer(const char *pBuffer, int iLen, int *piNewWindowId, const char *pszLoadFileOptions="", const char *pszLangId="", const char *pszBufName="", const char *pszDocName="")

Create an editor buffer in a new window with the data specified in pBuffer

Parameters:

pBuffer - Data to put in the new buffer. This may be 0

iLen - Length of pBuffer. If pBuffer is an ASCIIZ buffer, this parameter maybe -1.

piNewWindowId - Address of int variable to store the new window id

pszLoadFileOptions - Options to be given to vsLoadFiles when creating the new buffer. This is mainly here to be able to specify the "+fu" and "+fd" options to specify line ending types.

pszLangId - Language ID. See p_LangId. For list of language types, use our Language Options dialog ("Tools", "Options","Language Setup...").

pszBufName - Name of new editor buffer.

pszDocName - Docname property for new buffer.

Returns: int

0 if succesful

Category:

File Functions


vsCRefactorCExtractMethodFinish

int VSAPI vsCRefactorCExtractMethodFinish(int handle, const char *filename, const char *newName, int createMethodCall, const char *paramInfo, const char *commentInfo, int flags, int syntaxIndent)

Finish the extract method operation

Parameters:

handle - Handle to transaction

filename - Filename to do refactoring within

newName - Name for new function

createMethodCall - should the refactoring replace the selected code with a method call?

paramInfo - List of parameters for new function

commentInfo - Comments to insert for the new function

flags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


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
_ShowWindow
_text_height
_text_width
_unique_name
_unique_tab_index
call_event
refresh


Vscroll Bar Properties

p_active_form
p_auto_size
p_backcolor
p_bbside
p_child
p_client_height
p_client_width
p_edit
p_enabled
p_eventtab
p_eventtab2
p_font_bold
p_font_charset
p_font_italic
p_font_name
p_font_outline
p_font_printer
p_font_size
p_font_strike_thru
p_font_transparent
p_font_underline
p_forecolor
p_HasBuffer
p_height
p_help
p_hwnd
p_hwndframe
p_isbutton_bar
p_IsTempEditor
p_large_change
p_max
p_mdi_child
p_min
p_mouse_pointer
p_MouseActivate
p_name
p_next
p_object
p_object_modify
p_old_height
p_old_width
p_old_x
p_old_y
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
rbutton_double_click
rbutton_down
rbutton_triple_click
rbutton_up
rc


vsCurWord

int VSAPI vsCurWord(int wid, char *pszWord, int MaxWordLen, int *pPhyiscalStartCol=0, int option=0, int *pMaxWordLen=0)

Parameters:

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.

Returns: int

If successful, returns 0 and places current word in pszWord. Otherwise a non-zero value is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsMouCurWord


vsdebug_version

_command int vsdebug_version()

Display the version of the vsdebug.dll

Category:

Debugger Functions


vsDebugFinalize

void VSAPI vsDebugFinalize()

Close all existing debugging sessions, and free all memory and files associated with the debugging session.

Since:

7.0

Category:

Debugger Functions


vsDebugInitialize

int VSAPI vsDebugInitialize()

Initialize the debugger library and prepare to connect to one or more debugging sessions.

Returns: int

0 on success, <0 on error.

Since:

7.0

Category:

Debugger Functions


vsDeleteAll

void VSAPI vsDeleteAll(int wid)

Deletes all lines in the buffer of the editor control specified.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsDeleteBuffer

void VSAPI vsDeleteBuffer(int wid)

Deletes buffer from the buffer ring even if the buffer is modified. The previous buffer's non-active cursor position information is used for the cursor location.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

_next_buffer, _prev_buffer


vsDeleteChar

void VSAPI vsDeleteChar(int wid, int Reserved=0)

Deletes character under text cursor.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


vsDeleteExtensionOptions

void VSAPI vsDeleteExtensionOptions(const char *pszExtension)

Removes the language setup options for the specific file extension. If the given extension is just referred to another extension, then only remove the referral, not the entire language setup.

Parameters:

pszExtension - File extension. For list of file extension types, use our Language Options dialog ("Tools", "Options","Language Setup...").

Category:

Configuration Functions

See Also:

vsSetDefaultLanguageOptions, vsGetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsGetDefaultExtensionReferTo, vsDeleteLanguageOptions


vsDeleteLanguageOptions

void VSAPI vsDeleteLanguageOptions(const char *pszLangId)

Removes the language setup options for the specific language, as specified by the given language ID. Note that 'lang' must be a real language ID, not a referred file extension.

Parameters:

pszLangId - Language ID (see p_LangId For list of languages, use our Language Options dialog ("Tools", "Options","Language Setup...").

Since:

13.0

Category:

Configuration Functions

See Also:

vsSetDefaultLanguageOptions, vsGetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsGetDefaultExtensionReferTo, vsDeleteExtensionOptions


vsDeleteLine

int VSAPI vsDeleteLine(int wid)

Deletes the current line.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns 0 unless last line of buffer is deleted.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsInsertLine, vsReplaceLine, vsGetLine, vsGetText


vsDeleteSelection

void VSAPI vsDeleteSelection(int wid, int markid=-1, int Reserved=-1)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

mark_id - Selection id to duplicated. If -1 is specified the active selection.

Returns: void

Returns 0 if successful. Otherwise TEXT_NOT_SELECTED_RC is returned. On error, message is displayed.

Category:

Selection Functions


vsDeleteTempView

void VSAPI vsDeleteTempView(int TempWindowId, int doDeleteBuffer=1)

This function deletes the window and optionally deletes the buffer attatched to that window.

Parameters:

TempWindowId - Window 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.

Categories:

Buffer Functions, File Functions

See Also:

vsCreateTempView, vsOpenTempView


vsDeleteText

int VSAPI vsDeleteText(int wid, int DelLen, char option=0)

Parameters:

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.

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.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsInsertText


vsDeleteWindow

void VSAPI vsDeleteWindow(int wid, void *preserved=0, int reserved=0)

Deletes the window specified. If the window specified is an editor control, the buffer is not deleted.

Parameters:

wid - Window id of object. 0 specifies the current object.

preserved -

reserved -

Applies To:

All Window Objects

Category:

Window Functions


vsDeselect

int VSAPI vsDeselect(int wid, int markid=-1)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

mark_id - Selection id to duplicated. If -1 is specified the active selection.

Returns: int

Returns 0 if mark_id is a valid selection handle. Otherwise INVALID_SELECTION_HANDLE_RC is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsDestroyEditorCtl

void VSAPI vsDestroyEditorCtl(int wid, long reserved=0)

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.

Parameters:

wid - Window id of the editor control.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Window Functions

See Also:

vsCreateEditorCtl


vsDestroySWTForm

void VSAPI vsDestroySWTForm(int wid, long reserved=0)

Destroy an SWT form.

Parameters:

wid - form ID

reserved - reserved

Category:

Form Functions


vsDiffFiles

int VSAPI vsDiffFiles(const char *pszFileName1="", int iBuf1Index=-1, int iWindow1Index=0, const char *pszFileName2="", int iBuf2Index=-1, int iWindow2Index=0, int iFlags=0, const char *pszFileSpec="", const char *pszExcludeFileSpec="", const char *pszDialogTitle="", const char *pszFile1Title="", const char *pszFile2Title="", const char *pszComment="", const char *pszCommentButtonCaption="", const char *pszImaginaryLine=0, const char *pszSaveButton1Caption=0, const char *pszSaveButton2Caption=0, const char *pszDiffStateFile=0)

Diffs the files specified and displays the Diff dialog.

Parameters:

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 iWindow1Index. Specify -1 to have this parameter ignored. Do not use this for a multi-file diff.

iWindow1Index - Window 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 iWindow2Index. Specify -1 to have this parameter ignored. Do not use this for a multi-file diff.

iWindow2Index - Window 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.

Returns: int

Returns 0 if successful. On error a message box is display.

Category:

File Functions


vsDiffLastFilesMatched

int VSAPI vsDiffLastFilesMatched()

Returns: int

Returns true if the last set of files compared with vsDiffFiles matched

Category:

File Functions


vsDiffSetCompareOptions

int VSAPI vsDiffSetCompareOptions(int iFlags)

Use this function to set the compare options for DIFFzilla®. Most options apply to the interface itself, and can be passed in at the time you are comparing the files. This function is used with the VSDIFF_COMP_OPT_* flags to actually control things like wheter or not to compare spaces in when comparing files.

Parameters:

iFlags - A combination of VSDIFF_COMP_OPT_* flags

Returns: int

0 if successful

Category:

File Functions


vsDllExport

int VSAPI vsDllExport(const char *pszFuncProto, const char *pszNameInfo, int arg2)

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]]...])

The address of the function is looked up using a shared library find function, using the func_name declared in the prototype. If the function is exported using a different name, then you should use vsLibExport, which allows you to pass in a pointer to the actual function.

Parameters:

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 _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.

Returns: int

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);

Category:

Macro Programming Functions

See Also:

vsLibExport


vsDown

int VSAPI vsDown(int wid, int Noflines)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Noflines - Number of lines to move the cursor down.

Returns: int

Returns 0 if successful. Otherwise BOTTOM_OF_FILE_RC is returned.

Example:

        status=vsDown(0,1);
        if (status) {
            // Hit bottom of file
        }

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

vsUp


vsDropFiles

void VSAPI vsDropFiles(unsigned int wparam)

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.

Parameters:

wparam - wparam of WM_DROPFILES message.

Category:

File Functions


vsDuplicateSelection

int VSAPI vsDuplicateSelection(int wid, int markid)

Parameters:

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.

Returns: int

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(0,-1); // Save handle of active
selection
mark_id=vsDuplicateSelection(0,mark_showing);    // Duplicate
active selection
vsCopyToCursor(0);
vsShowSelection(0,mark_id);  // Keep selection on source text.
vsFreeSelection (mark_showing);  // Free selection on destination text.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsDXY2LXY

void VSAPI vsDXY2LXY(int ScaleMode, int *px, int *py)

Converts X and Y from pixels to scale mode specified.

Parameters:

ScaleMode - Output Scale mode. VSSM_TWIP or VSSM_PIXEL.

px - Null or pointer to x coordinate.

py - Null or pointer to y coordinate.

Category:

Window Functions


vsEBCDICToASCII

void VSAPI vsEBCDICToASCII(const char *pSrcBuf, char *pDestBuf, int SrcBufLen=-1)

Converts EBCDIC text to ASCII. pSrcBuf maybe the same as pDestBuf (OK if pSrcBuf==pDestBuf).

Parameters:

pSrcBuf - Buffer contain EBCDIC data to be converted.

pDestBuf - Destination buffer for ASCII.

SrcBufLen - Number of bytes in pSrcBuf.

Category:

Unicode Functions


vsEndLine

void VSAPI vsEndLine(int wid)

Places cursor after end of current line.

Parameters:

wid - Window id of object. 0 specifies the current object.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, CursorMovement Functions, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

vsBeginLine


vsEndSelect

int VSAPI vsEndSelect(int wid, int markid=-1, int LockSelection=1)

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.

Parameters:

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).

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsBeginSelect


vsEndSelectCompare

int VSAPI vsEndSelectCompare(int wid, int markid=-1)

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsBeginSelectCompare


vsEvalExp

char*VSAPI vsEvalExp(char *pszResult, const char *pszSource, int base=10, void *preserved=0)

Evaluates a C syntax mathematical expression.

Parameters:

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.

Returns: char*VSAPI

Returns 0 if successful.

Category:

Keyboard Functions


vsEvent2Index

int VSAPI vsEvent2Index(int event, int version=0)

Deprecated. It is no longer necessary to call this function.

This functions no longer has a purpose and is present for backward compatibiliy only.

Parameters:

event - Event constant

version -

Returns: int

Returns input index unmodified.

Category:

Keyboard Functions

See Also:

vsIndex2Event


vsEvent2Name

char*VSAPI vsEvent2Name(int event, char *pszName, int MaxNameLen, char option='L', int *pMaxNameLen=0, int version=0)

Converts a SlickEdit event constant into its corresponding name.

Parameters:

event - 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.

Returns: char*VSAPI

Returns pszName.

Category:

Keyboard Functions

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:

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 , , 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).

Returns: int

Returns key binding information.

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.
}

Category:

Keyboard Functions

See Also:

vsEvent2Name, vsIndex2Event, vsSetEventTabIndex, vsEvent2Index, vsQDefaultEventTab


vsExecute

long VSAPI vsExecute(int wid, const char *pszCommand, const char *pszOptions="SMDA")

Runs the command specified. pszCommand can be any command that can be invoked from the 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.

Parameters:

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.

Returns: long

Return value of command executed is returned.

Applies To:

All Window Objects

Category:

Miscellaneous Functions


vsExit

void VSAPI vsExit(int status)

Terminates the current application and returns the exit code given.

Parameters:

ExitCode - Exit code to return to operating system.

Category:

Miscellaneous Functions


vsExpandTabs

void VSAPI vsExpandTabs(int wid, char *pszDest, int *pDestLen, const char *pSource, int SrcLen, int StartCol, int ColWidth, char Option)

Takes sub-string of source buffer and places the result in the dest buffer.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

vsExpandTabsC


vsExpandTabsC

void VSAPI vsExpandTabsC(int wid, char *pszDest, int *pDestLen, int StartCol, int ColWidth, char Option)

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.

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.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

vsExpandTabs, vsTextColC


vsFileAbsolute

char*VSAPI vsFileAbsolute(char *pszDestFilename, const char *pszSourceFilename, void *preserved=0)

Converts pszSrcFilename to a fully qualified path.

Parameters:

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.

Returns: char*VSAPI

Returns pszDestFilename.

Category:

File Functions

See Also:

vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileAbsoluteTo

char*VSAPI vsFileAbsoluteTo(char *pszDestFilename, const char *pszSourceFilename, const char *pszToDir=0)

Converts pszSrcFilename to a fully qualified path.

Parameters:

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.

Returns: char*VSAPI

Returns pszDestFilename.

Category:

File Functions

See Also:

vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileClose

int VSAPI vsFileClose(int fh)

Closes the file handle fh. fh must have been returned by vsFileOpen.

Returns: int

Returns 0 if successful.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileDetermineEncoding

int VSAPI vsFileDetermineEncoding(int filehandle, int &encoding)

This function is used to convert one of the VSENCODING_AUTO encoding options into an exact encoding. All other values for encoding remain unchanged.

Parameters:

filehandle - File handle returned by vsFileOpen().

encoding - On input this is one of the following:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page
  • VSENCODING_AUTOUNICODE
  • VSENCODING_AUTOUNICODE2
  • VSENCODING_AUTOXML
  • VSENCODING_AUTOEBCDIC
  • VSENCODING_AUTOEBCDIC_AND_UNICODE
  • VSENCODING_AUTOEBCDIC_AND_UNICODE2
  • VSENCODING_EBCDIC_SBCS
  • VSENCODING_UTF8
  • VSENCODING_UTF8_WITH_SIGNATURE
  • VSENCODING_UTF16LE
  • VSENCODING_UTF16LE_WITH_SIGNATURE
  • VSENCODING_UTF16BE
  • VSENCODING_UTF16BE_WITH_SIGNATURE
  • VSENCODING_UTF32LE
  • VSENCODING_UTF32LE_WITH_SIGNATURE
  • VSENCODING_UTF32BE
  • VSENCODING_UTF32BE_WITH_SIGNATURE - This is set to exact encoding that should be used.

Returns: int

Returns 0 or positive number if successful. Otherwise, a negative error code is returned.

Category:

Unicode Functions


vsFileFlush

int VSAPI vsFileFlush(int fh)

Forces the operating system to flush cached file data to disk.

Returns: int

Returns 0 if successful.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileMove

int VSAPI vsFileMove(const char *pszDestFilename, const char *pszSrcFilename)

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.

Parameters:

pszDestFilename - New name for file.

pszSrcFilename - Existing name of file.

Returns: int

Returns 0 if successful.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileOpen

int VSAPI vsFileOpen(const char *pszFilename, int option)

Opens the file specified with access specified by option.

Parameters:

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.

Returns: int

If successful, a handle to file which may be used by other vsFilexxx functions. Otherwise a negative error code is returned.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileQType

int VSAPI vsFileQType(VSPSZ pszFilename)

Determines the file type given the absolute (make sure the filename is absolute) filename specified. This function is needed because SlickEdit has some NFS-like features for handling some special files. These special files may have performance limitations or other limitations. This function lets you check the type and special case operations. For example, the filename "c:\java\src.zip\java\lang\Object.java" is a special file type because SlickEdit will treat "src.zip" like a directory so that files can be loaded out of a zip (or jar) file without requiring much special code. Currently, SlickEdit's NFS-like layer does not support writing to zip or jar files.

Returns: int

Returns one of the VSFILETYPE_* constants.

Category:

File Functions


vsFileRead

int VSAPI vsFileRead(int fh, void *pBuf, int BufLen)

Reads number of bytes specified by BufLen into pBuf.

Returns: int

If successful, the number of bytes read is returned. Otherwise a negative error code is returned.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileReadLink

char*VSAPI vsFileReadLink(const char *pszSourceFilename)

Resolve link for pszSourceFilename. UNIX only. If filename does not exist, then "" is returned. If filename is not a link, then original filename is returned. If filename is not an absolute path, then it is assumed relative to current directory.

Parameters:

pszSourceFilename - Filename to resolve link for

Returns: char*VSAPI

Resolved link filename.

Category:

File Functions


vsFileRelative

char*VSAPI vsFileRelative(char *pszDestFilename, const char *pszSourceFilename, const char *pszToDir=0, int AddDotDots=1)

Converts pszSrcFilename to a path specification which is relative to the directory specified by pszToDir.

Parameters:

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.

Returns: char*VSAPI

Returns pszDestFilename.

Category:

File Functions

See Also:

vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileSeek

long VSAPI vsFileSeek(int fh, long seekpos, int option)

Changes the file position for the file specified by fh.

Parameters:

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.

Returns: long

If successful, the new seek position is returned. Otherwise a negative error code is returned.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileWrite

int VSAPI vsFileWrite(int fh, const void *pBuf, int BufLen)

Write number of bytes specified by BufLen to the file specified by fh. pBuf points to the data to be written.

Returns: int

If successful, the number of bytes written is returned. Otherwise a negative error code is returned.

Category:

File Functions

See Also:

vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFillSelection

void VSAPI vsFillSelection(int wid, int markid=-1, unsigned ch=' ')

Fills the selection specified with a character.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsFindControl

int VSAPI vsFindControl(int wid, VSPSZ pszName)

Parameters:

wid - Window id of object. 0 specifies the current object.

pszName - Name of control to search for

Returns: int

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), ctlName, 0 is returned.

Applies To:

All Window Objects

Category:

Form Methods

See Also:

vsFindFormObject


vsFindFormObject

int VSAPI vsFindFormObject(VSPSZ pszName, VSPSZ pszOptions=NULL)

Parameters:

pszName - is a string in the format: form_name[.control_name]

pszOptions - "N" or "E", as described above

Returns: int

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.

Applies To:

All Window Objects

Category:

Form Methods

See Also:

vsFindControl


vsFindIndex

int VSAPI vsFindIndex(const char *pszName, int flags)

Parameters:

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_CLASS
Matches class name
VSTYPE_INTERFACE
Matches interface name
VSTYPE_STRUCT
Matches struct name
VSTYPE_CONST
Matches const name
VSTYPE_ENUM
Matches enumerated type
VSTYPE_MODULE
Matches module
VSTYPE_PICTURE
Matches picture.
VSTYPE_CLASS
Matches any Slick-C® class type name
VSTYPE_OBJECT
Matches any type of dialog box template. Use vsoi2type(VSOI_???) to find a specific type of object.
VSTYPE_MISC
Matches miscellaneous.

Returns: int

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));

Category:

Names Table Functions

See Also:

vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable


vsFindLanguageCallbackIndex

int VSAPI vsFindLanguageCallbackIndex(const char *callback_name, const char *language_id=0)

This function is used to look up a language-specific callback function.

Return the names table index for the callback function for the current language, or a language we inherit behavior from. The current object should be an editor control.

Parameters:

callback_name - name of callback to look up, with a '%s' marker in place where the language ID would be normally located.

language_id - current language ID (default=p_LangId)

Returns: int

Names table index for the callback. 0 if the callback is not found or not callable.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


vsFontIsScalable

int VSAPI vsFontIsScalable(int flags, const char *pszFontName, void *reserved=0)

Parameters:

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.

Returns: int

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.

Category:

Font Functions

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:

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.

Returns: int

Returns 0 if successful.

Category:

Font Functions

See Also:

vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFontQDefaultCharSet

int VSAPI vsFontQDefaultCharSet(int flags, const char *pszFontName, const char *pszFontSize)

Parameters:

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.

Returns: int

Windows only: Returns Windows character set.

Category:

Font Functions

See Also:

vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFontQType

int VSAPI vsFontQType(int flags, const char *pszFontName, void *reserved=0)

Parameters:

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.

Returns: int

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.

Category:

Font Functions

See Also:

vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFree

void VSAPI vsFree(void *pBuf)

Frees memory allocated by the vsAlloc function. If a NULL pointer is given, this function does nothing.

Parameters:

pBuf - Pointer to memory allocated by vsAlloc or vsRealloc.

Category:

Miscellaneous Functions

See Also:

vsAlloc, vsRealloc


vsFreeColor

void VSAPI vsFreeColor(int wid, VSCOLORINDEX ColorIndex)

Frees a color index allocated by vsAllocColor.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsAllocColor, vsSetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsFreeSelection

int VSAPI vsFreeSelection(int markid)

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.

Parameters:

mark_id - Selection id to free.

Category:

Selection Functions

See Also:

vsAllocSelection


vsGetACP

int VSAPI vsGetACP()

Returns: int

Returns the active code page. This result can be used in any function which accepts a code page.

Category:

Unicode Functions


vsGetBufferFromView

int VSAPI vsGetBufferFromView(char **ppBuffer, int *piLen, int iWindowId)

Get char buffer from window id. Use vsFree to free buffer data.

Parameters:

ppBuffer - Address of char * variable to store data in

piLen - Address of int variable to store length of the data in

iWindowId - Window id to store in ppBuffer

Returns: int

0 if successful

Category:

File Functions


vsGetDefaultColor

int VSAPI vsGetDefaultColor(int cfgfield, int *pFGColor, int *pBGColor, int *pFontFlag=NULL, int *pcfgParentColor=NULL)

Gets rgb color values (always in Windows format) and font style flag for the cfgfield specified.

Parameters:

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 - Output only. Set to one of the VSFONTFLAG_?? constants or 0.

pcfgParentColor - Output only. Set to the color ID of the color which 'cfgfield' inherits properties from. One of the VSCFG_??? constants or a color index allocated by vsAllocColor.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsAllocColor, vsFreeColor, vsSetTextColor, vsSetDefaultColor


vsGetDefaultExtensionOptions

int VSAPI vsGetDefaultExtensionOptions(const char *pszExtension, VS_LANGUAGE_OPTIONS *pLangOptions, int version=VS_LANGUAGE_OPTIONS_VERSION)

Deprecated. Use vsGetDefaultLanguageOptions

Gets language specific options for a specific file extension.

Parameters:

pszExtension - File extension. For list of file extension types, use our File Extension Manager dialog ("Tools", "Options...", "File Extension Manager")

pLangOptions - Initialized to language specific options for pszExtension.

version - normally VS_LANGUAGE_OPTIONS_VERSION

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultExtensionOptions, vsGetDefaultLanguageOptions, vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions


vsGetDefaultExtensionReferTo

void VSAPI vsGetDefaultExtensionReferTo(const char *pszExtension, char *pszLangId, int maxLangId)

Looks up the language mode with is associated with the given physical file extension. This information is used to determine what language mode to choose when a file with the given extension is opened.

Parameters:

pszExtension - File extension. For list of file extension types, use our Extension Manager dialog ("Tools", "Options...", "File Extension Manager").

pszLangId - Language ID (see p_LangId For list of language types, Language Options dialog ("Tools", "Options", "Language Setup...").

maxLangId - number of bytes allocated to pszLangId

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultExtensionReferTo, vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions


vsGetDefaultFont

int VSAPI vsGetDefaultFont(int field, char *pszFontName, int MaxFontName, int *pFontSizex10, int *pFontFlags, int *pCharSet=0)

Returns information about the font configuration.

Parameters:

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.

Returns: int

Returns 0 if parameters are valid.

Categories:

Edit Window Functions, Editor Control Functions, Miscellaneous Functions

See Also:

vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor


vsGetDefaultLanguageOptions

int VSAPI vsGetDefaultLanguageOptions(const char *pszLangId, const char *pszExtension, VS_LANGUAGE_OPTIONS *pLangOptions, int version=VS_LANGUAGE_OPTIONS_VERSION)

Gets language specific options for a specific language type.

Parameters:

pszLangId - Language ID (see p_LangId). For list of language types, use our Language Manager dialog ("Tools", "Options...", "Language Manager")

pszExtension - File extension referred to pszLangId

pLangOptions - Initialized to language specific options for pszLangId.

version - normally VS_LANGUAGE_OPTIONS_VERSION

Returns: int

Returns 0 if successful.

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions, vsSetDefaultLanguageOptions


vsGetDefaultOptionZ

char*VSAPI vsGetDefaultOptionZ(int option, char *pszResult, int MaxResult, int *pMaxResultLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns pszResult.

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsGetEditorName

char*VSAPI vsGetEditorName(int option, char *pszName, int MaxNameLen, int *pMaxNameLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns string corresponding to option specified.

Category:

Miscellaneous Functions


vsGetEmulation

char*VSAPI vsGetEmulation(char *pszResult, int MaxResult, int *pMaxResultLen=0)

Parameters:

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.

Returns: char*VSAPI

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++

Category:

Keyboard Functions


vsGetEnv

char*VSAPI vsGetEnv(const char *pszName)

Parameters:

pszName - Name of environment variable to retrieve value of.

Returns: char*VSAPI

Returns value of environment variable given. 0 is returned if the environment variable does not exist.

Category:

Miscellaneous Functions

See Also:

vsSetEnv


vsGetFontFlag

int VSAPI vsGetFontFlag(int wid, int cfg)

Parameters:

wid - Window ID, currently unused.

cfg - Color index, either a default color VSCFG_* or one allocated using vsAllocColor()

Returns: int

Return the font flags set for the given color index.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions


vsGetLine

int VSAPI vsGetLine(int wid, char *pszBuf, int BufLen)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pszBuf - Output buffer for current line.

BufLen - Number of characters allocated to pszBuf.

Returns: int

Returns number of bytes copied not including null character.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetText


vsGetLineRaw

int VSAPI vsGetLineRaw(int wid, char *pszBuf, int BufLen)

This function is identical to the vsGetLine function, except that the output string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS C API Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsGetMessage

char*VSAPI vsGetMessage(int rc, char *pszMessage, int MaxMsgLen, int *pMaxMsgLen=0)

Copies corrensponding message into pszMessage. Set to "Message not available" for a non-existant error code.

Parameters:

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.

Returns: char*VSAPI

Returns pszMessage.

Category:

Miscellaneous Functions

See Also:

vsMessage, vsGetMessageLine


vsGetMessageLine

char*VSAPI vsGetMessageLine(char *pszMessage, int MaxMessageLen, int *pMaxMessageLen=0)

Copies current contents of message line into pszMessage.

Parameters:

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.

Returns: char*VSAPI

Returns pszMessage.

Category:

Miscellaneous Functions

See Also:

vsMessage, vsGetMessage


vsGetProjectName

char*VSAPI vsGetProjectName(char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0)

See vsProjectQName.

Category:

Project Functions


vsGetRText

int VSAPI vsGetRText(int wid, int Nofbytes, long point, char *pszBuf, int *pNofbytesRead=0)

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.

Parameters:

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.

Returns: int

Returns number of bytes copied not including null character.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetLine, vsGetText, vsGetRText


vsGetSelectedText

int VSAPI vsGetSelectedText(int wid, char *pszBuf, int BufLen, int markid=-1, int flags=-1, const char *pEOLChars=0, int EOLCharsLen=-1)

This function retrieves the selected text. pszBuf is set to "" (strlen(pszBuf)==0) iif there is no selection.

Parameters:

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 set to 0, "\r\n" (UNIX: "\n") is always used. The buffer's line format setting is not used to determine the value to assign to pEOLChars. To specify Unix style line separator characters in a Windows environment, see the example below.

EOLCharsLen - Number of characters in pEOLChars. -1 means pEOLChars is null terminated.

Returns: int

Returns the number of characters in the selected text.

Example:

The only way to have vsGetSelectedText() use Unix style line separators in Windows is to specify pEOLChars and EOLCharsLen.

vsGetSelectedText(0, szText, 256, nMarkId, -1, "\n", 1);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQSelectedTextLength


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)

Returns information about the selection specified.

Parameters:

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.

Returns: int

Returns 0 if wid and markid are valid.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsGetSelLines

int VSAPI vsGetSelLines(int wid, int markid, int *pfirstline, int *plastline=0)

Returns line number information about the selection specified.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

markid - Selection handle returned by vsAllocSelection or vsDuplicateSelection. -1 specifies current selection.

pfirstline - Output for the first line of the selection.

plastcol - Output for the last line of the selection.

Returns: int

Returns 0 if wid and markid are valid.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsGetServerName

void VSAPI vsGetServerName(char *pszServerName, int MaxServerNameLen, int *pMaxServerNameLen=0)

SlickEdit uses the server name to communicate with other instances of the editor and for DDE.

Parameters:

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.

Returns: void

Returns pszServerName.

Category:

Miscellaneous Functions


vsGetText

int VSAPI vsGetText(int wid, int Nofbytes, long seekpos, char *pszBuf)

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.

Parameters:

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.

Returns: int

Returns number of bytes copied not including null character.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetLine


vsGetTimeString

int VSAPI vsGetTimeString(char *pszTime, int maxlen, char option='T')

Get system time in the output buffer specified. If the output buffer is null or maxlen=0, then the size required to store the time string is returned.

Parameters:

pszString - (out) Output buffer for system time string.

maxlen - Maximum number of characters in output buffer.

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.
'F'
Return time in the format YYYYMMDDhhmmssfff where YYYY is the year, MM is the month, DD is the day, hh is an hour between 0 and 23, mm is the minutes between 0 and 59, ss is the seconds between 0 and 59, and fff is the fractional second, in milliseconds.
'G'
Returns seconds elapsed since UNIX Epoch (Midnight of January 1, 1970). This value is always in UTC/GMT.

Returns: int

0 on success, >0 size required to store time string if output buffer is null, otherwise <0 error code.

Category:

Miscellaneous Functions


vsGetVar

VSHVAR VSAPI vsGetVar(int index)

Parameters:

index - Names table index returned by vsFindIndex or vsNameMatch.

Returns: VSHVAR

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsHvarGetI, vsArg, vsHvarAlloc, vsHvarFree, vsHvarHashtabEl, vsHvarArrayEl


vsGoToLine

int VSAPI vsGoToLine(int wid, int LineNumber, int OnlyCountRealLines=1, int doCenterScroll=1)

Searches for line specified and places the cursor on the line.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

LineNumber - Indicates the old line number to find.

OnlyCountRealLines - When non-zero, only real lines are counted. The "real line number" does not count non-savable lines (that is lines with the VSLF_ NOSAVE flag).

doCenter - When non-zero, if scrolling is necessary to make the destination line visible, the line is scrolled to the center of the screen.

Returns: int

Returns 0 if successful. If the line specified is past the end of the file, BOTTOM_OF_FILE_RC is returned and the cursor is placed at the end of the file. Other possible error codes are INVALID_OBJECT_HANDLE_RC and PROPERTY_OR_METHOD_NOT_ALLOWED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsGoToOldLineNumber

void VSAPI vsGoToOldLineNumber(int wid, int OldLineNum, int Reserved=1)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

OldLineNumber - Indicates the old line number to find.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsSetAllOldLineNumbers


vsGoToPoint

int VSAPI vsGoToPoint(int wid, long Point, long DownCount=0, int LineNum=(-1))

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Otherwise INVALID_POINT_RC is returned.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


vsGoToROffset

int VSAPI vsGoToROffset(int wid, long offset)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

offset - Real character offset to go to.

Returns: int

Returns 0 if offset is a valid offset. Otherwise an negative error code is returned.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsGoToPoint, vsQPoint, vsQROffset, vsGoToROffset


vsHaveClipboard

int VSAPI vsHaveClipboard()

Returns: int

Returns non-zero value if the is a system or internal clipboard which can be pasted by the "paste" command.

Category:

Clipboard Functions


vsHaveSelection

int VSAPI vsHaveSelection(int wid, int reserved=0)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns non-zero value if there is a current selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsHvarAlloc

VSHVAR VSAPI vsHvarAlloc(VSHVAR InitTohVar=0)

Returns: VSHVAR

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);

Category:

Miscellaneous Functions

See Also:

vsHvarGetI, vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarFree


vsHvarArrayDeleteEl

void VSAPI vsHvarArrayDeleteEl(HVAR hvarArray, int start, int Nofitems=1)

Deletes elements from an array variable.

Parameters:

hvarArray - array to delete item(s) from

start - start index corresponding to item(s) to delete

Nofitems - (default 1) number of items to delete

Example:

   vsHvarMakeEmpty(VSHVAR_RC);
   hvar = vsHvarArrayEl(VSHVAR_RC, 0);
   vsHvarSetI(hvar, 1);
   hvar = vsHvarArrayEl(VSHVAR_RC, 1);
   vsHvarSetI(hvar, 2);
   hvar = vsHvarArrayEl(VSHVAR_RC, 2);
   vsHvarSetI(hvar, 3);
   vsHvarArrayDeleteEl(VSHVAR_RC, 1); // t[1] will now contain 3

Category:

Miscellaneous Functions

See Also:

vsHvarNextEl, vsHvarMakeEmpty, vsHvarIsEmpty, vsHvarFormat


vsHvarArrayEl

VSHVAR VSAPI vsHvarArrayEl(VSHVAR hVarArrayEl, int i)

Returns: VSHVAR

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarAlloc, vsHvarFree


vsHvarArrayInsertEl

void VSAPI vsHvarArrayInsertEl(HVAR hvarArray, HVAR hvarValue, int start, int Nofitems=1)

Inserts an element into an array. Nofitems defaults to 1.

Parameters:

hvarArray - array to insert item(s) into

hvarValue - value to insert into array

start - start index corresponding to item(s) to insert

Nofitems - (default 1) number of items to insert

Example:

   vsHvarMakeEmpty(VSHVAR_RC);
   hvar = vsHvarArrayEl(VSHVAR_RC, 0);
   vsHvarSetI(hvar, 1);
   hvar = vsHvarArrayEl(VSHVAR_RC, 1);
   vsHvarSetI(hvar, 2);
   hvar = vsHvarArrayEl(VSHVAR_RC, 2);
   vsHvarSetI(hvar, 3);
   vsHvarArrayDeleteEl(VSHVAR_RC, 1);
   hvar = vsHvarAlloc();
   vsHvarSetI(hvar, 4);
   vsHvarInsertArray(VSHVAR_RC, hvar, 1, 2);  // { 1,4,4,2,3 }
   vsHvarFree(hvar);

Category:

Miscellaneous Functions

See Also:

vsHvarArrayDeleteEl, vsHvarNextEl, vsHvarMakeEmpty, vsHvarIsEmpty, vsHvarFormat, vsHvarIndexIn


vsHvarArrayLength

int VSAPI vsHvarArrayLength(HVAR hvar)

Parameters:

hvar - Handle to Slick-C variable.

Returns: int

Returns number or entries in the array variable specified.

Category:

Miscellaneous Functions


vsHvarCallMethod

int VSAPI vsHvarCallMethod(int wid, VSHVAR hvar, int index, int Nofargs, VSARGTYPE *pArgList)

Call a class method with the given argument list.

Parameters:

wid - window ID

hvar - handle for interpreter variable

index - names table index of class function

Nofargs - number of arguments

pArgList - array of arguments

Returns: int

0 on success. Returns INVALID_ARGUMENT_RC if the method index is invalid. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFindMethod, vsHvarCallMethodByName


vsHvarCallMethodByName

int VSAPI vsHvarCallMethodByName(int wid, VSHVAR hvar, VSPSZ func_name, int Nofargs, VSARGTYPE *pArgList)

Call a class method with the given argument list.

Parameters:

wid - window ID

hvar - handle for interpreter variable

func_name - name of class function to call

Nofargs - number of arguments

pArgList - array of arguments

Returns: int

0 on success. Returns INVALID_ARGUMENT_RC if the method index is invalid. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFindMethod, vsHvarCallMethod


vsHvarClassFieldIndex

int VSAPI vsHvarClassFieldIndex(VSPSZ class_name, VSPSZ field_name)

Parameters:

class_name - Slick-C® class name

field_name - name of struct or class data field (non-static)

Returns: int

Return the index >= 0 for the given non-static member of a class or struct. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns CLASS_MEMBER_NOT_FOUND_RC if the field is not found.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarFieldIndex, vsHvarClassFieldName, vsHvarGetField


vsHvarClassFieldName

VSPSZ VSAPI vsHvarClassFieldName(VSPSZ class_name, int index)

Parameters:

class_name - Slick-C® class name

index - index >=0 of non-static data member

Returns: VSPSZ

Return the name of the given non-static member of a class or struct. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns INVALID_ARGUMENT_RC if the field index is out of range.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldIndex, vsHvarFieldName, vsHvarClassFieldIndex, vsHvarGetField


vsHvarClassFindMethod

int VSAPI vsHvarClassFindMethod(VSPSZ class_name, VSPSZ func_name)

Parameters:

class_name - Slick-C® class name

func_name - name of class function

Returns: int

Return the name index of the given (virtual) method for the a Slick-C® class. For virtual methods, this will find the nearest virtual method, starting with the actual type of the given class. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns CLASS_MEMBER_NOT_FOUND_RC if the method is not found.

Category:

Miscellaneous Functions

See Also:

vsHvarCallMethod


vsHvarClassNumFields

int VSAPI vsHvarClassNumFields(VSPSZ class_name)

Parameters:

class_name - Slick-C® class name

Returns: int

Return the number of non-static data members in a class or struct. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarFieldIndex, vsHvarClassFieldName, vsHvarClassFieldIndex, vsHvarNumFields


vsHvarClassParent

VSPSZ VSAPI vsHvarClassParent(VSPSZ class_name, int index=0)

Parameters:

class_name - class to look up parent class for

index - 0 for super class, 1 ... n for interfaces

Returns: VSPSZ

Return the name of the given parent or interface which this class derives from or implements, respectively. Returns INVALID_ARGUMENT_RC if the field index is out of range. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName


vsHvarCopy

int VSAPI vsHvarCopy(HVAR hvar, HVAR src)

Sets value of interpreter variable specified to be a copy of the given interpreter variable.

Parameters:

hvar - interpreter variable (destination)

src - interpreter variable (source)

Returns: int

Returns <0 on error.

Category:

Miscellaneous Functions

See Also:

vsHvarFree, vsHvarAlloc, vsHvarMakeEmpty, vsHvarArrayEl, vsHvarSetI, vsHvarSetZ


vsHvarFieldIndex

int VSAPI vsHvarFieldIndex(VSHVAR hvar, VSPSZ field_name)

Parameters:

hvar - handle for interpreter variable

field_name - name of struct or class data field (non-static)

Returns: int

Return the index >= 0 for the given non-static member of a class or struct. Returns CLASS_MEMBER_NOT_FOUND_RC if the field is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarClassFieldName, vsHvarClassFieldIndex, vsHvarGetField


vsHvarFieldName

VSPSZ VSAPI vsHvarFieldName(VSHVAR hvar, int index)

Parameters:

hvar - handle for interpreter variable

index - index >=0 of non-static data member

Returns: VSPSZ

Return the name of the given non-static member of a class or struct instance. Returns INVALID_ARGUMENT_RC if the field index is out of range. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldIndex, vsHvarGetField


vsHvarFindInterfaceMethod

int VSAPI vsHvarFindInterfaceMethod(VSHVAR hvar, VSPSZ class_name, VSPSZ method_name)

Check if the given variable is an instance of the given class and if it implements the method named.

Parameters:

hvar - handle for interpreter variable

class_name - name of class or interface to test

method_name - name of method to find

Returns: int

Return the name index of the given (virtual) method for the a Slick-C® class. For virtual methods, this will find the nearest virtual method, starting with the actual type of the given class. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns CLASS_MEMBER_NOT_FOUND_RC if the method is not found.

Category:

Miscellaneous Functions

See Also:

vsHvarTypename, vsHvarInstanceOf, vsHvarFindMethod


vsHvarFindMethod

int VSAPI vsHvarFindMethod(VSHVAR hvar, VSPSZ func_name)

Parameters:

hvar - handle for interpreter variable

func_name - name of class function

Returns: int

Return the name index of the given (virtual) method for the a class instance. For virtual methods, this will find the nearest virtual method, starting with the actual type of the 'hvar' class instance. Returns CLASS_MEMBER_NOT_FOUND_RC if the method is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarCallMethod


vsHvarFormat

int VSAPI vsHvarFormat(VSHVAR hVar)

Parameters:

hvar - Handle to Slick-C® variable.

Returns: int

Returns variable format of hvar. One of the VSVF_??? constants.

Category:

Macro Programming Functions


vsHvarFree

int VSAPI vsHvarFree(VSHVAR hVar)

Returns: int

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);

Category:

Miscellaneous Functions

See Also:

vsHvarGetI, vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc


vsHvarGetField

VSHVAR VSAPI vsHvarGetField(VSHVAR hvar, int index)

Parameters:

hvar - handle for interpreter variable

index - index >=0 of non-static data member

Returns: VSHVAR

Return a handle to the given non-static data member of a class or struct. Returns INVALID_ARGUMENT_RC if the field index is out of range. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldIndex, vsHvarGetFieldByName


vsHvarGetFieldByName

VSHVAR VSAPI vsHvarGetFieldByName(VSHVAR hvar, VSPSZ field_name)

Parameters:

hvar - handle for interpreter variable

field_name - name of non-static data member

Returns: VSHVAR

Return a handle to the given non-static data member of a class or struct. Returns CLASS_MEMBER_NOT_FOUND_RC if the field is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarGetField


vsHvarGetHRef

VSHVAR VSAPI vsHvarGetHRef(VSHVAR hVar)

Returns: VSHVAR

Returns the id of the interpreter variable pointed to by the interpreter variable corresponding to hvar.

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetI

int VSAPI vsHvarGetI(VSHVAR hVar)

Returns: int

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;
       int index;

       // 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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetLstr

VSPLSTR VSAPI vsHvarGetLstr(VSHVAR hVar)

Returns: VSPLSTR

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetWID

int VSAPI vsHvarGetWID(VSHVAR hVar)

Returns: int

Returns integer value representing a window ID 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;
       int index;

       // The rc variable is a global variable which always exists.
       index=vsFindIndex("rc",VSTYPE_VAR);
       // Get handle to interpreter variable
       hvar=vsGetVar(index);
         i=vsHvarGetWID(hvar);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetZ

VSPSZ VSAPI vsHvarGetZ(HVAR hvar)

Returns: VSPSZ

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));

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarHashtabDeleteEl

void VSAPI vsHvarHashtabDeleteEl(HVAR hvarHashtab, VSPSZ pBuf, int BufLen=-1)

Deletes an element from hash table.

Parameters:

hvarHashtab - hash table to delete item from

pBuf - index or key corresponding to item to look for

BufLen - length of hash key

Example:

   vsHvarMakeEmpty(VSHVAR_RC);
   hvar=vsHvarHashtabEl(VSHVAR_RC,"styles");
   vsHvarSetI(hvar,1);
   vsHvarHashtabDeleteEl(VSHVAR_RC,"styles");

Category:

Miscellaneous Functions

See Also:

vsHvarNextEl, vsHvarMakeEmpty, vsHvarIsEmpty, vsHvarFormat, vsHvarIndexIn


vsHvarHashtabEl

VSHVAR VSAPI vsHvarHashtabEl(VSHVAR hVarHashtab, const char *pBuf, int BufLen=-1)

Returns: VSHVAR

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarHashtabInsertEl

void VSAPI vsHvarHashtabInsertEl(HVAR hvarArray, HVAR hvarValue, VSPSZ pBuf, int BufLen=-1)

Inserts an element into a hash table. Nofitems defaults to 1.

Parameters:

hvarHashtab - hash table to insert item into

hvarValue - value to insert into hash table

pBuf - index or key corresponding to item to look for

BufLen - length of hash key

Example:

   vsHvarMakeEmpty(VSHVAR_RC);
   hvar = vsHvarAlloc();
   vsHvarSetZ(hvar, "world");
   vsHvarHashtabInsertEl(VSHVAR_RC, hvar, "hello");
   vsHvarFree(hvar);

Category:

Miscellaneous Functions

See Also:

vsHvarHashtabDeleteEl, vsHvarNextEl, vsHvarMakeEmpty, vsHvarIsEmpty, vsHvarFormat, vsHvarIndexIn


vsHvarIndexIn

VSHVAR VSAPI vsHvarIndexIn(HVAR hvarHashtab, VSPSZ pBuf, int BufLen=-1)

Parameters:

hvarHashtab - hash table to test

pBuf - index or key corresponding to item to look for

BufLen - length of hash key

Returns: VSHVAR

Returns a reference to element if element exists at index given.

Example:

   vsHvarMakeEmpty(VSHVAR_RC);
   hvar=vsHvarHashtabEl(VSHVAR_RC,"styles");
   vsHvarSetI(hvar,1);
   hvar=vsHvarIndexIn(VSHVAR_RC,"styles");  // will be non-zero
   hvar=vsHvarIndexIn(VSHVAR_RC,"color");   // will be zero

Category:

Miscellaneous Functions

See Also:

vsHvarNextEl, vsHvarMakeEmpty, vsHvarIsEmpty, vsHvarFormat, vsHvarHashtabInsertEl


vsHvarInstanceOf

int VSAPI vsHvarInstanceOf(VSHVAR hvar, VSPSZ class_name)

Check if the given variable is an instance of the named class or interface.

Parameters:

hvar - handle for interpreter variable

class_name - name of class, struct, or interface to test

Returns: int

'true' if 'hvar' is an instance of 'name' 'false' otherwise. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarTypename


vsHvarIsEmpty

int VSAPI vsHvarIsEmpty(VSHVAR hvar)

Parameters:

hvar - Handle to variable.

Returns: int

Returns true if the format of the variable specified is VSVF_EMPTY. This is equivelant to the expression vsHvarFormat(hvar)==VSVF_EMPTY.

Category:

Miscellaneous Functions


vsHvarMakeEmpty

void VSAPI vsHvarMakeEmpty(VSHVAR hvar)

Clears contents of variable and sets its variable format to VSVF_EMPTY.

Parameters:

hvar - Handle to variable.

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);
}

Category:

Miscellaneous Functions


vsHvarNextEl

VSHVAR VSAPI vsHvarNextEl(VSHVAR hvarArrayOrHashTab, HVAR hvarstart)

Parameters:

hvar - Handle to hash table or array variable.

hvarIndex - Handle to index variable.

Returns: VSHVAR

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);
}

Category:

Miscellaneous Functions


vsHvarNumFields

int VSAPI vsHvarNumFields(VSHVAR hvar)

Parameters:

hvar - handle for interpreter variable

Returns: int

Return the number of non-static data members in a class or struct type instance. Returns CLASS_NAME_NOT_FOUND_RC if the class is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarFieldIndex, vsHvarClassFieldName, vsHvarClassFieldIndex, vsHvarClassNumFields


vsHvarParent

VSPSZ VSAPI vsHvarParent(VSHVAR hvar, int index=0)

Parameters:

hvar - handle for interpreter variable

index - 0 for super class, 1 ... n for interfaces

Returns: VSPSZ

Return the name of the given parent or interface which this class derives from or implements, respectively. Returns INVALID_ARGUMENT_RC if the field index is out of range. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarClassParent


vsHvarSetB

int VSAPI vsHvarSetB(VSHVAR hVar, void *pBuf, int BufLen)

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarSetField

int VSAPI vsHvarSetField(VSHVAR hvar, int index, VSHVAR value)

Modify the contents of the given non-static data member of a class or struct.

Parameters:

hvar - handle for interpreter variable

index - index >=0 of non-static data member

value - value to set field to

Returns: int

0 on success. Returns INVALID_ARGUMENT_RC if the field index is out of range. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldIndex, vsHvarSetFieldByName


vsHvarSetFieldByName

int VSAPI vsHvarSetFieldByName(VSHVAR hvar, VSPSZ name, VSHVAR value)

Modify the contents of the given non-static data member of a class or struct.

Parameters:

hvar - handle for interpreter variable

name - name of non-static data member

value - value to set field to

Returns: int

0 on success. Returns CLASS_MEMBER_NOT_FOUND_RC if the field is not found. Returns INVALID_HVAR_ARGUMENT_RC if 'hvar' is not a struct or class instance.

Category:

Miscellaneous Functions

See Also:

vsHvarFieldName, vsHvarSetField


vsHvarSetI

int VSAPI vsHvarSetI(VSHVAR hVar, int value)

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);

Category:

Miscellaneous Functions

See Also:

vsHvarSetB, vsHvarGetZ, vsHvarGetLstr, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarSetPointer

int VSAPI vsHvarSetPointer(HVAR hvar, HVAR src)

Sets value of interpreter variable specified to be a pointer to the given interpreter variable.

NOTE: As always with pointer types, use with care, because interpreter variables are not reference counted. If the src variable goes out of scope, it will be destructed, leaving this pointer dangling.

Parameters:

hvar - interpreter variable (destination)

src - interpreter variable (source)

Category:

Miscellaneous Functions

See Also:

vsHvarFree, vsHvarAlloc, vsHvarMakeEmpty, vsHvarArrayEl, vsHvarSetI, vsHvarSetZ


vsHvarSetWID

int VSAPI vsHvarSetWID(VSHVAR hVar, int wid)

Sets value of interpreter variable to window id specified. The window id is represented as an integer.

Example:

       // Get handle to interpreter variable
       hvar=vsGetVar(index);
      // Specify integer for variable value
         vsHvarSetWID(hvar,wid);

Category:

Miscellaneous Functions

See Also:

vsHvarSetB, vsHvarGetZ, vsHvarGetLstr, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarSetZ

int VSAPI vsHvarSetZ(VSHVAR hVar, const char *pszValue)

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");

Category:

Miscellaneous Functions

See Also:

vsHvarSetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetB, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarTypename

VSPSZ VSAPI vsHvarTypename(VSHVAR hvar)

Parameters:

hvar - handle for interpreter variable

Returns: VSPSZ

Return a string describing the type of the given variable. This is only for class and struct instances.

Category:

Miscellaneous Functions


vsIndex2Event

int VSAPI vsIndex2Event(int index, int version=0)

Deprecated. It is no longer necessary to call this function.

Parameters:

index - Event

Returns: int

Returns input index unmodified.

Category:

Keyboard Functions

See Also:

vsEvent2Index


vsInit

int VSAPI vsInit(VSINIT *pvsinit)

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 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.

Parameters:

pvsinit - See comments for VSINIT structure in "vs.h". You must initialized the contents of this structure to 0. For C and C++, this can be done using memset() or defining this structure as a global or static variable.

Returns: int

Returns 0 if successful.

Category:

Miscellaneous Functions


vsInsertLine

void VSAPI vsInsertLine(int wid, const char *pBuf, int BufLen=-1)

Inserts line into editor buffer after the current line.

Parameters:

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.

Example:

vsInsertLine(0,"add line after current line",-1);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsGetLine, vsReplaceLine, vsDeleteLine, vsGetText


vsInsertLineRaw

void VSAPI vsInsertLineRaw(int wid, const char *pBuf, int BufLen=-1)

This function is identical to the vsInsertLine function, except that the input string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS C API Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsInsertText

int VSAPI vsInsertText(int wid, const char *pBuf, int BufLen=-1, int Binary=0, unsigned char NLCh1='\r', unsigned char NLCh2='\n')

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.

Parameters:

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. CRLF).

NLCh1 - First character of end of line sequence.

NLCh2 - Second character of end of line sequence.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsInsertTextRaw

int VSAPI vsInsertTextRaw(int wid, const char *pBuf, int BufLen=-1, int Binary=0, unsigned char NLCh1='\r', unsigned char NLCh2='\n')

This function is identical to the vsInsertText function, except that the input string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS C API Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsInvalidateWindow

void vsInvalidateWindow(int wid)

Invalidates the entire client are of the window and queues a paint message

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

All Window Objects

Categories:

Edit Window Methods, Editor Control Methods


vsIsCodePage

int VSAPI vsIsCodePage(int encoding)

Returns: int

Returns non-zero value if encoding is a code page and not one of the VSENCODING_* constants.

Category:

Unicode Functions


vsIsCodePageAvailable

int VSAPI vsIsCodePageAvailable(int codePage)

Returns: int

Returns non-zero value if the code page given is available. When a code page is not available, it can't be used as input to a function which accepts a code page parameter.

Category:

Unicode Functions


vsIsEditorCtl

int VSAPI vsIsEditorCtl(int wid, int allowHiddenWindow=1)

Parameters:

wid - window ID, 0 for current window

allowHiddenWindow - if false, return 0 for hidden windows.

Returns: int

Returns non-zero value if the specified window is an editor control, and optionally, not a hidden window.

Categories:

Editor Control Functions, Window Functions


vsIsEventPending

int VSAPI vsIsEventPending(int flags=0)

Test if a key, mouse, or mouse-move event is available.

Parameters:

flags - Bit-wise flags of vsEventPendingFlags. Defaults to 0.

Returns: int

1 (true) if event is available, otherwise 0 (false).

Category:

Keyboard Functions


vsIsWindowValid

int VSAPI vsIsWindowValid(int wid)

Parameters:

wid - Window id of object. 0 specifies the current object.

Returns: int

Returns 0 if the window id is a valid instance of an SlickEdit object.

Example:

int wid;
//Traverse all SlickEdit objects.
for (wid=1;wid<=vsLastWindowID();++wid) {
     // IF this window is a valid object
     if (_iswindow_valid(wid) ){
            // 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_HASBUFFER) &&
                vsPropGetI(wid,VSP_MDICHILD) &&
                wid!=VSWID_HIDDEN) {
                  vsDestroyEditorCtl (wid);
            }
     }
}

Category:

Window Functions


vsJoinLine

int VSAPI vsJoinLine(int wid)

Joins the next line to the end of the current line.

Parameters:

wid - Window id of object. 0 specifies the current object.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsJoinLineToCursor


vsJoinLineToCursor

int VSAPI vsJoinLineToCursor(int wid, int reserved=0)

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.

Parameters:

wid - Window id of object. 0 specifies the current object.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsJoinLine


vsKeyin

void VSAPI vsKeyin(int wid, const char *pBuf, int BufLen)

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.

Parameters:

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.

Applies To:

Text Box, Combo Box, Edit Window, Editor Control

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

vsQInsertState, vsSetInsertState


vsLanguageInheritsFrom

int VSAPI vsLanguageInheritsFrom(const char *parent, const char *language_id=0)

Does the current source language match or inherit from the given language?

If 'lang' is not specified, the current object must be an editor control.

Parameters:

parent - language ID to compare to

language_id - current language ID (default=p_LangId)

Returns: int

'true' if the language matches, 'false' otherwise.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions


vsLastWindowID

int VSAPI vsLastWindowID()

Returns: int

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 SlickEdit objects.
for (wid=1;wid<=vsLastWindowID();++wid) {
     // IF this window is a valid object
     if (_iswindow_valid(wid) ){
            // 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_HASBUFFER) &&
                vsPropGetI(wid,VSP_MDICHILD) &&
                wid!=VSWID_HIDDEN) {
                  vsDestroyEditorCtl (wid);
            }
     }
}

Category:

Window Functions


vsLibExport

int VSAPI vsLibExport(const char *func_proto_p, const char *name_info_p, int arg2, void *pfn)

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]]...])

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.

Parameters:

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 _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).

pfn - (optional) Pointer to function. For DLL functions, this is optional if the real function name is the same as the exported function name. This is required for functions that are not exported by your DLL or for functions in vsapi.dll.

Returns: int

Returns 0 if successful. Otherwise a non-zero error code is returned.

Example:

     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));

     }

Category:

Macro Programming Functions

See Also:

vsDllExport


vsLineMarkerAdd

int VSAPI vsLineMarkerAdd(int wid, int RealLineNum, int isRealLineNum, int NofLines, int BMIndex, int type, const char *pszMessage=0, void *pUserData=0, void *reserved=0)

Adds a new line marker.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the marker type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled break point.
_breakpn.bmp
Indicates a line with a disabled break point.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.

type - Type allocated by vsMarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML is supported by our mini-HTML control.

pUserData - Pointer to user data.

Returns: int

Returns index of new line marker.

Example:

// Add debug bitmap to give the visual effect of a
// break point.
int type=vsMarkerTypeAlloc();
int LineMarkerIndex=vsLineMarkerAdd(0, vsPropGetI(0,VSP_LINE),
                      0,4, vsFindIndex("_breakpt.bmp",VSTYPE_PICTURE),
                      type);

// Add a line marker which draws a box
int type=vsMarkerTypeAlloc();
int LineMarkerIndex=vsLineMarkerAdd(0,vsPropGetI(0,VSP_LINE),
                      0,4,vsFindIndex("_edplus.bmp",VSTYPE_PICTURE),
                      type,"line 1<br>line2");
vsLineMarkerSetMousePointer(LineMarkerIndex,MP_CROSS);
vsLineMarkerSetStyleColor(LineMarkerIndex,0xff0000);
vsMarkerTypeSetFlags(type,VSMARKERTYPEFLAG_DRAW_BOX|VSMARKERTYPEFLAG_AUTO_REMOVE);

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerAddB

int VSAPI vsLineMarkerAddB(const char *pszBufName, int RealLineNum, int isRealLineNum, int NofLines, int BMIndex, int type, const char *pszMessage=0, void *pUserData=0, const char *pszLineData=0, void *reserved=0)

Adds a new line marker.

Parameters:

pszBufName - Name of buffer.

RealLineNum - Line number or real line number (not counting no save lines).

isRealLineNum - Indicates whether RealLineNum is a real line number or not.

NofLines - Number of lines in this item. Specify zero if the type you are using does not have the VSMARKERTYPEFLAG_DRAW_BOX flag set.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap. The following are names of bitmaps used for debugging:

_breakpt.bmp
Indicates a line with an enabled break point.
_breakpn.bmp
Indicates a line with a disabled break point.
_execpt.bmp
Indicates current execution line.
_stackex.bmp
Indicates a line on the execution call stack.

type - Type allocated by vsMarkerTypeAlloc().

pszMessage - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

pUserData - Pointer to user data.

pszLineData - This is usually 0 but may contain some of the contents of the line.

Returns: int

Returns index of new line marker.

Example:

// Add debug bitmap to give the visual effect of a
// break point.
int type=vsMarkerTypeAlloc();
int LineMarkerIndex=vsLineMarkerAddB("c:\\projects\\java\\main.java",
                       10,
                       1,4, vsFindIndex("_breakpt.bmp",VSTYPE_PICTURE),
                       type);

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerAddMarkId

int VSAPI vsLineMarkerAddMarkId(int wid, int markid, int BMIndex, int type, const char *pszMessage=0, void *pUserData=0, void *reserved=0)

Adds a new line marker. Note that using a mark id instead of a line number has the advantage that the number of lines in the file do not need to be calculated. This is only useful for data files and not source files. However, the draw box feature is not supported.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

MarkId - Mark id allocated by vsAllocSelection().

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap.

type - Type allocated by vsMarkerTypeAlloc().

Message - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

pUserData - Pointer to user data.

Returns: int

Returns index of new line marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerAddMarkIdB

int VSAPI vsLineMarkerAddMarkIdB(const char *pszBufName, int markid, int BMIndex, int type, const char *pszMessage=0, void *pUserData=0, const char *pszLineData=0, int RealLineNum=0, long BeginLineROffset=0, int col=0, void *reserved=0)

Adds a new line marker. Note that using a mark id instead of a line number has the advantage that the number of lines in the file do not need to be calculated. This is only useful for data files and not source files. However, the draw box feature is not supported.

Parameters:

pszBufName - Name of buffer.

MarkId - Mark id allocated by vsAllocSelection().

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap.

type - Type allocated by vsMarkerTypeAlloc().

pszMessage - HTML message displayed when mouse is over bitmap. Only a subset of HTML supported by our mini-HTML control is supported.

pUserData - Pointer to user data.

pszLineData - This is usually 0 but may contain some of the contents of the line.

RealLineNum -

Returns: int

Returns index of new line marker.

Category:

Marker Functions


vsLineMarkerAllocFindList

int*VSAPI vsLineMarkerAllocFindList(int wid, int LineNum, long LineOffset=VSNULLSEEK, int CheckNofLines=0, int *pNofItems=0)

Lists line markers

Parameters:

wid - Window id of editor control. 0 specifies the current object.

LineNum - Line number returned by vsPropGetI(wid,VSP_LINE)

LineOffset - Optional specifies offset to search for markers which use MarkIds.

CheckNofLines - When on, only line markers with NofLines which include this line are returned.

pNofItems - May be null. Set to number of items in array returned.

Returns: int*VSAPI

Returns list of line markers indexes which match the line (or lines if CheckRange is non-zero) specified. -1 is appended to the end of the list to indicate the end of the list. 0 is returned if no matches are found. Call vsFree to free the list.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerGet

int VSAPI vsLineMarkerGet(int LineMarkerIndex, VSLINEMARKERINFO &info, int version=0)

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

info - Returns all information for line marker.

version -

Returns: int

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerNext

int VSAPI vsLineMarkerNext(int LineMarkerIndex)

Interates all line markers. Using this function could cause slow performance since this function list all line markers and not just line markers for a specific buffer.

Parameters:

LineMarkerIndex - Specify -1 or the last value returned by this function.

Returns: int

Returns index of next line marker. Returns -1 if there are no more line markers.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemove

void VSAPI vsLineMarkerRemove(int LineMarkerIndex)

Removes line marker.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemoveAllBMIndex

void VSAPI vsLineMarkerRemoveAllBMIndex(int BMIndex)

Removes all line markers that have the specified BMIndex.

Parameters:

BMIndex - Index of bitmap in names table.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemoveAllType

void VSAPI vsLineMarkerRemoveAllType(int type)

Removes all line markers that have the specified type.

Parameters:

type - Type of marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemoveBMIndex

void VSAPI vsLineMarkerRemoveBMIndex(int wid, int BMIndex)

Removes all line markers for the specified editor control that have the specified BMIndex.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

BMIndex - Index of bitmap in names table.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemoveNonPushedType

void VSAPI vsLineMarkerRemoveNonPushedType(int wid, int type)

Removes all line markers for the specified editor control that have the specified type and are not pushed bookmarks.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

type - Type of marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerRemoveType

void VSAPI vsLineMarkerRemoveType(int wid, int type)

Removes all line markers for the specified editor control that have the specified type.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

type - Type of marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerSetBMIndex

void VSAPI vsLineMarkerSetBMIndex(int LineMarkerIndex, int BMIndex)

Sets the bitmap for the line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

BMIndex - Index of bitmap in names table.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerSetMousePointer

void VSAPI vsLineMarkerSetMousePointer(int LineMarkerIndex, int MousePointer)

Sets the mouse pointer for the line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

MousePointer - Index to mouse pointer. One of VSMP_ constants.

Applies To:

Edit Window, Editor Control

Categories:

Marker Functions, Mouse Functions


vsLineMarkerSetStyleColor

void VSAPI vsLineMarkerSetStyleColor(int LineMarkerIndex, int RGBColor)

Sets the RBG box color line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

RGBColor - RGB color.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLineMarkerSetUserData

int VSAPI vsLineMarkerSetUserData(int LineMarkerIndex, void *pUserData)

Sets the userdata for the line marker specified.

Parameters:

LineMarkerIndex - Index of line marker returned by a vsLineMarkerAdd function.

pUserData - Pointer to user data.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsLoadFiles

int VSAPI vsLoadFiles(int wid, const char *pszCmdline)

See Slick-C® load_files method for information on return values and pszCmdLine string.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pszCmdLine - See load_files method for more information.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods, File Functions, Window Functions


vsLoadTemplate

int VSAPI vsLoadTemplate(int index_or_wid, int parent, int flags, VSLOADDATA *pLoadData, int x=-1, int y=-1, int width=-1, int height=-1, int state='N')

Load a Slick-C resource template by index.

Parameters:

index_or_wid - Resource template index or window id of already-created object. If VSLOAD_WINDOW or VSLOAD_REINIT flags are used, then it is the window id of the already-created object. Otherwise it is the resource template.

parent - Parent window id.

flags - Load flags. See VSLOAD_*.

pLoadData - Load data. This includes ON_CREATE arguments passed to the ON_CREATE events of the resource being loaded. Set to 0 if no load data. See VSLOADDATA type.

x - Initial window geometry that overrides what is stored in the template. Only useful when using VSLOAD_MDI_CHILDFORM because you cannot create an MDI child window hidden, move it, then make it visible.

y -

width -

height -

state - Initial window state. 'N'=Normalized, 'M'=Maximized, 'I'=Iconized/minimized. Ignored if not using VSLOAD_MDI_CHILDFORM.

Returns: int

Window id of loaded resource. Returns <0 on error.

Category:

Window Functions

See Also:

vsFindIndex


vsLowcase

char*VSAPI vsLowcase(char *pString, int StringLen=-1, int utf8=-1)

Converts string to lower case.

Parameters:

pString - Input string.

StringLen - Number of bytes in pString. Specify -1 to determine length of string if string is null terminated.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that the input and output string are SBCS/DBCS. 1 specifies that the input and output string are UTF-8.

Categories:

String Functions, Unicode Functions

See Also:

vsUpcase


vsLXY2DXY

void VSAPI vsLXY2DXY(int ScaleMode, int *px, int *py)

Converts X and Y from scale mode specified to pixels.

Parameters:

ScaleMode - Input scale mode. VSSM_TWIP or VSSM_PIXEL.

px - Null or pointer to x coordinate.

py - Null or pointer to y coordinate.

Category:

Window Functions


vsMacroEndRecording

void VSAPI vsMacroEndRecording()

Terminates macro recording. This function is used to implement our macro recording commands.

Category:

Macro Programming Functions

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


vsMacroGetFilename

char*VSAPI vsMacroGetFilename(char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns absolute output filename of the last recorded macro. This is "" if there is no last recorded macro.

Category:

Macro Programming Functions

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()

Returns: int

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.

Category:

Macro Programming Functions

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()

Use this function to determine which macro recording commands should be enabled or disabled.

Returns: int

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.

Category:

Macro Programming Functions

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()

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.

Returns: int

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.

Category:

Macro Programming Functions

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()

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.

Returns: int

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.

Category:

Macro Programming Functions

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()

Returns: int

Returns non-zero value if a recording macro is currently being executed.

Category:

Macro Programming Functions

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)

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.

Parameters:

value - Set to 1 if you want command called by vsExecute or vsCallIndex to do macro recording.

Example:

void VSAPI mycommand()
{
     vsMacroSetRecordSource(0);
     vsExecute(0,"save_as c:\\temp\\junk.c",
                 "" // DONT specify M option here
               );
}

Category:

Macro Programming Functions

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)

Indicates whether a source macro is currently running. Determines value returned by vsMacroQRunning.

Parameters:

value - Set to 0 or 1.

Category:

Macro Programming Functions

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)

Starts recording a macro and makes the editor control corresponding to wid the output editor control for recorded source.

Parameters:

wid - Window id of object. 0 specifies the current object.

Category:

Macro Programming Functions

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


vsMarkerTypeAlloc

int VSAPI vsMarkerTypeAlloc()

Returns: int

Returns index of type. Once a type is allocated, various attributes of the type can be set.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

vsMarkerTypeFree


vsMarkerTypeFree

int VSAPI vsMarkerTypeFree(int type)

Frees marker type alloced by vsMarkerTypeAlloc().

Parameters:

type - Marker type index

Returns: int

Returns 0 on success, <0 on error.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

vsMarkerTypeAlloc


vsMarkerTypeQFlags

int VSAPI vsMarkerTypeQFlags(int type)

Parameters:

type - Index of pic type.

Returns: int

Returns pic flags for the pic type specified.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeQPriority

int VSAPI vsMarkerTypeQPriority(int type)

Parameters:

type - Index of pic type.

Returns: int

Returns the draw priority for this marker type. Lower numbers mean higher priority, 0 is the default priority. The lowest priority is 255.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetCallbackCopyUserData

int VSAPI vsMarkerTypeSetCallbackCopyUserData(int type, void(VSAPI*pfnMarkerCopyUserData)(int SrcMarkerIndex, int SrcBMIndex, int SrcType, const void*pSrcUserData, void*pDestClipboardUserData, int*pDestClipboardUserDataLen))

Sets the CopyUserData callback for the marker type specified. You may need to define this callback if you want support for Undo or Copy/Paste. The purpose of this callback is to allow you to create a copy of the user data so that it may be stored in the undo stack. No pointers should be stored in in the pDestClipboardUserData buffer because in the future the copy/paste functionality could support inter-process clipboards.

This callback is called just before a marker is about to be deleted or copied.

Parameters:

type - Type returned from vsMarkerTypeAlloc()

pfnMarkerCopyUserData - Callback function. Sets buffer length of pDestClipboardUserData and if pDestClipboardUserData is not NULL, fills this buffer in with the user data. pDestClipboardUserData is NULL the first time this callback is called to determine the buffer size.

Returns: int

Returns 0 if the marker type is valid.

Category:

Marker Functions


vsMarkerTypeSetCallbackFreeUserData

int VSAPI vsMarkerTypeSetCallbackFreeUserData(int type, void(VSAPI*pfnMarkerFreeUserData)(int MarkerIndex, int BMIndex, int Type, void*pUserData, int BufId))

Sets the FreeUserData callback for the marker type specified. You may need to define this callback if you want support for Undo or Copy/Paste.

This callback is called just before a marker is about to be deleted including when you call vsLineMarkerRemove. Free your user data here if necessary. Do not free the user data in the vsMarkerTypeSetCallbackLinesDeleted() callback if you free the user data here.

Parameters:

type - Type returned from vsMarkerTypeAlloc()

pfnMarkerFreeUserData - Callback function.

Returns: int

Returns 0 if the marker type is valid.

Category:

Marker Functions


vsMarkerTypeSetCallbackKeepEmptyMarker

int VSAPI vsMarkerTypeSetCallbackKeepEmptyMarker(int type, int(VSAPI*pfnKeepEmptyMarker)(int MarkerIndex, int BMIndex, int type, void*pUserData))

Sets the KeepEmptyMarker callback for the marker type specified. The purpose of this callback is to give you more control over whether this marker should be deleted. DO NOT free user data in this callback. Instead, define the vsMarkerTypeSetCallbackFreeUserData() callback.

For line markers, this callback is called when the line containing this marker is deleted and NofLines<=0.

For stream markers, this callback is called when all the text in the range is deleted.

Parameters:

type - Type returned from vsMarkerTypeAlloc()

pfnPicKeepEmptyMarker - Callback function. Returns 0 if the marker should be deleted.

Returns: int

Returns 0 if the marker type is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetCallbackMouseEvent

int VSAPI vsMarkerTypeSetCallbackMouseEvent(int type, int event, int(VSAPI*pfnCommand)(int wid, int LineNum, int LineMarkerIndex, int BMIndex, int Type, const char*pszMessage, void*pUserData)=0)

Parameters:

type - Index of marker type.

event - Mouse event constant. Mouse event constant (ex VS_OFFSET_MEVENTS+VS_MK_LBUTTON_DOWN). Only the LBUTTON_DOWN, LBUTTON_DOUBLE_CLICK, RBUTTON_DOWN events are supported.

pfnCommand - Callback.

Returns: int

Returns 0 if successful. Sets the callback for the specified mouse event.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetCallbackPasteIntoLine

int VSAPI vsMarkerTypeSetCallbackPasteIntoLine(int type, int(VSAPI*pfnMarkerPasteIntoLine)(int DestWid, int SrcMarkerIndex, int SrcType))

Sets the PasteIntoLine callback for the marker type specified. You will almost always need to define this callback when setting the VSMARKERTYPEFLAG_COPY_CHAR_LINE_SELECT flag on the marker type in order to allow you to decide whether the marker that was copied with the contents of a line should be pasted into the line specified in the edit window specified.

This callback is called when a marker will be created due to a Paste/Copy-to-Clipboard or Buffer-to-Buffer-Copy AND the marker type contains VSMARKERTYPEFLAG_COPYPASTE | VSMARKERTYPEFLAG_COPY_CHAR_LINE_SELECT.

Note:
Currently our copy/paste facility is performed by Buffer-to-Buffer-Copy because the SlickEdit clipboard is a buffer.

Parameters:

type - Type returned from vsMarkerTypeAlloc()

pfnMarkerPasteIntoLine - Callback function. DestWid is the window id that the marker would be pasted to. SrcMarkerIndex is the source marker that would be copied and used to create a new marker. SrcType is the type of the marker that would be copied. The line and column at which the marker would be pasted is set upon entry into this callback. Return 0 if you DO NOT want the marker pasted into the line, return 1 if you DO want the marker pasted into the line. All properties for NewMarkerIndex have been set (except for the user data). You may call vsLineMarkerGet to query information about the new marker.

Returns: int

Returns 0 if the marker type is valid.

Example:

...
int VSAPI myCallbackMarkerPasteIntoLine(int DestWid, int SrcMarkerIndex, int SrcType);
int type = vsMarkerTypeAlloc();
vsMarkerTypeSetFlags(type,VSMARKERTYPEFLAG_COPYPASTE|VSMARKERTYPEFLAG_UNDO|VSMARKERTYPEFLAG_AUTO_REMOVE|VSMARKERTYPEFLAG_COPY_CHAR_LINE_SELECT);
vsMarkerTypeSetCallbackPasteIntoLine(type,myCallbackMarkerPasteIntoLine);
...
int VSAPI myCallbackMarkerPasteIntoLine(int DestWid, int SrcMarkerIndex, int SrcType)
{
    // Current column we are pasting into
    int p_col = vsPropGetI(DestWid,VSP_COL);
    // Current line number we are pasting into
    int p_line = vsPropGetI(DestWid,VSP_LINE);
    // Current line length (excluding newline chars) we are pasting into
    int line_len = vsQLineLength(DestWid,0);

    // TODO:
    // Decide whether to allow this paste or not.
    // Return 0 if you DO NOT want to perform the paste.
    // Return 1 if you DO want to perform the paste.

    // Allow the marker to be pasted
    return 1;
}

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetCallbackPasteUserData

int VSAPI vsMarkerTypeSetCallbackPasteUserData(int type, void *(VSAPI*pfnMarkerPasteUserData)(int NewMarkerIndex, int SrcBMIndex, int SrcType, const void*pSrcClipboardUserData))

Sets the PasteUserData callback for the marker type specified. You may need to define this callback if you want support for Undo or Copy/Paste. The purpose of this callback is to allow you to create new user data for the marker which has just been created and set in a buffer.

This callback is called when a new marker has been created due to an Undo/Paste/Copy-to-Clipboard or Buffer-to-Buffer-Copy. The new marker has the same settings as the marker that was copied except for line number information.

Note: Currently our copy/paste facility is performed by Buffer-to-Buffer-Copy because the SlickEdit clipboard is a buffer

Parameters:

type - Type returned from vsMarkerTypeAlloc()

pfnMarkerPasteUserData - Callback function. Returns a pointer to the new user data for the newly created marker. All properties for NewMarkerIndex have been set except for the user data. You may call vsLineMarkerGet to query information about the new marker.

Returns: int

Returns 0 if the marker type is valid.

Category:

Marker Functions


vsMarkerTypeSetCallbackRefresh

int VSAPI vsMarkerTypeSetCallbackRefresh(int type, void(VSAPI*pfnRefreshMarkers)(int MarkerRefreshFlags))

Parameters:

type - Index of marker type.

pfnRefreshMarkers - Callback.

Returns: int

Returns 0 if successful. Sets the refresh callback for the marker type specified. This callback is called when a line marker line numbers change or a marker is removed because all text for the marker was removed.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetFlags

void VSAPI vsMarkerTypeSetFlags(int type, int MarkerTypeFlags)

Sets the marker type flags for the marker type specified.

Parameters:

type - Index of marker type.

MarkerTypeFlags - Marker flags may be one or more of the VSMARKERTYPEFLAG_* flags. See flags for details.

VSMARKERTYPEFLAG_AUTO_REMOVE
Specifies that the marker be removed when all marker text is deleted.
VSMARKERTYPEFLAG_DRAW_BOX
Specifies that a box be drawn around the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.
VSMARKERTYPEFLAG_DRAW_FOCUS_RECT
Specifies that a focus rectangle be drawn around the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.
VSMARKERTYPEFLAG_DRAW_SQUIGGLY
Specifies that a squiggly underline be drawn under the text. For line markers, the number of lines contained in the box is determined by the NofLines property of the line marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMarkerTypeSetPriority

void VSAPI vsMarkerTypeSetPriority(int type, int DrawPriority)

Sets the drawing priority for the marker type specified. 0 is the highest priority, 255 is the lowest priority.

Parameters:

type - Index of marker type.

DrawPriority - unsigned integer between 0 and 255. 0 is the default draw priority.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsMatchCursorLength

int VSAPI vsMatchCursorLength()

Returns: int

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);
}

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsMatchStart, vsMatchLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMatchLength

int VSAPI vsMatchLength(int TaggedExpression=-1)

Parameters:

TaggedExpression - Tagged expression number. For SlickEdit 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: int

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);
}

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMatchStart

long VSAPI vsMatchStart(int TaggedExpression=-1)

Parameters:

TaggedExpression - Tagged expression number. Specify a MatchGroup of -1 to get the length of the entire string matched. For SlickEdit 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: long

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);
}

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsMatchLength, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMaybeExecuteKey

int VSAPI vsMaybeExecuteKey(int wid, int event, int checkCtrlAlt)

Execute the command bound to the specified event (key) if one exists.

Parameters:

wid - Window id of window that should perform the command for the specified key

event - Key or key combination to use to find the command bound to that key. The values come from vsevents.h

checkCtrlAlt - Flag: 1 to also check for CONTROL and/or ALT modifier keys being pressed before the key is executed, 0 to ignore the modifier keys

Returns: int

0 if no command for the specified key or key sequence. -1 if command found

Category:

Keyboard Functions


vsMDICreate

int VSAPI vsMDICreate(VSSYSHWND hwndframe, VSSYSHWND hwnd, VSSYSHWND hwndmdiclient)

This function registers some MDI window handles. Currently, only one MDI window is supported. SlickEdit will automically disable the hwndframe window when a modal dialog box is displayed.

Parameters:

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.

Returns: int

Returns MDI window instance handle.

See our MDI sample program for an example.

Category:

Miscellaneous Functions


vsMDIRegisterStatusWindow

void VSAPI vsMDIRegisterStatusWindow(int mdi_wid, VSSYSHWND hwndframe, VSSYSHWND hwnd)

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.

Parameters:

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.

Category:

Miscellaneous Functions


vsMDISetActiveChild

void VSAPI vsMDISetActiveChild(int wid)

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.

Parameters:

wid - Window id of object. 0 specifies the current object.

Category:

Miscellaneous Functions


vsMenuDelete

int VSAPI vsMenuDelete(int menu_handle, int position)

Deletes a menu or menu item in a loaded menu or a menu resource.

Parameters:

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.

Returns: int

Returns 0 if successful.

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);
}

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuDestroy

int VSAPI vsMenuDestroy(int menu_handle)

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.

Parameters:

menu_handle - Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

Returns: int

Returns 0 if successful.

Category:

Menu Functions

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)

Finds menu or menu item with a specified command or category.

Parameters:

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.

Returns: int

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);
}

Category:

Menu Functions

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)

Gets menu item values for the menu items which contain the command or category specified.

Parameters:

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 - 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.

Returns: int

Returns 0 if successful.

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

Category:

Menu Functions

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)

Inserts a menu or menu item into a loaded menu or a menu resource.

Parameters:

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 - 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.

Returns: int

Returns 0 if successful.

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");
}

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuLoad

int VSAPI vsMenuLoad(int wid, int index, char menu_option)

Parameters:

wid - Window id of 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.

Returns: int

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 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);
}

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuQInfo

int VSAPI vsMenuQInfo(int menu_handle, char option='C')

Parameters:

menu_handle - Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

Returns: int

Returns number of menu items in loaded menu menu_handle.

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuSet

int VSAPI vsMenuSet(int wid, int menu_handle)

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.

Parameters:

wid - Window id of SlickEdit form or MDI frame.

menu_handle - Handle of loaded menu returned by vsMenuLoad.

Returns: int

Returns 0 if successful.

Example:

void VSAPI dllproc ()
{
    int index;
    // Find index of 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);
}

Applies To:

MDI Window, Form

Categories:

Form Methods, MDI Window Methods, Menu Functions

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)

Sets menu item values for the menu items which contain the command or category specified.

Parameters:

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 - 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.

Returns: int

Returns 0 if successful.

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');
}

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuShow

int VSAPI vsMenuShow(int wid, int menu_handle, int vpm_flags, int x, int y)

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.

Parameters:

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.

Returns: int

Returns 0 if successful.

Example:

#include "slick.sh"
defmain()
{
   // Low-level code to display 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);
}

Category:

Menu Functions

See Also:

vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMergeFiles

int VSAPI vsMergeFiles(const char *pszBaseFilename="", int iBaseBufferId=-1, int iBaseWindowId=0, const char *pszRev1Filename="", int iRev1BufferId=-1, int iRev1WindowId=0, const char *pszRev2Filename="", int iRev2BufferId=-1, int iRev2WindowId=0, const char *pszOutputFilename="", int iOutputBufferId=-1, int iOutputWindowId=0, int iFlags=0, const char *pszCopy1Caption="", const char *pszCopy2Caption="", const char *pszCopy1AllCaption="", const char *pszCopy2AllCaption="", const char *pszImaginaryLineCaption=0)

Performs a three way merge and displays the results interleave or in a merge dialog.

Parameters:

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 iBaseWindowId. Specify -1 to have this parameter ignored.

iBaseWindowId - Window 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 iRev1WindowId. Specify -1 to have this parameter ignored.

iRev1WindowId - Window 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 iRev2WindowId. Specify -1 to have this parameter ignored.

iRev2WindowId - Window 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 iOutputWindowId. If you specify iOutputBufferId or iOutputWindowId, 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.

iOutputWindowId - Window Id for the output buffer. If you use this, be sure to specify "" for pszOutputFilename, and -1 for iOutputBufferId. If you specify iOutputBufferId or iOutputWindowId, 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 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.

Returns: int

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.

Category:

File Functions


vsMessage

void VSAPI vsMessage(const char *psz)

Parameters:

psz - is temporarily displayed on the message line. Message will disappear after a key is pressed.

Category:

Miscellaneous Functions

See Also:

vsStickyMessage


vsMessageBox

int VSAPI vsMessageBox(const char *pszMessage, const char *pszTitle=0, int vsmb_flags=VSMB_OK)

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.

Parameters:

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.

Returns: int

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
}

Category:

Miscellaneous Functions

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)

Parameters:

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.

Returns: int

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(VSEV_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_HASBUFFER)>=0) return;
     char word[VSMAXCURWORD];

     vsMouCurWord(0,vsMouQLastX(),vsMouQLastY(),1,1,word,VSMAXCURWORD);
     vsMessage(word);
}

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


vsMouQLastInRect

int VSAPI vsMouQLastInRect(int wid, char option, int top, int bottom, int left, int right)

Parameters:

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.

top - Top of rectangle

bottom - Bottom of retangle

left - Left hand side of rectangle

right - Right hand size of rectnagle

Returns: int

Returns 'true' if the position of the mouse for the last event falls within the given rect, with respect to the coordinates of the given window ID.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


vsMouQLastX

int VSAPI vsMouQLastX(int wid=0, char option='D')

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


vsMouQLastY

int VSAPI vsMouQLastY(int wid=0, char option='D')

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Mouse Functions


vsMoveWindow

void VSAPI vsMoveWindow(int wid, int x, int y, int width, int height, char state=0, int reserved=1)

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.

Parameters:

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.

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods, Window Functions


vsMultiByteConvertMultiByteToUTF16BE

char*VSAPI vsMultiByteConvertMultiByteToUTF16BE(int codePage, const char *pBuf, const char *pEndBuf, unsigned short *pwDest, int wDestLen, unsigned *pNofCharsWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts multi-byte text to UTF-16 big endian.

Parameters:

pBuf - Buffer containing source multi-byte text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-16 text.

DestLen - Number of characters allocated to destination buffer. Specify wBufLen+4 characters (BufLen*2+4 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsMultiByteConvertMultiByteToUTF16LE

char*VSAPI vsMultiByteConvertMultiByteToUTF16LE(int codePage, const char *pBuf, const char *pEndBuf, unsigned short *pwDest, int wDestLen, unsigned *pNofCharsWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts multi-byte text to UTF-16 little endian.

Parameters:

pBuf - Buffer containing source multi-byte text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-16 text.

DestLen - Number of characters allocated to destination buffer. Specify wBufLen+4 characters (BufLen*2+4 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsMultiByteConvertMultiByteToUTF32BE

char*VSAPI vsMultiByteConvertMultiByteToUTF32BE(int codePage, const char *pBuf, const char *pEndBuf, unsigned *pwDest, int wDestLen, unsigned *pNofCharsWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts multi-byte text to UTF-32 big endian.

Parameters:

pBuf - Buffer containing source multi-byte text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-32 text.

DestLen - Number of characters allocated to destination buffer. Specify uBufLen+2 characters (BufLen*4+8 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsMultiByteConvertMultiByteToUTF32LE

char*VSAPI vsMultiByteConvertMultiByteToUTF32LE(int codePage, const char *pBuf, const char *pEndBuf, unsigned *pwDest, int wDestLen, unsigned *pNofCharsWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts multi-byte text to UTF-32 little endian.

Parameters:

pBuf - Buffer containing source multi-byte text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-32 text.

DestLen - Number of characters allocated to destination buffer. Specify uBufLen+2 characters (BufLen*4+8 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsMultiByteFillBuf

char*VSAPI vsMultiByteFillBuf(int destEncoding, int codePage, int writeFirstBuffer, void *pDest, int DestLen, const char *pSrc, const char *pSrcEnd, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts the data from the multi-byte code page specified to the encoding specified UTF-8.

Parameters:

destEncoding - One of the following encodings:

  • VSENCODING_UTF16LE
  • VSENCODING_UTF16LE_WITH_SIGNATURE
  • VSENCODING_UTF16BE
  • VSENCODING_UTF16BE_WITH_SIGNATURE
  • VSENCODING_UTF32LE
  • VSENCODING_UTF32LE_WITH_SIGNATURE
  • VSENCODING_UTF32BE
  • VSENCODING_UTF32BE_WITH_SIGNATURE

codePage - One of the following code pages:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page

writeFirstBuffer - Indicates whether this is the first buffer is being written. When this is non-zero and the encoding given has a signature, the signature is written.

pDest - Destination buffer for data in the encoding format specified.

DestLen - Number of bytes allocated to destination buffer.

pSrc - Pointer to multi-byte source data.

pSrcEnd - Pointer to end of multi-byte source data.

pNofbytesWritten - Receives number of bytes (not characters of encoding format) written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs.

Returns: char*VSAPI

Returns pointer to next character to read.

Example:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

static char gDestTempBuffer[32768];
static int WriteFromUTF8(const char *pszFilename,int
dest_encoding,int intput_fh)
{
   VSUTF8_FILEINFO1 fileinfo;
   fileinfo.pBuf=fileinfo.pEndBuf=0;
   fileinfo.fh=intput_fh;

   int output_fh=vsFileOpen(pszFilename,1);
   if (output_fh<0) {
      return(output_fh);
   }
   int writeFirstBuffer=1;
   int status;
   for (;;) {
      int Nofbytes;

fileinfo.pBuf=vsMultiByteFillBuf(dest_encoding,VSCP_ACTI
VE_CODEPAGE, writeFirstBuffer,

gDestTempBuffer,sizeof(gDestTempBuffer),
                             fileinfo.pBuf,fileinfo.pEndBuf,
                             (unsigned
*)&Nofbytes,&status,&fileinfo,CallbackFileRead1
                             );
      if (status<0) {
         break;
      }
      if (Nofbytes<=0) {
         status=Nofbytes;
         break;
      }
      Nofbytes=writefh(output_fh,gDestTempBuffer,Nofbytes);
      if (Nofbytes<0) {
         status=Nofbytes;
         break;
      }
      writeFirstBuffer=0;
   }
   closefh(output_fh);
   return(status);
}

Category:

Unicode Functions


vsNameCallable

long VSAPI vsNameCallable(int index)

Returns: long

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");
       }

Category:

Names Table Functions

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:

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. Removes name entry corresponding to name table index.

Category:

Names Table Functions

See Also:

vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameDllAddr

long VSAPI vsNameDllAddr(int index)

Parameters:

index - Index into names table of global function.

Returns: long

Returns address of function. 0 is returned if index is not valid or can not be resolved.

Category:

Names Table Functions

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, int *pMaxInfoLen=0)

This function is used to get command function attributes or user defined additional name information.

Parameters:

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.

Returns: char*VSAPI

Returns pszInfo.

Category:

Names Table Functions

See Also:

vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameInfoArg2

int VSAPI vsNameInfoArg2(int index)

Returns: int

This function is used to return command function VSARG2_??? attributes. See "vs.h" for list of VSARG2_??? constants.

Category:

Names Table Functions

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)

This function creates a new names table item.

Parameters:

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.

Returns: int

If successful, the index of new names table item is returned. Otherwise, a negative error code is returned. 0 is never returned.

Category:

Names Table Functions

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:

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.

Returns: int

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
       }

Category:

Names Table Functions

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:

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.

Returns: char*VSAPI

Returns pszName.

Category:

Names Table Functions

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:

index - Index into names table of item.

pszName - New name.

pszInfo - Optional new name information. If null, current name information is preserved. This function is used to rename a names table item.

Returns: int

If successful, returns index. Otherwise a negative error code is returned.

Category:

Names Table Functions

See Also:

vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameType

int VSAPI vsNameType(int index)

Parameters:

index - Index into names table of item.

Returns: int

Returns name table type flags for index.

Category:

Names Table Functions

See Also:

vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNextBuffer

void VSAPI vsNextBuffer(int wid, int nbflags)

Switches to the next buffer.

Parameters:

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 cursor position (line number, col, etc.) information is not updated.
VSNBFLAG_NO_REFRESH
When specified, window refresh flags are not updated to avoid unnecessary screen painting.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

vsPrevBuffer, vsDeleteBuffer


vsOpenTempView

int VSAPI vsOpenTempView(const char *pszFilename, int *pTempWindowId, int *pOrigWindowId=0, const char *pszLoadOption=0, const char *pszOpenOption=0)

This function creates an editor window 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 vsActiveWindow and/or the VSP_WINDOWID property to switch windows. The call vsPropGetI(0,VSP_WINDOWID) returns the current window id.

Parameters:

pszFilename - Name of file to process.

pTempWindowId - Set to newly created window id.

pOrigWindowId - Set to current window id. There is always a valid current window id.

pszLoadOption - File load options

""
Display existing buffer or read pszFilename from disk.
"+bi buf_id>"
Ignore pszFilename and create new window 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.

pszOpenOption - File open options

C
Clear the buffer.
M
Select the editing mode for this file.
X
If the file is not found, a new file is created.
L
Specifies that select edit mode will be called later, but the file should have the correct load options initialized.
T
Throw away changes when temp view is closed.

Returns: int

If successful, returns 0 and the temp window/buffer is active. Otherwise a negative error code is returned.

Categories:

Buffer Functions, File Functions

See Also:

vsDeleteTempView, vsCreateTempView


vsPicGet

int VSAPI vsPicGet(int PicIndex, int *pRealLineNum=0, int *pLineNum=0, int *pNofLines=0, void **ppUserData=0, int *pBufID=0, char *pszBufName=0, int *pBMIndex=0, int *ptype=0, char **pszMessage=0, char *pszLineData=0, int *pmarkid=0, long *pBeginLineROffset=0, int *pcol=0, void *preserved2=0)

Deprecated. . Use vsLineMarkerGet() instead.

Parameters:

PicIndex - Index of pic returned by a vsPicAdd function.

pRealLineNum - Set to real line number.

pLineNum - Set to line number.

pNofLines - Set to number of lines. Used to determine how lines to draw a box around.

ppuserdata - Set to userdata.

pBufID - Set to buffer id or negative number if file is not currently loaded.

pszBufName - Set to buffer name.

pBMIndex - Set to index into names table of bitmap.

ptype - Set to type.

pszMessage - Set to message.

pszLineData - Set to line data. This parameter is typically only used by pics with a valid mark id.

pmarkid - Set to mark id.

pBeginLineROffset - Set to real seek position to the beginning of the line.

pcol - Set to column.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsPicGetOrder

int VSAPI vsPicGetOrder(int BMIndex)

Parameters:

BMIndex - Index of bitmap in names table.

Returns: int

Order of bitmap. Lowest order is displayed on top.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions

See Also:

vsPicSetOrder


vsPicSetOrder

void VSAPI vsPicSetOrder(int BMIndex, int order, int OnlySetIfZero=0)

Sets the order for the bitmap specified.

Parameters:

BMIndex - Index of bitmap in names table.

Order - Index of bitmap in names table.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsplit_window

_command typeless vsplit_window(_str load_options="")

Splits the current window vertically in half.

Parameters:

buffer_name - Option to load buffer into split window. See load_file.

Returns: typeless

Returns 0 if successful.

Applies To:

Edit Window

Category:

Window Functions

See Also:

hsplit_window


vsPosGetLinePointers

void VSAPI vsPosGetLinePointers(unsigned char **pp, unsigned char **ppBeginLine, unsigned char **ppEndLine, int *pRelLine)

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).

Parameters:

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.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosIsEOL, vsPosSetPointer, vsPosInit, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosGetPointers

void VSAPI vsPosGetPointers(unsigned char **pp, unsigned char **ppEndLine, unsigned char **ppEndBuf=0)

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).

Parameters:

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.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosIsEOL, vsPosSetPointer, vsPosInit, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetLinePointers, vsPosSetCurLine, vsPosQCol


vsPosInit

int VSAPI vsPosInit(int LineOffset)

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.

Parameters:

LineOffset - Offset tp set the Pos cursor with in the current line.

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;
}

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosIsEOL

int VSAPI vsPosIsEOL(int offset, int ReturnWhenBetweenNLChars=0)

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.

Parameters:

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, linefeed end of line sequence.

Returns: int

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, linefeed end of line sequence.
Other
File I/O error

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosIsEOR

int VSAPI vsPosIsEOR(int offset)

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.

Parameters:

Offset - Specifies offset from Pos cursor. Must be >=0.

Returns: int

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

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosNextBOL

int VSAPI vsPosNextBOL(int Noflines)

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.

Parameters:

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.

Returns: int

Returns the actually number of lines the Pos cursor went up or down.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosQCol

int VSAPI vsPosQCol()

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine


vsPosRelPGoTo

int VSAPI vsPosRelPGoTo(unsigned char *p)

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.

Parameters:

p - New position for Pos cursor. 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;
}

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosRestore

int VSAPI vsPosRestore(const void *pSavePos)

Returns: int

Restore Pos cursor to position saved by vsPosSave.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosSave

int VSAPI vsPosSave(void *pSavePos)

Returns: int

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.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosSetCurLine

int VSAPI vsPosSetCurLine()

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.

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosQCol


vsPosSetPointer

void VSAPI vsPosSetPointer(unsigned char *p)

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.

Parameters:

p - New position for Pos cursor. Where pBeginBuf>=p<pEndBuf .

Example:

vsPosInit(0);
unsigned char *p,*pEndLine,*pEndBuf);
vsPosGetPointers(&p,&pEndLine,&pEndBuf);
if (p+1

Applies To:

Edit Window, Editor Control

Category:

Search Functions

See Also:

vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPrepareForTerminate

void VSAPI vsPrepareForTerminate()

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. SlickEdit destroys its MDI Frame window in between these two calls.

Category:

Miscellaneous Functions


vsPrevBuffer

void VSAPI vsPrevBuffer(int wid, int nbflags)

Switches to the previous buffer.

Parameters:

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 cursor position (line number, col, etc.) information is not updated.
VSNBFLAG_NO_REFRESH
When specified, window refresh flags are not updated to avoid unnecessary screen painting.

Applies To:

Edit Window, Editor Control

Categories:

Buffer Functions, Edit Window Methods, Editor Control Methods

See Also:

vsNextBuffer, vsDeleteBuffer


vsprint

void VSAPI vsprint(const char *pBuf, int BufLen=-1)

Outputs debug data to a scrolling window. This function is not yet supported under UNIX. This function is used to assist debugging.

Parameters:

pBuf - Data to be printed.

BufLen - Number of characters in pBuf. -1 specifies that pBuf is null terminated and its length can be determined using this.

Category:

Miscellaneous Functions

See Also:

vsprint, vsprintln


vsPrintGetConfig

void VSAPI vsPrintGetConfig(VSPRINTCONFIG *pconfig, int version=0)

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.

Categories:

Edit Window Functions, Editor Control Functions


vsprintln

void VSAPI vsprintln(const char *pBuf, int BufLen=-1)

Outputs debug data to a scrolling window. The next debug output message will be printed on the next line. This function is not yet supported under UNIX. This function is used to assist debugging.

Use vsprintln to implement your own xprintf

Parameters:

pBuf - Data to be printed.

BufLen - Number of characters in pBuf. -1 specifies that pBuf is null terminated and its length can be determined using this.

Category:

Miscellaneous Functions

See Also:

vsprint, vsprintln


vsPrintSetConfig

void VSAPI vsPrintSetConfig(const VSPRINTCONFIG *pconfig, int version=0)

Windows: Sets the current print configuration which will be used by the print command and the gui_print commands dialog box.

Categories:

Edit Window Functions, Editor Control Functions


vsProcessEvents

void VSAPI vsProcessEvents(int *pcancel=0, int ProcessTimerEvents=0)

Reads and dispatches all system messages until there are no more messages or the variable *pcancel becomes non- zero.

Parameters:

pcancel - Optionally points to a user variable. When the user variable is non-zero, this function returns.

ProcessTimerEvents - Determines whether timer events should be processed.

Category:

Keyboard Functions

See Also:

vsEvent2Index, vsIndex2Event, vsSetEventTabIndex, vsEventTabIndex, vsQDefaultEventTab


vsProjectListConfigs

char**VSAPI vsProjectListConfigs(int *pNofConfigs, int *pActiveConfig=0, int reserved=0, int *preserved=0)

Parameters:

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.

Returns: char**VSAPI

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.

Category:

Project Functions


vsProjectQName

char*VSAPI vsProjectQName(char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns pszFilename.

Category:

Project Functions


vsPropGetB

int VSAPI vsPropGetB(int wid, int prop_id, void *pBuf, int BufLen, int *pBufLen=0)

Copies string value of property into pBuf. No more than BufLen bytes are copied.

Parameters:

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.

Returns: int

Returns number of bytes copied

Example:

     int len;
     char bufname[100];

     len=vsPropGetB(0,VSP_BUFNAME,bufname,100);

Applies To:

All Window Objects

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetHvar

VSHVAR VSAPI vsPropGetHvar(int wid, int prop_id)

Parameters:

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 - VSP_USER, VSP_USER2, or VSP_EMBEDDED_ORIG_VALUES

wid -

prop_id -

Returns: VSHVAR

Returns value of an HVAR property. This can only be used with VSP_USER, VSP_USER2, and VSP_EMBEDDED_ORIG_VALUES.

Example:

     int col;
       col=vsPropGetHvar(0,VSP_USER);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetI

int VSAPI vsPropGetI(int wid, int prop_id)

Parameters:

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".

Returns: int

Returns value of integer property.

Example:

     int col;
     col=vsPropGetI(0,VSP_COL);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetL

long VSAPI vsPropGetL(int wid, int prop_id)

Parameters:

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".

Returns: long

Returns value of long integer property.

Example:

     HWND hwnd;
     hwnd=(HWND)vsPropGetL(0,VSP_HWND);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetZ

int VSAPI vsPropGetZ(int wid, int prop_id, char *pszValue, int ValueLen, int *pValueLen=0)

Copies string value of property into pszValue. The returned string is always null terminated. No more than BufLen characters are copied.

Parameters:

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.

Returns: int

Returns number of characters copied

Example:

     int len;
     char bufname[100];

     len=vsPropGetZ(0,VSP_BUFNAME,bufname,100);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetB

void VSAPI vsPropSetB(int wid, int prop_id, const void *pBuf, int BufLen)

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.

Parameters:

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.

Example:

     vsPropSetB(0,VSP_BUFNAME,"c:\\autoexec.bat",15);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetHvar

void VSAPI vsPropSetHvar(int wid, int prop_id, VSHVAR hvar)

Sets value of HVAR property to hvar. This can only be used with VSP_USER, VSP_USER2, and VSP_EMBEDDED_ORIG_VALUES.

Parameters:

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 - VSP_USER, VSP_USER2, or VSP_EMBEDDED_ORIG_VALUES

hvar - New value for property.

Example:

     // Go to line 5 in current buffer
       vsPropSetHvar(0,VSP_LINE,hvar);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetI

void VSAPI vsPropSetI(int wid, int prop_id, int value)

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.

Parameters:

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.

Example:

     // Go to line 5 in current buffer
     vsPropSetI(0,VSP_LINE,5);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetL

void VSAPI vsPropSetL(int wid, int prop_id, long value)

Sets value of long integer property to value.

Parameters:

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.

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetZ

void VSAPI vsPropSetZ(int wid, int prop_id, const char *pszValue)

Sets value of string property to pszValue.

Parameters:

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.

Example:

     vsPropSetZ(0,VSP_BUFNAME,"c:\\autoexec.bat");

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropTest

int VSAPI vsPropTest(int wid, int prop_id, int object_id=0)

Parameters:

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".

object_id - One of the VSOI_??? constants in "vs.h" Ignored unless window_id==0

Returns: int

Test if the given property is safe to get for the given window ID without causing the interpreter to throw an error. Returns 0 if ok, <0 if not safe.

Example:

     int col;
       col=vsPropTest(0,VSP_COL);

Applies To:

All Window Objects

Category:

Miscellaneous Functions

See Also:

vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsQBinaryLoadTagsSupported

int VSAPI vsQBinaryLoadTagsSupported(VSPSZ pszFilename=0)

Parameters:

pszFilename - name of file to test

Returns: int

Returns 'true' if the given file has support for a load-tags callback function, such as for loading symbols from a ZIP file or a DLL with metadata or a Java class file or JAR file.

Category:

Tagging Functions

See Also:

vsQTaggingSupported


vsQButtonBar

int VSAPI vsQButtonBar(int wid, int bbside)

Parameters:

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

Returns: int

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. 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.

Applies To:

MDI Window

Category:

MDI Window Methods


vsQDefaultEventTab

int VSAPI vsQDefaultEventTab()

Returns: int

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_COM
MAND);
   if (index) {
      // Bind this function to a F12
       vsSetEventTabIndex(vsQDefaultEventTab(),
                          vsEvent2Index(VS_OFFSET_FKEYS+11),
                          index);

   }

Category:

Keyboard Functions


vsQDefaultOption

int VSAPI vsQDefaultOption(int option)

Parameters:

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 or ruler around the current line.
  • VSCURRENT_LINE_BOXFOCUS_NONE -- Do not draw box
  • VSCURRENT_LINE_BOXFOCUS_ONLY -- Just draw box, no ruler
  • VSCURRENT_LINE_BOXFOCUS_TABS -- Draw tabs ruler
  • VSCURRENT_LINE_BOXFOCUS_INDENT -- Draw syntax indent ruler
  • VSCURRENT_LINE_BOXFOCUS_DECIMAL -- Darw decimal ruler
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 Parameter Info 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 Parameter Info
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.

Returns: int

Returns current setting of specified option.

Category:

Miscellaneous Functions

See Also:

vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsQDockChannel

int VSAPI vsQDockChannel(int wid, int bbside)

Parameters:

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

Returns: int

Returns window id of frame window dock channel for a particular side. Note that we have not yet provided a C API call to create an item in the dock channel because we do not expect anyone using our C editor control APIs to use our toolbars. SlickEdit's MDI implementation uses the Slick-C® _LoadDockChannel function to create a dock channel.

Applies To:

MDI Window

Category:

MDI Window Methods


vsQhide_all_comments_enabled

int VSAPI vsQhide_all_comments_enabled(int wid)

Parameters:

wid - Window id of MDI frame window.

Returns: int

Returns non-zero value if this editor controls buffer type supports the hide_all_comments command.

Category:

Miscellaneous Functions


vsQhide_code_block_enabled

int VSAPI vsQhide_code_block_enabled(int wid)

Parameters:

wid - Window id of MDI frame window.

Returns: int

Returns non-zero value if this editor controls buffer type supports the hide_code_block command.

Category:

Selective Display Functions


vsQIdle

long VSAPI vsQIdle()

Returns: long

Returns the time in milliseconds since the last key or mouse event.

Category:

Keyboard Functions

See Also:

vsResetIdle


vsQInsertState

int VSAPI vsQInsertState(int wid, int Reserved=0)

Each text box has its own insert state. However, all edit windows and editor controls share the same insert state.

Parameters:

wid - Window id of object. 0 specifies the current object.

Returns: int

Returns non-zero value if insert is on.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

vsSetInsertState


vsQIntVar

int VSAPI vsQIntVar(VSPSZ pszVarName, int DefaultValue)

Parameters:

pszVarName - Global Slick-C® variable name.

DefaultValue - Value returned if variable is not found in names table.

Returns: int

Returns the value of the global Slick-C® variable name given. If the variable is not found, DefaultValue is returned.

Category:

Names Table Functions


vsQLastEvent

int VSAPI vsQLastEvent(int NewLastEvent=VSEV_NULL, int version=0)

Parameters:

NewLastEvent - If this is not VSEV_NULL, the last event is set to this value.

Returns: int

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.

Category:

Keyboard Functions

See Also:

vsCallKey, vsEvent2Name, vsEvent2Index, vsIndex2Event, vsEventTabIndex, vsSetEventTabIndex


vsQLastIndex

int VSAPI vsQLastIndex(char option)

Parameters:

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.

Returns: int

Returns a last index corresponding to option given.

Category:

Keyboard Functions

See Also:

vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsQLineFlags

int VSAPI vsQLineFlags(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsQLineLength

int VSAPI vsQLineLength(int wid, int IncludeNLChars)

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsQLineNumberFromOld

int VSAPI vsQLineNumberFromOld(int wid, int OldLineNumber)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

OldLineNumber - Old line number (VSP_OLDLINENUMBER).

Returns: int

Returns line number (VSP_LINE) corresponding to OldLineNumber.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQLineNumberFromReal

int VSAPI vsQLineNumberFromReal(int wid, int RealLineNumber)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

RealLineNumber - Real line number (VSP_RLINE).

Returns: int

Returns line number (VSP_LINE) corresponding to RealLineNumber.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQMaxTabCol

int VSAPI vsQMaxTabCol()

Returns: int

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.

Example:

 // 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.

Categories:

Edit Window Methods, Editor Control Methods


vsQmflast_enabled

int VSAPI vsQmflast_enabled()

Returns: int

Returns true if a menu item which executes the mflast command should be enabled.

Category:

Miscellaneous Functions


vsQOffset

long VSAPI vsQOffset(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: long

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.

Categories:

Edit Window Methods, Editor Control Methods


vsQOldLineNumberFromLine

int VSAPI vsQOldLineNumberFromLine(int wid, int LineNumber)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

LineNumber - Line number (VSP_LINE).

Returns: int

Returns old line number (VSP_OLDLINENUMBER) corresponding to LineNumber.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQPoint

void VSAPI vsQPoint(int wid, long *pPoint, long *pDownCount, char Option='P')

Parameters:

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'.

'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.
'L'
Sets pPoint to current line number. If the current line number is not known, pPoint is set to -1.

Categories:

Edit Window Methods, Editor Control Methods


vsQPrevIndex

int VSAPI vsQPrevIndex(char option)

Parameters:

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.

Returns: int

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;
     }

Category:

Keyboard Functions

See Also:

vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsQReadOnly

int vsQReadOnly(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: int

Returns 0 if editing is allowed for this buffer.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, vsQReadOnly


vsQRealLineNumberFromLine

int VSAPI vsQRealLineNumberFromLine(int wid, int LineNumber)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

LineNumber - Old line number (VSP_LINE).

Returns: int

Returns real line number (VSP_RLINE) corresponding to LineNumber.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQRefNextOccurrenceEnabled

int VSAPI vsQRefNextOccurrenceEnabled(int reserved=1)

Returns: int

Returns non-zero value if the find_next and find_prev commands are searching through symbol references.

Category:

Search Functions


vsQROffset

long VSAPI vsQROffset(int wid)

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: long

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.

Applies To:

Edit Window, Editor Control

Categories:

Editor Control Methods, Search Functions

See Also:

vsGoToPoint, vsQPoint, vsGoToROffset


vsQSelectedTextLength

int VSAPI vsQSelectedTextLength(int wid, int markid=-1, int flags=-1, const char *pEOLChars=0, int EOLCharsLen=-1)

Parameters:

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.

Returns: int

Returns the number of characters in the selected text. 0 is returned if there is no selection.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsGetSelectedText


vsQSelectType

int VSAPI vsQSelectType(int wid, int markid=-1, char option='T')

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsSetSelectType


vsQTaggingSupported

int VSAPI vsQTaggingSupported(int wid=0, VSPSZ lang=0)

Parameters:

wid - Window id of MDI frame window.

lang - (optional) language id

Returns: int

Returns non-zero value if this editor controls language mode supports tag navigation commands include show_procs, list_tags, next_proc, prev_proc, find_tag, and push_tag.

Category:

Tagging Functions


vsQTextWidth

int VSAPI vsQTextWidth(int wid, const char *pText, int TextLen)

Parameters:

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: int

Returns the display width of text string specified based on the current font. Return value is in the parent scale mode (p_xyscale_mode).

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


vsQuitView

void VSAPI vsQuitView(int wid)

This function has been deprecated. Use vsDeleteWindow() instead.

Parameters:

wid - Window id of object. 0 specifies the current object.

Applies To:

All Window Objects

Category:

Window Functions


vsQUndoStatus

int VSAPI vsQUndoStatus(int wid, char undo_option='U')

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsQvcadd_enabled

int VSAPI vsQvcadd_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcadd command should be enabled.

Category:

Version Control Functions


vsQvccheckin_enabled

int VSAPI vsQvccheckin_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vccheckin command should be enabled.

Category:

Version Control Functions


vsQvccheckout_enabled

int VSAPI vsQvccheckout_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vccheckout command should be enabled.

Category:

Version Control Functions


vsQvcdiff_enabled

int VSAPI vsQvcdiff_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcdiff command should be enabled.

Category:

Version Control Functions


vsQvcget_enabled

int VSAPI vsQvcget_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcget command should be enabled.

Category:

Version Control Functions


vsQvchistory_enabled

int VSAPI vsQvchistory_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vchistory command should be enabled.

Category:

Version Control Functions


vsQvclock_enabled

int VSAPI vsQvclock_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vclock command should be enabled.

Category:

Version Control Functions


vsQvcmanager_enabled

int VSAPI vsQvcmanager_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcmanager command should be enabled.

Category:

Version Control Functions


vsQvcproperties_enabled

int VSAPI vsQvcproperties_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcproperties command should be enabled.

Category:

Version Control Functions


vsQvcremove_enabled

int VSAPI vsQvcremove_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcremove command should be enabled.

Category:

Version Control Functions


vsQvcunlock_enabled

int VSAPI vsQvcunlock_enabled(int editorctl_wid)

Returns: int

Returns true if a menu item which executes the vcunlock command should be enabled.

Category:

Version Control Functions


vsRealloc

void*VSAPI vsRealloc(void *pBuf, int len)

Reallocates memory.

Parameters:

pBuf - Null pointer or pointer allocated by vsAlloc.

len - New allocation size for pBuf.

Returns: void*VSAPI

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.

Category:

Miscellaneous Functions

See Also:

vsFree, vsAlloc, vsFree, vsAlloc


vsRedrawFrame

void vsRedrawFrame(int wid)

Immediately redraws all non-client area decorations. On Unix, Shell window decorations are not redrawn.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

All Window Objects

Categories:

Edit Window Methods, Editor Control Methods


vsrefactor_copyright

void VSAPI vsrefactor_copyright()

Display the copyright notice for the vsrefactor.dll

Category:

Refactoring Functions


vsrefactor_finalize

void VSAPI vsrefactor_finalize()

Close all existing refactoring, and free all memory and files associated with the refactoring library.

Category:

Refactoring Functions


vsrefactor_initialize

int VSAPI vsrefactor_initialize()

Initialize the refactoring library.

Returns: int

0 on success, <0 on error.

Category:

Refactoring Functions


vsrefactor_version

void VSAPI vsrefactor_version()

Display the version of the vsrefactor.dll

Category:

Refactoring Functions


vsRefactorAddFile

int VSAPI vsRefactorAddFile(const int handle, const char *filename, const char *userIncludePath, const char *systemIncludePath, const char *defineOptions, const char *compilerConfig)

Add a file to the refactoring transaction.

Parameters:

handle - Handle to transaction

filename - Filename to add

userIncludePath - User include path for this file

systemIncludePath - System include path for this file

defineOptions - #defines and #undefs for this file

compilerConfig - Compiler configuration name

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorBeginTransaction

int VSAPI vsRefactorBeginTransaction()

Begin a refactoring transaction.

Returns: int

Handle to transaction on success (>= 0), <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorCommitTransaction, vsRefactorCancelTransaction


vsRefactorCAddClassInfo

int VSAPI vsRefactorCAddClassInfo(const int handle, const char *className, const char *filename, const unsigned int beginSeekPos, const unsigned int endSeekPos)

Add class browse info to transaction

Parameters:

handle - Handle to transaction

className - Class name

filename - Filename to find symbol in

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCancelTransaction

int VSAPI vsRefactorCancelTransaction(const int handle)

Cancel a refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorBeginTransaction, vsRefactorCommitTransaction


vsRefactorCEncapsulate

int VSAPI vsRefactorCEncapsulate(const int handle, const char *filename, const char *symbolName, const char *getterName, const char *setterName, const char *methodName, const unsigned int beginSeekPos, const unsigned int endSeekPos, int formattingFlags, int syntaxIndent)

Encapsulate a field. Make a field private and make public getter and setter functions.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to encapsulate

getterName - Name of getter function to create

setterName - Name of setter function to create

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

formattingFlags - Flags for how generated code should be formatted

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCExtractMethod

int VSAPI vsRefactorCExtractMethod(const int handle, const char *filename, const char *symbolName, int &createMethodCall, const unsigned int beginSeekPos, const unsigned int endSeekPos, char *returnType, const unsigned int returnTypeMaxLength, char *paramInfo, const unsigned int paramInfoMaxLength, const unsigned int flags, const unsigned int syntaxIndent)

Analyze what is necessary to do in order to extract the code between 'beginSeekPos' and 'endSeekPos' into a separate function and replace the code with a call to the mew function.

Each line of parameter inforomation is a string of the form:

   name [tab] return_type [tab] reference [tab] required [newline]

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to extract method from

createMethodCall - [output] < 0 if there is a problem creating a function call, 0 otherwise

beginSeekPos - Seek position to begin extraction at

endSeekPos - Seek position to end extraction at

returnType - [output] set to return type of function

returnTypeMaxLength - number of bytes allocated to returnType

paramInfo - [output] set to list of function parameters

paramInfoMaxLength - number of bytes allocated to paramInfo

flags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error. If paramInfoLen is not long enough, this method will return INSUFFICIENT_MEMORY_RC, you should allocate at least 4K to paramInfoLen.

Category:

Refactoring Functions


vsRefactorCGetSuperClasses

int VSAPI vsRefactorCGetSuperClasses(const int handle, const char *symbolName, const char *filename, const unsigned int beginSeekPos, const unsigned int endSeekPos, char *superClassInfo)

Get a list of the super classes that are associated with a given symbol's class

Parameters:

handle - Handle to transaction

symbolName - Name of function

filename - Name of file containing function

beginSeekPos - Seek position of beginning of function reference

endSeekPos - Seek position of end of function reference

superClasses - String containing all super classes deliminated with @ and starts with number of classes. superClasses is in the form: number of classes [@] super_class_name [@] parent_class_name [@] super_class_name [@] parent_class_name [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCGlobalToField

int VSAPI vsRefactorCGlobalToField(int handle, VSPSZ filename, VSPSZ symbolName, int beginSeekPos, int endSeekPos, VSPSZ szClassFileName, VSPSZ szClassName, VSPSZ szFieldName, int flags)

Convert global variable to a field

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to rename

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

szFieldName - Name of field

flags - Flags for access modifiers and make field static

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCLocalToField

int VSAPI vsRefactorCLocalToField(int handle, VSPSZ filename, VSPSZ symbolName, int beginSeekPos, int endSeekPos, VSPSZ szFieldName, int flags)

Convert local variable to a field

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to rename

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

szFieldName - Name of field

flags - Flags for access modifiers and make field static

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCModifyParams

int VSAPI vsRefactorCModifyParams(int handle, const char *symbolName, const char *filename, int beginSeekPos, int endSeekPos, const char *oldParamInfo, const char *newParamInfo)

Perform the modify parameters

Parameters:

handle - Handle to transaction

symbolName - Name of function

filename - Name of file containing function

beginSeekPos - Seek position of beginning of function reference

endSeekPos - Seek position of end of function reference

oldParamInfo - Original parameter info

newParamInfo - What the user wants to change the parameters too. paramInfo is in the form: number of parameters [@] return_type of function [$] original parameter position( 0..numParameters-1) [@] parameter type string [@] parameter name string [@] default value [@] 'has_refs' or 'no_refs' [@] 'old' or 'new' (whether the parameter originally existed or was added through modify_params [$] next parameter's values ( see above )

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCModifyParamsGetInfo

int VSAPI vsRefactorCModifyParamsGetInfo(int handle, const char *symbolName, const char *filename, int beginSeekPos, int endSeekPos, char *paramInfo)

Get the parameter info for a function

Parameters:

handle - Handle to transaction

symbolName - Name of function

filename - Name of file containing function

beginSeekPos - Seek position of beginning of function reference

endSeekPos - Seek position of end of function reference

paramInfo - String containing information about parameters paramInfo is in the form: number of parameters [@] return_type of function [$] original parameter position( 0..numParameters-1) [@] parameter type string [@] parameter name string [@] default value [@] 'has_refs' or 'no_refs' [@] 'old' or 'new' (whether the parameter originally existed or was added through modify_params [$] next parameter's values ( see above )

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCMoveField

int VSAPI vsRefactorCMoveField(const int handle, const char *filename, const char *symbolName, const char *className, const char *classFileName, const char *classDefFileName, const unsigned int beginSeekPos, const unsigned int endSeekPos)

Move a field. Move a static field from one class to another and fix all references.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to move

className - Name of class to move symbol to.

classFileName - File that contains the class declaration to move symbol to.

classDefFileName - File that contains the class definition to move symbol to.

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCMoveMethod

int VSAPI vsRefactorCMoveMethod(int nHandle, VSPSZ szSrcMethodName, VSPSZ szSrcClassName, VSPSZ szDstMethodName, VSPSZ szDstClassName, int nSrcIdx, int nDstIdx, char **files, int nFiles, int nReceiver, int nFlags)

Move a method. Move a method from one class to another and fix all references.

Parameters:

nHandle - Handle to transaction

szSrcMethodName - Name of method to move

szSrcClassName - Name of class to move method from.

szDstMethodName - Name of destination method

nReceiver - The index of the delegate chosen.

nFlags - Flags for access modifiers

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCommitTransaction

int VSAPI vsRefactorCommitTransaction(const int handle)

Commit a refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorBeginTransaction, vsRefactorCancelTransaction


vsRefactorConfigAdd

int VSAPI vsRefactorConfigAdd(const char *configName, const char *configHeader, const char *includePath)

Add a new C/C++ compiler configuration to the master refactoring configuration file.

Parameters:

configName - name for this configuration

configHeader - header file to configure the compiler

includePath - PATHSEP deliminated include file path

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigCount, vsRefactorConfigDelete, vsRefactorConfigDeleteAll, vsRefactorConfigGetName, vsRefactorConfigSetName, vsRefactorConfigGetHeader, vsRefactorConfigSetHeader, vsRefactorConfigCountIncludes, vsRefactorConfigGetInclude, vsRefactorConfigAddInclude, vsRefactorConfigDeleteInclude, vsRefactorConfigDeleteAllIncludes


vsRefactorConfigAddInclude

int VSAPI vsRefactorConfigAddInclude(const char *configName, const char *includePath, int includeIndex=-1)

Add a path to the include path

Parameters:

configName - name of configuration to modify

includePath - include path to add

includeIndex - where to insert path, -1 to insert at end of list

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCountIncludes, vsRefactorConfigDeleteInclude, vsRefactorConfigDeleteAllIncludes


vsRefactorConfigAddJAR

int VSAPI vsRefactorConfigAddJAR(const char *configName, const char *jarPath, int jarIndex=-1)

Add a jar to the system jars for a configuration

Parameters:

configName - name of configuration to modify

jarPath - jar to add

jarIndex - where to insert jar, -1 to insert at end of list

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigJavaAdd, vsRefactorConfigCountJARs, vsRefactorConfigDeleteJAR, vsRefactorConfigDeleteAllJARs


vsRefactorConfigClose

int VSAPI vsRefactorConfigClose()

Close the master refactoring [compiler] configuration file. If there are modifications, they will be discarded, unless you call vsRefactorConfigSave first.

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigOpen


vsRefactorConfigCount

int VSAPI vsRefactorConfigCount()

Return the number of compiler configurations stored in the master refactoring configuration file.

Returns: int

number of configurations, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigDelete, vsRefactorConfigDeleteAll


vsRefactorConfigCountIncludes

int VSAPI vsRefactorConfigCountIncludes(const char *configName)

Return the number of include paths associated with the given configuration.

Parameters:

configName - name of configuration to query

Returns: int

number of includes on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd


vsRefactorConfigCountJARs

int VSAPI vsRefactorConfigCountJARs(const char *configName)

Return the number of system jars associated with the given configuration.

Parameters:

configName - name of configuration to query

Returns: int

number of jars on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigJavaAdd


vsRefactorConfigDelete

int VSAPI vsRefactorConfigDelete(const char *configName)

Delete the named configuration

Parameters:

configName -

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigCount, vsRefactorConfigDeleteAll, vsRefactorConfigAdd


vsRefactorConfigDeleteAll

int VSAPI vsRefactorConfigDeleteAll()

Delete all configurations

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigDelete


vsRefactorConfigDeleteAllIncludes

int VSAPI vsRefactorConfigDeleteAllIncludes(const char *configName)

Delete all include paths from the given configuration.

Parameters:

configName - name of configuration to modify

Returns: int

0 on success, <0 on error

Category:

Tagging Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCountIncludes, vsRefactorConfigAddInclude, vsRefactorConfigDeleteInclude


vsRefactorConfigDeleteAllJARs

int VSAPI vsRefactorConfigDeleteAllJARs(const char *configName)

Delete all system jars from the given configuration.

Parameters:

configName - name of configuration to modify

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigJavaAdd, vsRefactorConfigCountJARs, vsRefactorConfigAddJAR, vsRefactorConfigDeleteJAR


vsRefactorConfigDeleteAllType

int VSAPI vsRefactorConfigDeleteAllType(const char *type)

Delete all configurations of specified type

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigDelete


vsRefactorConfigDeleteInclude

int VSAPI vsRefactorConfigDeleteInclude(const char *configName, const char *includePath)

Delete an include path from the given configuration.

Parameters:

configName - name of configuration to modify

includePath - include path to remove

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCountIncludes, vsRefactorConfigAddInclude, vsRefactorConfigDeleteAllIncludes


vsRefactorConfigDeleteJAR

int VSAPI vsRefactorConfigDeleteJAR(const char *configName, const char *jarPath)

Delete a jar from the given configuration.

Parameters:

configName - name of configuration to modify

jarPath - path to jar to remove

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigJavaAdd, vsRefactorConfigCountJARs, vsRefactorConfigAddJAR, vsRefactorConfigDeleteAllJARs


vsRefactorConfigGetHeader

int VSAPI vsRefactorConfigGetHeader(const char *configName, char *configHeader, int maxLength)

Retrieve the full path to the configuration header for the given configuration.

Parameters:

configName - name of configuration to query

configHeader - [reference] set to full path to configuration header

maxLength - length of configHeader buffer

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCount, vsRefactorConfigSetHeader


vsRefactorConfigGetInclude

int VSAPI vsRefactorConfigGetInclude(const char *configName, int includeIndex, char *includePath, int maxLength)

Get the full path to the specified include path

Parameters:

configName - name of configuration to query

includeIndex - index within include path to query

includePath - set to include path

maxLength - length of includePath buffer

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigAddInclude, vsRefactorConfigDeleteInclude, vsRefactorConfigDeleteAllIncludes


vsRefactorConfigGetJAR

int VSAPI vsRefactorConfigGetJAR(const char *configName, int jarIndex, char *jarPath, int maxLength)

Get the full path to the specified system jar

Parameters:

configName - name of configuration to query

jarIndex - index within include path to query

jarPath - set to jar path

maxLength - length of includePath buffer

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigAddJAR, vsRefactorConfigDeleteJAR, vsRefactorConfigDeleteAllJARs


vsRefactorConfigGetName

int VSAPI vsRefactorConfigGetName(int configIndex, char *configName, int maxLength)

Retrieve the name of the given configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configName - [reference] set to name of configuration

maxLength - length of the configName buffer

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCount, vsRefactorConfigSetName


vsRefactorConfigGetType

int VSAPI vsRefactorConfigGetType(int configIndex, char *configType, int maxLength)

Retrieve the type of the given configuration. Currently will return "c" for C/C++ and "java" for Java.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configName - [reference] set to name of configuration

maxLength - length of the configName buffer

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCount


vsRefactorConfigIsOpen

int VSAPI vsRefactorConfigIsOpen(VSPSZ xmlConfigFile)

See if the config file exists and is open

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigSave, vsRefactorConfigClose


vsRefactorConfigJavaAdd

int VSAPI vsRefactorConfigJavaAdd(const char *configName, const char *sourcePath, const char *jarPath)

Add a new java compiler configuration to the master refactoring configuration file.

Parameters:

configName - name for this configuration

sourcePath - root dir for this configuration

jarPath - PATHSEP deliminated list of the system jars

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigCount, vsRefactorConfigGetName, vsRefactorConfigSetName, vsRefactorConfigCountJARS, vsRefactorConfigGetJAR, vsRefactorConfigAddJAR, vsRefactorConfigDeleteJAR, vsRefactorConfigDeleteAllJARs


vsRefactorConfigOpen

int VSAPI vsRefactorConfigOpen(const char *xmlConfigFile)

Open the master refactoring [compiler] configuration file, either for reading or editing. The configuration file is an XML file conforming to vsrefactor.dtd.

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigSave, vsRefactorConfigClose


vsRefactorConfigSave

int VSAPI vsRefactorConfigSave(const char *xmlConfigFile=NULL)

Save the master refactoring [compiler] configuration file. An alternate configuration file path may be specified.

Parameters:

xmlConfigFile - Fully qualified path to XML configuration file

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigOpen, vsRefactorConfigClose


vsRefactorConfigSetHeader

int VSAPI vsRefactorConfigSetHeader(const char *configName, const char *configHeader)

Save the full path to the configuration header for the given configuration.

Parameters:

configName - name of configuration to query

configHeader - new path to configuration header

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCount, vsRefactorConfigGetHeader


vsRefactorConfigSetName

int VSAPI vsRefactorConfigSetName(int configIndex, const char *configName)

Rename the given configuration.

Parameters:

configIndex - index of configuration to query name of [0..n-1]

configName - new name of configuration

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsRefactorConfigAdd, vsRefactorConfigCount, vsRefactorConfigGetName


vsRefactorCountErrorFiles

int VSAPI vsRefactorCountErrorFiles(const int handle)

Get the number of files that were filed to parse in the refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCountErrors

int VSAPI vsRefactorCountErrors(const int handle, const char *filename=NULL)

Get the number of errors that are in the refactoring error log.

Parameters:

handle - Handle to transaction

filename - Filename of file that failed to parse

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCountModifiedFiles

int VSAPI vsRefactorCountModifiedFiles(const int handle)

Get the number of files that were modified in the refactoring transaction.

Parameters:

handle - Handle to transaction

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCParse

int VSAPI vsRefactorCParse(const int handle, const unsigned int flags)

Parse the files in the refactoring transaction

Parameters:

handle - Handle to transaction

flags - Optional flags

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCPreprocess

int VSAPI vsRefactorCPreprocess(const int handle, int wid, int addLineMarkers=1)

Parse the files in the refactoring transaction

Parameters:

handle - Handle to transaction

wid - Window to insert results into

addLineMarkers - Add #line markers

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCPullUp

int VSAPI vsRefactorCPullUp(const int handle, const char *filename, const char *className, const unsigned int beginSeekPos, const unsigned int endSeekPos, const char *superClass, const char *membersToMove, char *memberWorkingOn, const char *superClassDefFilename)

Pull Up class member(s) to a super class

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class

beginSeekPos - Seek position of beginning of class reference

endSeekPos - Seek position of end of class reference

superClass - Name of superclass to move symbol to

membersToMove - Members of class to move to superclass

memberWorkingOn - (out)This is used for errors. This is the member being worked when error occurs

superClassDefFilename - File to move function definiitions into. membersToMove is in the form: number of members [@] member [@] member [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCPullUpFindMembers

int VSAPI vsRefactorCPullUpFindMembers(const int handle, const char *filename, const char *symbolName, const unsigned int beginSeekPos, const unsigned int endSeekPos, const char *destClassName, char *members, const char *dependencyFiles)

Find the members of the given class and check for dependencies.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

beginSeekPos - Seek position of beginning of class reference.

endSeekPos - Seek position of end of class reference.

destClassName - Name of class to move members to.

members - (out)String containing members of class along with dependency information.

dependencyFiles - Files that contain function body definitions.

Returns: int

0 on success, <0 on error members is in the form: number of members [@] memberIndex [@] memberDescription [@] memberType [@] number of dependents [@] dependent index [@] isADependency(true or false) [@] dependentDescription [@] ... ... dependent index will be -1 if it is a global dependency that cannot be moved.

Category:

Refactoring Functions


vsRefactorCPushDown

int VSAPI vsRefactorCPushDown(const int handle, const char *filename, const char *className, const unsigned int beginSeekPos, const unsigned int endSeekPos, const char *derivedClass, const char *membersToMove, char *memberWorkingOn, const char *classDefInfoList, const char *origClassDefFiles)

Push Down class member(s) to a derived class

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class

beginSeekPos - Seek position of beginning of class reference

endSeekPos - Seek position of end of class reference

derivedClass - Name of derivedclass to move symbol to

membersToMove - Members of class to move to superclass

memberWorkingOn - (out)This is used for errors. This is the member being worked when error occurs

classDefInfoList - Classesand Files to move members to. Format: NumOfClasses @ className0 @ classFile0 @ classNameN @ classFileN @

origClassDefFiles - Format: NumOfFiles @ defFile0 @ defFileN @ membersToMove is in the form: number of members [@] member [@] member [@] ...

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCPushDownFindClassInFile

int VSAPI vsRefactorCPushDownFindClassInFile(const int handle, const char *className, const char *filename, int &foundClass)

Find a symbol with className in the compilation unit created by filename.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

found - (out)boolean indicating whether a symbol of className was found in the compilation unit created using filename.

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCPushDownFindMembers

int VSAPI vsRefactorCPushDownFindMembers(const int handle, const char *filename, const char *symbolName, const unsigned int beginSeekPos, const unsigned int endSeekPos, const char *destClassName, char *members, const char *dependencyFiles)

Find the members of the given class and check for dependencies.

Parameters:

handle - Handle to transaction

className - Name of class

filename - Name of file containing class.

beginSeekPos - Seek position of beginning of class reference.

endSeekPos - Seek position of end of class reference.

destClassName - Name of class to move members to.

members - (out)String containing members of class along with dependency information.

dependencyFiles - Files that contain function body definitions.

Returns: int

0 on success, <0 on error members is in the form: number of members [@] memberIndex [@] memberDescription [@] memberType [@] number of dependents [@] dependent index [@] isADependency(true or false) [@] dependentDescription [@] ... ... dependent index will be -1 if it is a global dependency that cannot be moved.

Category:

Refactoring Functions


vsRefactorCRename

int VSAPI vsRefactorCRename(const int handle, const char *filename, const char *symbolPath, const unsigned int beginSeekPos, const unsigned int endSeekPos, const char *newName, const unsigned int flags)

Rename a symbol

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name of symbol to rename

beginSeekPos - Seek position of symbol or position to start search

endSeekPos - Seek position to end symbol search (0 if begin is actual symbol)

newName - New name for symbol

flags - Optional flags

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCReplaceLiteral

int VSAPI vsRefactorCReplaceLiteral(const int handle, const char *filename, const char *literalName, const char *constantName, const unsigned int flags)

Replace a literal with a constant

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

literalName - Name of literal to convert to a constant

constantName - Name of constant variable

flags - Optional flags

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCStandardMethods

int VSAPI vsRefactorCStandardMethods(const int handle, const char *filename, const char *symbolName, int startSeekPos, int endSeekPos, char **className, int &existingClassMethods)

Analyzes a symbol to determine it's class and determine which of the standard methods are already implemented for that class.

Parameters:

handle - Handle to transaction

filename - Filename to find symbol in

symbolName - Name selected symbol

startSeekPos - Start seek position of symbol

endSeekPos - End seek position of symbol

className - Returns the name of the class that symbolName refers to

existingClassMethods - Returns flags indicating which methods are already implemented in the class. Uses bitset of VSREFACTOR_METHOD_* (above)

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorCStandardMethodsFinish

int VSAPI vsRefactorCStandardMethodsFinish(int handle, const char *filename, const char *symbolName, int startSeekPos, int endSeekPos, int methodsToCreate, int formattingFlags, int syntaxIndent)

Finish the create standard methods

Parameters:

handle - Handle to transaction

filename - Filename to do refactoring within

className - Name of class to add standard methods to

startSeekPos - Start seek position of symbol

endSeekPos - End seek position of symbol

methodsToCreate - Which methods to create, bitset of VSREFACTOR_METHOD_* (above)

formattingFlags - Optional flags, bitset of VSREFACTOR_FORMAT_* (above)

syntaxIndent - Syntax indent amount

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorFinalize

void VSAPI vsRefactorFinalize()

Close all existing refactoring, and free all memory and files associated with the refactoring library.

Category:

Refactoring Functions


vsRefactorGetError

int VSAPI vsRefactorGetError(const int handle, const char *filename, const int errorIndex, char *errorString, const int maxLength)

Get the specified error string from the refactoring transaction.

Parameters:

handle - Handle to transaction

filename - Filename of file that failed to parse

errorIndex - Index of error

errorString - Error string

maxLength - Maximum error string length

Returns: int

Length of error string on success, <0 on error

Category:

Refactoring Functions


vsRefactorGetErrorFileName

int VSAPI vsRefactorGetErrorFileName(const int handle, const int index, char *filename, const int maxLength)

Get the name of the file while failed to parse from the refactoring transaction.

Parameters:

handle - Handle to transaction

index - Index of file

filename - Filename of file that was modified

maxLength - Maximum filename length

Returns: int

Length of error string on success, <0 on error

Category:

Refactoring Functions


vsRefactorGetModifiedFileContents

int VSAPI vsRefactorGetModifiedFileContents(int wid, const int handle, const char *filename)

Get the contents of the modified file from the refactoring transaction and insert it into the given editor control.

Parameters:

wid - Editor control window ID

handle - Handle to transaction

filename - Filename of file that was modified

Returns: int

Length of error string on success, <0 on error

Category:

Refactoring Functions


vsRefactorGetModifiedFileName

int VSAPI vsRefactorGetModifiedFileName(const int handle, const int index, char *filename, const int maxLength)

Get the name of the modified file from the refactoring transaction.

Parameters:

handle - Handle to transaction

index - Index of file

filename - Filename of file that was modified

maxLength - Maximum filename length

Returns: int

Length of error string on success, <0 on error

Category:

Refactoring Functions


vsRefactorGetRText

int VSAPI vsRefactorGetRText(int wid, char *text, int textLen)

Get the entire source file text from the given editor control.

Parameters:

wid - Window ID

text - text to insert

textLen - number of bytes allocated to 'text'

Returns: int

number of bytes copied on success, if text is NULL, return the number of bytes required. If text is not NULL, but textLen is less than the buffer size, return INSUFFICIENT_MEMORY_RC.

Category:

Refactoring Functions

See Also:

vsInsertText


vsRefactorInitialize

int VSAPI vsRefactorInitialize()

Initialize the refactoring library.

Returns: int

0 on success, <0 on error.

Category:

Refactoring Functions


vsRefactorInsertText

int VSAPI vsRefactorInsertText(int wid, const char *text, int textLen)

Insert the given text into an editor control.

Parameters:

wid - Window ID

text - text to insert

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions

See Also:

vsInsertText


vsRefactorMessage

int VSAPI vsRefactorMessage(const char *message, bool isFilename=false)

Post a progress message while parsing or doing a refactoring operation.

Parameters:

message - Message to display.

isFilename - Is 'message' a file name?

Returns: int

0 on success, <0 on cancellation.

Category:

Refactoring Functions


vsRefactorProgress

int VSAPI vsRefactorProgress(int progress, int maximum)

Update the caller on our progress when doing a refactoring operation. If the progress callback returns < 0, it must indicate a cancellation.

Parameters:

progress - Progress factor between 0 .. maximum

maximum - Number that progress is computed relative to

Returns: int

0 on success, <0 on cancellation.

Category:

Refactoring Functions


vsRefactorRemoveFile

int VSAPI vsRefactorRemoveFile(const int handle, const char *filename)

Remove a file to the refactoring transaction.

Parameters:

handle - Handle to transaction

filename - Filename to add

Returns: int

0 on success, <0 on error

Category:

Refactoring Functions


vsRefactorSetModifiedFileContents

int VSAPI vsRefactorSetModifiedFileContents(int wid, const int handle, const char *filename)

Set the contents of the modified file from the given editor control and store it back with the refactoring transaction.

Parameters:

wid - Editor control window ID

handle - Handle to transaction

filename - Filename of file that was modified

Returns: int

Length of error string on success, <0 on error

Category:

Refactoring Functions


vsRefresh

void VSAPI vsRefresh(int wid=0, char Option='A')

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 SlickEdit objects are updated. This makes macros written for 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.

Parameters:

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. 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.

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Image Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


vsRegisterWindow

int VSAPI vsRegisterWindow(VSSYSHWND hwndframe, VSSYSHWND hwndclient, int oi=VSOI_FORM)

Registers a system window as a SlickEdit object. There are different reasons for registering form (outer) windows. One reason is so that a window created outside of SlickEdits dialog boxes will get disabled when 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.

Parameters:

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.

Returns: int

Returns window id of newly registered window.

Category:

Window Functions

See Also:

vsUnregisterWindow


vsRepeatSearch

int VSAPI vsRepeatSearch(int wid, const char *pszOptions=0, int StartCol=0)

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).

Parameters:

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 "SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-regular-expression
Specifies a word search and sets the default word characters to those matched by the SlickEdit- 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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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.

Returns: int

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);
        }

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsReplaceLine

int VSAPI vsReplaceLine(int wid, const char *pBuf, int BufLen=-1)

Sets the current line of the current buffer to pBuf.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsGetLine, vsInsertLine, vsDeleteLine


vsReplaceLineRaw

int VSAPI vsReplaceLineRaw(int wid, const char *pBuf, int BufLen=-1)

This function is identical to the vsReplaceLine function, except that the input string is in the same format as the internal buffer data which can be SBCS/DBCS or UTF-8. See "Unicode and SBCS/DBCS C API Programming".

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsResetIdle

void VSAPI vsResetIdle(int reserved=-1)

Resets SlickEdit's idle time count to 0. If an OEM does not call this function, 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:

(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_MOUSELASTX)
          ) {
         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
   // 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
   );
}

Category:

Keyboard Functions

See Also:

vsQIdle


vsResetModifiedLineFlags

void VSAPI vsResetModifiedLineFlags(int wid, int Reserved=0)

Turns off the VSLF_INSERTED_LINE and VSLF_MODIFY flags for all lines in the specified editor control.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsRestorePos

void VSAPI vsRestorePos(int wid, const VSSAVEPOS *pbuf)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pbuf - Structure initialized by vsSavePos.

Category:

CursorMovement Functions


vsRestorePos2

void VSAPI vsRestorePos2(int wid, int markid)

Restores the editor cursor position and scroll position information and frees the selection.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

mark_id - mark id allocated by vsSavePos2.

Category:

CursorMovement Functions


vsRestoreSearch

void VSAPI vsRestoreSearch(void *pvoid)

Restores search information saved by the vsSaveSearch function.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

See Also:

vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch


vsRubout

void VSAPI vsRubout(int wid, int Reserved=0)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods


vsSaveFile

int VSAPI vsSaveFile(int wid, const char *pszCmdLine)

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.

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.

Parameters:

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. 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.

Returns: int

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");

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsSavePos

void VSAPI vsSavePos(int wid, VSSAVEPOS *pbuf, int reserved=0)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pbuf - Structure filled in with editor cursor position and scroll position information.

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


vsSavePos2

void VSAPI vsSavePos2(int wid, int *pmarkid)

Saves the editor cursor position and scroll position information so that it can be restored later by vsRestorePos2. It is safe to make edits in between calls to vsSavePos2 and vsRestorePos2.

IMPORTANT: If you do not call vsRestorePos2, you need to call vsFreeSelection to free the selection allocated.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pmark_id - Ouput for mark id.

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods


vsSaveSearch

int VSAPI vsSaveSearch(void *pvoid=0)

Saves search information set by one of the functions vsSearch or vsRepeatSearch. Use vsRestoreSearch to restore the search information.

Returns: int

Returns number of bytes needed to be allocated to pvoid.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions, Search Functions

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)

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:

Parameters:

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 SlickEdit regular expression. See SlickEdit 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", "Options", "File Extension Setup...", select the Advanced tab).
W=SlickEdit-regular-expression
Specifies a word search and sets the default word characters to those matched by the SlickEdit- 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 or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
,
Delimiter 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.

Returns: int

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);

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsSearchInitSkipped

void VSAPI vsSearchInitSkipped(int reserved=0)

When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped if 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.

Applies To:

Edit Window

Category:

Search Functions


vsSearchPromptReplace

int VSAPI vsSearchPromptReplace(int wid, const char *pszFindString, const char *pszReplaceString, const char *pszOptions)

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.

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsCommandReplaceQNofChanges


vsSearchQNofSkipped

int VSAPI vsSearchQNofSkipped()

When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped if 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: int

Returns the number of replace operations that were skipped.

Applies To:

Edit Window

Category:

Search Functions


vsSearchQSkipped

char*VSAPI vsSearchQSkipped()

When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped if 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: char*VSAPI

Returns a space delimited list of line numbers where the replace operation that was skipped.

Applies To:

Edit Window

Category:

Search Functions


vsSearchReplace

int VSAPI vsSearchReplace(int wid, const char *pReplaceString, int ReplaceStringLen=-1, int RepeatSearch=0)

Replaces the match found by the last vsSearch or vsRepeatSearch with the replace string specified and optionally searches for the next occurrence.

Parameters:

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

Returns: int

Returns 0 if successful. Common return codes are BREAK_KEY_PRESSED_RC and STRING_NOT_FOUND_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSaveSearch, vsRestoreSearch


vsSelectBlock

int VSAPI vsSelectBlock(int wid, int markid=-1, int SelectFlags=0)

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsSelectChar, vsSelectLine


vsSelectChar

int VSAPI vsSelectChar(int wid, int markid=-1, int SelectFlags=0)

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsSelectBlock, vsSelectLine


vsSelectEditMode

void VSAPI vsSelectEditMode(int wid, const char *pszLangId=0, int reserved=0)

Deprecated. Use vsSetEditorLanguage().

Sets the language specific information such as tabs, margins, color coding, etc. to the specified language's options.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pszLangId - Language ID. See p_LangId. For list of language types, use our Language Options dialog ("Tools", "Options","Language Setup...").

Category:

Edit Window Methods


vsSelectLine

int VSAPI vsSelectLine(int wid, int markid=-1, int SelectFlags=0)

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.

Parameters:

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.

Returns: int

Returns 0 if successful. Possible returns are TEXT_NOT_SELECT_RC. and TEXT_ALREADY_SELECTED_RC.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsSelectChar, vsSelectLine


vsSelectMatch

int VSAPI vsSelectMatch(int wid, int markid=-1)

Uses the selection id specified to select the last string matched by one of the functions vsSearch or vsRepeatSearch.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Search Functions

See Also:

vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsSetAllOldLineNumbers

void VSAPI vsSetAllOldLineNumbers(int wid, int Reserved=1)

Sets all old line numbers for the current buffer to the line number. Use the vsGoToOldLineNumber method to go to an old line number. 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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsSetDefaultColor

int VSAPI vsSetDefaultColor(int cfgfield, int FGColor, int SetFGColor, int BGColor=0, int SetBGColor=0, int FontFlag=0, int SetFontFlag=0, int cfgParentColor=0, int SetParentColor=0)

Gets rgb color values (always in Windows format) and font style flag for the cfgfield specified.

Parameters:

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 - Set to one of the VSFONTFLAG_?? constants or 0.

SetFontFlag - Indicates whether to use FontFlag as new foreground color.

cfgParentColor - One of the VSCFG_??? constants or a color index allocated by vsAllocColor

SetParentColor - Indicates whether to use cfgParentColor as new parent color id.

Returns: int

Returns 0 if successful.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsAllocColor, vsFreeColor, vsSetTextColor, vsSetDefaultColor


vsSetDefaultExtensionInheritsFrom

void VSAPI vsSetDefaultExtensionInheritsFrom(const char *pszExtension, const char *pszInheritFrom)

Deprecated. Use vsSetLanguageInheritsFrom.

Allows you to create a language which has it's own set of options, but can inherit support callbacks from another language.

Parameters:

pszExtension - File extension. For list of file extension types, use our File Extension Manager dialog ("Tools", "Options...", "File Extension Manager")

pszInheritsFrom - pszExtension is set to inherit language specific callbacks from the language specified by pszInheritFrom.

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions

See Also:

vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsDeleteLanguageOptions, vsUpdateExistingBufferExtensionOptions, vsUpdateExistingBufferLanguageOptions, vsLanguageInheritsFrom, vsFindLanguageCallbackIndex


vsSetDefaultExtensionOptions

void VSAPI vsSetDefaultExtensionOptions(const char *pszLangId, const VS_LANGUAGE_OPTIONS *pLangOptions, int reserved=0, int version=VS_LANGUAGE_OPTIONS_VERSION)

Deprecated. Use vsSetDefaultLanguageOptions

Sets language specific options for a specific file extension.

Parameters:

pszExtension - File extension. For list of file extension types, use our File Extension Manager dialog ("Tools", "Options...", "File Extension Manager")

pLangOptions - New language specific options for pszExtension. Since all options are must be set, use the vsGetDefaultExtensionOptions first to query the existing value before setting new values.

reserved - unused

version - normally VS_LANGUAGE_OPTIONS_VERSION

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultExtensionOptions, vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsDeleteLanguageOptions, vsUpdateExistingBufferExtensionOptions, vsUpdateExistingBufferLanguageOptions


vsSetDefaultExtensionReferTo

void VSAPI vsSetDefaultExtensionReferTo(const char *pszExtension, const char *pszLangId)

Allows you to specify that a file extension is associated with the specified language. This information is used to determine what language mode to choose when a file with the given extension is opened.

Parameters:

pszExtension - File extension. For list of file extension types, use our Extension Manager dialog ("Tools", "Options...", "File Extension Manager").

pszLangId - Language ID (see p_LangId For list of language types, Language Options dialog ("Tools", "Options", "Language Setup...").

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultExtensionReferTo, vsSetDefaultLanguageOptions, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions


vsSetDefaultFont

int VSAPI vsSetDefaultFont(int field, char *pszFontName, int FontSizex10, int FontFlags, int CharSet=VSCHARSET_DEFAULT)

Sets font configuration for various SlickEdit objects.

Parameters:

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.

Returns: int

Returns 0 if parameters are valid.

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultFont, vsGetDefaultColor, vsSetDefaultColor


vsSetDefaultLanguageOptions

void VSAPI vsSetDefaultLanguageOptions(const char *pszLangId, const char *pszExtension, const VS_LANGUAGE_OPTIONS *pLangOptions, int version=VS_LANGUAGE_OPTIONS_VERSION)

Sets language specific options for a specific language.

Parameters:

pszLangId - File language ID (see p_LangId). For list of language types, use our Language Options dialog ("Tools", "Options", "Language Setup...")

pszExtension - File extension referred to pszLangId

pLangOptions - New language specific options. Since all options are must be set, use the vsGetDefaultLanguageOptions first to query the existing value before setting new values.

reserved - unused

version - normally VS_LANGUAGE_OPTIONS_VERSION

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultExtensionReferTo, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions


vsSetDefaultOption

int VSAPI vsSetDefaultOption(int option, int value)

Sets corresponding option.

Parameters:

option - See vsQDefaultOption.

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsSetDefaultOptionZ

int VSAPI vsSetDefaultOptionZ(int option, const char *pszResult)

Parameters:

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.

Returns: int

Returns 0 if arguments are valid.

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsSetEditorLanguage

void VSAPI vsSetEditorLanguage(int wid, const char *pszLangId=0, int reserved=0)

Sets the language specific information such as tabs, margins, color coding, etc. to the specified language's options.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pszLangId - Language ID. See p_LangId. For list of language types, use our Language Options dialog ("Tools", "Options","Language Setup...").

Category:

Edit Window Methods


vsSetEnv

int VSAPI vsSetEnv(const char *pszName, const char *pszValue)

Parameters:

pszName - Name of environment variable to set.

pszValue - Value of variable to set

Returns: int

0 if successful

Category:

Miscellaneous Functions

See Also:

vsSetEnv


vsSetEventTabIndex

int VSAPI vsSetEventTabIndex(int keytab_index, int key_index, int index, int version=0)

Set event binding.

Parameters:

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 - An event constant VSEV_??? from vsevents.h

index - Names table index. May be 0 to unbind key.

version - Must be 0.

Returns: int

Examples:

     static int VSAPI MyCommand()
     {
           vsMessageBox("Got here");
     }

     extern "C" int VSAPI vsDllInit()
     {
         vsLibExport("_command int MyCommand()",
                 0,0,
                                     MyCommand);
          // Bind this command to Shift+F12
          vsSetEventTabIndex(
                 vsQDefaultEventTab(),
                 VSEV_F12|VSEVFLAG_SHIFT,    // Shift+F12
                 vsFindIndex("MyCommand", VSTYPE_COMMAND));

     }

Category:

Keyboard Functions

See Also:

vsEvent2Name, vsEventTabIndex, vsQDefaultEventTab


vsSetEventTabRangeIndex

int VSAPI vsSetEventTabRangeIndex(int keytab_index, int event1, int event2, int index, int version=0)

Sets range of event bindings

Parameters:

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.

event1 - An event constant VSEV_??? from vsevents.h

event2 - An event constant VSEV_??? from vsevents.h

VSEV_RANGE_FIRST_CHAR_KEY
First character key. This is character code 0. No shift flags may be combined with this.
VSEV_RANGE_LAST_CHAR_KEY
Last character key. This is character code 0x1ffffff. No shift flags may be combined with this.
VSEV_RANGE_FIRST_NONCHAR_KEY
First non unicode character key. No shift flags may be combined with this.
VSEV_ALL_RANGE_LAST_NONCHAR_KEY
Last non unicode character key with all shift flags.
VSEV_RANGE_FIRST_MOUSE
First mouse event. Shift flags may be combined with this.
VSEV_RANGE_LAST_MOUSE
Last mouse event. Shift flags may be combined with this.
VSEV_ALL_RANGE_LAST_MOUSE
Last mouse event with all shift flags.
VSEV_RANGE_FIRST_ON
First ON event. No shift flags may be combined with this.
"VSEV_RANGE_LAST_ON
Last ON event. No shift flags may be combined with this.

index - Names table index. May be 0 to unbind key.

version - Must be 0.

Returns: int

Example:

static int VSAPI MyCommand()
{
   vsMessageBox("Got here");
}

extern "C" int VSAPI vsDllInit()
{
   vsLibExport("_command int MyCommand()",
           0,0,
           MyCommand);
   // Bind this command to a range of characters
   // ' ' - Last supported Unicode character
   vsSetEventTabRangeIndex(
          vsQDefaultEventTab(),
          VSEV_SPACE,
          VSEV_RANGE_LAST_CHAR_KEY,
          vsFindIndex("MyCommand", VSTYPE_COMMAND));

   // Unbind all character keys. This effects keys
   // like a-z, punctuation, and foreign language characters.
   // Keys like Alt+A which are not unicode characters are not effected.
   vsSetEventTabRangeIndex(
          vsQDefaultEventTab(),
          VSEV_RANGE_FIRST_CHAR_KEY,
          VSEV_RANGE_LAST_CHAR_KEY,
          0);

   // Unbind all non-character keys including keys like Enter,
   // Backspace, Ctrl+Shift+Alt+Enter, Alt+A
   vsSetEventTabRangeIndex(
          vsQDefaultEventTab(),
          VSEV_RANGE_NONFIRST_CHAR_KEY,
          VSEV_ALL_RANGE_NONLAST_CHAR_KEY,
          0);

   // Unbind all mouse events in any shift key combination.
   vsSetEventTabRangeIndex(
          vsQDefaultEventTab(),
          VSEV_RANGE_FIRST_MOUSE,
          VSEV_ALL_RANGE_LAST_MOUSE,
          0);

   // Unbind all Ctrl+mouse events.
   vsSetEventTabRangeIndex(
          vsQDefaultEventTab(),
          VSEV_RANGE_FIRST_MOUSE|VSEVFLAG_CTRL,
          VSEV_ALL_RANGE_LAST_MOUSE|VSEVFLAG_CTRL,
          0);

Category:

Keyboard Functions

See Also:

vsEvent2Name, vsEventTabIndex, vsQDefaultEventTab


vsSetFocus

void VSAPI vsSetFocus(int wid)

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.

Parameters:

wid - Window id of object to set focus to

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


vsSetFocus2

void VSAPI vsSetFocus2(int wid)

Sets focus to the object. This function does not call the VSINIT.pfnSetFocus call back.

Parameters:

wid - Window id of object to set focus to

Applies To:

All Window Objects

Categories:

Check Box Methods, Combo Box Methods, Command Button Methods, Directory List Box Methods, Drive List Methods, Edit Window Methods, Editor Control Methods, File List Box Methods, Form Methods, Frame Methods, Gauge Methods, Hscroll Bar Methods, Label Methods, List Box Methods, MDI Window Methods, Picture Box Methods, Radio Button Methods, Spin Methods, Text Box Methods, Vscroll Bar Methods


vsSetFocusToModalDialog

int VSAPI vsSetFocusToModalDialog()

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.

Returns: int

Returns non-zero value if focus was set to a modal dialog box.

Category:

Editor Control Functions


vsSetHelpFilename

void vsSetHelpFilename(char *pszFilename)

Parameters:

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.

Category:

Miscellaneous Functions


vsSetInsertState

void VSAPI vsSetInsertState(int wid, int state, int Reserved=0)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

State - New value for insert state.

Applies To:

Edit Window, Editor Control, Text Box, Combo Box

Categories:

Combo Box Methods, Edit Window Methods, Editor Control Methods, Text Box Methods

See Also:

vsQInsertState


vsSetLanguageInheritsFrom

void VSAPI vsSetLanguageInheritsFrom(const char *pszLangId, const char *pszParentLangId)

Allows you to create a language which has it's own set of options, but can inherit support callbacks from another language.

Parameters:

pszLangId - Language ID (see p_LangId For list of language types, Language Options dialog ("Tools", "Options", "Language Setup...").

pszParentLangId - pszLangId is set to inherit language specific callbacks from the language specified by pszParentLangId. If NULL, remove language inheritance for pszLangId.

Since:

13.0

Applies To:

Edit Window, Editor Control

Category:

Tagging Functions

See Also:

vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteLanguageOptions, vsUpdateExistingBufferLanguageOptions, vsLanguageInheritsFrom, vsFindLanguageCallbackIndex


vsSetLastIndex

void VSAPI vsSetLastIndex(char option, int index)

Parameters:

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.

Returns: void

Sets a last index corresponding to option given.

Category:

Keyboard Functions

See Also:

vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsSetLineFlags

void VSAPI vsSetLineFlags(int wid, int Flags, int Mask=0)

Sets the line status flags for the current line.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

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.

Mask - The Mask indicates which bits will be set according to Flags. If Mask is 0, Mask is set to the value of Flags.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsSetPrevIndex

void VSAPI vsSetPrevIndex(char option, int index)

Parameters:

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.

Returns: void

Returns a last index corresponding to option given.

Category:

Keyboard Functions

See Also:

vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsSetSelectType

int VSAPI vsSetSelectType(int wid, int markid, int type, char option='L')

This function changes the selection type for a specified selection handle.

Parameters:

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.

Returns: int

Returns 0 if the markid specified is valid. Otherwise a negative error code is returned.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions

See Also:

vsQSelectType


vsSetTextColor

void VSAPI vsSetTextColor(int wid, VSCOLORINDEX ColorIndex, int ColorLen, bool replacePreviousColor=true)

Copies color indexes for ColorLen characters of text starting from the cursor. A 0 color index indicates a null color.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

ColorIndex - 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.

ColorLen - Repeat the specified color for this many bytes. abs(ColorLen) times.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsAllocColor, vsFreeColor, vsSetDefaultColor, vsGetDefaultColor


vsSetTimeout

int VSAPI vsSetTimeout(int ms)

Set the timeout amount for performance critical functions. The timeout is not a strict timeout, it's a software timeout. Use _CheckTimeout() to test if the timeout is expired.

It is good practice to clear the timeout after you are done with it by calling _SetTimeout(0).

Parameters:

ms - number of milliseconds to time out after. use 0 to clear an existing timeout.

Returns: int

Normally will return 'ms', but if there is an existing earlier timeout, the earlier timeout will be returned.

Category:

Miscellaneous Functions


vsShiftSelectionLeft

void VSAPI vsShiftSelectionLeft(int wid, int markid=-1, int Reserved=1)

Deletes characters at left edge of marked area specified.

Parameters:

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsShiftSelectionRight

void VSAPI vsShiftSelectionRight(int wid, int markid=-1, int Reserved=1, unsigned char Reserved2=' ')

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsShowSelection

void VSAPI vsShowSelection(int wid, int markid)

Makes the mark corresponding to mark_id visible. Currently only one mark may be showing at a time.

Parameters:

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.

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsSortSelection

int VSAPI vsSortSelection(int wid, int markid, int SortFlags)

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.

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Selection Functions


vsSplitLine

int VSAPI vsSplitLine(int wid, int col=0)

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.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vsStickyMessage

void VSAPI vsStickyMessage(const char *psz)

psz is displayed on the message line.

Category:

Miscellaneous Functions

See Also:

vsMessage


vsStreamMarkerAdd

int VSAPI vsStreamMarkerAdd(int wid, long StartOffset, long Length, int isRealOffset, int BMIndex, int type, const char *pszMessage=0, void *pUserData=0, void *reserved=0)

Adds a new stream marker with an optional associated line picture. Stream markers are intended to be used for squiggly underline error markup, color markup, box markup, and focus rectangle markup. The number of lines in the file do not need to be calculated for this type of marker.

The draw box feature is not supported.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

StartOffset - Byte start offset of text in file

Length - Byte length of text

isRealOffset - When non-zero, indicates that StartOffset does NOT include lines with the NOSAVE VSLF_NOSAVE flag set. Note that lines with the VSLF_NOSAVE flag set are not saved with the file on disk.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap.

type - Type allocated by vsMarkerTypeAlloc().

pszMessage - Optional message to display as tooltip help when cursor is over the bitmap.

pUserData - Pointer to user data.

reserved -

Returns: int

Returns index of new stream marker.

Applies To:

Edit Window, Editor Control

Example:

   int type=vsMarkerTypeAlloc();
   vsMarkerTypeSetFlags(type,VSMARKERTYPEFLAG_DRAW_BOX|VSMARKERTYPEFLAG_AUTO_REMOVE|VSMARKERTYPEFLAG_UNDO);
   int wid=0; // current window which hopefully is and editor control.
   int StreamMarkerIndex=vsStreamMarkerAdd(
                 wid,
                 vsQOffset(wid),4,false,
                 vsFindIndex("_edplus.bmp",VSTYPE_PICTURE),type,"this is a test");
   vsStreamMarkerSetStyleColor(StreamMarkerIndex,0xff);

Category:

Marker Functions


vsStreamMarkerAddB

int VSAPI vsStreamMarkerAddB(const char *pszBufName, long StartOffset, long Length, int isRealOffset, int BMIndex, int type, const char *pszMessage, void *pUserData=0, void *reserved=0)

Adds a new stream marker with an optional associated line picture. Stream markers are intended to be used for squiggly underline error markup. The number of lines in the file do not need to be calculated for this type of marker.

The draw box feature is not supported.

Parameters:

pszBufName - Name of Buffer;

StartOffset - Byte start offset of text in file

Length - Byte length of text

isRealOffset - When non-zero, indicates that StartOffset does NOT include lines with the NOSAVE VSLF_NOSAVE flag set. Note that lines with the VSLF_NOSAVE flag set are not saved with the file on disk.

BMIndex - Bitmap to display at the line specified. Specify 0 for no bitmap.

type - Type allocated by vsMarkerTypeAlloc().

pszMessage - Optional message to display as tooltip help when cursor is over the bitmap.

pUserData - Pointer to user data.

reserved -

Returns: int

Returns index of new stream marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerAllocFindList

int*VSAPI vsStreamMarkerAllocFindList(int wid, int *pNofItems, long StartOffset, long Length, long SearchStartOffset=VSNULLSEEK, int type=0, int internalStartBlock=-1, long internalStartBlockPos_l=0)

Lists stream markers

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pNofItems - (output only, optional) Set to number of items in list.

StartOffset - Stream markers that intersect with StartOffset,StartOffset+Length are listed.

Length - Stream markers that intersect with StartOffset,StartOffset+Length are listed.

SearchStartOffset - For performance reasons, only Stream markers that start after SearchStartOffset are listed. By default, StartOffset-8000 is used. If performance is not a problem, you can specify 0. However, if there are 1 million stream markers, then each call requires 1 million stream markers to be checked and this can be SLOW. This optimization works well since it is reasonable to assume that this is less than one stream marker per byte in the file.

type -

internalStartBlockP1 - Editor block+1 or 0 to indicate null. This is offset by one for backward compatibility.

Returns: int*VSAPI

Returns list of stream markers indexes that intersect with StartOffset,StartOffset+Length. -1 is appended to the end of the list to indicate the end of the list. 0 is returned if no matches are found. Call vsFree to free the list.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerRemove

void VSAPI vsStreamMarkerRemove(int StreamMarkerIndex)

Removes stream marker.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerRemoveAllBMIndex

void VSAPI vsStreamMarkerRemoveAllBMIndex(int BMIndex)

Removes all stream markers that have the specified BMIndex.

Parameters:

BMIndex - Index of bitmap in names table.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerRemoveAllType

void VSAPI vsStreamMarkerRemoveAllType(int type)

Removes all stream markers that have the specified type.

Parameters:

type - Type of marker

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerRemoveType

void VSAPI vsStreamMarkerRemoveType(int wid, int type)

Removes all stream markers for the specified editor control that have the specified type.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

type - Type of marker.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetLength

void VSAPI vsStreamMarkerSetLength(int StreamMarkerIndex, long Length)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

Length - Replace Length of this stream marker with the new Length

Returns: void

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetMessage

void VSAPI vsStreamMarkerSetMessage(int StreamMarkerIndex, char *pszMessage)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

pszMessage - Replace message.

Returns: void

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetMousePointer

void VSAPI vsStreamMarkerSetMousePointer(int StreamMarkerIndex, int MousePointer)

Sets the mouse pointer for the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

MousePointer - Index to mouse pointer. One of VSMP_ constants.

Applies To:

Edit Window, Editor Control

Categories:

Marker Functions, Mouse Functions


vsStreamMarkerSetStartOffset

void VSAPI vsStreamMarkerSetStartOffset(int StreamMarkerIndex, long StartOffset)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

Length - Replace StartOffset of this stream marker with the StartOffset

Returns: void

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetStyleColor

void VSAPI vsStreamMarkerSetStyleColor(int StreamMarkerIndex, int RGBColor)

Sets the RBG box color or squiggly line color for the stream marker specified..

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

RGBColor - RGB color

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetTextColor

void VSAPI vsStreamMarkerSetTextColor(int StreamMarkerIndex, VSCOLORINDEX ColorIndex, int reserved=0)

Sets the color index for the text in the stream marker specified.

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

ColorIndex - Index of color allocated by vsAllocColor(). Specify 0 for no color (null).

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetType

void VSAPI vsStreamMarkerSetType(int StreamMarkerIndex, int type)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

pszMessage - Replace marker type.

Returns: void

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStreamMarkerSetUserData

int VSAPI vsStreamMarkerSetUserData(int StreamMarkerIndex, void *pUserData)

Parameters:

StreamMarkerIndex - Index of stream marker returned by a vsStreamMarkerAdd function.

Length - Replace StartOffset of this stream marker with the StartOffset

Returns: int

0 if stream marker index is valid.

Applies To:

Edit Window, Editor Control

Category:

Marker Functions


vsStrLastPos

int VSAPI vsStrLastPos(const char *pSearchFor, int SearchForLen, const char *pBuf, int BufLen, int start, int SearchFlags)

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.

Parameters:

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 first character.

SearchFlags - One or more of the following flags:

  • VSSTRPOSFLAG_IGNORE_CASE -- Case insensitive search.
  • VSSTRPOSFLAG_RE -- SlickEdit regular expression search. See help on SlickEdit Regular Expressions.
  • VSSTRPOSFLAG_WORD -- Reserved for future used.
  • VSSTRPOSFLAG_UNIXRE -- UNIX regular expression search. See UNIX Regular Expressions.
  • VSSTRPOSFLAG_BINARY -- Binary search. This allows start positions in the middle of a DBCS or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
  • VSSTRPOSFLAG_ACP -- Specifies that pSearchFor and pBuf contain active code page data and that an SBCS/DBCS mode search should be performed. This flag is ignored if Unicode support is not active.
  • VSSTRPOSFLAG_BRIEFRE -- Brief regular expression search. See help on Brief Regular Expressions.
  • VSSTRPOSFLAG_WILDCARDS -- Wildcards expression search. See help on Wildcard Expressions

Example:

See vsStrPos for an example.

Category:

String Functions

See Also:

vsStrPos, vsStrPosMatchLength, vsStrPosMatchStart, vsStrPosGetFlags


vsStrPos

int VSAPI vsStrPos(const char *pSearchFor, int SearchForLen, const char *pBuf, int BufLen, int start, int SearchFlags)

Parameters:

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
SlickEdit regular expression search. See SlickEdit Regular Expressions.
VSSTRPOSFLAG_WORD
Reserved for future used.
VSSTRPOSFLAG_UNIXRE
UNIX regular expression search. See UNIX Regular Expressions.
VSSTRPOSFLAG_BINARY
Binary search. This allows start positions in the middle of a DBCS or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
VSSTRPOSFLAG_ACP
Specifies that pSearchFor and pBuf contain active code page data and that an SBCS/DBCS mode search should be performed. This flag is ignored if Unicode support is not active.
VSSTRPOSFLAG_BRIEFRE
Brief regular expression search. See Brief Regular Expressions.
VSSTRPOSFLAG_WILDCARDS
Wildcards expression search. See Wildcard Expressions.

Returns: int

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 SlickEdit 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_UNIXR
E);
   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");
   }

Category:

String Functions

See Also:

vsStrLastPos, vsStrPosMatchLength, vsStrPosMatchStart


vsStrPosGetFlags

int VSAPI vsStrPosGetFlags(const char *char_flags)

Translate the string-style search arguments to vsStrPos() style arguments.

Parameters:

pSearchFlags - One or more of the flags supported by pos.

Returns: int

Bitset of VSSTRPOSFLAG_* flags required by by vsStrPos and vsStrLastPos.

Category:

String Functions

See Also:

vsStrPos, vsStrLastPos


vsStrPosMatchLength

int VSAPI vsStrPosMatchLength(int MatchGroup)

Parameters:

TaggedExpression - Tagged expression number.

Returns: int

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.

For SlickEdit 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.

Example:

See vsStrPos for an example.

Category:

String Functions

See Also:

vsStrPos, vsStrLastPos, vsStrPosMatchStart


vsStrPosMatchStart

int VSAPI vsStrPosMatchStart(int MatchGroup)

Parameters:

TaggedExpression - Tagged expression number. For SlickEdit 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: int

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.

For SlickEdit 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.

Example:

See vsStrPos for an example.

Category:

String Functions

See Also:

vsStrPos, vsStrLastPos, vsStrPosMatchLength


vsStrRev

char*VSAPI vsStrRev(char *pString, int StringLen=-1, int utf8=-1)

Reverse characters in string.

Parameters:

pString - Input string.

StringLen - Number of bytes in pString. If pString is null terminated, you can specify -1 for the length of string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that the input and output string are SBCS/DBCS. 1 specifies that the input and output string are UTF-8.

Categories:

String Functions, Unicode Functions


vsStrTranslate

int VSAPI vsStrTranslate(char *pOutput, int OutputLen, int *pBytesRequired, const char *pInputStr, int InputLen, const char *pReplaceStr, int ReplaceLen, const char *pSearchStr, int SearchLen, int SearchFlags=0)

Parameters:

pOutput - (output) Character array to copy output to.

OutputLen - Number of bytes allocated to output array.

pBytesRequired - Number of bytes required for pOutput (can be NULL).

pInputStr - Input string to translate.

InputLen - Length of input string, -1 if null-terminated.

pReplaceStr - String to replace search matches with.

ReplaceLen - Length of replace string, -1 if null- terminated.

pSearchStr - String to search for.

SearchLen - Length of search string, -1 if null- terminated.

SearchFlags - One or more of the following flags:

VSSTRPOSFLAG_IGNORE_CASE
Case insensitive search.
VSSTRPOSFLAG_RE
SlickEdit regular expression search. See SlickEdit Regular Expressions.
VSSTRPOSFLAG_WORD
Reserved for future used.
VSSTRPOSFLAG_UNIXRE
UNIX regular expression search. See UNIX Regular Expressions.
VSSTRPOSFLAG_BINARY
Binary search. This allows start positions in the middle of a DBCS or UTF-8 character. This option is useful when editing binary files (in SBCS/DBCS mode) 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.
VSSTRPOSFLAG_ACP
Specifies that pSearchFor and pBuf contain active code page data and that an SBCS/DBCS mode search should be performed. This flag is ignored if Unicode support is not active.
VSSTRPOSFLAG_BRIEFRE
Brief regular expression search. See Brief Regular Expressions.
VSSTRPOSFLAG_WILDCARDS
Wildcards expression search. See Wildcard Expressions.

Returns: int

Returns pInputStr with all occurrences of pSearchStr replaced with pReplaceStr. See vsStrPos function for information on valid search options.

Category:

String Functions

See Also:

vsStrPos, vsStrPosGetFlags


vsTagCheckForPackage

int vsTagCheckForPackage(const char *symbol, VSHREFVAR tag_files, int exact_match, int case_sensitive, char *aliased_to=0, int aliased_to_len=0)

Look up 'symbol' and see if it is a package, namespace, module or unit.

For synchronization, threads should perform a tag_lock_context(false) and tag_lock_matches(true) prior to invoking this function.

Parameters:

symbol - current symbol to look for

tag_files - (reference to _str[]) list of tag files to search

exact_match - look for exact match rather than prefix match

case_sensitive - case sensitive comparison?

aliased_to - set to namespace alias name, if applicable

aliased_to_len - number of bytes allocated to 'aliased_to'

Returns: int

>0 if 'symbol' or prefix of matches package, otherwise returns 0. A value of 1 indicates the item was found in a tag file, a value of greater than 1 indicates that that item was found in the context.

Category:

Tagging Functions


vsTagCheckFriendRelationship

bool VSAPI vsTagCheckFriendRelationship(const char *szClassName, const char *szFriendList)

Parameters:

szClassName - class which tag is coming from

szFriendList - list of classes that are friendly to our context

Returns: bool

Returns true if the given given class is among the friends on the given friend list. Otherwise it returns false. Since this language feature is specific to C++, the check is always case sensitive.

Category:

Tagging Functions

See Also:

vsTagFindFriendsToTag, vsTagFindFriendsOfClass


vsTagCloseDB

int VSAPI vsTagCloseDB(const char *pszFilename=0, int leave_open=0)

Close the current database.

Parameters:

pszFilename - (optional) File path of database to close.

leave_open - (optional) If true, do not really close the file, instead flush the buffer if open read-write, then leave the file open read-only.

Returns: int

database handle >= 0 on success, < 0 on error.

Category:

Tagging Functions


vsTagComposeTag

void VSAPI vsTagComposeTag(char *proc_name, int proc_name_max, const char *tag_name, const char *class_name, const char *type_name, int tag_flags=0, const char *signature=0, const char *return_type=0, const char *template_signature=0)

Create the canonical tag display string of the form:

   tag_name(class_name:type_name)flags(signature)return_type

This is used to speed up find-tag and maketags for languages that do not insert tags from DLLs.

Parameters:

proc_name - output string for "composed" tag

proc_name_max - number of bytes allocated to proc_name

tag_name - the name of the tag

class_name - class/container the tag belongs to

type_name - the tag type, (see VS_TAGTYPE_*)

tag_flags - (optional) integer tag flags (see VS_TAGFLAG_*)

signature - (optional) function signature

return_type - (optional) function return type

template_signature - (optional) template signature

Returns: void

nothing.

Category:

Tagging Functions


vsTagContextMatchOccurrence

int VSAPI vsTagContextMatchOccurrence(VSHREFVAR errorArgs, const char *file_name, int rseekpos, const char *tag_name, int case_sensitive, int &num_matches, int max_matches=VS_TAG_MAX_MATCHES)

Use context_match_tags to locate the tag matches for the occurrence in the given file at the given seek position. If the seek position is 0, then use the current buffer, otherwise, open the given file in a temporary view and seek to the given position.

Parameters:

errorArgs - Array of strings for return code

file_name - Path of file occurrence is located in

rseekpos - Real seek position of occurrence

tag_name - Name of occurrence to match against

case_sensitive - Case sensitive tag search?

num_matches - (output) number of matches found

max_matches - maximum number of matches to find

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagContextMatchTags

int VSAPI vsTagContextMatchTags(VSHREFVAR errorArgs, char *tag_name, int max_tag_name, int exact_match, int case_sensitive, int find_parents, int &num_matches, int max_matches=VS_TAG_MAX_MATCHES, int filter_flags=VS_TAGFILTER_ANYTHING, int context_flags=VS_TAGCONTEXT_ALLOW_locals, VSHREFVAR visited=0, int depth=0)

The current object must be an editor control positioned on the tag that you wish to find matches for, with the edit mode selected.

Parameters:

errorArgs - Array of strings for return code

tag_name - Name of occurrence to match against

max_tag_name - Amount of space allocated to tag_name

exact_match - Exact match or prefix match?

case_sensitive - Case sensitive tag search?

find_parents - Find instances of the tag in parent classes

num_matches - (output) number of matches found

max_matches - maximum number of matches to find

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagCreateDB

int VSAPI vsTagCreateDB(const char *pszFilename)

Create a tags database, with standard tables, index, and types.

Parameters:

pszFilename - File path where to create new database. If the file already exists, it will be truncated.

Returns: int

database handle >= 0 on success, < 0 on error.

Category:

Tagging Functions


vsTagDecomposeTag

int VSAPI vsTagDecomposeTag(const char *pszProcName, char *pszTagName, char *pszClassName, char *pszTypeName, int &tag_flags, char *pszSignature=0, char *pszReturnType=0, char *pszTmplSignature=0)

Decompose the canonical tag display string of the form:

   tag_name(class_name:type_name)flags(signature)return_type

This is used to speed up find-tag and maketags for languages that do not insert tags from DLLs. All output strings are set to the empty string if they do not match, tag_flags is set to 0 if there is no match.

Parameters:

pszProcName - tag display string

pszTagName - (reference) the name of the tag

pszClassName - (reference) class/container the tag belongs to

pszTypeName - (reference) the tag type, (see VS_TAGTYPE_*)

tag_flags - (reference) integer tag flags (see VS_TAGFLAG_*)

pszSignature - (optional reference) arguments/signature of tag

pszReturnType - (optional reference) return type / value of tag

pszTmplSignature - (optional) template signature

Returns: int

0 on success.

Category:

Tagging Functions


vsTagEmbeddedEnd

void VSAPI vsTagEmbeddedEnd(VSHREFVAR orig_values)

If we are in embedded mode, leave it, and restore the embedded mode back to what it was before.

Parameters:

orig_values - HVAR used to restore the original mode.

Category:

Tagging Functions

See Also:

vsTagEmbeddedStart()


vsTagEmbeddedStart

int VSAPI vsTagEmbeddedStart(VSHREFVAR orig_values)

Check if we are in an embedded context and enter embedded language mode if necessary.

Parameters:

orig_values - HVAR used to save the original mode name extension, and related information.

Returns: int

  • 0 -- Returns 0 if there is no embedded language
  • 1 -- Return 1, indicates that the mode has been switch to the embedded language. Caller must call vsTagEmbeddedEnd(orig_values)
  • 2 -- Returns 2 to indicate that there is embedded language code, but in comment/in string like default processing should be performed.
  • 3 -- Returns 3 if mode name is the same.

Category:

Tagging Functions

See Also:

vsTagEmbeddedEnd()


vsTagExtInheritsFrom

int VSAPI vsTagExtInheritsFrom(const char *parent, const char *lang=0)

Deprecated. use vsLanguageInheritsFrom()

Does the current source language match or inherit from the given language?

If 'lang' is not specified, the current object must be an editor control.

Parameters:

parent - extension to compare to

lang - current source language (default=p_LangId)

Returns: int

'true' if the extension matches, 'false' otherwise.

Category:

Tagging Functions


vsTagFindClass

int VSAPI vsTagFindClass(char *pszClassName, const char *pszSearch=0, int normalize=0, int case_sensitive=1, int find_first=1, const char *cur_class_name=0)

Return the first class name in the database, matching 'search_class', normalize the class name if necessary (find the class/package scope that this class belongs to). If (normalize==1) attempt to normalize the class name, finding a package scope that this class could belong to.

Parameters:

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 NULL

normalize - attempt to normalize class name found?

case_sensitive - case sensitive search?

find_first - find first match or next match

cur_class_name - name of current class context

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagFindClosest

int VSAPI vsTagFindClosest(const char *pszTagName, const char *pszFilename, int line_no, int case_sensitive=0)

Retrieve tag in the given file closest to the given line number. Use vsTagGetTagInfo to extract the details about the tag.

Parameters:

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 - case sensitive tag name comparison?

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions


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)

Retrieve the first tag with the given tag name or tag name prefix. Use vsTagGetTagInfo to extract the details about the tag.

Parameters:

pszTagName - Name of tag 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 - (optional) default search is case-insensitive.

find_first - (optional) find first match, or next match

skip_duplicates - (optional) skip duplicate tags

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions


vsTagFindExtCallback

int VSAPI vsTagFindExtCallback(const char *callback_name, const char *language_id=0)

Deprecated. use vsFindLanguageCallbackIndex()

This function is used to look up a language-specific callback function.

Return the names table index for the callback function for the current language, or an inherited language. The current object should be an editor control.

Parameters:

callback_name - name of callback to look up, with a '%s' marker in place where the language ID would be normally located.

ext - current language ID (default=p_LangId)

Returns: int

Names table index for the callback. 0 if the callback is not found or not callable.

Category:

Tagging Functions


vsTagFindExtension

int VSAPI vsTagFindExtension(char *pszLangId, const char *pszSearchFor=0, int find_first=1)

Deprecated. Use vsTagFindLanguage

Retrieve an language ID from the language name table. This function has the side effect of positioning the language iterator on the given language type, and may be used to test the existence of a language type in the database.

Parameters:

pszLangId - Language ID found

pszSearchFor - Language ID to search for

pszFindFirst - Find first language, or find next?

Returns: int

0 on success, <0 on error, BT_RECORD_NOT_FOUND_RC if the language is not found.

Category:

Tagging Functions


vsTagFindFile

int VSAPI vsTagFindFile(char *pszFilename, const char *pszPrefix=0, int find_first=1)

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.

Parameters:

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 natch?

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions


vsTagFindFriendsOfClass

int VSAPI vsTagFindFriendsOfClass(const char *szClassName, VSHREFVAR tag_files, char *szFriendList, int maxFriendList)

Find all the friends of the given class in the current context and tag files.

Parameters:

szClassName - class to find friends of

tag_files - list of tag files to search

szFriendList - (reference) set to list of friends, separated by VS_TAGSEPARATOR_parents

maxFriendList - number of bytes allocated to szFriendList

Returns: int

0 on success, <0 on error. Having no friends is considered as a success.

Category:

Tagging Functions

See Also:

vsTagListSymbolsInClass, vsTagCheckFriendRelationship


vsTagFindFriendsToTag

int VSAPI vsTagFindFriendsToTag(const char *szCurTagName, const char *szClassName, VSHREFVAR tag_files, char *szFriendList, int maxFriendList)

Find all the classes which are friendly towards the given tag name or it's class or outer classes.

Parameters:

szCurTagName - tag to find friends to

szCurClassName - class to find friends to

tag_files - list of tag files to search

szFriendList - (reference) set to list of friends, separated by VS_TAGSEPARATOR_parents

maxFriendList - number of bytes allocated to szFriendList

Returns: int

0 on success, <0 on error. Having no friends is considered as a success.

Category:

Tagging Functions

See Also:

vsTagListSymbolsInClass, vsTagCheckFriendRelationship


vsTagFindGlobal

int VSAPI vsTagFindGlobal(int type_id, int mask=0, int nzero=0, int find_first=1)

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 vsTagGetInfo and/or vsTagGetDetail to extract the details about the tag.

Parameters:

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

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Example:

find the first inline global function.

     vsTagFindGlobalOfType(VS_TAGTYPE_function, VS_TAGFLAG_inline, 1);

Category:

Tagging Functions


vsTagFindIncludedBy

int VSAPI vsTagFindIncludedBy(const char *pszFileName, int find_first, char *pszIncludedBy, int included_max)

Retrieve the name of a file that includes 'pszFileName'.

Parameters:

pszFileName - name of included file

find_first - find first item, or next

pszIncludedBy - (reference) set to name of included file

included_max - size of buffer for 'pszIncluded'

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagFindIncludeFile

int VSAPI vsTagFindIncludeFile(const char *pszFilename, int find_first, char *pszIncludeName, int include_max)

Retrieve the name of the first file included by 'pszFileName'.

Parameters:

pszFilename - "outer" filename, for example, src.jar

find_first - Find first included file, or find next?

pszIncludeName - (reference) pointer to buffer to copy include file name into

include_max - size of buffer for 'pszIncludeName'

Returns: int

0 on sucess, <0 on error.

Category:

Tagging Functions


vsTagFindInFile

int VSAPI vsTagFindInFile(const char *pszFilename, int find_first=1)

Find the first tag in the given file. Tags are returned unsorted. Use vsTagGetTagInfo to extract the details about the tag.

Parameters:

pszFilename - File name as stored in database.

find_first - find first match or next match

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions


vsTagFindLanguage

int VSAPI vsTagFindLanguage(char *pszLangId, const char *pszSearchFor=0, int find_first=1)

Retrieve a language ID from the language name table. This function has the side effect of positioning the language iterator on the given language type, and may be used to test the existence of a language type in the database.

Parameters:

pszLangId - Language ID found

pszSearchFor - Language ID to search for

pszFindFirst - Find first language, or find next?

Returns: int

0 on success, <0 on error, BT_RECORD_NOT_FOUND_RC if the language is not found.

Category:

Tagging Functions


vsTagFindMember

int VSAPI vsTagFindMember(const char *pszClassName, const char *pszFilename=0, int find_first=1)

Retrieve the first tag included in this tag database which belongs to the given class name, and if specified, comes from the given file. Use vsTagGetInfo and/or vsTagGetDetail to extract the details about the tag.

Parameters:

pszClassName - Class name to search for members of

pszFilename - (optional), tag must come from this file name

find_first - find first match or next match

Returns: int

0 on success, <0 on error, BT_RECORD_NOT_FOUND_RC if not found.

Category:

Tagging Functions


vsTagFindOccurrence

int VSAPI vsTagFindOccurrence(const char *tag_name, int exact_match=0, int case_sensitive=0, int find_first=1)

Find the first/next occurrence with the given tag name or tag prefix. Use tag_get_occurrence (below) to get details about the occurrence.

Parameters:

tag_name - Tag name or prefix to search for

exact_match - Exact (word) match or prefix match (0)

case_sensitive - Case sensitive search?

find_first - find first match or next match?

Returns: int

0 on success, BT_RECORD_NOT_FOUND_RC if not found, <0 on error.

Category:

Tagging Functions


vsTagFindRegex

int VSAPI vsTagFindRegex(const char *pszTagRegex, const char *pszSearchOptions=0, int find_first=1)

Starting with the currently selected tag, compare the tag name with the given regular expression.

Parameters:

pszTagRegex - regular expression to search for tags matching

pszSearchOptions - search options, passed to vsStrPos()

find_first - find first match or next match

Returns: int

0 if a match is found, <0 on error or not found.

Category:

Tagging Functions


vsTagFindTag

int VSAPI vsTagFindTag(const char *pszTagName, int type_id, const char *pszClassName=0, int find_first=1, const char *signature=0)

Find the first tag with the given, name, type and class.

Parameters:

pszTagName - tag name to find, exact match

type_id - tag type to search for tag_name having (VS_TAGTYPE_*)

pszClassName - class name to search for tag_name having

find_first - find first match, or next match

signature - function signature, ignored if no match found

Returns: int

0 on success, <0 on error or not found.

Category:

Tagging Functions


vsTagGetBitmap

int VSAPI vsTagGetBitmap(int filter_flags_1, int filter_flags_2, const char *type_name, const char *class_name, int tag_flags, int &leaf_flag, int &pic_member)

Simple to use, but very fast entry point for selecting the bitmap to be displayed in the tree control corresponding to the given tag information. You must call tag_tree_prepare_expand() prior to calling this function.

Parameters:

filter_flags_1 - first part of class browser filter flags

filter_flags_2 - second part of class browser filter flags

type_name - tag type name

class_name - tag class name, just checked for null/empty

tag_flags - tag flags, bitset of VS_TAGFLAG_

leaf_flag - (reference) -1 implies leaf item, 0 or 1 container

pic_member - (reference) set to picture index of bitmap

Returns: int

0 on success, <0 on error, >0 if filtered out.

Category:

Tagging Functions


vsTagGetClassParents

const char**VSAPI vsTagGetClassParents(const char *pszClassName)

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.

Parameters:

pszClassName - 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.

Returns: const char**VSAPI

0 on failure, otherwise it returns the list of parent classes. Note that the list returned is allocated statically, and NULL terminated.

Category:

Tagging Functions


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, char *pszClassParents=0, char *pszTmplSignature=0)

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.

For synchronization, threads should perform a tag_lock_context(false) prior to invoking this function.

Parameters:

context_id - Unique ID of context item, 1..num_of_context

pszTagName - (Output, required) Name of tag or symbol

pszTypeName - (Output, optional) Tag type name, see tag_get_type.

tag_flags - (Output) Tag flags indicating symbol attributes, VS_TAGFLAG_

pszFilename - (Output, optional) File name as stored in database.

start_line_no - (Output) Line number that tag occurs on in file_name.

start_seekpos - (Output) Seek position where the tag begin in file_name.

scope_line_no - (Output) Line number that tag scope begins, eg. function scope

scope_seekpos - (Output) Seek position where the tag scope begins.

end_line_no - (Output) Line number that tag ends on in file_name.

end_seekpos - (Output) Seek position where the tag ends in file_name.

pszClassName - (Output, optional) Name of class that tag belongs to.

pszReturnType - (Output, optional) Declared type/value of symbol or function

pszArguments - (Output, optional) Function/Macro arguments.

pszExceptions - (Output, optional) Exceptions thrown or other function details

pszClassParents - (Output, optional) Class parents

pszTmplSignature - (Output, optional) Template signature

Returns: int

0 on success.

Category:

Tagging Functions


vsTagGetCurrentContext

int VSAPI vsTagGetCurrentContext(char *cur_tag_name, int &cur_flags, char *cur_type_name, int &cur_type_id, char *cur_context, char *cur_class, char *cur_package)

Determine the name of the current class or package context. The current object needs to be an editor control.

For synchronization, threads should perform a tag_lock_context(false) and tag_lock_matches(true) prior to invoking this function.

Parameters:

cur_tag_name - name of the current tag in context (allocate VS_TAG_MAX_TAGNAME bytes)

cur_flags - type (VS_TAGTYPE_*) of the current tag

cur_type_name - type ID (VS_TAGTYPE_*) of the current tag (allocate VS_TAG_MAX_TYPENAME bytes)

cur_type_id - bitset of VS_TAGFLAG_* for the current tag

cur_context - class name representing current context (allocate VS_TAG_MAX_CLASSNAME bytes)

cur_class - cur_context minus the package name (allocate VS_TAG_MAX_CLASSNAME bytes)

cur_package - only package name for the current context (allocate VS_TAG_MAX_CLASSNAME bytes)

Returns: int

0 if no context, context ID >0 on success, <0 on error.

Category:

Tagging Functions


vsTagGetDate

int VSAPI vsTagGetDate(const char *pszFilename, char *pszDate=0, const char *pszIncludedBy=0)

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.

Parameters:

pszFilename - File path of source file to retrieve tagging date for.

pszDate - (20 bytes, optional) Modification date of file when tagged. Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms)

pszIncludedBy - File path of source file which includes pszFilename

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions


vsTagGetDetailI

int VSAPI vsTagGetDetailI(int detail_id, int item_id, int &iValue)

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.

For synchronization, macros should perform a tag_lock_context(false) or tag_lock_matches(false) prior to invoking this function.

Parameters:

detail_id - ID of detail to extract, one of:

      VS_TAGDETAIL_type_id                (int) unique id for tag type.
      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_id               (int) unique id for class tag belongs to
      VS_TAGDETAIL_flags                  (int) tag flags, see tag_insert_simple
      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_tag_id                 (int) unique ID for tag instance
      VS_TAGDETAIL_context_id             (int) returns same result as tag_current_context()
      VS_TAGDETAIL_local_id               (int) returns same result as tag_current_local
      VS_TAGDETAIL_current_file           (int) returns name of file in current context

      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_name_linenum   (int) line number symbol name is on
      VS_TAGDETAIL_context_name_seekpos   (int) seek position of symbol name
      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_flags          (int) tag attribute flags.
      VS_TAGDETAIL_context_outer          (int) ID of first enclosing tag.

      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_name_linenum   (int) line number symbol name is on
      VS_TAGDETAIL_local_name_seekpos   (int) seek position of symbol name
      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_flags            (int) tag attribute flags.
      VS_TAGDETAIL_local_outer            (int) ID of first enclosing tag.

      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_name_linenum   (int) line number symbol name is on
      VS_TAGDETAIL_match_name_seekpos   (int) seek position of symbol name
      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_flags            (int) tag attribute flags.
      VS_TAGDETAIL_match_outer            (int) ID of first enclosing tag.

item_id - ID of local variable, context item to get information about, ignored if the detail is for the current tag in the tag database.

iValue - (Output) Set to tag detail value. If the given tag does not exist, this will be set to 0.

Returns: int

0 on success.

Category:

Tagging Functions


vsTagGetDetailZ

int VSAPI vsTagGetDetailZ(int detail_id, int item_id, char *pszValue, int max_len=VS_TAG_MAX_FILENAME)

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 more specific information about the given tag.

For synchronization, macros should perform a tag_lock_context(false) or tag_lock_matches(false) prior to invoking this function.

Parameters:

detail_id - 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_file_name              (string) full path of file the tag is in
      VS_TAGDETAIL_file_date              (string) date of file when tagged
      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_return                 (string) value or type of var/function
      VS_TAGDETAIL_arguments              (string) function or template arguments
      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.
      VS_TAGDETAIL_file_ext               (string) p_LangId for file name
      VS_TAGDETAIL_language_id            (string) p_language_id for file name
      VS_TAGDETAIL_template_args          (string) template signature

      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_class          (string) name of class.
      VS_TAGDETAIL_context_args           (string) tag arguments.
      VS_TAGDETAIL_context_return         (string) value or type of symbol.
      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_context_template_args  (string) template signature

      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_class            (string) name of class.
      VS_TAGDETAIL_local_args             (string) tag arguments.
      VS_TAGDETAIL_local_return           (string) value or type of symbol.
      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_local_template_args    (string) template signature

item_id - ID of local variable or context item to get information about, ignored if the detail is for the current tag in the tag database.

pszValue - (Output, 1024 bytes allocated) Set to tag detail after successful completion of function. If the given tag does not exist, this will be set to "".

max_len - (optional, default is VS_TAG_MAX_FILENAME), number of bytes allocated to pszValue.

Returns: int

0 on success.

Category:

Tagging Functions


vsTagGetExtension

int VSAPI vsTagGetExtension(const char *pszFilename, char *pszLangId=0)

Deprecated. Use vsTagGetLanguage

Retrieve the p_LangId property for the given file. 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.

Parameters:

pszFilename - File path of source file

pszLangId - (256 bytes) Set to language ID for the file

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions


vsTagGetLanguage

int VSAPI vsTagGetLanguage(const char *pszFilename, char *pszLangId=0, int maxLangId=VS_TAG_MAX_FILEEXT)

Retrieve the p_LangId property for the given file. 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.

Parameters:

pszFilename - File path of source file

pszLangId - Set to language ID for the file

maxLangId - Number of bytes allocated to pszLangId

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions


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, char *pszClassParents=0, char *pszTmplSignature=0)

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.

Parameters:

local_id - Unique ID of local variable, 1..num_of_locals

pszTagName - (Output, required) Name of tag or symbol

pszTypeName - (Output, optional) Tag type name, see tag_get_type.

tag_flags - (Output) Tag flags indicating symbol attributes, VS_TAGFLAG_

pszFilename - (Output, optional) File name as stored in database.

start_line_no - (Output) Line number that tag occurs on in file_name.

start_seekpos - (Output) Seek position where the tag begin in file_name.

scope_line_no - (Output) Line number that tag scope begins, eg. function scope

scope_seekpos - (Output) Seek position where the tag scope begins.

end_line_no - (Output) Line number that tag ends on in file_name.

end_seekpos - (Output) Seek position where the tag ends in file_name.

pszClassName - (Output, optional) Name of class that tag belongs to.

pszReturnType - (Output, optional) Declared type/value of symbol or function

pszArguments - (Output, optional) Function/Macro arguments.

pszExceptions - (Output, optional) Exceptions thrown or other function details

pszClassParents - (Output, optional) Class parents

pszTmplSignature - (Output, optional) Template signature

Returns: int

int VSAPI

Category:

Tagging Functions


vsTagGetMatchInfo

int VSAPI vsTagGetMatchInfo(int match_id, char *pszTagFile, 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, char *pszClassParents=0, char *pszTmplSignature=0)

Retrieve information about the given search match.

Parameters:

match_id - match ID to look up (from tag_insert_match)

pszTagName - (Output, required) Name of tag or symbol

pszTypeName - (Output, optional) Tag type name, see tag_get_type.

tag_flags - (Output) Tag flags indicating symbol attributes, VS_TAGFLAG_

pszFilename - (Output, optional) File name as stored in database.

start_line_no - (Output) Line number that tag occurs on in file_name.

start_seekpos - (Output) Seek position where the tag begin in file_name.

scope_line_no - (Output) Line number that tag scope begins, eg. function scope

scope_seekpos - (Output) Seek position where the tag scope begins.

end_line_no - (Output) Line number that tag ends on in file_name.

end_seekpos - (Output) Seek position where the tag ends in file_name.

pszClassName - (Output, optional) Name of class that tag belongs to.

pszReturnType - (Output, optional) Declared type/value of symbol or function

pszArguments - (Output, optional) Function/Macro arguments.

pszExceptions - (Output, optional) Exceptions thrown or other function details

pszClassParents - (Output, optional) Class parents

pszTmplSignature - (Output, optional) Template signature

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagGetNextArgument

int VSAPI vsTagGetNextArgument(const char *params, int *arg_pos, char *argument, int arg_max, const char *ext=0)

Disect the next argument (starting at 'arg_pos') from the given parameter list (params). Place the result in 'argument'. This is designed to handle both C/C++ style, comma separated argument lists, and Pascal/Ada semicolon separated argument lists.

If you do not know the number of bytes to allocate to 'argument', call this with 'argument' as NULL, and calculate ('arg_pos' - 'orig_pos' + 1).

Parameters:

params - complete parameter list to parse

arg_pos - current position in argument list use 0 to find first argument

argument - [output] set to the next argument in the argument list

arg_max - number of byte allocated to 'argument'

ext - current file extension

Returns: int

Returns the position where the argument begins in 'params'. Note, this may differ from the original value of 'arg_pos' if there are leading spaces. Returns STRING_NOT_FOUND_RC and sets 'argument' to the empty string if there are no more arguments in the parameter list.

Category:

Tagging Functions


vsTagGetOccurrence

int VSAPI vsTagGetOccurrence(char *occur_name, char *file_name)

Retrieve information about the current occurrence, as defined by tag_find_occurrence/tag_next_occurrence.

Parameters:

occur_name - (output, VS_TAG_MAX_TAGNAME) Word to be indexed

file_name - (output, VS_TAG_MAX_FILENAME) Path of file occurrence is located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


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, char *pszClassParents=0, char *pszTmplSignature=0)

Retrieve general information about the current tag (as defined by calls to vsTagFindGlobal or vsTagFindMember. 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.

Parameters:

pszTagName - (Output, required) Name of tag or symbol

pszTypeName - (Output, optional) Tag type name, see tag_get_type.

tag_flags - (Output) Tag flags indicating symbol attributes, VS_TAGFLAG_

pszFilename - (Output, optional) File name as stored in database.

line_no - (Output) Line number that tag occurs on in file_name.

pszClassName - (Output, optional) Name of class that tag belongs to.

pszReturnType - (Output, optional) Declared type/value of symbol or function

pszArguments - (Output, optional) Function/Macro arguments.

pszExceptions - (Output, optional) Exceptions thrown or other function details

pszClassParents - (Output, optional) Class parents

pszTmplSignature - (Output, optional) Template signature

Returns: int

0 on success.

Category:

Tagging Functions


vsTagGetType

VSPSZ VSAPI vsTagGetType(int type_id)

Return the string associated with the standard tag type ID

Parameters:

type_id - tag type ID

Returns: VSPSZ

0 if type_id is not a registered type. "" if (type_id == 0).

Category:

Tagging Functions


vsTagInsertContext

int VSAPI vsTagInsertContext(int outer_context, const char *tag_name, const char *tag_type, const char *file_name, int start_line_no, int start_seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, const char *class_name=0, int tag_flags=0, const char *signature=0, const char *class_parents=0, const char *template_sig=0, int name_line_no=0, int name_seekpos=0)

Add a tag and its context information to the context list. 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().

For synchronization, threads should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

outer_context - context ID for the outer context (eg. class/struct)

tag_name - tag string

tag_type - string specifying tag_type

file_name - full path of file the tag is located in

start_line_no - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_line_no - start line number of start of tag inner scope

scope_seekpos - start seek position of tag inner scope

end_line_no - (optional) ending line number of tag within file

end_seekpos - (optional) end seek position of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (optional) see VS_TAGFLAG_* above.

signature - (optional) tag signature (return type, arguments, etc)

class_parents - (optional) classes that this class inherits from

template_sig - (optional) template signature

name_line_no - (optional) line number that symbol name is located on

name_seekpos - (optional) Seek position of the first character of the symbol name

Returns: int

sequence number (context_id) of tag context on success, or <0 on error.

Category:

Tagging Functions


vsTagInsertFileEnd

int VSAPI vsTagInsertFileEnd()

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.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagInsertFileStart

int VSAPI vsTagInsertFileStart(const char *file_name)

Set up for inserting a series of tags from a single file for update. Doing this allows the tag database engine to detect and handle updates more effeciently, even in the presence of duplicates.

Parameters:

file_name - full path of file the tags are located in

Returns: int

0 on success, <0 on error.int VSAPI

Category:

Tagging Functions


vsTagInsertLocal

int VSAPI vsTagInsertLocal(const char *tag_name, const char *tag_type, const char *file_name, int start_linenum, int start_seekpos, int scope_linenum, int scope_seekpos, int end_linenum, int end_seekpos, const char *class_name=0, int tag_flags=0, const char *signature=0, const char *class_parents=0, const char *template_sig=0, int name_line_no=0, int name_seekpos=0)

Add a local variable tag and its information to the locals list. The context for the a local 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_local().

For synchronization, macros should perform a tag_lock_context(true) prior to invoking this function.

Parameters:

tag_name - tag string

tag_type - string specifying tag_type

file_name - full path of file the tag is located in

start_linenum - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_linenum - start line number of start of tag inner scope

scope_seekpos - start seek position of tag inner scope

end_linenum - (optional) ending line number of tag within file

end_seekpos - (optional) end seek position of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (optional) see VS_TAGFLAG_* above.

signature - (optional) tag signature (return type, arguments, etc)

class_parents - (optional) classes that this class inherits from

template_sig - (optional) template signature

name_line_no - (optional) line number that symbol name is located on

name_seekpos - (optional) Seek position of the first character of the symbol name

Returns: int

sequence number (local_id) of local variable on success, or <0 on error.

Category:

Tagging Functions


vsTagInsertMatch

int VSAPI vsTagInsertMatch(const char *tag_file, const char *tag_name, const char *tag_type, const char *file_name, int start_linenum, int start_seekpos, int scope_linenum, int scope_seekpos, int end_linenum, int end_seekpos, const char *class_name=0, int tag_flags=0, const char *signature=0, const char *class_parents=0, const char *template_sig=0)

Add a search match tag and its information to the matches list.

Parameters:

tag_file - (optional) full path of tag file match came from

tag_name - tag string

tag_type - string specifying tag_type

file_name - full path of file the tag is located in

start_linenum - start line number of tag within file

start_seekpos - start seek position of tag within file

scope_linenum - start line number of start of tag inner scope

scope_seekpos - start seek position of tag inner scope

end_linenum - (optional) ending line number of tag within file

end_seekpos - (optional) end seek position of tag within file

class_name - (optional) name of class that tag is present in, use concatenation (as defined by language rules) to specify names of inner classes.

tag_flags - (optional) see VS_TAGFLAG_* above.

signature - (optional) tag signature (return type, arguments, etc)

class_parents - (optional) classes that this class inherits from

template_sig - (optional) template signature

Returns: int

sequence number (match_id) of matching tag on success, or <0 on error.

Category:

Tagging Functions


vsTagInsertOccurrence

int VSAPI vsTagInsertOccurrence(const char *occur_name, const char *file_name)

Insert a new occurrence into the word index.

Parameters:

occur_name - Word to be indexed

file_name - Path of file occurrence is located in

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagInsertSimpleTag

int VSAPI vsTagInsertSimpleTag(const char *tag_name, int type_id, const char *file_name, int line_no, const char *class_name, int tag_flags, const char *signature=0, const char *class_parents=0, const char *template_signature=0)

API function for inserting a tag entry with supporting info

Parameters:

tag_name - name of entry

type_id - type of tag, (see VS_TAGTYPE_*)

file_name - path to file that is located in

line_no - line number that tag is positioned on

class_name - name of class that tag belongs to

tag_flags - tag attributes (see VS_TAGFLAG_*)

signature - (optional) arguments and return type

class_parents - (optional) class parents

template_signature - (optional) template signature

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagInsertTag

int VSAPI vsTagInsertTag(const char *tag_name, const char *tag_type, const char *file_name, int line_no, const char *class_name, int tag_flags, const char *signature=0, const char *class_parents=0, const char *template_signature=0)

API function for inserting a tag entry with supporting info

Parameters:

tag_name - name of entry

tag_type - type of tag, (see VS_TAGTYPE_*)

file_name - path to file that is located in

line_no - line number that tag is positioned on

class_name - name of class that tag belongs to

tag_flags - tag attributes (see VS_TAGFLAG_*)

signature - (optional) arguments and return type

class_parents - (optional) class parents

template_signature - (optional) template signature

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagListFileOccurrences

int VSAPI vsTagListFileOccurrences(int tree_wid, int tree_index, const char *tag_name, int exact_match, int case_sensitive, int &num_refs, int max_refs)

List the files containing 'tag_name', matching by prefix or case-sensitive, as specified. Terminates search if a total of max_refs are hit. Items are inserted into the tree, with the user data set to the file path.

Parameters:

tree_wid - window id of tree control to insert into

tree_index - index, usually TREE_ROOT_INDEX to insert under

tag_name - name of tag to search for

exact_match - exact match or prefix match

case_sensitive - case sensitive match, or case-insensitive

num_refs - (reference) number of references found so far

max_refs - maximum number of items to insert

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagListSymbolsInClass

int VSAPI vsTagListSymbolsInClass(int treewid, int tree_index, VSHREFVAR tag_files, const char *prefix, const char *search_class, int pushtag_flags, int context_flags, int &num_matches, int max_matches, int exact_match, int case_sensitive, int depth=0, int find_all=1, VSHREFVAR template_args=0, const char *friend_list=0, VSHREFVAR visited=0)

Attempt to locate the given symbol in the given class by searching first locals, then the current file, then tag files, looking strictly for the class definition, not just class members. Recursively looks for symbols in inherited classes and resolves items in enumerated types to the correct class scope (since enums do not form a namespace). The order of searching parent classes is depth-first, preorder (root node searched before children).

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. Returns 1 if the definition of the given class 'search_class' is found, othewise returns 0, indicating that no matches were found.

The current object must be an editor control or the current buffer.

Parameters:

treewid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert items under, ignored if (treewid == 0)

tag_files - (reference to _str[]) tag files to search

prefix - symbol prefix to match

search_class - name of class to search for matches

pushtag_flags - VS_TAGFILTER_*, tag filter flags

context_flags - VS_TAGCONTEXT_*, tag context filter flags

num_matches - (reference) number of matches

max_matches - maximum number of matches allowed

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

depth - Recursive call depth, bails out at 32

find_all - find all instances, for each level of inheritance

template_args - Slick-C® hash table of template arguments

friend_list - list of classes that are friendly with the context the tags are being listed in

visited - (optional) Slick-C® hash table of prior results

Returns: int

1 if the definition of the symbol is found, 0 otherwise, <0 on error.

Category:

Tagging Functions


vsTagMakeCaption

const char*VSAPI vsTagMakeCaption(const char *pszTagName, const char *pszTypeName, const char *pszClassName, int tag_flags, const char *pszArguments=0, int include_tab=0, const char *pszFileName=0, const char *pszTemplateArgs=0)

Create a caption for the tag, given the following tag information and specifications about the caption style. The output string is generally formatted as follows:

   member_name[(arguments)] ['in' class_name]
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: for the 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(int a, bool x) in MyClass
and the following if include_tab is false.
     MyClass::myMember(int a, bool x)

Caption formatted in standard form as normally presented in class browser.

Parameters:

pszTagName - Name of tag (symbol).

pszTypeName - Tag type, corresponding to VS_TAGTYPE_

pszClassName - (Optional) 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, VS_TAGFLAG_*.

pszArguments - (Optional) Arguments, such as function or template class parameters.

include_tab - append class name after signature if 1, prepend class name with :: if 0

pszFileName - Path to tag, this is needed for packages

pszTemplateArgs - Tempalte signature

Returns: const char*VSAPI

Returns the resulting tree caption as a NULL terminated string. Note the result is returned is a statically allocated string.

Category:

Tagging Functions


vsTagMatchOccurrencesInFile

int VSAPI vsTagMatchOccurrencesInFile(VSHREFVAR errorArgs, int tree_wid, int tree_index, const char *tag_name, int case_sensitive, const char *file_name, int line_no, int filter_flags, const char *source_file_name, int start_seekpos, int stop_seekpos, int &num_matches, int max_matches, VSHREFVAR visited=0, int depth=0)

Use context_match tags to locate the tag matches for the occurrence in the given file at the given seek position. If a file name is not given, then use the current buffer. If a file name is given, but the seek position is -1, then use the current buffer position. Otherwise, open the given file in a temporary view and seek to the given position.

Parameters:

errorArgs - Array of strings for return code

tree_wid - Window ID of tree control to insert into

tree_index - tree index to insert under

tag_name - Name of occurrence to match against

case_sensitive - Case sensitive tag search?

file_name - Path of file tag to search for is in

line_no - Line number tag is located on

filter_flags - bitset of VS_TAGFILTER_

src_file_name - name of source file to search

start_seekpos - starting seek position

stop_seekpos - ending seek position

num_matches - (output) number of matches found

max_matches - maximum number of matches to find

visited - (optional, reference) hash table of past tagging results

depth - (optional) search depth, to cap recursion

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagMatchSymbolInContext

int VSAPI vsTagMatchSymbolInContext(const char *prefix, const char *search_class, int treewid, int tree_index, VSHREFVAR tag_files, int &num_matches, int max_matches, int pushtag_flags, int context_flags, int exact_match=0, int case_sensitive=1, int strict=1, int find_parents=0, int find_all=0, const char *search_file=0, VSHREFVAR visited=0, int depth=0)

Match the given symbol based on the current context information. Order of searching is:

  1. local variables in current function
  2. members of current class, including inherited members
  3. globals found in the current file
  4. globals imported explicitely from current file
  5. globals, (not static variables), found in other files
  6. any symbol found in this file
  7. any symbol found in any tag file
Failing that, it repeats steps (1-6) with pushtag_flags set to -1, thus disabling any filtering, unless 'strict' is true. The current object must be an editor control or current buffer.

Parameters:

prefix - symbol prefix to match

search_class - name of class to search for matches

treewid - window id of tree control to insert into, 0 indicates to insert into a match set

tree_index - tree index to insert items under, ignored if (treewid == 0)

tag_files - (reference to _str[]) tag files to search

num_matches - (reference) number of matches

max_matches - maximum number of matches allowed

pushtag_flags - VS_TAGFILTER_*, tag filter flags

context_flags - VS_TAGCONTEXT_*, tag context filter flags

exact_match - exact match or prefix match (0)

case_sensitive - case sensitive (1) or case insensitive (0)

strict - strict match, or allow any match?

find_parents - find parents of the given class?

find_all - find all instances, for each level of scope

search_file - file context to search for matches in (for imports)

visited - (optional) Slick-C® hash table of prior results

depth - (optional) depth of recursive search

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagMatchUsesInFile

int VSAPI vsTagMatchUsesInFile(VSHREFVAR errorArgs, int tree_wid, int tree_index, int case_sensitive, const char *file_name, int line_no, const char *alt_file_name, int alt_line_no, int filter_flags, int caller_id, const char *source_file_name, int start_seekpos, int stop_seekpos, int &num_matches, int max_matches)

Use context_match tags to locate the tag matches for the occurrence in the given file at the given seek position. If a file name is not given, then use the current buffer. If a file name is given, but the seek position is -1, then use the current buffer position. Otherwise, open the given file in a temporary view and seek to the given position.

Parameters:

errorArgs - Array of strings for return code

tree_wid - Window ID of tree control to insert into

tree_index - tree index to insert under

case_sensitive - Case sensitive tag search?

file_name - Path of file tag to search for is in

line_no - Line number tag is located on

alt_file_name - Alternate path of file tag to search for is in

alt_line_no - Alternate line number tag is located on

filter_flags - bitset of VS_TAGFILTER_

caller_id - Context ID for item to find uses in

start_seekpos - starting seek position

stop_seekpos - ending seek position

num_matches - (output) number of matches found

max_matches - maximum number of matches to find

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagNormalizeClasses

int VSAPI vsTagNormalizeClasses(const char *class_parents, const char *cur_class_name, const char *file_name, VSHREFVAR tag_files, int allow_locals, int case_sensitive, char *normal_parents, int max_parents_len, char *normal_types=0, int max_type_len=0, char *normal_files=0, int max_file_len=0, VSHREFVAR template_args=0, VSHREFVAR visited=0, int depth=0)

For each item in 'class_parents', normalize the class and place it in 'normal_parents', along with the tag type, placed in 'normal_types'.

Parameters:

class_parents - list of class names, seperated by semicolons

cur_class_name - class context in which to normalize class name

file_name - source file where reference to class name is

tag_files - list of tag files to search

allow_locals - allow local classes in list

case_sensitive - case sensitive tag search?

normal_parents - list of normalized class names

max_parents_len - number of bytes allocated to normal_parents

normal_types - list of tag types found for normalized class names

max_type_len - number of bytes allocated to normal_types

normal_files - list of tag files parent classes are found in

max_file_len - number of bytes allocated to normal_files

template_args - Slick-C® hash table of template arguments

visited - Slick-C® hash table of prior results

depth - depth of recursive search

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagOccurrencesStart

int VSAPI vsTagOccurrencesStart(const char *file_name)

Set up for inserting a series of occurrencess from a single file for update. Doing this allows the tag database engine to detect and handle updates more effeciently, even in the presence of duplicates.

Parameters:

file_name - full path of file

Returns: int

0 on success, <0 on error.int VSAPI

Category:

Tagging Functions


vsTagOpenDB

int VSAPI vsTagOpenDB(const char *pszFilename, int read_only=1)

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, use tag_read_db instead.

Parameters:

pszFilename - File path of database to open.

read_only - (default true) open the database for read access

Returns: int

database handle >= 0 on success, < 0 on error.

Category:

Tagging Functions


vsTagQualifySymbolName

int VSAPI vsTagQualifySymbolName(char *qualified_name, int qualified_max, const char *search_name, const char *context_class, const char *context_file, VSHREFVAR tag_files, int case_sensitive, VSHREFVAR visited=0, int depth=0)

Qualify the given class symbol by searching for symbols with its name in the current context/scope. This is used to resolve partial class names, often found in class inheritance specifications. The current object must be an editor control or current buffer.

Parameters:

qualified_name - (output) "qualified" symbol name

qualified_max - number of bytes allocated to qualified_name

search_name - name of symbol to search for

context_class - current class context (class name)

context_file - current file name

tag_files - list of tag files to search

case_sensitive - case sensitive tag search?

visited - (optional) Slick-C® hash table of prior results

depth - (optional) depth of recursive search

Returns: int

qualified name if successful, 'search_name' on error.

Category:

Tagging Functions


vsTagRemoveFromFile

int VSAPI vsTagRemoveFromFile(const char *pszFilename, int RemoveFile=0)

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.

Parameters:

pszFilename - File path of source file to remove from tag file.

RemoveFile - If true, remove file_name from the tag database completely, not just the tags in that file. Default is false.

Returns: int

0 on success, < 0 on error.

Category:

Tagging Functions


vsTagRetagFile

int VSAPI vsTagRetagFile(const char *pszFilename, const char *pszExt=0, int reserved=0)

Retag the given file, using the given extension-specific parser.

Parameters:

pszFilename - Name/Path to source file to tag

pszExt - File extension to use for tagging this source code

reserved - future expansion

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagSetClassParents

int VSAPI vsTagSetClassParents(const char *class_name, const char *class_parents)

Specify what classes and interfaces a given file derives from. This will create an entry for 'class_name' if it does not already exist.

Fully qualified class names are preferred, but un-qualified class names may be used also, however, they may not be resolved correctly if there are duplicates with the same name.

Parameters:

class_name - Fully qualified class name

class_parents - a semi-colon seperated list of class names.

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagSetDate

int VSAPI vsTagSetDate(const char *pszFilename, const char *pszDate=0, int file_type=0, const char *pszIncludedBy=0)

Set the date of tagging for the given file. If the date is not specified, use the file modification time found on disk. This function has the side effect of positioning the file iterator on the given file name.

Parameters:

pszFilename - File path of source file to setting tagging date for.

pszDate - (20 bytes, optional) Modification date of file when tagged. Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms)

file_type - Type of file to search for, source vs. reference

pszIncludedBy - File path of source file which includes pszFilename

Returns: int

0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

Category:

Tagging Functions


vsTagSetLanguage

int VSAPI vsTagSetLanguage(VSPSZ pszFilename, VSPSZ pszLangId)

API function for setting the language type for the given filename. This corresponds to the p_LangId property of 'file_name', not necessarily the literal file extension.

Parameters:

file_name - name of file to set language type for

lang - p_LangId property for file_name

Returns: int

0 on success, <0 on error.

Category:

Tagging Functions


vsTagTreeInsertTag

int VSAPI vsTagTreeInsertTag(int tree_wid, int tree_index, int include_tab, int force_leaf, int tree_flags, const char *pszTagName, const char *pszTypeName, const char *pszFileName, int line_no, const char *pszClassName=0, int tag_flags=0, const char *pszSignature=0, const char *pszTemplateArgs=0, VSHVAR hvarUserInfo=0)

API function for inserting a tag entry with supporting info into the given tree control.

Parameters:

tree_wid - window ID of the tree control

tree_index - parent index to insert item under

include_tab - append class name after signature if 1, prepend class name with :: if 0

force_leaf - if < 0, force leaf node, otherwise choose by type

tree_flags - flags passed to vsTreeAddItem

pszTagName - name of entry

pszTypeName - type of tag, (see VS_TAGTYPE_*)

pszFileName - path to file that is located in

line_no - line number that tag is positioned on

pszClassName - name of class that tag belongs to

tag_flags - tag attributes (see VS_TAGFLAG_*)

pszSignature - arguments and return type

pszTemplateArgs - template signature

hvarUserInfo - per-node user data for tree control

Returns: int

tree index on success, <0 on error.

Category:

Tagging Functions


vsTagUpdateContext

int VSAPI vsTagUpdateContext()

Update the tags in the current context if necessary. The context needs to be updated if we switch buffers, or if it is modified.

Returns: int

0 on success, < 0 on error.

Category:

Tagging Functions


vsTagUpdateLocals

int VSAPI vsTagUpdateLocals(int list_all=0)

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.

Parameters:

list_all -

Returns: int

0 on success, < 0 on error.

Category:

Tagging Functions


vsTerminate

void VSAPI vsTerminate()

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.

Category:

Miscellaneous Functions


vsTestEvent

int VSAPI vsTestEvent(int wid=0, char *pszOptions=0)

Deprecated. Use vsIsKeyPending

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, Keyboard Functions


vsTextColC

int VSAPI vsTextColC(int wid, int col, char option='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.

Parameters:

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.

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'.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods, String Functions

See Also:

vsExpandTabsC, vsExpandTabs


vsTogglecase

char*VSAPI vsTogglecase(char *pString, int StringLen=-1, int utf8=-1)

Toggles case on all characters.

Parameters:

pString - Input string.

StringLen - Number of bytes in pString. If pString is null terminated, you can specify -1 for the length of string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that the input and output string are SBCS/DBCS. 1 specifies that the input and output string are UTF-8.

Categories:

String Functions, Unicode Functions

See Also:

vsLowcase


vsTop

void VSAPI vsTop(int wid)

Places cursor at first line and first column of buffer. wid identifies the object to be operated on. 0 specifies the current object.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

vsBottom


vsTreeAddItem

int VSAPI vsTreeAddItem(int iWID, int iRelativeIndex, const char *pszCaption, int iFlags, int iCollapsedBMIndex, int iExpandedBMIndex, int iState, int iNodeFlags=0, VSHVAR hvarUserInfo=0)

Adds a new sibling or child item.

Parameters:

iWID - 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.

hvarUserInfo - Slick-C variable containing per-node user data.

Returns: int

Returns the item index of the new item.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

vsTreeSetUserInfo


vsTreeGetUserInfo

int VSAPI vsTreeGetUserInfo(int wid, int iHandle, VSHVAR *hvar)

Gets the user info value for the specified tree item.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

iHandle - Tree item index.

pszInfo - Buffer to put user info in

iInfoSize - Size of buffer pszInfo

Returns: int

0 if successful

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo


vsTreeSearch

int VSAPI vsTreeSearch(int wid, int iIndex, const char *pSearchCaption, int iCaptionLength, int iFlags=0, const char *pSearchUserInfo=0, int iUserInfoLength=0)

Searches the tree for the specified value.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

iIndex - Tree item index. By default, the parent index of the children to be searched. If the TREE_SEARCH_SIBLING option is specified, then this is the first sibling search.

pSearchCaption - Caption to search for in the tree

iFlags - Search flags. TREE_SEARCH_CI case insensitive search TREE_SEARCH_PREFIX prefix match TREE_SEARCH_SIBLING search siblings. when this is specified, iIndex is the first sibling searched, rather than the parent of items to be searched TREE_SEARCH_RECURSIVE search recursively through the tree (by default, only one level is searched) TREE_SEARCH_HIDDEN search hidden nodes

pSearchUserInfo - Optional user info to search for

Returns: int

0 if successful

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo


vsTreeSetUserInfo

int VSAPI vsTreeSetUserInfo(int wid, int iHandle, VSHVAR hvar)

Sets the user info value for the specified tree item.

Parameters:

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.

Applies To:

Tree View

Category:

Tree View Methods

See Also:

_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo


vsTruncQLineLength

int VSAPI vsTruncQLineLength(int wid, int *pEntireLineLen=0, int reserved=0)

Parameters:

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.

Returns: int

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


vstudio_open_file

int vstudio_open_file(_str Path, int Line, int Col)

Opens the current file in Visual Studio (2003 or 2005), optionally positioning the caret to a specific line and column coordinate. This method first tries to connect to an already running instance of Visual Studio 2003 or 2005. If there is no running instance, a new instance is created. It will not connect to Visual Studio versions lower than 2003 (internal version 7.1) Windows Only

Parameters:

Path - Full path to the file

Line - Optional line number to center on. (Line numbers are 1-based)

Col - Optional column number to place caret on. Only works if Line is > 0

Returns: int

1 indicates success -1 indicates Visual Studio could not be started. 0 indicates Visual Studio is started, but the file could not be opened

Category:

Miscellaneous Functions


vstudio_open_solution

int vstudio_open_solution(_str solutionFilePath, _str VStudioVersion)

Opens the Visual Studio Solution (.sln) file in the specified version of Visual Studio .NET.

Parameters:

solutionFilePath - Full path to the .sln file

VStudioVersion - Version of Visual Studio to open (7.1, 8.0, and up)

Returns: int

1 indicates success -1 indicates Visual Studio could not be started. 0 indicates Visual Studio is started, but the solution could not be opened

Category:

Miscellaneous Functions


vstw

_command typeless vstw(_str name="", ...)

This function is identical to the st command.

Category:

Macro Programming Functions


vsUnregisterWindow

void VSAPI vsUnregisterWindow(int wid)

Unregisters a window registered by vsRegisterWindow.

Parameters:

wid - Window id of object

Category:

Window Functions

See Also:

vsRegisterWindow


vsUp

int VSAPI vsUp(int wid, int Noflines)

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.

Returns: int

Returns 0 if successful. Otherwise TOP_OF_FILE_RC is returned.

Applies To:

Edit Window, Editor Control

Categories:

CursorMovement Functions, Edit Window Methods, Editor Control Methods

See Also:

vsDown


vsUpcase

char*VSAPI vsUpcase(char *pString, int StringLen=-1, int utf8=-1)

Converts string to upper case.

Parameters:

pString - Input string.

StringLen - Number of bytes in pString. If pString is null terminated, you can specify -1 for the length of string.

utf8 - -1 specifies that input and output string are UTF-8 if UTF-8 support is enabled. 0 specifies that the input and output string are SBCS/DBCS. 1 specifies that the input and output string are UTF-8.

Categories:

String Functions, Unicode Functions

See Also:

vsLowcase


vsUpdateExistingBufferExtensionOptions

void VSAPI vsUpdateExistingBufferExtensionOptions(const char *pszLangId, const char *pszReserved=0, int reserved=0)

Deprecated. Use vsUpdateExistingBufferLanguageOptions()

Updates all editor control buffers which are using these language options to the newly configured values.

Parameters:

pszLangId - Language ID. See p_LangId. For list of language types, use our Language Options dialog ("Tools", "Options","Language Setup...").

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultLanguageOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsDeleteLanguageOptions


vsUpdateExistingBufferLanguageOptions

void VSAPI vsUpdateExistingBufferLanguageOptions(const char *pszLangId, const char *pszReserved=0, int reserved=0)

Updates all editor control buffers which are using these language options to the newly configured values.

Parameters:

pszLangId - Language ID. See p_LangId. For list of language types, use our Language Options dialog ("Tools", "Options","Language Setup...").

pszReserved - unused

reserved - unused

Since:

13.0

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Functions, Editor Control Functions

See Also:

vsSetDefaultLanguageOptions, vsDeleteLanguageOptions


vsUpdatePicture

int VSAPI vsUpdatePicture(const char *pszFilename, int reserved=0)

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 SlickEdit that the bitmap is global (not attatched to a Slick-C® dialog box).

Parameters:

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.

Returns: int

If succcessful, returns names table index of picture. Otherwise, a negative error code is returned.

Category:

File Functions


vsUTF8

int VSAPI vsUTF8()

Returns: int

Returns non-zero if SlickEdit is running in UTF-8 mode. Otherwise, 0 is returned.

Category:

Unicode Functions


vsUTF8CharBegin

char*VSAPI vsUTF8CharBegin(const char *pBuf, int BufLen, const char *pCurrent, int *pCharLen=0, int beginComposite=1)

Finds the beginning of the current composite character or UTF-8 character.

Parameters:

pBuf - Buffer contain UTF-8 text.

BufLen - Number of UTF-8 characters in pBuf. Specify -1 to compute the length from a null terminated buffer.

pCurrent - Pointer to UTF-8 character in pBuf.

pCharLen - Set to number of bytes in the current character.

BeginComposite - When non-zero, finds the beginning of the composite character.

Returns: char*VSAPI

Returns pointer to the beginning of the current composite or UTF-8 character. pCurrent is returned if pCurrent >=pBuf+BufLen.

Category:

Unicode Functions


vsUTF8CharBegin2

char*VSAPI vsUTF8CharBegin2(const char *pBuf, int BufLen, const char *pCurrent)

Finds the beginning of the current UTF-8 character.

Parameters:

pBuf - Buffer contain UTF-8 text.

BufLen - Number of UTF-8 characters in pBuf. Specify -1 to compute the length from a null terminated buffer.

pCurrent - Pointer to UTF-8 character in pBuf.

Returns: char*VSAPI

Returns pointer to the beginning of the UTF-8 character. pCurrent is returned if pCurrent >=pBuf+BufLen.

Category:

Unicode Functions


vsUTF8CharNext

char*VSAPI vsUTF8CharNext(const char *pBuf, const char *pEndBuf)

Parameters:

pCurrent - Buffer contain UTF-8 text.

pEndBuf - Pointer to end of pBuf text where pEndBuf-pCurrent is the buffer length.

Returns: char*VSAPI

Returns pointer to the beginning of the next composite character or pEndBuf if pCurrent==pEndBuf.

Category:

Unicode Functions


vsUTF8CharNext2

char*VSAPI vsUTF8CharNext2(const char *pBuf, const char *pEndBuf)

Parameters:

pCurrent - Buffer contain UTF-8 text.

pEndBuf - Pointer to end of pBuf text where pEndBuf-pCurrent is the buffer length.

Returns: char*VSAPI

Returns pointer to the beginning of the next UTF-8 character or pEndBuf if pCurrent==pEndBuf. Use vsUTF8CharNext, to skip composite characters.

Category:

Unicode Functions


vsUTF8CharPrev

char*VSAPI vsUTF8CharPrev(const char *pLine, const char *pCurrent)

Parameters:

pLine - Buffer contain UTF-8 text.

pCurrent - Pointer to the beginning of a UTF-8 character in pLine.

Returns: char*VSAPI

Returns pointer to the beginning of the previous composite character or pLine if pCurrent==pLine.

Category:

Unicode Functions


vsUTF8CharRead

char*VSAPI vsUTF8CharRead(const char *pBuf, const char *pEndBuf, unsigned &ich, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0)

Reads a UTF-8 character. This function does not read composite characters. This function does performs more error checking on the UTF-8 character read than the vsUTF8CharRead2() function. Use the vsUTF8CharRead2() function instead of the this function for much better performance.

Parameters:

pBuf - Buffer contain UTF-8 text.

pEndBuf - Pointer to end of buffer.

uch - Recieves UTF-32 character. Set to -1 if the UTF-8 character read is invalid or pBuf>=pEndBuf.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8CharRead2

VSSTATIC char* vsUTF8CharRead2(const char *pBuf, const char *pEndBuf, unsigned &uch)

Reads a multi-byte UTF-8 sequence. The current byte MUST be >=0x80 and must be readable (i.e. pBufParameters:

pBuf - Pointer to UTF-8 string

pEndBuf - Pointer past end of UTF-8 string

uch - Ouput character index. Set to -1 if character sequence is truncated (premature end of buffer).

Returns: VSSTATIC char*

Returns pointer to next character to read.

Example:

void printUTF8String(const char *p,int len)
{
   const char *pend=p+len;
   while (p
Category:
Unicode Functions


vsUTF8CharReadPrev

char*VSAPI vsUTF8CharReadPrev(const char *pLine, const char *pCurrent, unsigned &uch)

Reads the previous UTF-8 character. This function does not read composite characters.

Parameters:

pLine - Buffer contain UTF-8 text.

pCurrent - Pointer to current character in pLine.

uch - Recieves UTF-32 character.

Returns: char*VSAPI

Returns pointer to the previous character.

Category:

Unicode Functions


vsUTF8CharWrite

VSSTATIC int vsUTF8CharWrite(unsigned wch, char *pdest)

Converts a UTF-32 character range 0x0-0x7fffffff to UTF-8. The caller must handle converting UTF-16 (windows UNICODE) surrogates into the UTF-32 character equivalent. That is, the caller must convert 0xD800,0x0DC00 to 0x10000.

Parameters:

wch - UTF-32 character in range 0x0-0x7fffffff.

pdest - Pointer to UTF-8 destination buffer Must contain enough space for UTF-8 character. In the worst case, 6 bytes are required.

Returns: VSSTATIC int

Returns number of UTF-8 bytes required to encode the UTF-32 character given. 0 is returned if the UTF-32 character is too large (above 0x7fffffff).

Category:

Unicode Functions


vsUTF8ConvertMultiByteToUTF8

char*VSAPI vsUTF8ConvertMultiByteToUTF8(int codePage, const char *pBuf, const char *pEndBuf, char *pDest, int DestLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts a multi-byte (SBCS/DBCS code page data) text to UTF-8.

Parameters:

codePage - Indicates the code page for the source data. One of following code pages:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page

pBuf - Buffer containing source multi-byte text.

pEndBuf - Pointer to end of buffer.

pDest - Destination buffer for UTF-8.

DestLen - Number of bytes allocated to destination buffer. For code pages that produce 21-bit UNICODE, specify BufLen*3+6 bytes if you want all UTF-8 bytes in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF8ToMultiByte

char*VSAPI vsUTF8ConvertUTF8ToMultiByte(int codePage, const char *pBuf, const char *pEndBuf, char *pDest, int DestLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts UTF-8 text to multi-byte (SBCS/DBCS code page data).

Parameters:

codePage - Indicates the code page for the output data. One of following code pages:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page

pBuf - Buffer containing source UTF-8 text.

pEndBuf - Pointer to end of buffer.

pDest - Destination buffer for multi-byte text.

DestLen - Number of bytes allocated to destination buffer. Specify BufLen+2 bytes if you want all UTF-8 bytes in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF8ToUTF16BE

char*VSAPI vsUTF8ConvertUTF8ToUTF16BE(const char *pBuf, const char *pEndBuf, unsigned short *pwDest, int wDestLen, unsigned *pNofCharsWritten, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts UTF-8 text to UTF-16 big endian.

Parameters:

pBuf - Buffer containing source UTF-8 text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-16 text.

DestLen - Number of characters allocated to destination buffer. Specify BufLen+10 characters (BufLen*2+10 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF8ToUTF16LE

char*VSAPI vsUTF8ConvertUTF8ToUTF16LE(const char *pBuf, const char *pEndBuf, unsigned short *pwDest, int wDestLen, unsigned *pNofCharsWritten, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts UTF-8 text to UTF-16 little endian.

Parameters:

pBuf - Buffer containing source UTF-8 text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-16 text.

DestLen - Number of characters allocated to destination buffer. Specify BufLen+10 characters (BufLen*2+10 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF8ToUTF32BE

char*VSAPI vsUTF8ConvertUTF8ToUTF32BE(const char *pBuf, const char *pEndBuf, unsigned *pwDest, int wDestLen, unsigned *pNofCharsWritten, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Parameters:

pBuf - Buffer containing source UTF-8 text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-32 text.

DestLen - Number of characters allocated to destination buffer. Specify BufLen+20 characters (BufLen*4+20 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data. Converts UTF-8 text to UTF-32 big endian.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF8ToUTF32LE

char*VSAPI vsUTF8ConvertUTF8ToUTF32LE(const char *pBuf, const char *pEndBuf, unsigned *pwDest, int wDestLen, unsigned *pNofCharsWritten, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts UTF-8 text to UTF-32 little endian.

Parameters:

pBuf - Buffer containing source UTF-8 text.

pEndBuf - Pointer to end of buffer.

pwDest - Destination buffer for UTF-32 text.

DestLen - Number of characters allocated to destination buffer. Specify BufLen+20 characters (BufLen*4+20 bytes) if you want all data converted.

pCharsWritten - Receives number of characters written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data.

Returns: char*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF16BEToUTF8

unsigned short*VSAPI vsUTF8ConvertUTF16BEToUTF8(const unsigned short *pwBuf, const unsigned short *pwEndBuf, char *pDest, int destLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO2 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO2*pfile, const unsigned short*pCurrentPos)=0, int *pXlatError=0)

Converts a UTF-16 big endian text to UTF-8.

Parameters:

pwBuf - Buffer containing source UTF-16 big endian text.

pwEndBuf - Pointer to end of buffer.

pDest - Destination buffer for UTF-8.

DestLen - Number of bytes allocated to destination buffer. Specify wBuflen*3+6 bytes if you want all UNICODE characters in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pwBuf>=pwEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data. Currently this parameter is always set to 0.

Returns: unsigned short*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead2(VSUTF8_FILEINFO2 *pfile,const
unsigned short *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(unsigned short *)pCurrentPos;
      return(1);  // no more data.
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(unsigned short *)gTempBuffer;
   pfile->pEndBuf=(unsigned short
*)(gTempBuffer+(status&0xfffffffe));
   return(status);   // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF16LEToUTF8

unsigned short*VSAPI vsUTF8ConvertUTF16LEToUTF8(const unsigned short *pwBuf, const unsigned short *pwEndBuf, char *pDest, int destLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO2 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO2*pfile, const unsigned short*pCurrentPos)=0, int *pXlatError=0)

Converts a UTF-16 little endian text to UTF-8.

Parameters:

pwBuf - Buffer containing source UTF-16 little endian text.

pwEndBuf - Pointer to end of buffer.

pDest - Destination buffer for UTF-8.

DestLen - Number of bytes allocated to destination buffer. Specify wBuflen*3+6 bytes if you want all UNICODE characters in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pwBuf>=pwEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data. Currently this parameter is always set to 0.

Returns: unsigned short*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead2(VSUTF8_FILEINFO2 *pfile,const
unsigned short *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(unsigned short *)pCurrentPos;
      return(1);  // no more data.
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(unsigned short *)gTempBuffer;
   pfile->pEndBuf=(unsigned short
*)(gTempBuffer+(status&0xfffffffe));
   return(status);   // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF32BEToUTF8

unsigned*VSAPI vsUTF8ConvertUTF32BEToUTF8(const unsigned *pwBuf, const unsigned *pwEndBuf, char *pDest, int destLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO4 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO4*pfile, const unsigned*pCurrentPos)=0, int *pXlatError=0)

Converts a UTF-32 big endian text to UTF-8.

Parameters:

pwBuf - Buffer containing source UTF-32 big endian text.

pwEndBuf - Pointer to end of buffer.

pDest - Destination buffer for UTF-8.

DestLen - Number of bytes allocated to destination buffer. Specify wBuflen*6+10 bytes if you want all UNICODE characters in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pwBuf>=pwEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data. Currently this parameter is always set to 0.

Returns: unsigned*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead4(VSUTF8_FILEINFO4 *pfile,const
unsigned *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(unsigned *)pCurrentPos;
      return(1);  // no more data.
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(unsigned *)gTempBuffer;
   pfile->pEndBuf=(unsigned *)(gTempBuffer+(status&0xfffffffc));
   return(status);   // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8ConvertUTF32LEToUTF8

unsigned*VSAPI vsUTF8ConvertUTF32LEToUTF8(const unsigned *pwBuf, const unsigned *pwEndBuf, char *pDest, int destLen, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO4 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO4*pfile, const unsigned*pCurrentPos)=0, int *pXlatError=0)

Converts a UTF-32 little endian text to UTF-8.

Parameters:

pwBuf - Buffer containing source UTF-32 little endian text.

pwEndBuf - Pointer to end of buffer.

pDest - Destination buffer for UTF-8.

DestLen - Number of bytes allocated to destination buffer. Specify wBuflen*6+10 bytes if you want all UNICODE characters in your buffer converted.

pNofbytesWritten - Receives number of bytes written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pwBuf>=pwEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs while translating the data. Currently this parameter is always set to 0.

Returns: unsigned*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead4(VSUTF8_FILEINFO4 *pfile,const
unsigned *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(unsigned *)pCurrentPos;
      return(1);  // no more data.
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(unsigned *)gTempBuffer;
   pfile->pEndBuf=(unsigned *)(gTempBuffer+(status&0xfffffffc));
   return(status);   // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF8FileRead

int VSAPI vsUTF8FileRead(int filehandle, void *pbuf, int bufsize, int encoding, int readFirstBuffer, int *pXlatError=0)

Reads the file and converts the data from the encoding specified to UTF-8.

Parameters:

filehandle - File handle returned from vsFileOpen().

pbuf - Destination buffer for UTF-8 data.

bufsize - Number of bytes allocated to destination buffer.

encoding - One of the following encodings:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page
  • VSENCODING_UTF8
  • VSENCODING_UTF8_WITH_SIGNATURE
  • VSENCODING_UTF16LE
  • VSENCODING_UTF16LE_WITH_SIGNATURE
  • VSENCODING_UTF16BE
  • VSENCODING_UTF16BE_WITH_SIGNATURE
  • VSENCODING_UTF32LE
  • VSENCODING_UTF32LE_WITH_SIGNATURE
  • VSENCODING_UTF32BE
  • VSENCODING_UTF32BE_WITH_SIGNATURE

readFirstBuffer - Indicates whether this is the first read after opening the file. When this is non-zero and the encoding given has a signature, the signature is skipped.

pXlatError - Set to 1 if a translation error occurs.

Returns: int

Returns number of bytes read if successful. 0 is returned when there's no more data to be read. Otherwise, a negative error code is returned.

Category:

Unicode Functions


vsUTF8FillBuf

char*VSAPI vsUTF8FillBuf(int encoding, int writeFirstBuffer, void *pDest, int DestLen, const char *pSrc, const char *pSrcEnd, unsigned *pNofBytesWritten=0, int *pstatus=0, VSUTF8_FILEINFO1 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO1*pfile, const char*pCurrentPos)=0, int *pXlatError=0)

Converts the data from the UTF-8 to the encoding specified UTF-8.

Parameters:

destEncoding - One of the following encodings:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page
  • VSENCODING_UTF8
  • VSENCODING_UTF8_WITH_SIGNATURE
  • VSENCODING_UTF16LE
  • VSENCODING_UTF16LE_WITH_SIGNATURE
  • VSENCODING_UTF16BE
  • VSENCODING_UTF16BE_WITH_SIGNATURE
  • VSENCODING_UTF32LE
  • VSENCODING_UTF32LE_WITH_SIGNATURE
  • VSENCODING_UTF32BE
  • VSENCODING_UTF32BE_WITH_SIGNATURE

writeFirstBuffer - Indicates whether this is the first buffer is being written. When this is non-zero and the encoding given has a signature, the signature is written.

pDest - Destination buffer for data in the encoding format specified.

DestLen - Number of bytes allocated to destination buffer.

pSrc - Pointer to UTF-8 source data.

pSrcEnd - Pointer to end of UTF-8 source data.

pNofbytesWritten - Receives number of bytes (not characters of encoding format) written.

pstatus - Set to 0 if no error. Otherwise, a negative return code.

pfnRead - Callback function to read more data when pBuf>=pEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

pXlatError - Set to 1 if a translation error occurs.

Returns: char*VSAPI

Returns pointer to next character to read.

Example:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead1(VSUTF8_FILEINFO1 *pfile,const
char *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(char *)pCurrentPos;
      return(1);  // No more data
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(char *)gTempBuffer;
   pfile->pEndBuf=(char *)(gTempBuffer+status);
   return(status);  // 0 for success, negative number for error.
}

static char gDestTempBuffer[32768];
static int WriteFromUTF8(const char *pszFilename,int
dest_encoding,int intput_fh)
{
   VSUTF8_FILEINFO1 fileinfo;
   fileinfo.pBuf=fileinfo.pEndBuf=0;
   fileinfo.fh=intput_fh;

   int output_fh=vsFileOpen(pszFilename,1);
   if (output_fh<0) {
      return(output_fh);
   }
   int writeFirstBuffer=1;
   int status;
   for (;;) {
      int Nofbytes;
      fileinfo.pBuf=vsUTF8FillBuf(dest_encoding,writeFirstBuffer,

gDestTempBuffer,sizeof(gDestTempBuffer),
                             fileinfo.pBuf,fileinfo.pEndBuf,
                             (unsigned
*)&Nofbytes,&status,&fileinfo,CallbackFileRead1
                             );
      if (status<0) {
         break;
      }
      if (Nofbytes<=0) {
         status=Nofbytes;
         break;
      }
      Nofbytes=writefh(output_fh,gDestTempBuffer,Nofbytes);
      if (Nofbytes<0) {
         status=Nofbytes;
         break;
      }
      writeFirstBuffer=0;
   }
   closefh(output_fh);
   return(status);
}

Category:

Unicode Functions


vsUTF8IsAlpha

int VSAPI vsUTF8IsAlpha(const char *p, const char *pend, int *plen)

Parameters:

p - Pointer to UTF-8 character

pend - Pointer to end of UTF-8 source buffer.

plen - Set to number of bytes in UTF-8 character read.

Returns: int

Returns non-zero value if the UTF-8 character is a letter. Otherwise, 0 is returned.

Category:

Unicode Functions


vsUTF8IsLower

int VSAPI vsUTF8IsLower(const char *p, const char *pend, int *plen)

Parameters:

p - Pointer to UTF-8 character

pend - Pointer to end of UTF-8 source buffer.

plen - Set to number of bytes in UTF-8 character read.

Returns: int

Returns non-zero value if the UTF-8 character is a lower case letter. Otherwise, 0 is returned.

Category:

Unicode Functions


vsUTF8IsUpper

int VSAPI vsUTF8IsUpper(const char *p, const char *pend, int *plen)

Parameters:

p - Pointer to UTF-8 character

pend - Pointer to end of UTF-8 source buffer.

plen - Set to number of bytes in UTF-8 character read.

Returns: int

Returns non-zero value if the UTF-8 character is a upper case letter. Otherwise, 0 is returned.

Category:

Unicode Functions


vsUTF8Lowcase

void VSAPI vsUTF8Lowcase(char *p, int buflen)

Converts UTF-8 text to lower case. Under Windows, this function relies on the WIN32 function CharLowerBuffW which only support characters below 65536. Characters above 65537 are not changed.

Parameters:

pBuf - Buffer to convert.

BufLen - Length of buffer to convert.

Category:

Unicode Functions


vsUTF8MemICmp

VSSTATIC int vsUTF8MemICmp(const char *pBuf1, const char *pBuf2, int len)

Case insensitive compare. Characters are compared by character value and not using any Unicode standard.

Parameters:

pBuf1 - Pointer to UTF-8 buffer 1

pBuf2 - Pointer to UTF-8 buffer 2

len - Number of bytes to compare

Returns: VSSTATIC int

0     Strings are equal
>0    pBuf1>pBuf2
<0    pBuf1

Category:

Unicode Functions


vsUTF8ReadEntireFile

int VSAPI vsUTF8ReadEntireFile(int filehandle, int encoding, char *&pszBuf, int &BufLen, int reuseCurrentPointer=0, int *pXlatError=0)

Converts entire file from encoding specified to UTF-8.

Parameters:

filehandle - Source file handle returned by vsFileOpen().

encoding - One of the following encodings:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page
  • VSENCODING_UTF8
  • VSENCODING_UTF8_WITH_SIGNATURE
  • VSENCODING_UTF16LE
  • VSENCODING_UTF16LE_WITH_SIGNATURE
  • VSENCODING_UTF16BE
  • VSENCODING_UTF16BE_WITH_SIGNATURE
  • VSENCODING_UTF32LE
  • VSENCODING_UTF32LE_WITH_SIGNATURE
  • VSENCODING_UTF32BE
  • VSENCODING_UTF32BE_WITH_SIGNATURE

pszBuf - Output buffer for UTF-8 data. This buffer is null terminated. If reuseCurrentPoint is non- zero, this must be a pointer to memory allocated by vsAlloc().

BufLen - Number of bytes read into pszBuf. This length does not including the null terminating character.

reuseCurrentPointer - When non-zero, pszBuf must already point to memory allocated by vsAlloc. If pszBuf is not big enough, its size will be increased.

pXlatError - Set to 1 if a translation error occurs.

Returns: int

Returns 0 if successful. Otherwise, a negative return code.

Category:

Unicode Functions


vsUTF8Reverse

void VSAPI vsUTF8Reverse(char *p, int buflen)

Reverse UTF-8 characters in string.

Parameters:

pBuf - Buffer to convert.

BufLen - Length of buffer to convert.

Category:

Unicode Functions


vsUTF8StrCmp

int VSAPI vsUTF8StrCmp(const char *p1, const char *p2, int len1=-1, int len2=-1)

Compares two UTF-8 strings. This function is slow because it applies many of the Unicode rules. Under Windows, both buffers are converted to UTF-16 and then the WIN32 CompareStringW() function is called. Use the vsUTF8StrCmpQuick() function for a fast string compare that does not apply Unicode rules.

Parameters:

p1 - UTF-8 string 1.

p2 - UTF-8 string 2.

len1 - Number of bytes in string 1.

len2 - Number of bytes in string 2.

Returns: int

Returns 1 if string 1 is greater than string 2. Returns 0 if string 1 equals string 2. Returns -1 if string 1 is less than string 2.

Category:

Unicode Functions


vsUTF8StrCmpQuick

VSSTATIC int vsUTF8StrCmpQuick(const char *pBuf1, const char *pBuf2, int BufLen1, int BufLen2)

Case sensitive compare. Characters are compared by character value and not using any Unicode standard.

Parameters:

pBuf1 - Pointer to UTF-8 buffer 1

pBuf2 - Pointer to UTF-8 buffer 2

BufLen1 - Number of bytes in buffer 1. Use -1 if pBuf1 is a NULL terminated string.

BufLen2 - Number of bytes in buffer 2. Use -1 if pBuf2 is a NULL terminated string.

Returns: VSSTATIC int

0     Strings are equal
>0    pBuf1>pBuf2
<0    pBuf1

Category:

Unicode Functions


vsUTF8StrICmp

int VSAPI vsUTF8StrICmp(const char *p1, const char *p2, int len1=-1, int len2=-1)

Compares two UTF-8 strings case insensitive. This function is slow because it applies many of the Unicode rules. Under Windows, both buffers are converted to UTF-16 and then the WIN32 CompareStringW() function is called. Use the vsUTF8StrICmpQuick() function for a fast string compare that does not apply Unicode rules.

Parameters:

p1 - UTF-8 string 1.

p2 - UTF-8 string 2.

len1 - Number of bytes in string 1.

len2 - Number of bytes in string 2.

Returns: int

Returns 1 if string 1 is greater than string 2. Returns 0 if string 1 equals string 2. Returns -1 if string 1 is less than string 2.

Category:

Unicode Functions


vsUTF8StrICmpQuick

VSSTATIC int vsUTF8StrICmpQuick(const char *pBuf1, const char *pBuf2, int BufLen1=-1, int BufLen2=-1)

Case insensitive compare. Characters are compared by character value and not using any Unicode standard.

Parameters:

pBuf1 - Pointer to UTF-8 buffer 1

pBuf2 - Pointer to UTF-8 buffer 2

BufLen1 - Number of bytes in buffer 1. Use -1 if pBuf1 is a NULL terminated string.

BufLen2 - Number of bytes in buffer 2. Use -1 if pBuf2 is a NULL terminated string.

Returns: VSSTATIC int

0     Strings are equal
>0    pBuf1>pBuf2
<0    pBuf1

Category:

Unicode Functions


vsUTF8Togglecase

void VSAPI vsUTF8Togglecase(char *p, int buflen)

Converts UTF-8 text to toggle case character by character. Characters above 65537 are not changed.

Parameters:

pBuf - Buffer to convert.

BufLen - Length of buffer to convert.

Category:

Unicode Functions


vsUTF8ToMultiByte

char*VSAPI vsUTF8ToMultiByte(const char *pBuf, int BufLen=-1, int *pDestLen=0, int i=0, int codePage=VSCP_ACTIVE_CODEPAGE)

Converts a UTF-8 text to multi-byte. To free the memory allocated by this function, specify 0 for pBuf, -1 for BufLen, anything for DestLen, and the correct destination temp buffer. There is typically no need to free the memory allocated by this function unless you converted a very large amount of data.

Parameters:

pBuf - Input UTF-8 buffer.

BufLen - Length of buffer. Specify -1 to compute length from a null terminated buffer.

DestLen - Length of resulting multi-byte string.

i - Destination temp buffer index where 0<=i<=9. This allows you to call this function multiple times without the previous result being overwritten by the new result.

codePage - One of the following code pages:

  • VSCP_ACTIVE_CODEPAGE
  • VSCP_CYRILLIC_KOI8_R
  • VSCP_ISO_8859_1
  • VSCP_ISO_8859_2
  • VSCP_ISO_8859_3
  • VSCP_ISO_8859_4
  • VSCP_ISO_8859_5
  • VSCP_ISO_8859_6
  • VSCP_ISO_8859_7
  • VSCP_ISO_8859_8
  • VSCP_ISO_8859_9
  • VSCP_ISO_8859_10
  • Any valid Windows code page

Returns: char*VSAPI

Returns pointer to null terminated multi-byte string.

Category:

Unicode Functions


vsUTF8ToUTF16

unsigned short*VSAPI vsUTF8ToUTF16(const char *pBuf, int BufLen=-1, int *pDestLen=0, int i=0)

Converts a UTF-8 text to UTF-16. To free the memory allocated by this function, specify 0 for pBuf, -1 for BufLen, anything for DestLen, and the correct destination temp buffer. There is typically no need to free the memory allocated by this function unless you converted a very large amount of data.

Parameters:

pBuf - Input UTF-8 buffer.

BufLen - Length of buffer. Specify -1 to compute length from a null terminated buffer.

DestLen - Length of resulting UTF-16 string.

i - Destination temp buffer index where 0<=i<=9. This allows you to call this function multiple times without the previous result being overwritten by the new result.

Returns: unsigned short*VSAPI

Returns pointer to null terminated UTF-16 string.

Category:

Unicode Functions


vsUTF8Upcase

void VSAPI vsUTF8Upcase(char *p, int buflen)

Converts UTF-8 text to upper case. Under Windows, this function relies on the WIN32 function CharUpperBuffW which only support characters below 65536. Characters above 65537 are not changed.

Parameters:

pBuf - Buffer to convert.

BufLen - Length of buffer to convert.

From:

pic.doc

Category:

Unicode Functions


vsUTF16CharNext

unsigned short*VSAPI vsUTF16CharNext(const unsigned short *pCurrent, const unsigned short *pEndBuf)

Parameters:

pCurrent - Buffer contain UTF-16 text.

pEndBuf - Pointer to end of pBuf text where pEndBuf-pCurrent is the buffer length.

Returns: unsigned short*VSAPI

Returns pointer to the beginning of the next composite or surrogate character or pEndBuf if pCurrent==pEndBuf.

Category:

Unicode Functions


vsUTF16CharPrev

unsigned short*VSAPI vsUTF16CharPrev(const unsigned short *pLine, const unsigned short *pCurrent)

Parameters:

pLine - Buffer contain UTF-16 text.

pCurrent - Pointer to the beginning of a UTF-16 character in pLine.

Returns: unsigned short*VSAPI

Returns pointer to the beginning of the previous composite or surrogate character or pLine if pCurrent==pLine.

Category:

Unicode Functions


vsUTF16CharRead

unsigned short*VSAPI vsUTF16CharRead(const unsigned short *pwBuf, const unsigned short *pwEndBuf, unsigned &uch, VSUTF8_FILEINFO2 *pfile=0, int(VSAPI*pfnRead)(VSUTF8_FILEINFO2*pfile, const unsigned short*pCurrentPos)=0)

Reads a UTF-16 or UTF-32 (surrogate) character. This function does not read composite characters. This function is slower than the vsUTF16CharRead2() function.

Parameters:

pwBuf - Buffer contain UTF-16 text.

pwEndBuf - Pointer to end of buffer.

uch - Recieves UTF-32 character.

pfnRead - Callback function to read more data when pwBuf>=pwEndBuf. This allows you to write more efficient code which processes data directly from any source without having to make a copy of the data. Returns 0 if successful, 1 if no more data, and a negative error code for an error.

Returns: unsigned short*VSAPI

Returns pointer to the next character to read.

Example:

Sample callback function:

static char gTempBuffer[32768];

static int VSAPI CallbackFileRead2(VSUTF8_FILEINFO2 *pfile,const
unsigned short *pCurrentPos)
{
   if (pCurrentPospEndBuf) {
      pfile->pBuf=(unsigned short *)pCurrentPos;
      return(1);  // no more data.
   }
   int status=readfh(pfile->fh,gTempBuffer,sizeof(gTempBuffer));
   pfile->pBuf=(unsigned short *)gTempBuffer;
   pfile->pEndBuf=(unsigned short
*)(gTempBuffer+(status&0xfffffffe));
   return(status);   // 0 for success, negative number for error.
}

Category:

Unicode Functions


vsUTF16CharRead2

VSSTATIC unsigned short*VSAPI vsUTF16CharRead2(const unsigned short *pwBuf, const unsigned short *pwEndBuf, unsigned &uch)

Reads a UTF-16 or UTF-32 (surrogate) character. This function does not read composite characters. This function is faster than the vsUTF16CharRead() function.

Parameters:

pwBuf - Buffer contain UTF-16 text.

pwEndBuf - Pointer to end of buffer.

uch - Recieves UTF-32 character.

Returns: VSSTATIC unsigned short*VSAPI

Returns pointer to the next character to read.

Category:

Unicode Functions


vsUTF16CharReadPrev

unsigned short*VSAPI vsUTF16CharReadPrev(const unsigned short *pLine, const unsigned short *pCurrent, unsigned &uch)

Reads the previous UTF-16 or UTF-32 (surrogate) character. This function does not read composite characters.

Parameters:

pLine - Buffer contain UTF-16 text.

pCurrent - Pointer to current character in pLine.

uch - Recieves UTF-32 character.

Returns: unsigned short*VSAPI

Returns pointer to the previous character.

Category:

Unicode Functions


vsUTF16SafeCpy

void VSAPI vsUTF16SafeCpy(unsigned short *pszDest, const unsigned short *pszSrc, int DestLen)

Copies a null terminated UTF-16 string. Resulting string is always null terminated even if the entire source string cannot be copied.

Parameters:

pszDest - Destination buffer.

pszSrc - Null terminated UTF-16 string.

DestLen> - Number of characters allocated to pszDest. Must be at least 1.

Category:

Unicode Functions


vsUTF16ToUTF8

char*VSAPI vsUTF16ToUTF8(const unsigned short *pBuf, int BufLen=-1, int *pDestLen=0, int i=0)

Converts a UTF-16 to UTF-8. To free the memory allocated by this function, specify 0 for pBuf, -1 for BufLen, anything for DestLen, and the correct destination temp buffer. There is typically no need to free the memory allocated by this function unless you converted a very large amount of data.

Parameters:

pBuf - Input UTF-16 buffer.

BufLen - Length of buffer. Specify -1 to compute length from a null terminated buffer.

DestLen - Length of resulting UTF-8 string.

i - Destination temp buffer index where 0<=i<=9. This allows you to call this function multiple times without the previous result being overwritten by the new result.

Returns: char*VSAPI

Returns pointer to null terminated UTF-8 string.

Category:

Unicode Functions


vsUTF32ToLower

unsigned VSAPI vsUTF32ToLower(unsigned u)

Parameters:

uch - UTF-32 character.

Returns: unsigned

Converts UTF-32 character to lower case. Currently, if a character above 0xFFFFF is given, the character is returned unchanged.

Category:

Unicode Functions


vsUTF32ToUpper

unsigned VSAPI vsUTF32ToUpper(unsigned u)

Parameters:

uch - UTF-32 character.

Returns: unsigned

Converts UTF-32 character to upper case. Currently, if a character above 0xFFFFF is given, the character is returned unchanged.

Category:

Unicode Functions


vsWinQData

void*VSAPI vsWinQData(int wid)

This function should only be used by OEM's to store some data per editor control and not by users writing macros.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

Returns: void*VSAPI

Returns pointer to OEM window data set by the vsWinSetData function.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsWinSetData


vsWinSetData

void VSAPI vsWinSetData(int wid, void *pdata)

This function should only be used by OEM's to store some data per editor control and not by users writing macros.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

pdata - Pointer to window specific data.

Returns: void

Sets pointer to OEM window data.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

vsWinSetData


vsWorkspaceListProjects

char**VSAPI vsWorkspaceListProjects(int *pNofProjects, int *pActiveProject=0)

Parameters:

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.

Returns: char**VSAPI

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.

Category:

Project Functions


vsWorkspaceQName

char*VSAPI vsWorkspaceQName(char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0)

Parameters:

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.

Returns: char*VSAPI

Returns pszFilename.

Category:

Project Functions


vsXMLCFGAdd

int VSAPI vsXMLCFGAdd(int iHandle, int iIndex, const char *pNameOrValue, int NameOrValueLen, int NodeType, int iFlags)

Adds node to XMLCFG tree. Use the vsXMLCFGSetNname() function to set the name of a node. Use the vsXMLCFGSetValue() function to set the value of a node.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - Tree node index to add attribute to.

pNameOrValue - Name or value of the element to be added. If the NodeType specified requires a name, this specifies the name. Otherwise, this specifies the value.

NameOrValueLen - Number of bytes in pNameOrValue. -1 may be specified if pNameOrValue is a null terminated string.

NodeType - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

iFlags - Add flags. By default, a new sibling is created after NodeIndex. 0 or one of the following flags may be specified:

  • VSXMLCFG_ADD_BEFORE
  • VSXMLCFG_ADD_AS_CHILD

Returns: int

Returns index to new node if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGAddAttribute

int VSAPI vsXMLCFGAddAttribute(int iHandle, int iIndex, const char *pszAttrName, const char *pAttrValue, int AttrValueLen=-1, int iFlags=0)

Adds attribute as a child of the NodeIndex specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - node index to add attribute to.

pszAttrName - Name of the attribute to be added.

pAttrValue - Value of the attribute.

AttrValueLen - Number of bytes in pAttrValue. -1 may be specified if pAttrValue is a null terminated string.

iFlags - combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

Returns: int

Returns node index of the new attribute if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGClose

int vsXMLCFGClose(int iHandle)

Decrements the open count and frees XMLCFG tree when the count reaches zero.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGCopy

int VSAPI vsXMLCFGCopy(int DestHandle, int DestNodeIndex, int SrcHandle, int iSrcNodeIndex, int flags)

Duplicate a tree

Parameters:

DestHandle - Handle of destination tree

DestNodeIndex - Index of destination node

SrcHandle - Handle to source tree

iSrcNodeIndex - Index of source node

flags - Specifies one of the following flags:

VSXMLCFG_COPY_CHILDREN
copy children of source as the last children of the dest
VSXMLCFG_COPY_AS_CHILD
copy the source as the last child of the dest
VSXMLCFG_COPY_BEFORE
copy the source as a sibling before the dest
Specify no flags to copy as a sibling after dest. Note that this function can not copy children as siblings.

Returns: int

Returns first node created or VSRC_XMLCFG_NO_CHILDREN_COPIED if successful. Otherwise, an negative error code other than VSRC_XMLCFG_NO_CHILDREN_COPIED is returned.

Example:

// Add tree as last child
vsXMLCFGCopy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex,VSXMLCFG_COPY_A_CHILD);

// Add tree before dest node
vsXMLCFGCopy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex,VSXMLCFG_COPY_BEFORE);

// Add tree after dest node
vsXMLCFGCopy(DestHandle,DestNodeIndex,
   SrcHandle,SrcNodeIndex);

Category:

XMLCFG Functions


vsXMLCFGCreate

int VSAPI vsXMLCFGCreate(const char *pszFilename, int iEncoding, int iCreateOption=VSXMLCFG_CREATE_IF_EXISTS_CREATE)

Creates or opens an existing XMLCFG tree.

Parameters:

pszFilename - Name of XML file to create. No disk I/O occurs.

iEncoding - For standard XML files, this parameter should be VSENCODING_UTF8. For Visual Studio 2002/2003 project files, this parameter should be VSCP_ACTIVE_CODEPAGE. For Visual Studio 2005, use VSENCODING_UTF8. Do not use VSENCODING_AUTOXML for creating new documents. But VSENCODING_AUTOXML is valid when using VSXMLCFG_CREATE_IF_EXISTS_OPEN.

encoding may be one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_AUTOUNICODE
VSENCODING_AUTOXML
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE

VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE
VSENCODING_UTF32BE_WITH_SIGNATURE

iCreateOption - One of the following options.

VSXMLCFG_CREATE_IF_EXISTS_CLEAR
If this XMLCFG tree already exists, clear the contents of the tree.
VSXMLCFG_CREATE_IF_EXISTS_OPEN
If this XMLCFG tree already exists, just return the existing handle.
VSXMLCFG_CREATE_IF_EXISTS_ERROR
If this XMLCFG tree already exists, return an error.
VSXMLCFG_CREATE_IF_EXISTS_CREATE
If this XMLCFG tree already exists, create a new tree with the same name.

Returns: int

Returns XMLCFG tree handle if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGDelete

int VSAPI vsXMLCFGDelete(int iHandle, int NodeIndex, int OnlyDeleteChildren=0)

Delete a node and its children from an XML tree.

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to delete

OnlyDeleteChildren - When true, only the children of the node specified are deleted.

Returns: int

Returns 0 if successful

Category:

XMLCFG Functions


vsXMLCFGDeleteAttribute

int VSAPI vsXMLCFGDeleteAttribute(int iHandle, int NodeIndex, const char *pszAttrName)

Deletes an attribute

Parameters:

iHandle - Handle to an XML tree

NodeIndex - Index to node to delete attribute from

pszAttrName - Name of attribute to delete

Returns: int

Returns 0 if successful

Category:

XMLCFG Functions


vsXMLCFGFindChildWithName

int VSAPI vsXMLCFGFindChildWithName(int iHandle, int iIndex, VSPSZ pszName, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Finds the tree node index

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - Tree node index.

pszName - Name of node to find. This may be null.

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the tree node index with element matching pszName which is a child of node NodeIndex. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGFindSimple

int VSAPI vsXMLCFGFindSimple(int iHandle, VSPSZ pszQueryStr, int NodeIndex=VSXMLCFG_ROOT_INDEX, int reserved=0)

Parameters:

iHandle - iHandle Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

pszQueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

NodeIndex - Tree node index to start search from.

reserved -

Returns: int

Returns node index (>=0) found if successful. Otherwise a negative error code is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c"
FileIndex=vsXMLCFGFindSimple(handle,
    "/project/file[file-eq(@name,'main.c')]");

// Find the attribute node under /project/file with name equal
// to "main.c"
AttrIndex=vsXMLCFGFindSimple(handle,
    "/project/file/@name[file-eq(.,'main.c')]");

Category:

XMLCFG Functions


vsXMLCFGFindSimpleArray

void VSAPI vsXMLCFGFindSimpleArray(int iHandle, VSPSZ pszQueryStr, int NodeIndex, slickedit::SEArray&nodeArray, int FindFlags=0)

Searches for nodes based on an subset XPath expression.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

pszQueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

NodeIndex - Tree node index to start search from.

FindFlags - Zero or more of the following flags:

Returns: void

If successful, returns array of integer node indexes where -1 terminates the array. Otherwise 0 is returned.

Example:

// Find all file element nodes under /project
int *piArray=vsXMLCFGFindSimpleArray(handle,"/project/file");

// Find the "file" element nodes that are anywhere
// beneath the node specified.
int *piArray=vsXMLCFGFindSimpleArray(handle,"//file");

Category:

XMLCFG Functions


vsXMLCFGFindSimpleInsert

int VSAPI vsXMLCFGFindSimpleInsert(int wid, int iHandle, const char *pszQueryStr, int NodeIndex=VSXMLCFG_ROOT_INDEX)

Searches for nodes based on an subset XPath expression and inserts the results into the current buffer.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

pszQueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

NodeIndex - Tree node index to start search from.

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Example:

// Find the value of all "name" attributes under
// "/project/file" element nodes.
vsXMLCFGFindSimpleInsert(0,handle,"/project/file/@name");

Category:

XMLCFG Functions


vsXMLCFGGetAttribute

char*VSAPI vsXMLCFGGetAttribute(int iHandle, int iIndex, VSPSZ pszRequestedAttr, int *pValueLen=0, VSPSZ pszDefaultValue="")

Retrieves attribute value for the attribute name given.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - Tree node index.

pszRequestedAttr - Name of attribute to retrieve value for.

pValueLen - Number of bytes in returned value.

pszDefaultValue - Value to return if attributre does not exist on an error occurs.

Returns: char*VSAPI

Returns attribute value if successful. Otherwise pszDevaultValue is returned.

Category:

XMLCFG Functions


vsXMLCFGGetDepth

int VSAPI vsXMLCFGGetDepth(int iHandle, int NodeIndex)

Gets the depth of a node. Root node depth is 0.

Parameters:

NodeIndex - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - Tree node index.

Returns: int

Returns the depth of the specified tree item. The depth of the root tree item (NodeIndex=0) is 0.

Category:

XMLCFG Functions


vsXMLCFGGetFilename

VSPSZ VSAPI vsXMLCFGGetFilename(int iHandle)

Gets the filename for the XMLCFG tree specified. This is the name specified in the vsXMLCFGOpen and vsXMLCFGCreate calls.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

Returns: VSPSZ

Returns the filename used to open or create this XML tree.

Category:

XMLCFG Functions


vsXMLCFGGetFirstChild

int VSAPI vsXMLCFGGetFirstChild(int iHandle, int iIndex, int NodeTypeFlags=~VSXMLCFG_NODE_ATTRIBUTE)

Gets the first child index from the specified index. The root index is always 0, or TREE_ROOT_INDEX, so to traverse the tree start there.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndex - Tree node index.

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the first child of the specified node type for the node given. -1 is returned if the node specified has no children.

Category:

XMLCFG Functions


vsXMLCFGGetLastChild

int VSAPI vsXMLCFGGetLastChild(int iHandle, int NodeIndex, int NodeTypeFlags=~VSXMLCFG_NODE_ATTRIBUTE)

Gets the parent index from the specified index.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Tree node index.

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the last child of the specified node type for the node given. -1 is returned if the node specified has no children.

Category:

XMLCFG Functions


vsXMLCFGGetModify

int VSAPI vsXMLCFGGetModify(int iHandle)

Fetches the XML document modify state.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

Returns: int

Returns a non-zero value if the XML document has been modified.

Category:

XMLCFG Functions


vsXMLCFGGetName

char*VSAPI vsXMLCFGGetName(int iHandle, int NodeIndex, int *pNameLen=0)

Gets the node name

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex -

pNameLen -

Returns: char*VSAPI

Returns the name for the node specified. The name returned is null for comment, attribute, CDATA, and PCDATA nodes.

Category:

XMLCFG Functions


vsXMLCFGGetNextAttribute

int VSAPI vsXMLCFGGetNextAttribute(int iHandle, int NodeIndex)

Gets the next attribute node index.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Tree node index. Specify an element node to find the first attribute (child of the element node). In subsequent calls, specified the previous value returned by this function to get the next attribute index.

Returns: int

Returns the next attribute node index if successful. Otherwise a negative error code is returned.

Example:

ProjectIndex=vsXNKCFGFindSimple(handle,"/project");
for (AttrIndex=ProjectIndex;AttrIndex>0;) {
    AttrIndex=vsXMLCFGGetNextAttribute(handle,AttrIndex);
    if (AttrIndex<0) break;
    xprintf("Attribute name is %s",vsXMLCFGGetNextAttribute(handle,AttrIndex));
}

Category:

XMLCFG Functions


vsXMLCFGGetNextSibling

int VSAPI vsXMLCFGGetNextSibling(int iHandle, int NodeIndex, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Index of node to get sibling node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the next sibling of the node specified by NodeIndex. -1 is returned if the node specified has no next sibling.

Category:

XMLCFG Functions


vsXMLCFGGetNumNodes

int VSAPI vsXMLCFGGetNumNodes(int iHandle)

Returns the number of nodes in an XML tree

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

Returns: int

Number of nodes in the tree. Negative return value is an error.

Category:

XMLCFG Functions


vsXMLCFGGetParent

int VSAPI vsXMLCFGGetParent(int iHandle, int NodeIndex)

Gets the parent index from the specified index.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex -

Returns: int

If successful, returns index of parent. Otherwise a negative error is returned.

Category:

XMLCFG Functions


vsXMLCFGGetPath

char*VSAPI vsXMLCFGGetPath(int iHandle, VSPSZ pszQueryStr, VSPSZ pszAttrName, int *pAttrValueLen=0, VSPSZ pszDefaultValue="")

Gets the value of an attribute

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

pszQueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

pszAttrName - Name of attribute to get value of.

pAttrValueLen - Number of bytes in returned attribute value.

pszDefaultValue - Value to return if attribute does not exist or an error occurs.

Returns: char*VSAPI

attribute value if successful. Otherwise pszDefaultValue is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c" and get the "options" attribute value.
char *pszOptions=vsXMLCFGGetPath(handle,
    "/project/file[file-eq(@name,'main.c')]",
    "options"
    );

Category:

XMLCFG Functions


vsXMLCFGGetPrevSibling

int VSAPI vsXMLCFGGetPrevSibling(int iHandle, int NodeIndex, int NodeTypeFlags=VSXMLCFG_NODE_ELEMENT_START | VSXMLCFG_NODE_ELEMENT_START_END)

Gets the previous sibling child index from the specified index. The root index is always TREE_ROOT_INDEX, so to traverse the tree start there.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Index of node to get sibling node index for

NodeTypeFlags - Indicates node type of child to find. 1 or more VSXMLCFG_NODE_* flags. See _xmlcfg_add() for more information on this parameter.

Returns: int

Returns the node index of the next sibling of the node specified by NodeIndex. -1 is returned if the node specified has no next sibling.

Category:

XMLCFG Functions


vsXMLCFGGetType

int VSAPI vsXMLCFGGetType(int iHandle, int NodeIndex)

Gets info about a node

Parameters:

iHandle - Handle for an XML tree

NodeIndex - Index of element

Returns: int

Returns the node type if successful (one of VSXMLCFG_NODE_* constants). Otherwise a negative return code is returned.

Category:

XMLCFG Functions


vsXMLCFGGetValue

char*VSAPI vsXMLCFGGetValue(int iHandle, int NodeIndex, int *pValueLen=0)

Gets the node value

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Index of element

pValueLen - If specified, set to length in bytes of the value

Returns: char*VSAPI

Returns the node type if successful (one of VSXMLCFG_NODE_* constants). Otherwise a negative return code is returned.

Category:

XMLCFG Functions


vsXMLCFGOpen

int VSAPI vsXMLCFGOpen(const char *pszFilename, int &status, int OpenFlags=0, int iEncoding=VSENCODING_AUTOXML)

Opens an XML file and loads it into a tree. returns a handle to the tree

Parameters:

pszFilename - Name of the XML file to open

status - Set to 0 if succesful. Otherwise this is set to negative error code.

OpenFlags - zero or more of the following flags:

VSXMLCFG_OPEN_ADD_PCDATA
When specified, PCDATA (text between tags including white space) nodes are added to tree. CDATA (<![CDATA[ ... ]]>) nodes are always added to the tree.
VSXMLCFG_OPEN_RETURN_TREE_ON_ERROR
When specified, a valid tree handle is returned even if the XML document is not well formed.

One useful purpose for this option is to determine the namespaces for the current element. Unless the VSRC_XMLCFG_INPUT_ENDED_BEFORE_ALL_TAGS_WERE_TERMINATED is returned, you can't be sure if the XML tree was parsed up to the the current element. Therefore, when determining the current namespaces, truncate the buffer before the '<' for the current element

If a unrecoverable error occurs like "out of memory", a negative error code is returned.

By default, negative error code is returned.

Note: this function DOES NOT perform a thorough well formness check.

VSXMLCFG_OPEN_REFCOUNT
When specified, a search is preformed in the XMLCFG open file cache for a filename which already has the name given to open. If it is found, the reference count is incremented and the same XMLCFG handle is returned. vsXMLCFGClose always decrements the reference count and closes the file when the reference count is 0.

iEncoding - For standard XML files, this parameter should be VSENCODING_AUTOXML. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE.

encoding may be one of the following:

VSCP_ACTIVE_CODEPAGE
VSCP_EBCDIC
VSCP_CYRILLIC_KOI8_R
VSCP_ISO_8859_1
VSCP_ISO_8859_2
VSCP_ISO_8859_3
VSCP_ISO_8859_4
VSCP_ISO_8859_5
VSCP_ISO_8859_6
VSCP_ISO_8859_7
VSCP_ISO_8859_8
VSCP_ISO_8859_9
VSCP_ISO_8859_10
Any valid Windows code page
VSENCODING_AUTOUNICODE
VSENCODING_AUTOXML
VSENCODING_UTF8
VSENCODING_UTF8_WITH_SIGNATURE
VSENCODING_UTF16LE
VSENCODING_UTF16LE_WITH_SIGNATURE
VSENCODING_UTF16BE
VSENCODING_UTF16BE_WITH_SIGNATURE
VSENCODING_UTF32LE

VSENCODING_UTF32LE_WITH_SIGNATURE
VSENCODING_UTF32BE
VSENCODING_UTF32BE_WITH_SIGNATURE

Returns: int

handle to the tree if succesful ( >=0 ). Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGOpenFromBuffer

int VSAPI vsXMLCFGOpenFromBuffer(int wid, int &status, int flags=0, int StartRealSeekPos=0, int EndRealSeekPos=VSNULLSEEK, void *preserved=0)

Opens and parses an XML file into a tree. The XMLCFG function are intended to be used on valid XML files for reading and writing various configuration information. The XMLCFG functions are not for validating or checking for well formedness.

Parameters:

wid - Window id of editor control.

status - (Output only) Set to 0 if successful. Otherwise a negative error code.

flags - zero or more of the following flags:

VSXMLCFG_OPEN_ADD_PCDATA
When specified, PCDATA (text between tags including white space) nodes are added to tree. CDATA (<![CDATA[ ... ]]>) nodes are always added to the tree.
VSXMLCFG_OPEN_RETURN_TREE_ON_ERROR
When specified, a valid tree handle is returned even if the XML document is not well formed.

One useful purpose for this option is to determine the namespaces for the current element. Unless the VSRC_XMLCFG_INPUT_ENDED_BEFORE_ALL_TAGS_WERE_TERMINATED is returned, you can't be sure if the XML tree was parsed up to the the current element. Therefore, when determining the current namespaces, truncate the buffer before the '<' for the current element

If a unrecoverable error occurs like "out of memory", a negative error code is returned.

By default, negative error code is returned.

Note: this function DOES NOT perform a thorough well formness check.

StartRealSeekPos - Start real seek position to start reading XML text.

EndRealSeekPos - End real seek position of XML text.

preserved -

Returns: int

Returns XMLCFG tree handle if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGOpenFromString

int VSAPI vsXMLCFGOpenFromString(const char *pBuffer, int BufLen, int &status, int OpenFlags=0, int iEncoding=VSENCODING_AUTOXML, void *preserved=0)

Opens and parses an XML file into a tree. The XMLCFG function are intended to be used on valid XML files for reading and writing various configuration information. The XMLCFG functions are not for validating or checking for well formedness.

Parameters:

pBuffer -

BufLen -

status - (Output only) Set to 0 if successful. Otherwise a negative error code.

OpenFlags - zero or more of the following flags:

VSXMLCFG_OPEN_ADD_PCDATA
When specified, PCDATA (text between tags including white space) nodes are added to tree. CDATA (<![CDATA[ ... ]]>) nodes are always added to the tree.
VSXMLCFG_OPEN_RETURN_TREE_ON_ERROR
When specified, a valid tree handle is returned even if the XML document is not well formed.

One useful purpose for this option is to determine the namespaces for the current element. Unless the VSRC_XMLCFG_INPUT_ENDED_BEFORE_ALL_TAGS_WERE_TERMINATED is returned, you can't be sure if the XML tree was parsed up to the the current element. Therefore, when determining the current namespaces, truncate the buffer before the '<' for the current element

If a unrecoverable error occurs like "out of memory", a negative error code is returned.

By default, negative error code is returned.

Note: this function DOES NOT perform a thorough well formness check.

VSXMLCFG_OPEN_REFCOUNT
When specified, a search is preformed in the XMLCFG open file cache for a filename which already has the name given to open. If it is found, the reference count is incremented and the same XMLCFG handle is returned. vsXMLCFGClose always decrements the reference count and closes the file when the reference count is 0.

iEncoding - For standard XML files, this parameter should be VSENCODING_AUTOXML. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE.

preserved -

Returns: int

Returns XMLCFG tree handle if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGSave

int VSAPI vsXMLCFGSave(int iHandle, int iIndentAmount, int iFlags, const char *pszAlternateFilename=0, int encoding=-1, int NodeIndex=0, PFNXMLCFGCFG_SAVE_CALLBACK pfnCallback=0)

Saves an XMLCFG tree to a XML file.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndentAmount - Amount to indent for each level. -1 to use tabs

iFlags - Formatting flags. flags may be zero or more of the following flags:

VSXMLCFG_SAVE_ALL_ON_ONE_LINE
Specifies that all attributes for a given element be written on the same line.
VSXMLCFG_SAVE_ONE_LINE_IF_ONE_ATTR
Specifies that attributes for a given element be written on the same line if there is only one attribute.
VSXMLCFG_SAVE_DOS_EOL
Specifies that carriage return and line feed characters separate each line. This is the default under Windows.
VSXMLCFG_SAVE_UNIX_EOL
Specifies that a line feed character separate each line. This is the default under UNIX.
VSXMLCFG_SAVE_SPACE_AROUND_EQUAL
Specifies that spaces be added before and after the '=' for attributes and their values.
VSXMLCFG_SAVE_CLOSE_BRACE_ON_SEPARATE_LINE
Specifies that the close brace be placed on a separate line.

pszAlternateFilename - When given, specifies filename to write to. Otherwise, the filename used in the open or create call is used.

encoding - When -1 this parameter defaults to the value specified in the vsXMLCFGOpen() or vsXMLCFGCreate() call. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE. encoding may be one of the following:

VSENCODING_UTF8 VSENCODING_UTF8_WITH_SIGNATURE VSENCODING_UTF16LE VSENCODING_UTF16LE_WITH_SIGNATURE VSENCODING_UTF16BE VSENCODING_UTF16BE_WITH_SIGNATURE VSENCODING_UTF32LE VSENCODING_UTF32LE_WITH_SIGNATURE VSENCODING_UTF32BE VSENCODING_UTF32BE_WITH_SIGNATURE

NodeIndex - The children of this node are written.

pfnCallback - Allows the indent to be customized for the contenst of a specific node.

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGSaveToBuffer

int VSAPI vsXMLCFGSaveToBuffer(int wid, int iHandle, int iIndentAmount, int iFlags, int NodeIndex=0, PFNXMLCFGCFG_SAVE_CALLBACK pfnCallback=0)

Saves an XMLCFG tree to a buffer.

Parameters:

wid - Window id of editor control. 0 specifies the current object.

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndentAmount - Amount to indent for each level. -1 to use tabs

iFlags - Formatting flags. flags may be zero or more of the following flags:

VSXMLCFG_SAVE_ALL_ON_ONE_LINE
Specifies that all attributes for a given element be written on the same line.
VSXMLCFG_SAVE_ONE_LINE_IF_ONE_ATTR
Specifies that attributes for a given element be written on the same line if there is only one attribute.
VSXMLCFG_SAVE_DOS_EOL
Specifies that carriage return and line feed characters separate each line. This is the default under Windows.
VSXMLCFG_SAVE_UNIX_EOL
Specifies that a line feed character separate each line. This is the default under UNIX.
VSXMLCFG_SAVE_SPACE_AROUND_EQUAL
Specifies that spaces be added before and after the '=' for attributes and their values.
VSXMLCFG_SAVE_CLOSE_BRACE_ON_SEPARATE_LINE
Specifies that the close brace be placed on a separate line.

NodeIndex - The children of this node are written.

pfnCallback - Allows the indent to be customized for the contenst of a specific node.

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGSaveToString

VSDLLEXPORT slickedit::SEString vsXMLCFGSaveToString(int iHandle, int iIndentAmount, int iFlags, int NodeIndex=0, PFNXMLCFGCFG_SAVE_CALLBACK pfnCallback=0)

Saves an XMLCFG tree to a XML file.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iIndentAmount - Amount to indent for each level. -1 to use tabs

iFlags - Formatting flags. flags may be zero or more of the following flags:

VSXMLCFG_SAVE_ALL_ON_ONE_LINE
Specifies that all attributes for a given element be written on the same line.
VSXMLCFG_SAVE_ONE_LINE_IF_ONE_ATTR
Specifies that attributes for a given element be written on the same line if there is only one attribute.
VSXMLCFG_SAVE_DOS_EOL
Specifies that carriage return and line feed characters separate each line. This is the default under Windows.
VSXMLCFG_SAVE_UNIX_EOL
Specifies that a line feed character separate each line. This is the default under UNIX.
VSXMLCFG_SAVE_SPACE_AROUND_EQUAL
Specifies that spaces be added before and after the '=' for attributes and their values.
VSXMLCFG_SAVE_CLOSE_BRACE_ON_SEPARATE_LINE
Specifies that the close brace be placed on a separate line.

encoding - When -1 this parameter defaults to the value specified in the vsXMLCFGOpen() or vsXMLCFGCreate() call. For Microsort .NET project files, this parameter should be VSCP_ACTIVE_CODEPAGE. encoding may be one of the following:

VSENCODING_UTF8 VSENCODING_UTF8_WITH_SIGNATURE VSENCODING_UTF16LE VSENCODING_UTF16LE_WITH_SIGNATURE VSENCODING_UTF16BE VSENCODING_UTF16BE_WITH_SIGNATURE VSENCODING_UTF32LE VSENCODING_UTF32LE_WITH_SIGNATURE VSENCODING_UTF32BE VSENCODING_UTF32BE_WITH_SIGNATURE

NodeIndex - The children of this node are written.

pfnCallback - Allows the indent to be customized for the contenst of a specific node.

Returns: VSDLLEXPORT slickedit::SEString

Returns 0 if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGSetAttribute

int VSAPI vsXMLCFGSetAttribute(int iHandle, int NodeIndex, const char *pszAttrName, const char *pAttrValue, int AttrValueLen=-1, int iFlags=0)

Sets or adds an attribute value for the element node specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Index to a node

pszAttrName - Name of attribute.

pAttrValue - New value for attribute.

AttrValueLen -

iFlags - -1 indicates that an error should be returned if the attribute does not already exists. Otherwise, the vsXMLCFGAddAttribute() function is called to add the attribute.

A combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Category:

XMLCFG Functions


vsXMLCFGSetModify

void VSAPI vsXMLCFGSetModify(int iHandle, int Modify)

Sets XML document modify state.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

Modify - New value for modify state

Category:

XMLCFG Functions

See Also:

vsXMLCFGGetModify


vsXMLCFGSetName

int VSAPI vsXMLCFGSetName(int iHandle, int NodeIndex, const char *pszName)

Sets the name for the node specified. The name should be null for comment, attribute, CDATA, and PCDATA nodes.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Tree node index.

pszName -

Returns: int

Returns 0 if successful. Otherwise a negative return code is returned.

Category:

XMLCFG Functions


vsXMLCFGSetPath

int VSAPI vsXMLCFGSetPath(int iHandle, const char *pszQueryStr, const char *pszAttrName=0, const char *pAttrValue=0, int AttrValueLen=-1, int iFlags=0, int reserved=0)

Sets or adds an attribute value for the element node specified.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

pszQueryStr - This is a small subset of an XPath expression. See _xmlcfg_find_simple() for information on this parameter.

pszAttrName - Name of attribute.

pAttrValue - New value for attribute

AttrValueLen - Number of bytes in pAttrValue. -1 may be specified in pAttrValue is a null terminated string.

iFlags - -1 indicates that an error should be returned if the attribute does not already exists. Otherwise, the vsXMLCFGAddAttribute() function is called to add the attribute.

A combination of the following flags:

VSXMLCFG_ADD_ATTR_AT_BEGINNING
Insert attribute at the beginning of the list of attributes at this node. By default, the attribute is added at the end.

reserved -

Returns: int

Returns 0 if successful. Otherwise a negative error code is returned.

Example:

// Find the first file element node under /project with name equal to
// "main.c" and set the "options" attribute value.
vsXMLCFGSetPath(handle,
    "/project/file[file-eq(@name,'main.c')]",
    "options",
    "-Zi"
    );

Category:

XMLCFG Functions


vsXMLCFGSetValue

int VSAPI vsXMLCFGSetValue(int iHandle, int NodeIndex, const char *pValue, int ValueLen=-1)

Sets the value for the node specified. The value returned is null except for comment, attribute, CDATA, and PCDATA nodes.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

NodeIndex - Tree node index.

pValue - New value for node.

ValueLen - Number of bytes in pValue. -1 may be specified if pValue is a null terminated string.

Returns: int

Returns 0 if successful. Otherwise a negative return code is returned.

Category:

XMLCFG Functions


vsXMLCFGSortOnAttribute

void VSAPI vsXMLCFGSortOnAttribute(int iHandle, int iParentNode, const char *pszPrimaryAttrName, const char *pszPrimaryOptions, const char *pszPrimaryFolderElementName=0, const char *pszSecondaryAttrName=0, const char *pszSecondaryOptions=0, void *reserved=0)

Sorts nodes that are children of a specified node.

Parameters:

iHandle - Handle to an XMLCFG tree returned by vsXMLCFGOpen(), vsXMLCFGCreate(), or vsXMLCFGOpenFromBuffer().

iParentNode - of this node are sorted.

pszPrimaryAttrName - Name of primary attribute to sort on.

pszPrimaryOptions - String of one or more of the following options:

F
Sort filenames
N
Sort numbers
I
Case insensitive sort. Sort is case sensitive if this option is not specified.
D
Descending. Sort is ascending if this option is not specified.
P
Place parent nodes at the top after sort. Here we consider a parent nodes with name PrimaryFolderElementName.
2
Specialized filename sort. Sort case insensitive on name without path, then case sensitive on name without path, then case insensitive on path.

pszPrimaryFolderElementName - Only used if P option specified in pszPrimaryOptions. Indicates the element of a folder.

pszSecondaryAttrName - Secondary attribute name to sort on

pszSecondaryOptions - Specifies secondary sort options. See primary options for more information.

reserved -

Example:

// Sort a folder node and place sub folders at the top.
// Note that it is OK that  nodes have no "N"
// attribute but do have a "Name" attribute.
vsXMLCFGSortOnAttribute(handle,FolderNode,"N",
   "Folder",
   "Name",
   "2P");

Category:

XMLCFG Functions


vsZLstrcpy

char*VSAPI vsZLstrcpy(char *pszDest, VSPLSTR plstrSource, int DestLen)

Converts VSPLSTR to ASCIIZ string. No more than DestLen are written.

Returns: char*VSAPI

Returns pszDest.

Category:

Miscellaneous Functions


w_match

_str w_match(_str name, boolean find_first)

Match only the word specified by name.

Parameters:

name - name to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

name if find_first is true, '' otherwise.

Category:

Completion Functions


wfont

_command void wfont()

Displays Window Font dialog box which allows you to change the font for the current MDI edit window or all MDI edit windows.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


wfont_zoom

_command void wfont_zoom(_str size="+1")

Modify the font size for the current editor window.

Parameters:

size - font size change amount

  • +n -- increase font size by 'n' pixels
  • -n -- decrease font size by 'n' pixels
  • n -- set font size to 'n'

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


wfont_zoom_in

_command void wfont_zoom_in(_str size="1")

Increase the font size for the current editor window.

Parameters:

size - (default=1) amount to increment font size

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

wfont_zoom


wfont_zoom_out

_command void wfont_zoom_out(_str size="1")

Decrease the font size for the current editor window.

Parameters:

size - (default=1) amount to decrement font size

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

wfont_zoom


wh

_command typeless wh(_str word="")

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", "Options", "General...", selected General Tab, "Word Help Filename") to set the help file used by this command.

Applies To:

Edit Window, Editor Control

Category:

Miscellaneous Functions


what_is

_command typeless what_is()

Displays help for the command that is bound to the next key you press.

Returns: typeless

Returns 0 if successful.

Category:

Keyboard Functions


where_is

_command typeless where_is(_str commandName='', _str quiet='', _str separatorChar=',')

Returns: typeless

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.

Category:

Keyboard Functions


which

_command void which(_str filename='')

Searches for filename in VSLICKPATH and PATH and displays the full path filename results on the message line.

Category:

File Functions


windbg_list_modules

_command void windbg_list_modules()

Display list of loaded modules.

Category:

Debugger Commands


windbg_update_image_path

_command void windbg_update_image_path()

Display and update image path. Image path specifies location of loaded executable binary files (.exe or .dll files).

Category:

Debugger Commands


windbg_update_symbols_path

_command void windbg_update_symbols_path()

Display and update symbol path. Symbol path specifies the directories where symbol files (.pdb files) are located. Modules are reloaded if when symbol path changes.

Category:

Debugger Commands


windbg_write_dumpfile

_command int windbg_write_dumpfile()

Create a memory dump file.

Returns: int

0 on success, <0 on error.

Category:

Debugger Commands


window_above

_command void window_above()

Switches to window above the current window if one exists.

Applies To:

Edit Window

Category:

Window Functions

See Also:

window_left, window_right, window_below, next_window, prev_window


window_below

_command void window_below()

Switches to window below the current window if one exists.

Applies To:

Edit Window

Category:

Window Functions

See Also:

window_left, window_right, window_above, next_window, prev_window


window_edit

_str window_edit(_str filename, int a2_flags)

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.

Don't use edit or window_edit to create a hidden buffer or it might get added to the project tab buffer list.

Returns: _str

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.

Applies To:

Edit Window

Category:

Window Functions


Window Functions

_arrange_icons
_change_all_wfonts
_create_tile_id
_create_window
_delete_window
_edit_window
_find_tile
_iswindow_valid
_last_window_id
_load_template
_move_window
_next_view
_next_window
_no_child_windows
_prev_view
_prev_window
_quit_view
_tile_windows
activate_view
activate_window
arrange_icons
cascade_windows
change_window
close_window
create_tile
delete_tile
duplicate_window
expand_window
find_window_closest_to_point
find_window_with_edge
find_window_with_point
for_each_mdi_child
get_view_id
get_window_id
hsplit_window
iconize_all
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_all
restore_mdi
restore_window
shrink_window
size_mdi
size_window
tile_windows
vsplit_window
window_above
window_below
window_edit
window_left
window_match
window_right
wleft_margin
zoom_window


window_left

_command void window_left()

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

Applies To:

Edit Window

Category:

Window Functions

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="")

Parameters:

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.

Returns: int

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.

Example:

// Look for window displaying ".process" buffer.
wid=window_match('.process','xn');

Category:

Window Functions

See Also:

buf_match, name_match, file_match


window_right

_command void window_right()

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

Applies To:

Edit Window, Editor Control

Category:

Window Functions

See Also:

window_above, window_left, window_below, next_window, prev_window


wkspace_file_match

_str wkspace_file_match(_str name, boolean find_first, boolean return_path=false)

Parameters:

name - file name prefix to match

find_first - 'true' to find first, 'false' to find next

Returns: _str

Returns next file name in the current workspace which is a prefix match of name. Returns '' when no more matches are found.

Categories:

Buffer Functions, Completion Functions

See Also:

f_match, dir_match, wkspace_file_match


wleft_margin

_command void wleft_margin(_str marginCol="")

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", "Options", "General...", select General Tab) lets you change this option in inches instead of twips.

Categories:

Edit Window Functions, Editor Control Functions, Window Functions


word

_str word(_str line, int n)

Returns: _str

Returns the Nth space or tab delimited word in string. '' is returned if the Nth word does not exist.

Category:

String Functions


word_chars

_command void word_chars(_str wordChars="")

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", "Options", "File Extension Setup...", select the Advanced tab).

Category:

Miscellaneous Functions


word_wrap

_command typeless word_wrap(_str yesno="")

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...", select the Word Wrap tab).

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

word_wrap_toggle


word_wrap_toggle

_command void word_wrap_toggle()

Toggles word wrap on/off. See word_wrap command for more information.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


wordwrap_delete_char

void wordwrap_delete_char(...)

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.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


workspace_cd

_command void workspace_cd()

Set current working directory to workspace directory.

Category:

Project Functions


workspace_close

_command int workspace_close()

Prompts to save modified files, save workspace auto-restore information, and closes all files.

Returns: int

Returns 0 if command not cancelled because user selected to cancel when prompted with modified file list. Otherwise a non-zero value is returned.

Category:

Project Functions

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_organize


workspace_dependencies

_command int workspace_dependencies(_str Project=_project_name)

Lists dependencies for the current project and allows you to modify the dependencies.

Category:

Project Functions

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_organize


workspace_insert

_command int workspace_insert(_str filename='', boolean quiet=false, boolean AllowEmptyFiles=false, boolean RetagWorkspaceFiles=true)

Allows you to add an existing project to the currently open workspace. The optional filename specifies the project to add.

Category:

Project Functions

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_organize


workspace_new

_command void workspace_new(boolean inDialog=true, _str workspaceName=null, _str workspaceDir=null)

Displays the New dialog box. Allows you to create files, projects, and workspaces. The Project tab is initially active.

Applies To:

Edit Window

Category:

Buffer Functions


workspace_open

_command int workspace_open(_str WorkspaceFilename='', _str notused="", _str restoring_from_invocation="", boolean closeFilesFirst=true, boolean restoreFiles=true)

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.

Category:

Project Functions

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_organize


workspace_organize

_command typeless workspace_organize()

Displays the Organize All Workspaces dialog box which allows you to organize your workspaces which appear in the All Workspaces menu of the Project menu

Category:

Project Functions

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_organize


workspace_properties

_command void workspace_properties()

Allows you to add projects to a workspace, change project dependencies, and set the active project. Displays Workspace Properties dialog box

Category:

Project Functions

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_organize


workspace_set_active

_command void workspace_set_active(_str filename='', boolean quiet=false, boolean allowBlankFilename=false, boolean doUpdateWorkspaceList=true)

Sets the specified project active in the current workspace.

Parameters:

filename - project file that is in the workspace

quiet -

allowBlankFilename -

doUpdateWorkspaceList -

Category:

Project Functions

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_organize


write_clipboard

_command void write_clipboard(_str name='')

Write clipboard to file.

Category:

Clipboard Functions


write_list

_command typeless write_list(_str params='')

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.

Returns: typeless

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.

Category:

File Functions


write_state

_command typeless write_state(_str arg1='')

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.

Returns: typeless

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".

Category:

File Functions

See Also:

clear_message


write_state_message

void write_state_message()

Displays the message "Execute write-state to save the configuration.".

Category:

Miscellaneous Functions


xcom

_command typeless xcom(_str cmdline='')

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.

Returns: typeless

Return code of external macro or program specified is returned.

Category:

Miscellaneous Functions

See Also:

dos, shell


xml_contentwrap

_command int xml_contentwrap(_str yesno="")

If yes, the editor attempts to wrap the contents of xml elements automatically.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

xml_contentwrap_toggle


xml_contentwrap_toggle

_command void xml_contentwrap_toggle()

Toggles the content wrapping portion of the XML formatting feature on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


xml_formatting

_command typeless xml_formatting(_str yesno="")

If yes, the editor attempts to wrap and auto format xml.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

xml_formatting_toggle


xml_formatting_toggle

_command void xml_formatting_toggle()

Toggles XML formatting on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


xml_mode

_command void xml_mode()

Activates XML file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


xml_taglayout

_command int xml_taglayout(_str yesno="")

If yes, the editor attempts to do automatic tag layout in xml documents.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods

See Also:

xml_taglayout_toggle


xml_taglayout_toggle

_command void xml_taglayout_toggle()

Toggles the tag layout portion of the XML formatting feature on/off.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


XMLCFG Functions

_xmlcfg_add
_xmlcfg_add_attribute
_xmlcfg_buffer_is_valid
_xmlcfg_close
_xmlcfg_copy
_xmlcfg_copy_children_as_siblings
_xmlcfg_create
_xmlcfg_delete
_xmlcfg_delete_all_attributes
_xmlcfg_delete_attribute
_xmlcfg_delete_children_with_name
_xmlcfg_delete_first_n_children
_xmlcfg_delete_last_n_children
_xmlcfg_find_child_with_name
_xmlcfg_find_simple
_xmlcfg_find_simple_array
_xmlcfg_find_simple_insert
_xmlcfg_get_attribute
_xmlcfg_get_attribute_ht
_xmlcfg_get_depth
_xmlcfg_get_filename
_xmlcfg_get_first_child
_xmlcfg_get_last_child
_xmlcfg_get_modify
_xmlcfg_get_name
_xmlcfg_get_next_attribute
_xmlcfg_get_next_sibling
_xmlcfg_get_num_children
_xmlcfg_get_num_nodes
_xmlcfg_get_parent
_xmlcfg_get_path
_xmlcfg_get_prev_sibling
_xmlcfg_get_type
_xmlcfg_get_value
_xmlcfg_get_xpath_from_node
_xmlcfg_is_handle_valid
_xmlcfg_is_node_valid
_xmlcfg_open
_xmlcfg_open_from_buffer
_xmlcfg_save
_xmlcfg_save_to_buffer
_xmlcfg_set_attribute
_xmlcfg_set_modify
_xmlcfg_set_name
_xmlcfg_set_path
_xmlcfg_set_path2
_xmlcfg_set_value
_xmlcfg_sort_on_attribute
_xmlcfg_trim_to_only_this_node


xmldoc_comment

_command void xmldoc_comment(typeless slcomment_start='///')

Generate a xmldoc-style comment for the current tag. Will attempt to convert the current comment to xmldoc.

This function is supported for C# and C++ only;

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


xmldoc_mode

_command void xmldoc_mode()

Activates XMLDOC file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


xnext_error2

typeless xnext_error2()

Finds the next error. Cursor is placed on the line and column of the file with error.

Category:

Miscellaneous Functions

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® (if you need similar functionality in Slick-C® use the "say" macro function).

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.

Category:

Miscellaneous Functions

See Also:

xprintf, mprintf, dfprintf


xsd_mode

_command void xsd_mode()

Activates XSD file editing mode.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


zap_line

typeless zap_line()

Deletes the current line and moves the cursor to column one. This function is used as input to the process_list procedure.

Returns: typeless

Returns 0.

Applies To:

Edit Window, Editor Control

Categories:

Edit Window Methods, Editor Control Methods


zoom_window

_command void zoom_window()

Zooms the current window to as large as possible. If the current window has already been zoomed, the previous window configuration is restored.

From:

Unicode.doc

Category:

Window Functions