Skip to content
bitmakerneoPublic

About

Modernized, single-unit native VCL RichView core for Delphi (Delphi 7 – Delphi 13, Win32/Win64) with built-in table support, vector print preview, and zero external dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TRichView Modernized Core (Delphi 7 - Delphi 13, VCL & FireMonkey)

English | Русский

A modernized, cross-platform, open-source refactoring of the classic freeware TRichView 0.5.x component originally created by Sergey Tkachenko (1997-2001).

This project serves as a clean, lightweight, dependency-free foundation for rich text rendering, tables, printing, and extensions (such as TMarkdownView) across VCL and FireMonkey (FMX).

TRichView Demo

Key Improvements over Original 0.5.x

  • Cross-Platform Shared Engine (src/RichViewCoreEngine.pas): Consolidated RichView.pas, RVStyle.pas, RVScroll.pas, PtblRV.pas, and RV_Save.inc into a clean platform-independent core (TRVLayoutEngine, TRVRenderTarget, TRVTableItem, TRVStyle), shared by both VCL (src/RichViewCore.pas) and FireMonkey (src/RichViewCoreFMX.pas).
  • FireMonkey Support (TRichViewFMX, TRVStyleFMX, TRVPrintFMX): Full FMX implementation using TTextLayout, TScrollBox, IFMXClipboardService, UTF-8 HTML/Text export, and cross-platform A4 page preview (TRVPrintFMX).
  • Unified Rendering & Printing Pipeline: Eliminated duplicate drawing logic between screen rendering and printing/preview. Both screen controls and page previews use the exact same layout and rendering engine.
  • Built-in Table Support (TRVTableItem): Native table rendering (AddTable) with column alignment (taLeftJustify, taCenter, taRightJustify), multi-span cell styling, automatic column shrinking with word-wrap, selection/clipboard export, and HTML <TABLE> generation.
  • Unicode & 64-bit Ready: Removed legacy ANSI 1000-byte stack buffers, Win9x 16-bit coordinate hacks, and deprecated APIs. Compiles cleanly with 0 errors, 0 warnings, and 0 hints from Delphi 7 up to Delphi 13 (Win32 & Win64) using sgmVersions.
  • Print Preview: Added TRVPrint.MakeMetafilePreview (VCL) and TRVPrintFMX.MakePreview (FMX) for crisp, scalable A4 page previews at any zoom level (Fit Page, Page Width, 100%–200%).
  • Unit Tested: Covered by 20 DUnit tests for VCL (test/RichViewTests.dpr) and 11 DUnitX tests for FMX (tests.fmx/RichViewFMXTests.dpr).

Related Projects

  • TMarkdownView - Native VCL Markdown viewer component built on top of TRichView.
  • MarkdownView TC Plugin - Fast native Lister plugin (wlx / wlx64) for Total Commander (F3 / Ctrl+Q).
  • sgmVersions - Cross-version compiler directives include file (Delphi 2 - Delphi 13).

Repository Structure

├── bin/          # Compiled executables and packages (Win32 / x64)
├── dcu/          # Compiled unit files
├── demo/         # VCL dynamic runtime demo application (no IDE installation required)
├── demo.fmx/     # FireMonkey dynamic runtime demo application
├── docs/         # Documentation assets and screenshots
├── pkg/          # VCL IDE packages (RichView_D7.dpk, RichView_D13.dpk)
├── pkg.fmx/      # FireMonkey IDE package (RichViewFMX_D13.dpk)
├── res/          # Component palette icons (.res) and icon generator utility
├── src/          # Core engine (RichViewCoreEngine.pas), VCL & FMX components and registration units
├── test/         # VCL DUnit test suite (RichViewTests.dpr - 20 tests)
├── tests.fmx/    # FMX DUnitX test suite (RichViewFMXTests.dpr - 11 tests)
├── LICENSE       # MIT License
├── README.md     # English documentation
└── README.ru.md  # Russian documentation

Quick Start

1. Dynamic Usage (Without Installing into IDE)

Add src/ to your project search path (it already includes sgmVersions.inc) and use RichViewCore (for VCL) or RichViewCoreFMX (for FireMonkey):

// VCL example (see also demo.fmx/uMainFMX.pas for TRichViewFMX)
uses
  RichViewCore;

var
  RVStyle: TRVStyle;
  RichView: TRichView;
  Table: TRVTableItem;
  Row: TRVTableRow;
begin
  RVStyle := TRVStyle.Create(Self);
  RichView := TRichView.Create(Self);
  RichView.Parent := Self;
  RichView.Align := alClient;
  RichView.Style := RVStyle;

  RichView.AddCenterLine('Hello, TRichView!', rvsHeading);
  RichView.AddFromNewLine('Normal text and ', rvsNormal);
  RichView.Add('clickable link', rvsJump1);

  Table := RichView.AddTable;
  Row := Table.AddRow;
  Row.AddCell(taLeftJustify, True).AddText('Column 1', rvsSubheading);
  Row.AddCell(taRightJustify, True).AddText('Column 2', rvsSubheading);

  RichView.Format;
end;

2. Installing into Delphi IDE

  1. Open the package(s) matching your Delphi version and framework:
    • VCL (Delphi 7): pkg/RichView_D7.dpk
    • VCL (Delphi 13): pkg/RichView_D13.dpk
    • FireMonkey (Delphi 13): pkg.fmx/RichViewFMX_D13.dpk
  2. Click Compile, then Install.
  3. TRichView, TRVStyle, and TRVPrint will appear on the RichView palette tab; TRichViewFMX, TRVStyleFMX, and TRVPrintFMX will appear on the RichView FMX tab (both packages can coexist in the same IDE).

Running Unit Tests

  • VCL (DUnit): Open test/RichViewTests.dpr in Delphi 7 or Delphi 13 (Win32 / Win64), build, and run RichViewTests.exe (20 test cases).
  • FireMonkey (DUnitX): Open tests.fmx/RichViewFMXTests.dpr (or the pgMainFMX project group) in Delphi 13, build, and run RichViewFMXTests.exe (11 test cases).

Credits & License

  • Original TRichView 0.5.x Freeware Concept & Base Code: Copyright © 1997-2001 Sergey Tkachenko (TRichView).
  • Modernization, Refactoring & Extensions: Copyright © Maksim Grusha / StudioGM Software (studiogm.us), licensed under the MIT License (see LICENSE).

About

Modernized, single-unit native VCL RichView core for Delphi (Delphi 7 – Delphi 13, Win32/Win64) with built-in table support, vector print preview, and zero external dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages