
![]() |
|
|
|
The MessageBox, MessageBoxRect, InputBox and InputBoxRect GMsgBox public procedures made private. The global procedural variables in GObjects are now called instead. These four functions now also take an extra parameter - AHelpCtx. A non-zero AHelpCtx will add a help button to the dialog.
The mfXXXX message box symbolic constants have been moved from the GMsgBox unit to the GObjects unit.
TColorsDialog.HistoryID field, LoadPalette and StorePalette methods removed. cmLoadPalette, cmStorePalette and cmVgaPalette commands are instead sent to the application, which should respond, as appropriate.
Reformatted MENUS.PAS for improved readability. Added private LastCmdSet field to TStatusLine to reduce redundant screen redraws.
Default DarkGray palette entry lightened to a half-grey.
Removed ScrnDriv's Dos and Strings units dependency so ScrnDriv functions now use FNameStr, not PathStr. FNameStr moved to GBaseObj from GObjects.
Changed TEditor.Init and TEditWindow.Init to make them TV compatible.
Added KeyShift field to the TEvent type. This field is valid for both evMouse and evKeyDown events. There should now be no need to ever call the GetShiftState function (or read the ShiftState variable) in a Graphic Vision application.
InitGraph does not take the PathToDrivers string. This should not affect your code as InitGraph is called via InitVideo, but a call to RegisterFont or LoadFont must now be made before a call to TApplication.Init.
TProgram.Init now initialises the TitleBarSize & ScrollbarSize variables.
Added the private TView.TViewPad & TGroup.TGroupPad fields to keep word alignment on descendant fields. I forgot to do this in 1.20 for some reason.
The GObjects unit has been split into two separate units in an effort to make more of the source code available to registered users. GBASEOBJ.PAS contains most of the simple type declarations from GObjects, plus the TObject, TStream, TCollection and the TRect objects. This unit is used by graphics engine unit; ScrnDriv for which the source is not made available. The interface section of this unit therefore cannot be modified. It is supplied with the registered versions mainly to aid debugging.
The GObjects unit is not now used by the ScrnDriv or GDrivers units, so those registered users who wish to modify this unit can do so.
Because of the above, most units that include a Uses GObjects clause will now need a Uses GBaseObj, GObjects clause instead.
TBitMap and TLogPal objects
Some changes have been made to the TBitMap object and its helper object the TLogPal. These are mostly minor organisational differences that won't affect your own code. Only the difference in the arguments passed to TBitMap.Init are likely to require changes to your own code.
TLogPal has now been given Load and Store methods. Ownership of a TBitmap's palette has been given to its associated TLogPal object.
bsXXXX constants moved from ScrnDriv unit to the Bitmaps unit.
FBitMapDraw procedural type declaration moved to ScrnDriv unit and renamed FOwnerDraw.
The arguments of the FReMapImage procedural type have been reversed to allow it to point to an object method.
TBitMap and descendants must now use a TLogPal palette management object (pointed to by its LogPal field), where previously this was optional.
NumOfCols and Palette fields removed (use LogPal^.NumCols and LogPal^.Pal instead)
TBitMap.Owner and TBitMap.OwnerDraw fields removed (moved to TLogPal.Client and TLogPal.ClientDraw)
TBitMap.Init method not now passed the AOwner and AOwnerDraw arguments. Use the new TBitMap.SetClientDraw method instead.
TBitMap.GetFileSize, TBitMap.ReMapImage and TBitMap.SetOwnerDraw methods added (see on-line help).
TBitMap.LoadImage and TBitMap.LoadPalette "internal" methods are passed 2 extra arguments. See the online help for more details.
MoveTextCursor procedure (GDrivers unit)
The arguments to the MoveTextCursor procedure have been changed (see the online help for details).
TMouseMask type (GDRIVERS unit)
This type is no longer defined. The more powerful TMouseDef type (see IDE help) has superseded it.
TDialog (GDialogs unit)
Changed TDialog.Init to give dialogs a taller frame title that uses the new fsStdDialog 3-D frame style. This means you shouldn't place textual controls (such as a TLabel or TStaticText) in row 1 of the dialog. Not many dialogs do this because it usually looks naff even in Turbo Vision, so it probably won't affect any of your code.
TPanel Object (GDialogs unit)
The TPanel.Init constructor is passed an extra argument; ASizeAdj. This is copied into the SizeAdj field inherited from TView.
TLabel Object (GDialogs unit)
TLabel.Init checks to see if the linked view passed in the ALink argument is an ofFramed view, and if it is sets its own SizeAdj.B.Y to 1 if the linked view is immediately below the label, or SizeAdj.B.X to 1 if the linked view is immediately to the right of the label. This 1 pixel "gap" between the label and its linked view allows the TFrame or TPanel to completely draw the frame around the ofFramed view.
The previous version of Graphic Vision just assumed the linked view was ofFramed and immediately below the label, and therefore always set SizeAdj.B.Y to 1.
TResourceFile (GObjects Unit)
The TResourceFile backlink has been changed slightly to allow more than one appended "magic" file to be accessible from a BP7 DPMI executable. This for example, allows a THelpFile, TResourceFile file and a TSharedResFile to be appended to the real-mode or DPMI Graphic Vision .EXE file that uses them. See the on-line help on the FindMagicFile procedure for more details.
The private TResourceFile.Index field has now been made public.
The TResourceFile.Get method can also be passed the ordinal position of a resource by typecasting a number to a PString. e.g.:
AnObject := ResFile.Get(PString(10));
will load and initialise the 11'th resource of the TResourceFile.
SysPal variable (GApp unit)
SysPal, the pointer to the hardware RGB palette has been renamed HardPal and moved to the ScrnDriv unit.
Memory for the hardware palette (HardPal) is now allocated by InitGraph and not by TProgram.InitScreen.
The interface to the hardware palette management functions have been "cleaned up", making the DosShell procedure cleaner too.
Some application palette entries have been changed.
ChangeSysColors procedure (GColors Unit)
Changes to the way the ChangeSysColors procedure in the ScrnDriv unit works means the "wrapper" code to invoke a "change colors" dialog (TColorDialog) has changed very slightly. Use the "Colors" nested procedure of TGVDemo.HandleEvent method in GVDEMO.PAS as a template.
THelpFile and THelpWindow (HelpFile unit)
The THelpFile backlink has been changed slightly to allow more than one "magic" file to be appended to a BP7 DPMI executable. This means you should use the GVHC help compiler utility to generate Graphic Vision help files, and not TVHC as previously. No changes are required to the actual help scripts.
The help file viewer object: THelpWindow has been enhanced slightly so it now saves its last screen position. This position is used on the next invocation of a help window.