Recent

Author Topic: [ANN] fpGUI Toolkit v2.0.0 has been released  (Read 4242 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
[ANN] fpGUI Toolkit v2.0.0 has been released
« on: February 10, 2026, 12:04:47 am »
Hi everyone,

I'm super happy to announce the v2.0.0 release of fpGUI Toolkit.

  https://github.com/graemeg/fpGUI

It only took 10 years since the last "official release". Oops.  :-D

As you can imagine, a full changelog would be massive, so here
are some highlights of the larger work.

== AggPas (Anty-Grain Geomery) canvas ==

A 100% implemented in Object Pascal, 2D graphics canvas with
advanced anti-aliasing and transparency now included. You can
use the native platform graphic rendering, or opt for AggCanvas,
which gives consistent and high quality rendering on all platforms


== Alien Windows branch was merged in ==

Before, every widget had it's own platform window handle. Now, the
 top-level window is the only window that has a native OS window
handle, and all widgets on that form has "virtual handles". This
means much less resources needed by the OS, more consistent
drawing, clipping and event handling. It also allows all widgets to fully
support transparency.


== Layout Manager System ==

fpGUI now has a pluggable layout manager architecture inspired by
Java Swing's LayoutManager interface. Instead of manually
calculating widget positions, you can assign a layout manager to
any container and let it handle positioning, sizing, and resize
behaviour automatically.

The layout manager system coexists with the existing
Align/Anchors mechanism. It is entirely optional -- existing code
continues to work without changes.

Three layout managers are included:

  * FlowLayout - arranges widgets in a horizontal row with
                 automatic wrapping
  * BorderLayout - five-region docking (North/South/East/West
                   and Center)
  * MigLayout - a full port of Java's MigLayout v11.4.2 (see
                below)

A quick start guide is available at:
  docs/layout_managers_quick_start.adoc


== MigLayout v11.4.2 Port ==

The headline feature is a comprehensive port of MigLayout v11.4.2
from Java to Object Pascal. MigLayout is one of the most powerful
and flexible layout managers available in the Java ecosystem, and
fpGUI now has a native implementation.

Supported features:

  * Grid-based layout with automatic wrapping
  * Column and row spanning (SpanX/SpanY)
  * Growth priorities (GrowX/GrowY) for distributing extra space
  * Cell alignment (left/center/right/top/bottom/fill)
  * Docking (North/South/East/West) outside the normal grid
  * Component gaps with physical unit support (px, mm, cm, inch,
    pt)
  * Platform-aware default gaps and sizing
  * Fluent constraint API with automatic reference counting
  * Constraint string parser for concise constraint definitions
  * Debug visualisation overlay for layout inspection
  * Multi-DPI / HiDPI support via logic units
  * Platform-specific button ordering (OK/Cancel vs Cancel/OK)

The port includes 396 unit tests, all passing cleanly.

A comprehensive demo application is available at
examples/gui/lm-mig/ with eight feature panels demonstrating
basic grids, alignment, spanning, growth, complex layouts,
constraint parsing, button ordering, and docking.


== FPReport (FPC's reporting system) integrated into fpGUI ==


What to generate reports, display them in your application, export
them to PDF of PNG. Now it's possible.


== Widget Sizing API ==

A new sizing model separates a widget's intended size from its
actual rendered size.

Widgets now have:

  * Width/Height - the developer's preferred (intended) size
  * ActualWidth/ActualHeight - the actual rendered size after
    layout
  * PreferredSize - explicit preferred size that layout managers
    read
  * MinWidth/MinHeight - minimum size constraints

Some widgets (TfpgLabel, TfpgButton) now calculate their
preferred size automatically based on content and font, so
explicit sizing is often unnecessary.

SetPosition() has been deprecated in favour of setting individual
properties (Left, Top, Width, Height). The uidesigner has been
updated to generate the new property-based code.


== PasBuild Build System ==

The project has adopted PasBuild as its build tool. The
repository structure has been reorganised:

  * Framework source: framework/src/main/pascal/corelib/
  * Test source: framework/src/test/pascal/
  * Build output: framework/target/

UIDesigner is now managed by the new build tool as well, and will
by default compile after the framework is compiled. You can
compile them independently if you want.

See PasBuild documentation for more details:
  https://github.com/graemeg/PasBuild

Build commands:

  pasbuild compile -p unix,agg    (build framework)
  pasbuild test -p unix,agg       (run unit tests)

All example extrafpc.cfg files have been updated for the new
directory structure.


== macOS Cocoa Backend ==

An initial macOS Cocoa backend has been implemented
(experimental). This adds native macOS support alongside the
existing X11 and GDI backends.


== HiDPI and Rendering Improvements ==

  * Fixed DPI scaling for widgets designed at 96dpi but displayed
    at higher densities
  * Focus rectangle line width now scales for HiDPI displays
  * Font height calculation improved (ascent + descent) to
    prevent text clipping
  * AggCanvas text baseline positioning fixed for descender
    characters
  * Canvas dimension guards added across X11/GDI/Cocoa backends
    to prevent range errors during extreme resize operations
  * AggPas 32-bit and 64-bit compatibility fixes


== DocView Application ==

Lots of DocView (help viewer) improvements, and several UI
windows/dialogs have been migrated to MigLayout:

  * Contents tab
  * Index tab
  * Search tab
  * Notes & History tabs

The File Open/Save and Directory Select dialogs have also been
converted to use MigLayout management.

I'll be migrating more applications, tools and example to MigLayout
for better HiDPI support.


== Other Notable Changes ==

  * Deprecated function calls replaced with method equivalents
    across the codebase
  * Command line parameter handling migrated to ICmdLineParams
    interface
  * TStringHashList replaced with FPC's TFPDataHashTable for PO
    file handling
  * TagPointer deprecated (FPC's TComponent.Tag now supports
    64-bit)
  * Font property moved to base widget class
  * Visible property moved to WidgetBase class
  * StyleManager assert logic fixes
  * Bug #83 (broken localise) fixed
  * Tab sheet resize flicker eliminated
  * TreeView scrollbar flicker fixed
  * Multiple memory leak fixes in MigLayout constraint handling
  * All compiler warnings from fpGUI code has been resolved
  * All range-check errors have been fixed


== Breaking Changes ==

  * SetPosition() is deprecated - use Left/Top/Width/Height
    properties instead
  * Directory structure changed - extrafpc.cfg paths updated
  * TagPointer is deprecated - use Tag (now 64-bit capable)
    instead
  * Deprecated function calls removed (use method equivalents)


== Documentation ==

  * docs/layout_managers_quick_start.adoc
     - 10-minute introduction to layout managers
  * docs/miglayout_v11_port_plan.adoc
     - detailed MigLayout port plan
  * docs/layout_manager_implementation_plan.adoc
     - architecture design document
  * docs/toolkit_sizing_comparison.adoc
     - widget sizing API design guide
  * docs/api_design_intent_pathway.adoc
     - API design intent documentation

Example demos for all three layout managers are in:
  * examples/gui/lm-flow/
  * examples/gui/lm-border/
  * examples/gui/lm-mig/


And there are lots more, but too much to mention here. :)

Feedback, bug reports, and questions are welcome as always.


Regards,
  - Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 404
  • I use FPC [main] 💪🐯💪
I may seem rude - please don't take it personally

PierceNg

  • Sr. Member
  • ****
  • Posts: 427
    • SamadhiWeb
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #2 on: February 10, 2026, 04:24:14 am »
🤔 hmmm

https://gitlab.com/freepascal.org/lazarus/lazarus/-/work_items/42037

LCL-fpGUI is an LCL widget set built on fpGUI, i.e., another layer of abstraction between your app code and the GUI layer.

Personally, I don't see the point of LCL-fpGUI. If want to use LCL, use a native widget set like Cocoa, Windows or a well maintained layer like Qt. If want to use fpGUI, just use fpGUI.

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 404
  • I use FPC [main] 💪🐯💪
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #3 on: February 10, 2026, 04:31:50 am »
LCL-fpGUI is an LCL widget set built on fpGUI, i.e., another layer of abstraction between your app code and the GUI layer.
Thanks for the explanation!
I may seem rude - please don't take it personally

AlexTP

  • Hero Member
  • *****
  • Posts: 2678
    • UVviewsoft
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #4 on: February 10, 2026, 08:13:16 am »
Does fpGUI support Wayland session (w/o using X11)?

Fred vS

  • Hero Member
  • *****
  • Posts: 3818
    • StrumPract is the musicians best friend
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #5 on: February 10, 2026, 11:48:09 am »
Does fpGUI support Wayland session (w/o using X11)?

Hello Alex.

fpGUI applications can run via XWayland on a Wayland session.
Afaik, there are currently no plans to make fpGUI compatible with "pure" Wayland.

Andrew created a "wayland" branch: https://github.com/graemeg/fpGUI/tree/wayland.

However, this branch is suspended: Wayland is simply too closed, primarily because it would require independent development for each compositor. Furthermore, Wayland doesn't justify dedicating so much energy to a buggy, obsolete project that is a slave to Big Data.
« Last Edit: February 10, 2026, 12:06:47 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

hrayon

  • Full Member
  • ***
  • Posts: 121
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #6 on: February 10, 2026, 01:39:36 pm »
My humble opinion.
If you make a video presenting the changes and improvements, showing the possibilities (very simplified, no need for audio, no need to appear on camera) it will be more convincing so that people can try and use it.
I'm in a phase of leaving Delphi and starting with Lazarus, and I would like to learn more about working with fpGUI, to know its possibilities and limitations.
The textual description is essential as you did, but seeing it actually working - even before installing and configuring everything - is worth more, it's more convincing.
Focus on making it easy to design modern user interfaces and you will gain many users.

(I used Google Translate)

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #7 on: February 10, 2026, 05:37:00 pm »
If you make a video presenting the changes and improvements, showing the possibilities (very simplified, no need for audio, no need to appear on camera) it will be more convincing so that people can try and use it.
That's an interesting idea. I have an active YouTube channel, but it doesn't currently cover programming.

Quote
The textual description is essential as you did, but seeing it actually working - even before installing and configuring everything - is worth more, it's more convincing.
Focus on making it easy to design modern user interfaces and you will gain many users.
I'm past the stage of trying to "win over users". I'm not a sales person, and don't understand each person's needs.

Try the toolkit, do your testing. If it feels like a good fit for your project, then use it. I did that back in the day with Delphi, then got burnt with Kylix when we needed cross-platform support (and vowed never to use commercial toolkits again). Then in the late 2000's I tried Lazarus LCL for part of our commercial software (that required Windows, Linux and MacOS support). LCL was too inconsistent across platform back then. That's when I started building fpGUI Toolkit. It's used in many commercial software and many open source projects. Now, fpGUI is my passion project. I have lots of tools or apps written and using it, so I'll keep supporting it, as long as I can.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #8 on: February 10, 2026, 05:46:03 pm »
🤔 hmmm

https://gitlab.com/freepascal.org/lazarus/lazarus/-/work_items/42037

As Pierce correctly said.... "LCL-fpGUI is an LCL widget set built on fpGUI".

I'm not the maintainer of lcl-fpgui, but did contribute a lot to it in the past. However, I don't see the real value of it now - especially since it doesn't have an active maintainer, and just causes a lot of confusion between the LCL widget set, and the true fpGUI Toolkit (https://fpgui.sourceforge.net/).
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #9 on: February 10, 2026, 05:58:53 pm »
Hi Graeme
Just updated my local fpgui-git-repo to version 2.0.0  ...Pheeeewww, lots of changes from 1.5 -> 2.0, but nice to see you're moving with this great project.

I have a couple of questions, if I may:
· How do I go about coding my fpGUI-views to be able to switch between
  Light-style & Dark-style? Does that get handled with the new
  'Layout-Manager'?
· The first thing I had to do when the download finished (after navigating the
  new directory layout), was to implement this:
Code: Pascal  [Select][+][-]
  1.   /// area 51 begin ///
  2.   TfpgMsgParmHandle = record { added 2026.02.10 /cdbc }
  3.     WParam: ptrint;
  4.     LParam: ptrint;
  5.     Data: pointer;
  6.   end;
  7.  
  8.   TfpgMsgParmUser = record { comments added 2026.02.10 /cdbc }
  9.     Param1: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit \
  10.     Param2: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit  > still longint!!!!
  11.     Param3: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit /
  12.   end;
  13.  
  14.  
  15.   TfpgMessageParams = record
  16.     case integer of
  17.       0: (mouse: TfpgMsgParmMouse);
  18.       1: (keyboard: TfpgMsgParmKeyboard);
  19.       2: (rect: TfpgRect);
  20.       3: (drop: TfpgMsgParmDrop);
  21.       4: (user: TfpgMsgParmUser);  
  22.       5: (handle: TfpgMsgParmHandle); { added 2026.02.10 /cdbc }
  23.   end;
  24.   /// area 51 end ///    
in 'fpg_base.pas lines ca. 223 -> 246
Integer is also a LongInt in 64bit, i.e.: NO good for WindowHandles etc...
Would you please consider adding something similar in "The Real McCoy"?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #10 on: February 10, 2026, 07:37:05 pm »
· How do I go about coding my fpGUI-views to be able to switch between
  Light-style & Dark-style? Does that get handled with the new
  'Layout-Manager'?

Themes or Styles have nothing to do with LayoutManager. The latter is about position and resizing widgets on a form. Themes or Styles are about how the widgets look like. You can have a look at the customstyles example app. There it shows how to set a style from the command line, change the default via code, or define your own new style.


Quote
  TfpgMsgParmUser = record { comments added 2026.02.10 /cdbc }
    Param1: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit \
    Param2: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit  > still longint!!!!
    Param3: Integer;       /// <--- THIS IS _NO_ GOOD ON 64bit /
  end;

Good spot Benny. Fixed in commit 62bdc1eb, in the 'develop' branch. It will be available in the 2.0.1 bug fix release shortly, with a few other fixes.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

CM630

  • Hero Member
  • *****
  • Posts: 1641
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #11 on: February 11, 2026, 08:02:35 am »
(currently) I am just curious, in case that somebody knows, is it possible to use fpGUI in Python?
AFAIK, Python goes with QT, which does not appeal to me.
« Last Edit: February 11, 2026, 02:40:22 pm by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Seenkao

  • Hero Member
  • *****
  • Posts: 743
    • New ZenGL.
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #12 on: February 11, 2026, 12:13:47 pm »
Hi!

Я посмотрел проект бегло. Но я использовал Lazarus и есть ошибки в пакетах.

Google translate:
I took a quick look at the project. But I used Lazarus, and there are errors in the packages.
The aggpas 2.5 package, paths:
Quote
-Fu
../../framework/src/main/pascal/corelib/render/software;../../framework/src/main/pascal/corelib;../../framework/src/main/pascal/gui;../../framework/src/main/pascal/corelib/x11;../../framework/src/main/pascal/3rdparty/regex
-Fi
../../framework/src/main/pascal/corelib;../../framework/src/main/pascal/corelib/x11;../../framework/src/main/resources
The fpgui_tookit 2.0 package, paths (maybe nothing has changed here):
Quote
-Fu
../../../framework/src/main/pascal/corelib;../../../framework/src/main/pascal/corelib/x11;../../../framework/src/main/pascal/gui;../../../framework/src/main/pascal/gui/db;../../../framework/src/main/pascal/corelib/render/software;../../../framework/src/main/pascal/reportengine;../../../framework/src/main/pascal/3rdparty/regex
-Fi
../../../framework/src/main/pascal/corelib;../../../framework/src/main/pascal/corelib/x11;../../../framework/src/main/pascal/corelib/render/software;../../../framework/src/main/pascal/gui;../../../framework/src/main/pascal;../../../framework/src/main/resources

В примерах, при масштабировании окна могут пропадать некоторые элементы, в особенности текст. А при просмотре IDE maximus там текст пропадает постоянно.

Я использую Linux. Debian 13.

Google translate:
In the examples, when scaling the window, some elements, especially text, may disappear. And when viewing in the Maximus IDE, the text disappears constantly.

I'm using Linux. Debian 13.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

hrayon

  • Full Member
  • ***
  • Posts: 121
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #13 on: February 11, 2026, 01:10:05 pm »
If you make a video presenting the changes and improvements, showing the possibilities (very simplified, no need for audio, no need to appear on camera) it will be more convincing so that people can try and use it.
That's an interesting idea. I have an active YouTube channel, but it doesn't currently cover programming.
Keep us informed when you post the video.
Quote
Quote
The textual description is essential as you did, but seeing it actually working - even before installing and configuring everything - is worth more, it's more convincing.
Focus on making it easy to design modern user interfaces and you will gain many users.
I'm past the stage of trying to "win over users". I'm not a sales person, and don't understand each person's needs.
I'm not sure about that... Posting this here is, in a way, an advertisement looking for interested parties.
Quote
Try the toolkit, do your testing. If it feels like a good fit for your project, then use it. I did that back in the day with Delphi, then got burnt with Kylix when we needed cross-platform support (and vowed never to use commercial toolkits again). Then in the late 2000's I tried Lazarus LCL for part of our commercial software (that required Windows, Linux and MacOS support). LCL was too inconsistent across platform back then. That's when I started building fpGUI Toolkit. It's used in many commercial software and many open source projects. Now, fpGUI is my passion project. I have lots of tools or apps written and using it, so I'll keep supporting it, as long as I can.
This is the problem. Faced with so many possibilities, the concept of fpGUI can go unnoticed. At first, looking quickly, I thought they were components, then I realized that they weren't, but that they could work together with Lazarus, but looking a little more closely, it seems that it can work - and this can be good (or not, depending on each case) - independently of Lazarus. A video would help a lot.
Testing on my own, I might not notice something that could be very important. The video can present 50% of the solution, from there, I would look for the other 50% on my own that may have been left out.
Today, my program depends heavily on grids, reports, and databases. I've already had to upgrade FastReport to be able to print double-sided on a PVC card printer. I need to make the grids more user-friendly and easier to find/present information. And everything has to look more "modern," obeying "UX and UI" rules... so, waiting for the video  :)

Graeme

  • Hero Member
  • *****
  • Posts: 1492
    • Graeme on the web
Re: [ANN] fpGUI Toolkit v2.0.0 has been released
« Reply #14 on: February 11, 2026, 07:25:05 pm »
(currently) I am just curious, in case that somebody knows, is it possible to use fpGUI in Python?
AFAIK, Python goes with QT, which does not appeal to me.

I have no idea, but I do know someone has shown be that they managed to use fpGUI via Java. So I would assume it must be possible with Python too. But I don't know the details, sorry.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018