Difference between revisions of "Lazarus 1.0 release notes"

From Lazarus wiki
Jump to navigationJump to search
m (Text replace - "delphi>" to "syntaxhighlight>")
Line 323: Line 323:
   ScrollLock := LCLIntf.GetKeyState(VK_SCROLL);
   ScrollLock := LCLIntf.GetKeyState(VK_SCROLL);
=== TDBEdit use EditMask property of the linked Field. ===
*'''Previous behaviour''': TDBEdit controls used the value stored in EditMask property (inherited from TCustomMaskEdit).
*'''Effects''': TDBEdit.EditMask property will be ignored.
*'''Reason''': Delphi compatibility.
*'''Remedy''': To keep old behavior set CustomEditMask to True

Revision as of 22:55, 24 March 2012

Template:Lazarus 0.99.0 release notes

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


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

LCL Interfaces Changes

  • Gtk2: Implemented LCLIntf.CreateEllipticRgn and CreateRoundRectRgn and implemented SetWindowRgn for TForm (previously it worked only for child controls)
  • WinCE: Implemented TSelectDirectoryDialog
  • A new interface was added called LCL-CustomDrawn which implements all native controls via the Lazarus Custom Drawn Controls. This interface has a minimal amount of native elements and implements TCanvas drawing through the non-native TLazCanvas, TBitmap through TLazIntfImage, etc. This is the first Lazarus interface to support Android. It also supports Windows, Mac OS X (Cocoa) and X11.

LCL Changes

  • The LCL is now a normal package. It is now automatically recompiled if needed. For example when switching the target platform and you have not yet compiled for this platform. This has no impact on existing projects.
  • The platform independent parts of the LCL are now in the package LCLBase. This has no impact on existing projects.
  • The linker options needed by the LCL are now only added to projects that use the package LCL. Formerly all projects got them. See here.
  • TCustomForm.Create raises an exception if form resource is not found.
  • TNotebook and TPage: The new implementations of these classes have been added.
  • TDBNavigator: It is now possible to have focusable buttons by setting Options = [navFocusableButtons] and TabStop = True. This is useful for accessibility and for devices without a mouse nor touch screen.
  • TControlBorderSpacing.GetSideSpace and GetSpace were swapped and are now consistent. GetSideSpace = Around + GetSpace.
  • TForm.WindowState=wsFullscreen was added
  • TCanvas.TextFitInfo was added to calculate how many characters will fit into a specified Width. Useful for word-wraping calculations.
  • TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent were added. They simplify the work of obtaining the final color of the control while resolving clDefault and the ParentColor.
  • LCLIntf.GetTextExtentExPoint now has a good default implementation which can work in any platform which does not have a specific implementation for it. The specific implementations are still better, if they can be supported by the widgetset.
  • TTabControl was reorganized. Now it has the correct class hierarchy and inherits from TCustomTabControl like it is supposed to.
  • New unit in the LCL: lazdialogs.pas. This unit has non-native versions of various native dialogs, for example TLazOpenDialog, TLazSaveDialog, TLazSelectDirectoryDialog. It is utilized by widgetsets which either do not have a native dialog, or do not wish to use it because it is limited. These dialogs can also be utilized by user applications directly.
  • New unit in the LCL: lazdeviceapis.pas. This unit offers an interface to more hardware devices such as the accelerometer, GPS, etc. See LazDeviceAPIs
  • New unit in the LCL: lazcanvas.pas. LazCanvas is a TFPImageCanvas descendent which implements drawing in a LCL compatible way but 100% in Pascal, doing all the drawing itself.
  • New unit in the LCL: lazregions.pas. LazRegions is a purely Pascal implementation of regions for canvas clipping, event clipping, finding in which control of a region tree one an event should reach, for drawing polygons, etc.
  • New LCL units: customdrawncontrols.pas, customdrawndrawers.pas, customdrawn_common.pas, customdrawn_android.pas and customdrawn_winxp.pas. These are the Lazarus Custom Drawn Controls, which are controls which immitate the standard LCL ones, but with the difference that they are non-native and skinnable.
  • New APIs were added to the LCL to improve our support for accessibility software such as screen readers. Read more in LCL Accessibility
  • Accessibility support in TCustomTreeView might make this control slower if there is a very large number of items, for example, 10.000+ items. If the performance impact is unacceptable it is possible to turn accessibility off for tree view items by setting TCustomTreeView.AccessibilityOn to false. The default value is true.

LazUtils Changes

  • LazUtils and the LCL now contain a 100% Pascal implementation of text rendering which can read TrueType fonts and draw nice texts with ClearType anti-aliasing. This library is called LazFreeType and is almost entirely in LazUtils except for 1 unit which is in the LCL which is a drawer unit.

IDE Changes

  • The old warnings at IDE start for Lazarus directory, compiler and FPC sources were replaced with one dialog. The dialog can be forced to show with the command line parameter --setup.
  • A new project now saves the session information (open files, caret positions, etc) as separate lps file in the project directory. You can change this in Project / Project Options / Session.
  • The IDE no longer asks to save changes, if only the session data has changed (i.e. cursor positions) and the session is saved in the separate lps file. You can enable the confirmation in Tools / Options / Desktop / Auto Save. See [[1]].
  • Compiler options: You can now use the project build macros in the search paths, linker and custom options of the project and all packages of the project. See the examples.
  • The package editor and project inspector were improved to better support big packages/projects with hundreds of files: You can now sort, filter and show the directory structure.
  • Packages compiled via Makefile created by the IDE are now recognized by the IDE and only recompiled if something changed.
  • Package general and package compiler options are now using generic IDE options interface.
  • New dialog to clean up build files, including all packages of the project
  • Cleaner clean up when compiling packages: The IDE now deletes all files in the unit output directory of a package unless the directory contains sources or is shared with another package (See packages).
  • Open File: filter list is now configurable in Tools / Options / Environment / File Filters
  • Editor:
    • Codefolding: Folded code remains folded, even if it temporarily becomes part of a comment (due to an open "(*" or "{"). Note: Such folds are not saved in the session, they are once they returned to there normal state, after the closing "*)"/"}" was typed.
    • Codefolding: Ability to hide (fold) the currently selected text. These folds are not saved to the session
    • Improved Mouse wheel support: Allows to zoom the editor (ctrl wheel) and slower/faster scrolling (shift/alt). Keys can be reconfigured.
    • Basic Macro-Recorder. (Only one Editor can record at a time, Macro can then be played to any editor)
    • Info-Hint, showing the current class/procedure on top of the editor, if it would otherwise be scrolled out
  • Debugger
    • Added display format for CPU-Register
    • Added Pascal Source to Disassembler
    • Added breakpoints, (display and toggle) to Disassembler
    • Added Thread dialog
    • Added Watchpoints (data breakpoints)
    • History of Watches and Locals [see blog]
    • Added logging of most of events (Event Log)
    • Added ability for a breakpoint (breaking or none-breaking) to enable/disable other breakpoints
    • Watch/Inspect the an object as the instantiated class.
  • Main menu structure got revamped. Source menu and its Refactor sub-menu are new.
  • Parameter Hints now have a button to paste the missing parameter names.
  • Code Explorer: Filter now deletes nodes, instead of marking.
  • Code Explorer: New category "Surrounding" allows to quickly jump to interface, implementation and nested procedures.
  • Help for keywords: The chmhelp package can now show help for keywords.
  • startlazarus now supports the --pcp parameter allowing multiple installations of Lazarus.
  • lazbuild can now create/update the Makefile of a package with the new option --create-makefile.
  • lazbuild --build-ide= now builds under Windows lazarus.exe, not lazarus.new.exe
  • lazbuild --build-ide= now appends the options instead of replacing.
  • lazbuild --build-mode= can now be used together with --build-ide to select the build profile of the IDE.
  • Design time only packages are no longer compiled into projects, unless enabled. See here.
  • New package type Runtime only, can not be installed in IDE. Use this to for package incompatible with the LCL or the IDE. See here.
  • When creating a new package the option to Add to the uses section of the project is now disabled by default.
  • New menu item to quickly create a new component: Package / New component.
  • New macros: PrimaryConfigPath, SecondaryConfigPath, FallbackOutputRoot, PkgName. See IDE Macros
  • The IDE interface unit projectintf was split into projectintf and compoptsintf. The unit compoptsintf contains the access to the various compiler options of the IDE. The unit packageintf now grants access to the compiler options of packages.
  • New projects can now be created with your own set of build modes, for example "debug" and "release". For this a feature was extended: Project / Project Options / Use these options as default for new projects.
  • The compiler option -Wpunitname, specifying the controller unit for embedded systems, is now used when doing a "find declaration". You can give this option under compiler options / other.
  • Project title can now contain macros



  • Parsing, searching and code completion of class operators and advanced records.
  • Parsing objcclass external syntax.
  • Parsing and class completion of nested classes. Searching is not yet fully implemented.
  • Parsing of class sections type, const, var, class var. Searching is not yet fully implemented.
  • Parsing delphi style generics. Searching in spezialized types is not yet fully implemented.
  • Parsing jvm syntax.
  • ctnClassType, ctnClassConst, ctnClassVar were removed and replaced with ctnTypeSection, ctnConstSection, ctnVarSection.
  • The class sub sections ctnTypeSection, ctnConstSection, ctnVarSection are now children of the visibility sections.
  • New IDE package for advanced Codetools: Cody.
  • Find declaration: "inherited;"
  • Identifier completion for compiler directives: keywords and FPC macros.
  • Identifier completion: option to replace only the prefix instead of the whole identifier (Tools / Options / Codetools / Identifier Completion / Replace whole identifier).
  • Code completion now creates variables from pointer parameters, e.g. CreateIconIndirect(@IconInfo) will create var IconInfo:TIconInfo;. See here.
  • Code completion now creates procedures/methods from parameters, e.g. List.Sort(@MySortFunction) will create the new function MySortFunction(Item1, Item2: Pointer): Integer. See here.


  • Wiki documentation
  • On{Before|After}Draw{BackWall|Background}, OnExtentChanged events for TChart
  • Antialiasing
  • TChartAxis:
    • MarkPositions to implement labels-inside bars and pies
    • Minor axis ticks and grid
    • AxisPen and Range properties
    • Intervals property to control interval size
  • TChartAxisMarks:
    • Stripes property to create "striped" chart background
    • YIndex property to implement labels for stacked series
    • Range property
  • TFuncSeries now correctly work with rotation and axis transformation
  • 5 new series:
    • Open-High-Low-Close, B-spline, Cubic spline, Polar, Fit
  • Multi-line mark labels, title and footer rotation
  • 6 new tools:
    • TDataPointClickTool, TDataPointHintTool, TDataPointCrosshairTool, TZoomMouseWheelTool, TPanMouseWheelTool, TUserDefinedTool
    • TBasicPanTool.LimitToExtent property
  • Drag-zoom and crosshair (former reticule) now should work on Qt and MacOS
  • KeyDown/KeyUp/MouseWheel events for chart tools
  • New transformations: TCumulNormDistrAxisTransform, TUserDefinedAxisTransform
  • New data source: TIntervalChartSource
  • TCalculatedChartSource: derivative and smooth derivative, AccumulationDirection
  • Series can now skip NaN values
  • New IChartDrawer API with various drawing back-ends:
    • AggPas (separate package)
    • Printer, for printing charts with appropriate scaling (separate package)
    • OpenGL
    • FPCanvas/NoGUI, for using in web servers
    • SVG
    • BGRABitmap (separate package)
    • Windows Metafile (separate package)
    • FPVectorial (separate package)
  • Navigation components: TChartNavScrollBar, TChartNavPanel
  • Legend:
    • Item format
    • Multiple columns, fill direction
    • Ordering and grouping
    • SymbolFrame property
    • OnCreate event
  • New components: TChartListbox, TChartExtentLink, TChartImageList
  • Enumerators
  • Arrow property for TConstantLine and TChartAxis
  • TChart.MarginsExternal property
  • Design-time editor for TListChartSource.DataPoints
  • 17 new demo projects, many updates to existing demos
  • Backwards-incompatible changes:
    • Adding Pie series does not automatically hide axises any longer
    • TZoomDragTool.Proportional property is replaced by RatioLimit, allowing single-axis zooming
    • TReticuleTool, TChart.ReticuleMode, TChart.ReticulePos and TChart.OnDrawReticule are deprecated and will be removed, use TDataPointCrosshairTool instead

Changes affecting compatibility

TCustomForm.Create raises an exception if resource is not found

  • Reason: Each form created by the IDE should have a resource, so if resource is not found there is something wrong with either a resource or the unit which contains the faulty form. Therefore the application should inform the developer that the form can't function correctly without the resource. This change is also Delphi compatible and compatible with TFrame and TDataModule components.
  • Remedy: If you need a resourceless form you have 3 options:
    • Create a TForm class (not a descendant)
    • Construct your form using the CreateNew() constructor.
    • It is also possible to disable the exception by setting the global variable RequireDerivedFormResource to False.

See also

LM_DEACTIVATE message is removed

  • Reason: Both LM_ACTIVATE and LM_DEACTIVATE had Active field which have WA_ACTIVE, WA_INACTIVE flags. Also this is more VCL compatible solution.
  • Remedy: Move LM_DEACTIVATE code to the LM_ACTIVATE handler inside a check of Message.Active = WA_INACTIVE, Move LM_ACTIVATE code inside a check for Message.Active <> WA_INACTIVE

TCompileReason or TLazCompilerOptions not found

  • Reason: The unit projectintf was split. The declarations for the IDE compiler options are now in the unit compoptsintf. The unit packageintf needed access to the compiler options.
  • Remedy: Add unit compoptsintf to the uses section.

Two packages which share their unit output directory give "unit not found", because the IDE deletes the ppu files

  • Reasons: When a package is compiled clean and the unit output directory of a package is not shared by sources nor dependent packages the IDE now deletes all files in the output directory. This solves the frequent "unit not found" / "checksum changed" problem of renamed/moved units and other left garbage created by upgrades and experiments.
  • Remedy: Change the unit output directory of one those packages OR create a dependency between the two packages OR set one of the two packages to update manually (Package Editor / Options / IDE Integration).


removed, see 0.9.30 release notes, use SrcEditorIntf.SourceEditorManagerIntf


SynEdit: Changes to Options, MouseOptions

All mouse related flags from the property Options were moved to MouseOptions. These are:

 eoAltSetsColumnMode, eoDragDropEditing, eoRightMouseMovesCursor, eoDoubleClickSelectsLine, eoShowCtrlMouseLinks

The new flags start with "em".

The old flags still exists (but should be considered deprecated).

  • Changes to the old values are forwarded to the new MouseOptions
  • Setting Options, but keeping the (all/some) mouse related flags as they currently were in Options (even if different from MouseOptions) will not update MouseOptions.
  • Setting a value in MouseOptions to true, will not update Options.
  • Clearing a value in MouseOptions (set to false) will update (clear) Options. But only if it was set in MouseOptions before (changed).

Old code should work as before, no changes needed. As soon as MouseOptions is used (write access), code may need to be adapted.

SynEdit: Changes to MouseActions

A new flag was introduced: emUseMouseActions im SynEdit.MouseActions

Custom MouseActions are now only used, if this is set.

Changes required: If you use MouseActions different from the flags in MouseOptions (was Options), them enable this flag.

SynEdit: BeginUpdate adds UndoBlock

  • This changes do not affect the usage of SynEdit via the designer

Calling SynEdit.BeginUpdate, now includes creating an undo-block. This means all changes made during the update will be one entry in the undo list.

Changes required: If the old behaviour is required, call SynEdit.BeginUpdate(False); the EndUpdate does not require any change, it adapts automatically.

SynEdit: Several deprecated methods were removed

  • This changes do not affect the usage of SynEdit via the designer
removed, use SynEdit.SelectWord
removed, the property was a dummy property for some time with no value. Information can be retrieved via TSynEditMarkupCtrlMouseLink(SynEdit.MarkupByClass[TSynEditMarkupCtrlMouseLink]).IsMouseOverLink
removed, use SynEdit.Gutter.Width
removed, only worked with SynPasSyn. See TSynPasSyn for configuration
removed, use FileLineEndType and FileWriteLineEndType
TSynEditMarkList (Bookmarks)
First / Last / Place / Insert have been removed, use Items[] / Add. Insert has no replacements, as bookmarks are now always sorted, and inserts at arbitrary positions no longer possible
TSynEditMarkList (Bookmarks)
GetMarksForLine, removed, use Line[n] property

SynEdit: MouseLinkColor and the underline

SynEdit no longer automatically underlines a link with MouseLinkColor.Foreground.

Instead MouseLinkColor.Foreground is only used for the text foreground-color. To get the underline the following should be added/configured:

   MouseLinkColor.FrameColor := MouseLinkColor.Foreground;
   MouseLinkColor.FrameStyle := slsSolid;
   MouseLinkColor.FrameEdges := sfeBottom;
   MouseLinkColor.FramePriority := 9999;  // make sure it is on top of all other frames

SynEdit: TSynCustomFoldHighlighter

  • This changes do not affect the usage of SynEdit via the designer
This may affect users who wrote their own highlighter *fold* support (inherited from TSynCustomFoldHighlighter)
This may affect users, who access such a highlighter from their code, to retrieve fold specific info.

FoldNodeInfo and FoldNodeInfoCount

Now available via Highlighter.FoldNodeInfo[LineIdx].CountEx([]) and Highlighter.FoldNodeInfo[LineIdx].NodeInfo(Index, [])

The following methods where removed:

function MinimumFoldLevel(Index: Integer): integer; virtual; abstract;
function EndFoldLevel(Index: Integer): integer; virtual; abstract;

The following methods where deprecated:

function FoldOpenCount(ALineIndex: Integer; AType: Integer = 0): integer; deprecated;
function FoldCloseCount(ALineIndex: Integer; AType: Integer = 0): integer; deprecated;
function FoldNestCount(ALineIndex: Integer; AType: Integer = 0): integer; deprecated;
They are also no longer "virtual". Inherited classes must be updated

All functionality is now available through:

function FoldBlockOpeningCount(ALineIndex: TLineIdx; const AFilter: TSynFoldBlockFilter): integer; virtual;
function FoldBlockClosingCount(ALineIndex: TLineIdx; const AFilter: TSynFoldBlockFilter): integer; virtual; overload;
function FoldBlockEndLevel(ALineIndex: TLineIdx; const AFilter: TSynFoldBlockFilter): integer; virtual; overload;
function FoldBlockMinLevel(ALineIndex: TLineIdx; const AFilter: TSynFoldBlockFilter): integer; virtual; overload;

Please see notes in unit SynEditHighlighterFoldBase

SynEdit: TSynCompletion, TSynAutoCompletion and TSynEditAutoComplete

Changed base class to be TSynPlugin.

This means TSynCompletion/TSynAutoCompletion/TSynEditAutoComplete is now freed, if it has no owner ("create(nil)") and the last added editor is destroyed. (Removing the Editor, does not free the plugin)

In other words: An owner-less plugin, assumes ownership by it's editor.

Solution: - Either create the completion with an Owner (or use the designer and drop one on your form) - or keep at least one editor added - or remove the editor, before destroying it

TCustomNotebook was moved from ExtCtrls to ComCtrls

  • Effects: TCustomNoteBook was moved
  • Reason: TCustomNotebook implements TPageControl, which is located in the ComCtrls unit. Logically the implementation of TPageControl should be in the ComCtrls unit, and this is also Delphi compatible. This change will also diminish the confusion that people make between TNotebook and TCustomNotebook, because both will be in different units now.
  • Remedy: The vast majority of projects should simply use TPageControl, so no change is required. For those that use TCustomNotebook, please change them to use TPageControl instead.

TCustomNotebook was renamed to TCustomTabControl

  • Effects: TCustomNoteBook was renamed
  • Reason: The previous name implied an unexisting relation to TNotebook, which caused a lot of confusion. On top of that, it was also Delphi-incompatible. The new name is Delphi compatible and fixes the previous problems.
  • Remedy: Rename any occurance of TCustomNotebook to TCustomTabControl.

TCustomPageControl/TPageControl.OnPageChanged were removed

  • Effects: TPageControl.OnPageChanged was removed
  • Reason: This event should never have existed because it is just a duplicate of OnChange which is the correct Delphi-compatible event. The way it was implemented, this event caused OnChange to be called twice, as per bug http://bugs.freepascal.org/view.php?id=19903
  • Remedy: Rename any occurance of TPageControl.OnPageChanged to TPageControl.OnChange. If you are using an old IDE but a new LCL you might error messages. To fix this, just rebuild your IDE to have it on the same version as your LCL.

Support for the shift states ssCaps, ssNum and ssScroll was removed from OnMouseWheel.

  • Previous behaviour: LCL-Win32 would send ssCaps, ssNum and ssScroll based on the key lock state, which is totally wrong. Windows does not support those keys as shift states. LCL-Carbon had ssCaps implemented and LCL-Gtk1/2 had unreliable implementations for them. All of those implementations were only for mouse wheel events, which is inconsistent with other mouse events.
  • Effects: ssCaps, ssNum and ssScroll are now never sent in mouse wheel events.
  • Reason: These shift states were implemented very unreliably and only for mouse wheel events and they cannot be implemented reliably.
  • Remedy: If you were previously depending on receiving the caps lock, num lock, etc, lock state in the win32 interface, use this code instead:
uses LCLIntf;

  CapsLock := LCLIntf.GetKeyState(VK_CAPITAL);
  NumLock := LCLIntf.GetKeyState(VK_NUMLOCK);
  ScrollLock := LCLIntf.GetKeyState(VK_SCROLL);

TDBEdit use EditMask property of the linked Field.

  • Previous behaviour: TDBEdit controls used the value stored in EditMask property (inherited from TCustomMaskEdit).
  • Effects: TDBEdit.EditMask property will be ignored.
  • Reason: Delphi compatibility.
  • Remedy: To keep old behavior set CustomEditMask to True