GV Logo

 Graphic Vision(tm)

 What's new in version 2.20

  [ Overview | Ordering | | Tech Info | What's New | Changes | Downloads | Upgrades | Known Bugs ]

This document describes the major enhancements to the Graphic Vision RTL between version 2.04 and this version (2.20). The file changes.htm details the changes made to the API.


Version 2.20

XMS extended memory API

The DOS real mode version of the GV RTL now provides support for accessing extended memory via an XMS device driver (such as HIMEM.SYS). This API consists of 4 main parts:

New time related functions

The GetMilliTime (GDrivers unit) function returns the program execution "up-time" in milliseconds. This function uses Timer 0 of the hardware programmable timer chip and has a resolution and accuracy of 1ms.

Improved Idle sheduling using the new GetMilliTime function. The new IdleTime variable sets the minimum duration between consecutive Application.Idle loops. This allows you to set an upper limit to the number of Idle loops performed per second. IdleTime is set to zero by default (execute Idle as many times as possible) since this is often what is required, and to maintain backwards compatibility.


Version 2.10

Long file name support

LFN open file dialog boxA major rewrite of the GDos unit means Graphic Vision apps can now optionally support long file names (LFN's) when run under an LFN-capable environment such as a Windows 9x Dos-box. LFN support is a compiler option, so those that don't need it don't have to have it. Unlike many LFN units written for Dos, we have spent many research and development hours to ensure Graphic Vision (through its GDos unit) supports all aspects of the LFN API and the various file systems it allows access to. We have also taken great care to ensure that LFN-capable Graphic Vision applications will work just as well when run under a non-LFN capable operating system. A new style TFileDialog as shown is specifically used when GV is built to support long filenames.

New style of scrollbar

A new sbAutoIndicator scrollbar options flag added, and TScrollbar code modified to provide auto-dimensioning scrollbar indicators (ala W95, Linux etc). The Size of the indicator calculated from the PgStep and Max-Min fields. This feature allows scrollbars to indicate the relative size of the displayed portion of a larger scrollable view.

JPEG and PCX image file support

JPEG image decoding and displaying is now possible with the Graphic Vision version of Jaques Nomsii Nzali's Pascal port of the Independant JPEG Group's JPEG C library. The Graphic Vision version of this library is available from the Downloads page and it's completely free.

PCX (ZSoft's RLE encoded image format) files are also supported with the new TBitMapPCX object. 2, 16 and 256 colour are all supported.

Even better support for multi-lingugal applications

Version 2.10 allows:

Version 2.03 allowed all an applications language-dependant strings to be moved out of the executable code and stored in a string table resource. This however still meant your resource generator program would have to generate the entire set of high-level resources for each language supported by your application.

Version 2.10 introduces a new system that allows you defer the assignment of language-dependant text strings until they are loaded from the default string table (ResStrings) at runtime, even those strings used by high-level resources. This means that only one set of high-level resources (dialog boxes, menus etc) has to be generated by multi-lingual applications. The only language-dependant components can now be just your string tables (generated by the RscMake compiler usually) - one string table for each supported language.

All view Init constructors that take a single language-dependant string can now take a string table index instead. The new typecast MakeStrResource is used to pass a string index (integer) as if it were a string constant. For example, the TStaticText.Init method declaration is unchanged, but it will now except either a string literal/variable (as before) or a string resource key (integer) for its Text argument. In order to pass an integer value as though it were a string, we must "fool" the compiler into thinking it is a string. To do this we typecast and dereference our integer value using MakeStrResource:

P := New(PStaticText, Init(R, doCentre, MakeStrResource(sMyStaticText)^);

Where "sMyMessage" is the string resource key (integer value) with a value greater than zero. TStaticText will detect that you have passed a resource key rather than a string and initialize its Text field by reading the string resource of ResStrings that has the key value of sMyMessage.

If the TStaticText view is then stored to a stream (eg as part of a high- level resource), then it will just store the string index instead of storing the actual string to the stream. Now when the TStaticText object is loaded from the resource file (by your application), it will again assign its Text field by getting the "sMyMessage"th string from the ResStrings string table. Although ResStrings may have contained English language strings when your resource file compiler program was run, it may now contain the German language equivalents, so your TStaticText will now be in German.

Views that take multiple strings, such as TCluster descendants (TRadioButtons, TCheckBoxes etc) have a new constructor called InitRes that takes:

The Load method of these "milti-lingual friendly" views determine if a string or a string resource index was passed to init, and either loads the string literal from the stream (as normal) or loads the string from the string table pointed to by the ResStrings global variable.

Once the above system was implemented, it became a trivial task to allow a Graphic Vision to change the language used "on the fly". All views that contain one or more potentially language-dependant strings[s] will respond to the new cmNewLanguage system event by reloading their strings from the global string table. All your code has do do is to override TProgram.InitStrings to change the global string table so it contains the strings appropriate to the selected language, then issue a cmNewLangauge system event.

A new wrapper function that generates a "Set Language" dialog box has also been provided to make your coding task even easier. The GvrDemo demo application has been modified to demonstrate just how easy it is to generate a multi-lingual application.

TBufStream object completely rewritten

The TBufStream object has been completely rewritten, ostensibly to allow it to be LFN compliant, but also to make it more efficient. The new code provides buffer-aligned read/writes, "lazy" writes and seeks, and optional automatic buffer sizing to the cluster size of the drive containing the file.

FindFirst function improved

FindFirst's "Attr" high byte now contains "required attributes" bits. Extra faReqXXXX symbolic constants added to reflect this. Older code should work as before because the high byte of your FindFirst calls should always have been zero (0 = no "must have" attributes). Works with or without an LFN operating system.

Improved TBitMap and TBitMapView objects

New TBitMapView methods and option flags allows bitmaps to be scrollable.

New TBitMap.CacheToFile virtual method. Allows the decoded image of a complex image format such as JPEG files to be cached in a temporary file. New bmoFileCache symboic constant added.

Resize and Close icons added to TFrame object

Windows 9x style "close button" [X] icon added in the top-right corner of a TFrame whenever its TWindow owner is closeable. A "resize" icon has also been added to the bottom-right corner of a window's TFame. This is only visible if the window has at least one visible standard scrollbar and is resizable, or it is a resizeable TDialog or descendant.

New inline arithmetic functions

MaxLong returns the higher of 2 LongInt values
MinLong returns the lower of 2 LongInt values.
MulDiv and LongMulDiv are trinary functions that return the result of (X * Y) div Z

New Delay procedure added

New Delay procedure added to GDrivers unit. Functionally equivalent to the Delay procedure of the CRT unit, but doesn't suffer from the same bug. The DelayCalibrate procedure has also been added that is called to calibrate the Delay procedure.


Version 2.00

As the number suggests, Version 2.00 is a major revision of the Graphic Vision application framework. GV has been given an extensive face-lift, and is more powerful than ever, but I refuse to call it GV '99 :-) Detailed below are the most significant changes made from version 1.41

100% Pixel based views and co-ordinates

The "character cell" based view co-ordinate system used by version 1 has been dropped. All screen co-ordinates and view sizes are now expressed in pixel units.

Support for standard 16-colour VGA video modes

The Graphic Vision graphics engine now supports 16 colour VGA and SVGA video modes up to 800 x 600, so GV applications can be run on standard VGA machines and those that do not have VESA Video Bios Extensions.

Multiple and proportionally spaced fonts

Multiple font support has been added. Fonts can be linked into a .TPU/.TPP unit or loaded from a resource or font file. All views (except editor and help views) default to using the (programmer-assignable) proportionally spaced system font. Fonts are dynamically loaded and unloaded at the appropriate time during program execution, in a similar manner to how overlays are handled by a DOS real-mode program.

Graphic Vision can use Windows 2.x fonts that contain character glyphs of up to 32 pixels wide, so you can use these directly in your GV applications, or use Borland's Resource Workshop or other Windows font editor to produce your own custom fonts.

Picture of a GV Improved file open/save and change directory dialogs

The standard dialog boxes of the GStdDlg unit have been greatly improved, using new or improved dialog controls to give them much better functionality and appearance. The screen shot to the right is of a typical File Open dialog box using bitmapped buttons.

New "3-D" look menus

Picture of a GV menu box

As shown here, all Graphic Vision menu types and the status line now have an attractive 3-D appearance, and can optionally use chiselled-in 3-D text, as can non-bitmapped buttons.

Multiple mouse cursors

All views can now assign a mouse cursor whenever the mouse pointer is over its displayed area. The new TView.SetMouse virtual method is called whenever the mouse enters the view's visible area. This method is overridden by views that want to display a different cursor than the standard "arrowhead". TFrame for example overrides SetMouse to display one of 6 different cursor images, depending on exactly where the mouse is positioned within it. You can see one of these in the screen shot of the Open File dialog box above. The Graphic Vision resource file generator now accepts Windows 3.x mouse cursor (.CUR) files, so again, you can use these directly in your GV applications.

Sprites now supported

Graphic Vision now supports sprites (transparent bitmaps). No special image format is required for these as the implementation allows standard Windows 3.x .BMP's to be used - create a sprite .BMP simply by using the bitmap's last logical palette entry as the transparent colour. The image is painted using the new bbTransPut bit-blit operator of TImage.Put. A single .BMP can be created that contains multiple sprite (and normal, opaque) images when the bitmap is being used to generate a GV resource file with the supplied RSCMAKE.EXE resource compiler utility.

New TItemViewer object

A new TItemViewer object has been created that provides the basis for very powerful itemised views, such as file lists etc. Lists and Outlines can be designed that display, text, bitmaps, sprites, or any combination. The directory pane in the above Open File dialog for example is a TItemViewer descendant where each element is a combination of a sprite and text.

New Combo drop-down dialog controls

A new Combo triad of views - TComboButton, TComboBox and TComboWindow - have been implemented to allow a drop-down (or pop-up) list of selectable items to be associated with any dialog control (or any other view type that provides the UI to some data), such as a history list for an inputline.

More powerful dialog controls

Many of the standard dialog controls, such as TCluster and TInputLine have been given an extensive re-write to take full advantage of the new pixel based, proportionally spaced font environment. All dialog controls now use the system proportionally spaced font by default.

GDOS unit replaces DOS.TPP and DOS.TPU

The new GDOS unit is designed to replace Borland's standard DOS.TPU/TPP unit. GDOS provides many new functions, such as very fast upper/lower case conversions that use a look-up table generated from a function provided by the operating system. The new unit also makes DPMI and bimodal applications more robust and easier to implement by providing functions and structures that are used in the same way in both real-mode and protected-mode. Most of these functions completely hide the complex DPMI interfacing from the applications programmer - no more source code riddled with {$IFDEF DPMI} DoThis {$ELSE} DoThat {$ENDIF} sections.

New RESOURCE.PAS unit

The RESOURCE unit contains objects that are used to object-orientated the low-level shared resources - mouse cursors, fonts and bitmaps - generated by the RSCMAKE.EXE resource generator utility.


Graphic Vision Home Page
[ Overview | Ordering | Tech Info | What's New | Changes | Downloads | Upgrades | Known Bugs ]


Copyright © 2000 Jason G Burgon
Graphic Vision is a trademark of Jason G Burgon
All trademarks are the property of their respective owners.

This page was last updated on 5th January 2003