Lazarus 1.8.0 release notes

From Lazarus wiki
Jump to navigationJump to search

Lazarus 1.8.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

  • TCustomForm
    • new position poWorkAreaCenter - center form on working area (depends on DefaultMonitor)
    • new compiler define LCLRealFormBounds. If you compile your application with LCLRealFormBounds on, the TCustomForm bounds (Width/Height) will be real outer bounds and not client bounds. Also constraints will affect real bounds. For now, it is supported only by win32.
  • TToolButton
    • new style tbsButtonDrop - paints a drop down arrow on the right side of the button. In contrast to tbsDropDown the button has only single clicking area that invokes the DropDownMenu if assigned.
    • new event OnArrowClick. It is called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton. Breaking change: OnClick was called in 1.6!
  • TToolBar
    • new DropDownWidth property to setup the width of the toolbutton arrow area for Style=tbsDropDown.
  • ClipBoard
    • The ClipBoard now supports copying and pasting text in HTML format by means of the methods GetAsHtml and SetAsHtml.
  • Menus (TPopupMenu, TMainMenu, TMenuItem)
    • Menus now support OwnerDraw with (almost) Delphi's approach. If you set TMenu.OwnerDraw to true the OnMeasureItem and OnDrawItem from TMenu and TMenuItem will be called. OnDrawItem from Lazarus has the same parameters as OnAdvancedDrawItem from Delphi. You can use the events also from TMenu, which is an LCL addition to Delphi. For now only win32 is supported.

IDE Changes

  • lazbuild
    • new option --add-package-link to register given lpk files without building.
  • Quick Fixes
    • new QuickFix for any fpc hint, note or warning: add compiler directive {$warn id off}
  • Code creation
    • new shortcut Ctrl+ Shift+X that shows a CodeCreation dialog with more options. Ctrl+ Shift+C never shows a dialog now.

IDE Interfaces Changes

Components

LazControls

  • Added T(Float)SpinEditEx, a widgetset independant implementation T(Float)SpinEdit with some extended capabilities:
    • NullValue property.
    • Configurable behaviour when the text inside the control is not a number.

DateTimeCtrls

  • DateTimeCtrls was splitted into DateTimeCtrls and DateTimeCtrlsDsgn packages and thus the components can get unregistered. Remedy: install DateTimeCtrlsDsgn into the IDE. (Don't use DateTimeCtrlsDsgn in your application.)

LazControls

  • Register procedures were moved into LazControlDsgn and thus the components can get unregistered. Remedy: install LazControlDsgn into the IDE. (Don't use LazControlDsgn in your application.)

Changes affecting compatibility

LCL incompatibilities

TToolButton.OnArrowClick added

  • Applies: event called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton.
  • Old behavior: OnClick was called.
  • New behavior: OnArrowClick is called.
  • Reason: there was no easy way to detect click on the arrow sub-button.
  • Remedy: use the same event handler for OnArrowClick and OnClick.

TCustomAbstractGroupedEdit descendants must override GetRealText/SetRealText methods

  • Old behavior: TCustomAbstractGroupedEdit reintroduced the Text property
  • New behavior: TCustomAbstractGroupedEdit uses TControl.Text
  • Reason: unnecessary 2 different properties with the same name and function
  • Remedy: override GetRealText/SetRealText instead of GetText/SetText.

TFontStyle enum item order is changed to match with Delphi

  • Old behavior: the last item was fsUnderline
  • New behavior: the last item is fsStrikeOut
  • Reason: Delphi compatibility.
  • Remedy: check code if it depends on Ord(TFontStyle) - like "StyleStrings: Array[TFontStyle] of string = ('Bold', 'Italic','StrikeOut','Underline');" or saving/retrieving font style as ordinal value.
  • More info: It does not affect LFM streaming. It can make a difference when iterating items.

THintWindow transparent for mouse messages by default

  • Old behavior: THintWindow received mouse messages
  • New behavior: THintWindow passes mouse message through itself to the underlying form/control.
  • Reason: Delphi compatibility.
  • Remedy: to make THintWindow clickable again, add a LM_NCHITTEST message handler to your hint window descendant and return HTCLIENT as message result:
 procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
 // ...
 procedure TMyHintWindow.WMNCHitTest(var Message: TLMessage);
 begin
   Message.Result := HTCLIENT;
 end;

Components incompatibilities

easylazfreetype: TCustomFreeTypeFontCollection.AddFile

  • Old behavior: return Boolean
  • New behavior: return TCustomFontCollectionItem
  • Reason: there was no easy possiblity to work with the added item.
  • Remedy: don't check the result for True, but for "<>nil".

IDE incompatibilities

Previous release notes