Sign in Join
Wiki copytemporary

Free Vision: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Contents
22
33 * 1 Overview
44 * 2 To do list
55 * 3 Unicode version
66 * 4 Turbo Vision
77 * 4.1 Turbo Vision code bases
88 * 4.1.1 C++
99 * 4.1.2 Pascal
1010 * 5 Problems on macOS
1111 * 6 Tutorial
1212
1313## Overview
1414
1515**Free Vision** is an application framework that allows you to design user friendly text mode applications. It is designed to be API-compatible with Borland's Turbo Vision framework.
1616
1717Free Vision implements a full windowing system, where each window can be updated, moved and operated independently from other windows. It is implemented on top of the [[video unit|video]], [keyboard](</index.php?title=keyboard_unit&action=edit&redlink=1> "keyboard unit \(page does not exist\)") and [mouse](</index.php?title=mouse_unit&action=edit&redlink=1> "mouse unit \(page does not exist\)") units and Free Vision applications can therefore run on most FPC platforms using the _write once, compile anywhere_ principle.
1818
1919The [[Textmode IDE|Free Pascal IDE]] uses Free Vision for its user interface. [[Textmode IDE development]] lists a simple object chart of IDE + FV objects.
2020
2121Free Vision is not 100% complete:
2222
2323 * the colorsel unit is missing, and the support to use it (palette support) might not be complete and/or debugged since the TV->FV transition in +/- 2000.
2424
2525**Availability:**
2626
2727 * Debian Linux: => install the package: [fp-units-fv](<http://packages.debian.org/hu/stable/fp-units-fv>)
2828 * Other distributions/OSes: Free Vision is included with the FPC source package.
2929
3030## To do list
3131
3232These items were written on a separate page, last edited May 2008:
3333
3434 * getting it fully up to speed and compatible with TV
3535 * endianness and 64-bit clean work.
3636 * filepaths to ansistring ? TP compat less of a problem nowadays. (copy to separate version if necessary?)
3737
3838## Unicode version
3939
4040Original Turbo Vision stored screen characters in 1-byte cells allowing only single byte code pages to be used (like 437, 866, 1251 etc), also did Free Vision. This is a serious limiting factor for use of Free Vision on modern systems. An [issue about Unicode support](<https://gitlab.com/freepascal.org/fpc/source/-/issues/21373>) presents in FPC bug tracker for a long time.
4141
4242As of February, 2022, adoption of Free Vision to Unicode has been merged into the FPC main branch. This branch has already been tested on Linux and Windows and considered stable at least on these two platforms.
4343
4444It requires FPC 3.1.1 or later, because it uses [[management operators]]. It uses them to store Unicode character cells in the enhanced video unit buffer. Each "character" on the screen is actually a unicode string, because it can contain several unicode code points, e.g. combining characters, etc. Management operators was used to avoid extra overhead of the unicode string (an extra heap block + reference count, etc) when a character cell is only a single unicode code point, which improves performance a lot with commonly used characters, such as ASCII, Cyrillic, etc, while still supporting languages with combining characters.
4545
4646[Instruction](<https://github.com/elfmz/far2l/issues/1255#issuecomment-1042898940>) on how to build Free Vision Unicode test app from sources on recent Ubuntu.
4747
4848**Supported features:**
4949
50501\. non-BMP characters
5151
52522\. East Asian (wide) character support
5353
54543\. combining characters
5555
56564\. fallback to legacy non-Unicode KVM drivers for operating systems that don't support Unicode
5757
58585\. backward compatibility FV units that use legacy codepages. All the unicode-enabled FV units have a 'U' prefix, i.e. 'UDrivers', 'UDialogs', 'UApp', etc. A lot of code sharing between the two sets of units (unicode and legacy) is achieved by using include files and ifdefs.
5959
60606\. unlimited string length in the new Unicode FV units (they're based on the UnicodeString type, which is UTF-16 and unlimited length). Legacy units still have shortstring limitations in certain places.
6161
6262Things **not planned** to be implemented for now (maybe later, after merging the branch):
6363
64641\. bidirectional text & right-to-left language support
6565
66662\. Arabic shaping
6767
6868Reason: author is entirely unfamiliar with right-to-left languages and also support in consoles is still rare and not very well standardized. However, the gnome-terminal now supports them, and the authors have proposed a [spec](<https://terminal-wg.pages.freedesktop.org/bidi/implementations.html>) for it, which hopefully may be adopted by other terminals also, so it should be possible to implement support for terminals that follow this spec. Any help, from people who know a right-to-left language, or have experience in implementing bidi text support is welcome.
6969
7070**Remaining things to be done:**
7171
72721\. Support the new Windows 10 console that supports non-BMP characters
7373
74742\. Port and test any remaining FV units and controls (most of them are probably ported, but the author might have left some unit out - look for FV units that don't have any Unicode versions with the 'U' prefix)
7575
76763\. Port and test other platforms, besides Windows and Linux
7777
78784\. [Port](<https://gitlab.com/freepascal.org/fpc/source/-/issues/40674>) the IDE to the new Unicode FV
7979
80805\. (not very important) Implement better handling of emoji width (e.g. currently the infamous U+1F4A9 character (💩) is double width, but is currently treated as single width, which results in broken rendering, so these kind of things should be handled properly in the EastAsianWidth unit)
8181
8282## Turbo Vision
8383
8484The Turbo Vision framework originates from Borland, and was delivered with the later incarnations on the Turbo range of compilers. There were two versions, a C++ one, and a Pascal one. The C++ was open sourced (PD) at some point, the Pascal didn't follow, which prompted FPC to search for an alternative.
8585
8686This was found in the shape of Free Vision, which (afaik) was a backport of the PD C++ code back to Pascal by Leon de Boer for use in graphics mode. As far as I can remember, Pierre and Peter backported the code back to textmode (coordinate system change that affected a lot of code!), ported missing parts, improved compatibility, and hooked it into the Textmode IDE. Note that the sf.net TVISION page falsely states that FPC uses Pascal sources donated by Borland, however it seems that nobody reacts to mails there.
8787
8888### Turbo Vision code bases
8989
9090There are currently a handful of Turbo Vision based codebases, all open source ones derived from the C++ version released by Borland.
9191
9292#### C++
9393
9494 * The C++ version as released by Borland (Public Domain). Unfortunately after all the mergers of Borland, the FTP server it was on is dead.
9595 * Possibly non free versions as delivered with Turbo C++ (and Object Vision?).
9696 * The SF.net C++ version, but it is GPL (a GPL library, which severely hampers usage).
9797 * Another alternative is an older C++ Turbo Vision version (BSD license) at [this homepage](<http://www.sigala.it/sergio/tvision/>).
9898 * There is also a modern alternative with support for C++17, UTF-8, etc., at this [GitHub repository](<https://github.com/magiblot/tvision>). This one is MIT licensed.
9999
100100#### Pascal
101101
102102 * The commercial versions packaged with Turbo Pascal compilers. These are still not open source in any form.
103103 * The (AFAIK heavily modified) Borland Pascal 7 version that was used for Virtual Pascal (not open).
104104 * Free Vision (LGPL license with linking exception). See above for details. Based on the C++ version.
105105 * Free Vision [adopted for UTF-8](<https://github.com/unxed/fv_utf8>).
106106 * Free Vision [Unicode adoption branch](<https://gitlab.com/freepascal.org/fpc/source/-/issues/21373#note_833019965>).
107107
108108## Problems on macOS
109109
110110User wrote: Unable to close Free Vision program on macOS, when Alt+X keyboard shortcut is pressed.
111111
112112FPC developer Jonas Maebe replied:
113113
114114Under native macOS programs, by default Option+key ("Option" is the name of the "Alt" key on macOS) is a way to enter a special character; Option/Alt is not mapped to Meta like on most other Unix platforms. If you want to map Option to Meta in Terminal, go to "Preferences -> Profiles -> Keyboard" and tick the "Use Option as Meta key" checkbox at the bottom.
115115
116116## Tutorial
117117
118118German (Deutsches) tutorial to Free Vision: [GitHub repo](<https://github.com/sechshelme/Lazarus-FreeVision-Tutorial>).
119119
120120The documentation of the individual components is available directly in the sources.
121121
122122---
123-*From the Free Pascal wiki, page "FVISION", as the Internet Archive kept it on 2025-12-20. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
123+*From the Free Pascal wiki, page "FVISION", as the Internet Archive kept it on 2025-12-20, last changed on 2024-08-22. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history