Difference between revisions of "Lazarus 2.2.0 release notes"

From Lazarus wiki
Jump to navigationJump to search
(→‎TAChart: Chart.AllowZoom changed: TDataPointDrawTool.OnDraw deprecated)
Line 67: Line 67:
  
 
=== TAChart: DataPointDrawTool.OnDraw deprecated ===
 
=== TAChart: DataPointDrawTool.OnDraw deprecated ===
The event OnDraw of the data point draw tools (TDataPointCrosshairTool, TDataPointDistanceTool will be removed and replaced by the new event OnCustomDraw.
+
The event OnDraw of the data point draw tools (TDataPointCrosshairTool, TDataPointDistanceTool) will be removed and replaced by the new event OnCustomDraw.
 
* Old behavior: the old event used for drawing the Drawer of the chart.
 
* Old behavior: the old event used for drawing the Drawer of the chart.
 
* New behavior: the Drawer to be used is passed as a parameter.
 
* New behavior: the Drawer to be used is passed as a parameter.

Revision as of 20:50, 15 April 2019

Lazarus 2.2.0 is not yet released. This page is under construction!

Statistics:

  1. commits: xxx
  2. log: svn log -r xxxx:xxxx
  3. resolved bug tracker issues: xxx

LCL Interfaces Changes

LCL Changes

TLazIntfImage.Create with size and description flags need no CreateData anymore

  • Old: After creating of a TLazIntfImage with size and flags CreateData has to be called
  • New: Creating of a TLazIntfImage with size and flags internal calls CreateData
  • Reason: Simplify, see Issue #35035

IDE Changes

  • Added IDE macro $(OutputFile) for the outputfile of the project. This usually corresponds to $(TargetFile), except when having a host application, in which case $(TargetFile) is the host application, while $(OutputFile) is the project executable (or library).
  • Codetools support for anonymous functions
  • "Close tabs to the right" in Source-Notebook

IDE Interface Changes

Components

AnchorDocking

  • New button to minimize a docked site.

Spotter

  • New IDE addon, showing a search list of all IDE commands.

TAChart

  • New chart tools "TAxisClickTool", "TTitleFootClickTool" and "TLegendClickTool": Create OnClick events when the user clicks on a chart axis or its title, the chart title or footer, or the chart legend, respectively. Good for creating an interactive GUI for formatting charts.
  • New property "AllowPanning" to turn built-in panning on/off.
  • New property "LimitToExtent" for zooming tools, avoids zooming out of the chart's full extent.
  • Property editor for TSeriesPointerStyle.
  • TBarSeries:
    • New property "BarShape" for drawing alternative shapes (cylinder, hexagonal prism, pyramid or cone) instead of rectangular bar.
  • TPieSeries:
    • Impoved painting of 3D pie series due to new properties: "DepthBrightnessDelta" allowing to darken or brighten the sides of the pie slices, "Orientation" and "ViewAngle" for different views of the series
    • New property "InnerRadiusPercent" allowing to draw a ring chart.
    • New property "MarkPositionCentered" for attaching data point labels to the pie center instead of the pie perimeter.
    • New property "StartAngle" to define the position of the first pie slice.
  • TListChartSource can be sorted by X, Y, XList, YList, Color, Text, or in a user-specific way defined by the event OnCompare.

Changes affecting compatibility

LazUtils

LCL incompatibilities

TMaskEdit: hexadecimal and binary characters

Mask support for hexadecimal and binary characters was added (this is a Lazarus extension, Delphi does not support this).

  • Old behavior: the characters 'h', 'H', 'b' and 'B' had no special meaning in the EditMask property
  • New behavior: these characters now are mask characters for hexadecimal and binary input respectively.
  • Reason: nice to have feature (QT5 supports it natively).
  • Remedy: if you need one of these characters as a literal in your EditMask: escape them with a '\'.

Components incompatibilities

TAChart: Chart.AllowZoom changed

The property AllowZoom of TChart is meant to give the user the chance to turn the builtin zooming feature on or off.

  • Old behavior: AllowZoom operates also on an external toolset.
  • New behavior: AllowZoom is effective only for the built-in toolset.
  • Reason: More consistent handling of properties
  • Remedy: Use the property Enabled of the external zoom tool to switch zooming off, or don't add a zoom tool at all.

TAChart: DataPointDrawTool.OnDraw deprecated

The event OnDraw of the data point draw tools (TDataPointCrosshairTool, TDataPointDistanceTool) will be removed and replaced by the new event OnCustomDraw.

  • Old behavior: the old event used for drawing the Drawer of the chart.
  • New behavior: the Drawer to be used is passed as a parameter.
  • Reason: When a chart is painted to an external file the Drawer of the chart still refers to the screen; therefore, the datapoint cross hair or distance bars are missing in the external file.
  • Remedy: Use the OnDraw code in the event handler for OnCustomDraw, but replace "Chart.Drawer" by the "ADrawer" given as a event parameter.

VirtualTreeViews: Renamed to "laz." prefix

VirtualTreeViews is essentially needed by OnlinePackageManager. Having this original package within the Lazarus installation makes is impossible for users to install a different version of this package.

  • Old behavior: Projects with VirtualTreeViews required the "virtualtreeview_package" and had the unit "virtualtrees" in the uses clause. The registered component classes were named "TVirtualStringTree", "TVirtualDrawTree", "TVTHeaderPopup".
  • New behavior: The package was renamed to "laz.virtualtreeview_package". All file names were changed to have a "laz." prefix, i.e. the uses clause will have to contain "laz.virtualtrees". The registered components are named "TLazVirtualStringTree", "TLazVirtualDrawTree", and "TLazVTHeaderPopup".
  • Reason: Avoid naming conflicts when another version of VirtualTreeViews is installed
  • Remedy: For existing projects requiring the VirtualTreeViews distributed with Lazarus,
    • open the lfm file in an external editor and replace "TVirtualStringTree" by "TLazVirtualStringTree", as well as - if available - "TVirtualDrawTree" by "TLazVirtualDrawTree" and "TVTHeaderPopup" by "TLazVTHeaderPopup".
    • open the project in the IDE, remove package "VirtualTreeView_package" from the project requirements and replace it by "laz.virtualtreeview_package"
    • in the pas file's "uses" clause, replace "virtualtrees" by "laz.virtualtrees"
    • in the pas file replace "TVirtualStringTree" by "TLazVirtualStringTree" (and accordingly for the other VTV components).

IDE incompatibilities

Previous release notes