Objective Edit : Chapter 1 Introduction to Objective Edit : Product Features
Product Features
Objective Edit provides a complete, full-featured source code editor, similar in functionality to the editor in Visual Studio. The primary features of Objective Edit include:
Text selection, insertion, and deletion
Customizable syntax color highlighting
Full support for Find/Replace
Support for multiple Undo/Redo
Support for OLE drag-and-drop
Support for drawing line index, bookmarks, breakpoints, and customized data flags in the gutter (the space to the left of the source code)
IntelliMouse Mouse Wheel support
Full syntax color highlighting based on language type (C++, C#, HTML, XML, VB, VBScript, and JavaScript are standard supported options. Other languages require customization.)
Line highlighting
Exporting edit control contents marked up as HTML
Language definitions stored in .ini file, custom embedded resource, or registry.
Unicode and MBCS support for foreign languages (including Far Eastern languages).
Model-view-controller architecture
Full integration with the MFC document/view architecture
SECEditView (CView-derived) and SECEditCtrl (CWnd-derived) classes
Support for MFC printing (black and white) and print preview in the CView-derived class
CWnd version supports printing only
Full source code
Source Code IntelliSense and MSDN Integration with Microsoft Visual Studio
Compatibility with the latest 32-bit and 64-bit releases of Microsoft Visual Studio
Compatibility with other Stingray Studio products (Objective Toolkit and Objective Views)
Feature Additions
This section considers additional features.
Application Wizard
Objective Edit now includes an AppWizard that allows you to create a new application quickly and easily. This AppWizard only supports Document View-based applications, which include:
Dialog
SDI
MDI
ATL COM
You can use the ATL COM AppWizard to create an ActiveX control that wraps Objective Edit functionality.
Animated Scrolling
The SECEditController::WindowScroll() method in Objective Edit versions 6.0 and 6.01 produced an animated scrolling effect by repeatedly calling ScrollWindow() to scroll the window one line at a time. While acceptable with short files, this effect is too slow with longer files.
In Objective Edit 6.02 and later, animated scrolling is enabled by default for backward compatibility, but it can be disabled. To disable animated scrolling call the SECEditController::SetScrollAnimation() method with a FALSE parameter:
 
SECEditController::SetScrollAnimation(FALSE);
Gutter Manipulation
Objective Edit now offers a more customizable gutter, where the gutter area is potentially divided into two regions, the index region and the mark region. In the index region, a zero-based line number for each text line can be displayed. There is also added support for formatting the line sequence numbers (or other selected information) within the gutter region.
The mark region is comparable to the old gutter, where bookmarks, breakpoints or other mark types are displayed. For backward compatibility, the default setting only displays the mark region.
For details on customizing the gutter, refer to “Working with the Gutter.”
HTML Output
Objective Edit now includes support for HTML output from the edit control. This feature allows the edit control to add markup information (according to the current language configuration of the editor) so that the appearance of the HTML that is output from the control is similar to the presentation within Objective Edit. This means, for example, that if Objective Edit is configured to highlight comments in green and language keywords in blue, green comments and blue keywords will be similarly colored when the HTML output from Objective Edit is loaded into a web browser.
NOTE >> This feature works with both ANSI and Unicode builds of the library; the Unicode version of Objective Edit generates marked up Unicode HTML output.
The HTML data extractor component requires a third-party Regex library. The Regex++ v.2.2.4 library, which makes powerful regular expression matching functionality available to projects incorporating Objective Edit, is now distributed with Objective Edit (since version 6.1). Regex++ is used to facilitate the new HTML export functionality described above.
Objective Edit has an optional dependency on the Regex++ (regular expression) libraries, which in turn have other dependencies. As a result, additional files (other than the Objective Edit DLLs themselves) may need to be distributed with your application.
NOTE >> The Edit build wizard now contains a checkbox to enable or disable the requirement for Regex. This checkbox is unchecked by default. Regex library solution files have also been updated to output the Regex libraries to the appropriate MFC product library directory by platform. For example, Win32 VC++ 8.0 Regex libraries are now output to <stingray-installdir>\Lib\vc8\x86. This output pattern is consistent for all supported compilers as well as x64 editions of the libraries. This means that the IDE path for Regex is no longer needed. Please refer to “Stingray Studio Paths in Property Sheets” in the Getting Started part for more detailed information about these IDE paths. Also, you can find information about redistributables in Appendix 6 of regex.htm file located at <stingray-installdir>\Regex. As described in regex.htm, it is also possible to link to a static version of Regex++ and avoid installation of additional libraries.
Use of the HTML output feature is straightforward. Client code simply invokes the class SECEdit method SaveHTMLFile() with 1 or 2 parameters. The first parameter is a pathname to the desired HTML output file. The optional second parameter is the name of a desired font. If a font face option is provided, the corresponding tag will be inserted into the HTML output. If the font is omitted, no tag will be inserted and the HTML output will be presented using the default font of whatever browser is later used to view the file.
An example invocation of the SaveHTMLFile() method is as follows:
 
m_SECEditCtrl.GetEdit()->SaveHTMLFile(_T("my.html"),_T("Arial Unicode MS"));
As a result of the above code, the Objective Edit control’s contents will be output in HTML format to a file called “my.html.” A tag will be inserted specifying that the text be drawn using the Arial Unicode font.
NOTE >> The font name parameter is optional.
New Language Configuration .ini Files
New language configuration .ini files have been included to support XML and C#.