About TRichView

Rich text editing VCL with support for tables, images and hyperlinks.

TRichView is a suite of native Delphi/C++Builder components for displaying, editing and printing hypertext documents. The component can be used to display documents (like web browsers, but easily controlled from a Delphi application), in chats and messengers, in specialized editors (web and help authoring), in any place where an application needs to edit rich text and save it to a Database or a file. The ScaleRichView Add-On for TRichView provides WYSIWYG editing and the Report Workshop Add on provides a set of VCL components for creating reports.

What is TRichView
TRichView is a suite of native Delphi/C++Builder components (VCL) for displaying, editing and printing hypertext documents.

Components support various character attributes (fonts, subscripts/superscripts, colored text background, custom drawn). Documents can contain tables, pictures, images from imagelists, any Delphi controls. Left, right, center or justify paragraph allignment, custom margins and indents, multilevel bullets and numbering, Unicode, background images, print preview, HTML export, RTF export and import, data-aware versions and more.

RichView Package is completely written in Delphi, and does not use external DLL or ActiveX files. It is not based on Microsoft RichEdit control. The registered version of the package includes full source code.

List of TRichView Features

  • Rich text and paragraph formatting - Custom fonts, colors, alignments, indents...
  • Images in documents - Bitmaps, metafiles, icons, jpegs, and more
  • Delphi/C++Builder controls in documents - Unique feature!
  • Tables - HTML-style tables with formatted contents in every cell
  • Bullets & numbering
  • Styles of text and paragraphs
  • Multi-language support - Multiple character sets, Unicode, bi-directional text
  • hypertext and related features- Hyperlinks, checkpoints, tags
  • Import and export, databases - Import from RTF, export to RTF and HTML, PDF, and more
  • Special editing features - Undo and text protection
  • Printing with preview
  • Spell-checking - Including live spelling with third-party spell checkers

Components included in TRichView

  • TRichView - component for displaying hypertext
  • TRichViewEdit - component for editing hypertext
  • TRVStyle - collection of [DB]RichView[Edit]s' text and paragraph styles, etc.
  • TRVPrint - component for printing [DB]RichView[Edit]s
  • TRVPrintPreview - component for print preview of [DB]RichView[Edit]s
  • TDBRichView - data-aware version of TRichView
  • TDBRichViewEdit - data-aware version of TRichViewEdit
  • TRVOfficeConverter - allows using text import and export converters from Microsoft Office
  • TRVReportHelper - allows drawing RichView documents onto the specified Canvases


Report Workshop is a set of VCL components for creating reports. Report Workshop is based on TRichView.
Report Workshop can be logically divided into the following groups:

  • Report design.
  • Report generation.
  • Data providers.

Report Design
Reports are designed in TRichView editor. ScaleRichView may be used as well. Report Workshop extends a user interface of RichViewActions by adding commands for report designing: a dialog for editing report-related document properties, dialogs for associating data queries with table rows and cells, dialogs for defining properties of cross tabulation tables (pivot tables), etc.

Report Generation
Reports are generated in TRichView (ScaleRichView) editors as well. There is a single component for report generation:

  • TRVReportGenerator - Just call the Execute() method, and a report will be built.

Data Providers
Data providers are a collection of components supplying data for reports. A data provider component processes data queries and returns data.

Report Workshop includes data providers based on standard and popular third-party components (including FireDAC, dbExpress, ADO/dbGo, Interbase Express, BDE, AbsoluteDB, NexusDB, DBISAM, ElevateDB, UniDAC, others DACs by DevArt and MicroOLAP), as well as a data provider working with any TDataSet-based components.

ScaleRichView is a TRichView addon providing WYSIWYG editing.
ScaleRichView is a set of VCL components for WYSIWYG editing (“What You See Is What You Get”), created based on TRichView and RichViewActions. ScaleRichView uses the TRichView engine for document rendering, but it repaginates, scales and draws pages in its own way.
Documents in ScaleRichView are accessible via a hidden (or external) TRichViewEdit component, so you can use the same methods for document generation and editing as you use in TRichView.
Becasue ScaleRichView is an addon to TRichView you need to have installed packages of TRichView and RichViewActions before you can install the ScaleRichView package.

The main features of ScaleRichView are:

  • support for almost all TRichView features
  • WYSIWYG editing mode
  • scaling
  • real-time repagination
  • support for more than 120 standard paper formats: ISO (Europe), ANSI (USA), JIS (Japan), etc.
  • ability to display and print in different formats (for example, document can be edited as A5 but printed as A3)
  • custom page positioning
  • multiple layout modes (Web mode, Normal Layout, Page Layout and more)
  • tooltip on scrolling, showing page number and text
  • vertical and horizontal graphic menus (toolbars) in scrollbar area
  • complete support of RichViewActions
  • controls in documents, both standard and special for ScaleRichView

WYSIWYG Editing in ScaleRichView
ScaleRichView is a word processor component designed to produce any sort of printable materials. It completely implements WYSIWYG technology. The phrase “What You See Is What You Get” describes how the component works. While editing, you can see documents exactly in the way they will be printed. ScaleRichView does not require printers to be installed (but it is recommended). You can add your own components in the scrollbar area making you application more convenient for users, or use special customizable vertical and horizontal toolbars. ScaleRichView supports more than 120 standard paper formats (ISO (Europe), ANSI (USA), JIS (Japan) and so on) and custom paper sizes.

Tooltips on Scrolling
ScaleRichView can (optionally) display a hint window when the user drags the thumb of vertical scrollbar. This tooltip displays the page number and the header text, simplifying navigation inside documents. You can see a similar feature in Microsoft Word.

Ruler
ScrlRVRuler component was created for ScaleRichView editor. It is based on RVRuler component (from RichViewActions) and was adapted for editing in WYSIWYG mode. Horizontal and vertical rulers allow quickly change margins without invoking dialog windows.

ScrlRVRuler (together with SRichViewEdit) supports 6 measuring units: inches, centimeters, millimeters, picas, points, pixels.

ToolWindow
ScaleRichView package includes a special toolbar component displayed in popup window.

For example, it can be shown when the user click button in the bottom right corner of the editor. Such tool window can be used to search and navigate in the document.

Table Handle
When the mouse is moved above some table, the table handle appears in the top left corner. You can define a menu to display when the user clicks this handle. This menu can provide a quick access to table operations.

Layouts
You can define various layouts: “Normal” (as one long page), “Web Layout”, “Print Layout” (page-view mode).

  • The Normal layout simplifies editing.
  • In the Web layout documents are shown as they will be displayed in web browsers.
  • The Print layout shows pages as they will be printed.

In addition, you can define your own layouts.

Custom Page Positioning
Custom page positioning is a unique feature of ScaleRichView. You can define coordinates of each page. You can arrange pages in rows and columns, or place them on circle and rotate. It's up to your imagination!

Z-Order of Pages
In the custom page positioning mode, you can define order in which pages are displayed. If you want to place some page above the others, just specify its number. You can create groups of pages if you assign the same number to them.

Custom Page Scaling
ScaleRichView allows defining scaling value for each page, so you can emphasize the current page or any other page.

Skins in ScaleRichView

TSRVSkinManager
A visual appearance of TSRichViewEdit, TSRVTabSet and SRVControls can be customized using TSRVSkinManager component. This component contains a collection of skins. Each skin has sets of colors, bitmaps and fonts as well as rules (schemes) for applying them to controls and their parts.

Poster Printing in ScaleRichView

Printing
In addition to a simple printing procedure implemented in TSRichViewEdit component, ScaleRichView includes TSRVPrint component designed for poster printing.

For example, we want to print A2 document, but our printer supports paper sizes only up to A4. TSRVPrint allows:

  • to stretch document prepared in TSRichViewEdit to the desired format (in our example — to A2), proportionally or not;
  • (optionally) to mirror page images horizontally;
  • to separate page images into frames (in our example, the frame size is A4);
  • to calculate the optimal frame orientation.

The poster does not necessarily have a standard size. You can define its size by specifying the numbers of frames horizontally and vertically (fractional values are possible). The figure shows the poster containing 4x3 frames of A4 size, portrait orientation.

Print Preview
TSRVPreview component shows posters as they will be printed.

Delphi and C++Builder Controls in ScaleRichView Documents
ScaleRichView editor, as well as TRichView editor, allows inserting components. But while TRichView inserts controls directly in the editor window and they work like if they were placed on form, ScaleRichView works differently: it display images of controls. This method allows to scale controls together with the document, but applies some restrictions (especially when image of the component is frequently changed; for example, the caret is not shown in TEdit and TMemo).

To take all advantages of this feature, you can use SRVControls.

SRVControls: Basic Controls
SRVControls is a set of controls that was designed to provide full functionality when inserted in ScaleRichView editor.

SRVControls:

  • are completely supported by SRichViewEdit;
  • are drawn and scaled with better quality;
  • have additional properties related to scaling and printing;
  • have customizable appearance;
  • support skins;
  • have the same appearance in all versions of Windows.

TSRVEdit is a single-line edit control, designed for insertion in TSRichViewEdit. In addition to properties common with TEdit, TSRVEdit has properties for displaying its state.

TSRVCheckBox and TSRVRadioButton can be used to create questionnaires and forms.

Other components:

  • TSRVButton - button, analog of TButton;
  • TSRVPanel - panel control that can contain other controls, analog of TPanel;
  • TSRVLabel - text label, analog of TLabel;
  • TSRVGroupBox - panel with caption, analog of TGroupBox.
  • TSRVListBox - advanced analog of TListBox.
  • TSRVComboBox - advanced analog of TComboBox.
  • TSRVPaintBox - analog of TPaintBox.

Special Features
TSRVEdit
and TSRVComboBox can display a list of suggestions. Unlike a combo box drop-down list, items in this list are generated dynamically and depend on the text in the control.

Items in TSRVListBox and TSRVComboBox can have:

  • custom indent (defining a hierarchy of items)
  • check box (only for TSRVListBox)
  • image
  • text (with custom font)
  • disabled state

SRVControls: TSRVTabSet and TSRVImagesScroll

TSRVTabSet displays horizontal or vertical tabs. The user can click or rearrange them. This component is used, for example, in the ActionTestTabs demo for switching between documents.

TSRVImagesScroll displays a gallery of images horizontally or vertically.

SRVControls: Media Player

TSRVMediaPlayer component was created specially for SRichViewEdit. The component provides full access to features of media files, allowing creating multimedia documents.
Watching video embedded in your document? No problem!

TSRVMediaPlayer, as against the standard TMediaPlayer:

  • can display video of any format, if the proper codecs are installed in the system;
  • provides access to information about video and audio files;
  • has user interface for navigation in media files;
  • allows to customize how audio and video files are played;
  • can display TV channels and play radio stations (if TV/radio tuner is available).

ActiveX Controls. Flash
ScaleRichView editor allows embedding ActiveX components, including Adobe Flash (TShockwaveFlash).

Components included in ScaleRichView

  • TSRichViewEdit — text processor for WYSIWYG editing, with scaling and multiple layouts (including page view mode).
  • TDBSRichViewEdit — data-aware version of TSRichViewEdit.
  • TSclRVRuler — ruler, an analog of TRVRuler from RichViewActions, but working with TSRichViewEdit.
  • TSRVPageScroll shows all pages as thumbnails.
  • TSRVToolBar — toolbar for insertion in scrollbar area of TSRichViewEdit.
  • TSRVToolWindow shows toolbar in popup window.
  • TSRVPrint prints documents from TSRichViewEdit; an editor component can print documents itself, but TSRVPrint supports several special printing modes, including posters.
  • TSRVPreview shows how document will be printed by TSRVPrint.
  • TSRVScrollBar — a skinnable scrollbar; this component is used inside TSRichViewEdit, but may be useful as a separate component as well.
  • TSRVTabSet — a skinnable set of tabs having icons and text labels; this component can be used to implement a tabbed multiple document interface.
  • TSRVSkinManager applies skins to TSRVTabSet and TSRVScrollBar.