FireMonkey New Features and Enhancements

From RAD Studio
Jump to: navigation, search

Go Up to FireMonkey


Metal Drivers GPU Support

On the macOS platform you can now build applications against the Metal API, rather that the old Quartz API and OpenGL.

Since Apple deprecated OpenGL, even when it is still available in Catalina, it is likely that will not be available in the future. FireMonkey Metal support offers a smooth migration to future requirements and better performance for screen rendering.

RAD Studio 10.4 introduced support for the Metal API in the iOS platform as well, where it is not required, but can offer better performance for FireMonkey applications in general.

How to Work with Metal

There are a few global settings to enable the use of the Metal driver for UI rendering and some of its configuration.

These settings are below and the default value in indicated:

FMX.Types.GlobalUseMetal: Boolean=False;

It allows using Metal for UI rendering. Boolean variable that specifies whether to use the Metal context for rendering graphics.

To enable the Metal context you have to set the global variable FMX.Types.GlobalUseMetal to True in the initialization section. By default this global variable is False to stay compatible with previous Delphi version.

Note:
When you use custom OpenGL functions or custom OpenGL Shader in its own code, migration to Metal may no be totally transparent.

FMX.Types.GlobalEventDrivenDisplayUpdates: Boolean=True; When this value is set to True, the draw loop pauses and updates are event-driven. The default value is True.

This is useful for games, but currently has no equivalent in OpenGL on Android.

Note:
This setting is for Metal only.

FMX.Types.GlobalPreferredFramesPerSecond: integer=60; It is the rate where the draw loop updates its contents. Integer variable to set the rate at which the draw loop update its contents when GlobalEventDrivenDisplayUpdates is set to False.

Note:
This setting is for Metal only.

New Window Styled Memo Implementation

The new implementation for the styled TMemo component on the Windows platform has better support for IME and other improvements.

To activate this new implementation you have to add to the uses statement the new unit FMX.Memo.Style.New. FireMonkey uses the old implementation for styled TMemo as default in all platforms.

Adding the new unit FMX.Memo.Style.New automatically replaces the old implementation of styled memo for all TMemo controls in the entire application.

The implementation of this new style memo is limited to the Windows platform. Here are some of the key features available:

  • The new styled memo includes a completely redesigned IME input. The new styled memo now works like a native IME text input in Windows:
  • The user may enter IME text to choose where to insert the IME text.
  • While the user is inputting IME text, IME text is not a part of Memo lines. IME text is drawn over the top.
  • Now the IME window changes its position, when the user scrolls the content of the memo.
  • When inputting IME text, the user can apply the Left and Right buttons to correct the current IME Text.
  • The new styled memo supports new ways of selecting text. For example, you can double-click and hold the mouse button down while moving it to select multiple words in the text (selecting entire words).
  • New styled memo implementation consists of different parts: selection, layout, check spelling, context menu, etc.
  • There are new additional methods in TTextService for better controlling the IME state.
  • Additional TMemo improvements include moving the Text inside the TMemo, moving the caret to a new line, using CaretPosition in the OnMouseUp event, and caret position when resizing controls. Also, TMemo offers a better display of Emoji characters on Android.

Additiontal FireMonkey Features and Notable Fixes

  • The Toolbar component in FireMonkey now has Hint, ShowHint, and ParentShowHint properties.
  • Improved support for Emoji ZWJ Sequences, for example, icon Family: Man, Woman, Girl, Boy.
  • New method to access Caret position from a mouse in TMemo.
  • There is a new method (TAndroidHelper.ShouldNativeLibrariesBeExtracted) to return the value of the 'extractNativeLibs' manifest attribute, which returns False for an application packaged as an app bundle.
  • Significantly increased the performance of rendering chars in TextLayout.
  • On macOS, there is a new entitlement option for Bluetooth.
  • Skia improvements on Mac and in TskLabel, and improved Z-Order Manager in Windows.
  • Dynamic style loading on non-Windows platforms.

New TBufferedLayout Component

FireMonkey now has a new layout control that stores its graphical content (including its internal controls) in a memory buffer, so that, in case there is no change, it can be repainted by displaying the buffer rather than repainting each internal control.

In many cases, the net effect is a faster refresh of the UI of the control. However, the use of TBufferedLayout on large surfaces may have a negative consequence in terms of memory usage, and that is why this behavior is not part of the core library.

The new control is easy to use, like other layouts, and has the following icon:

icon

Other FMX Features and Enhancements

Features and Enhancements added in RAD Studio Florence 13.1:

  • Introduced support for Linux styles and views in the IDE designer.
  • Added support for DirectX texture filtering.

Features and Enhancements added in RAD Studio Florence 13.0:

  • Introduced MaskEdit control.
  • Introduced Display Link Service.
  • Targets Android API level 35.
  • Update to the iOS API Headers.
  • Update of the manifestmerger command-line tool to version 31.10.1.
  • Update of the AAPT2 command-line tool to version 8.10.1.
  • Updates to the Java2OP command-line tool replacing Doclava with the jparser command-line tool.
  • Update of the Skia Library integration (Skia4Delphi) to the latest version 7.0.0 (see Releases - skia4delphi/skia4delphi).
  • The TComboEdit AutoComplete component now supports typing autocomplete, similar to the VCL TComboBox with editable text configuration.
  • New set of properties to TPresentedScrollBox for the user to control scroll animation, bounces, and touch interaction.
  • Updated all iOS API headers from RTL to iOS 18.4.
  • Fullscreen support for iOS.
  • Added support for the 16.0 version of Emoji symbols.
  • Improved the interaction of iOS FMX apps with Bluetooth keyboards in terms of arrow key management.
  • Redesigned the IFMXSpellCheckerService by creating the new interface IFMXSpellCheckerServiceEx. This allows for working with different languages and sentences, rather than just words.

See Also