Releases: graemeg/fpGUI
fpGUI v2.1.0 release
v2.1.0 (2026-04-27)
- Event Loop Rearchitecture
- Worker threads can now wake the main event loop instantly on all
platforms without waiting for mouse movement or timer expiry. - TThread.Queue() and TThread.Synchronize() wake the event loop
automatically via FPC's WakeMainThread hook. - Duplicate FPGM_PAINT and FPGM_RESIZE messages for the same widget
are coalesced, reducing redundant processing under high load. - New TfpgAsyncTask class for background tasks that safely publish
progress updates to the GUI thread (SwingWorker-inspired). - New fpgInvokeLater() schedules work on the main thread from any
thread.
- Worker threads can now wake the main event loop instantly on all
- Hybrid Canvas (new) — now default on all platforms
- The AggPas hybrid canvas is now the default on all platforms.
No extra build profile is required; the 'agg' and 'freetype'
profiles have been removed. - Cached bitmap glyph rendering for fast syntax-highlighted text.
- Platform buffer managers added for Windows (GDI) and macOS (Cocoa).
- Performance: fast-path for opaque rectangle fills, bypassing AggPas
blending when alpha is not needed. - Fixed several Windows-specific rendering issues: upside-down text on
32-bit FPC 3.2.2, layout not applied on first show of modal dialogs,
and a compilation error on 32-bit targets.
- The AggPas hybrid canvas is now the default on all platforms.
- Fusion Style (new)
- Added Fusion Light and Fusion Dark application styles, inspired by
Qt5 Fusion. Fusion Light is now the default IDE style. - Fusion-style page control tabs and body rendering.
- Checkbox, radio button, and progress bar painting delegated to
TfpgStyle, enabling per-style customisation.
- Added Fusion Light and Fusion Dark application styles, inspired by
- HiDPI improvements
- Improved HiDPI scaling for the GDI (Windows) and X11 backends.
- Maximus IDE
- PasBuild backend integration: TPasBuildProjectBackend
bridges the IDE with the PasBuild build system. - Project tree redesign: displays modules, dependencies,
and build profiles as tree nodes with accent colour category headers. - Multi-module UI with aggregator project support.
- Dependency tree visualisation added to the project tree.
- Build actions: clean, rebuild, and test added to IDE toolbar.
- INI and XML syntax highlighting added.
- MigLayout used throughout the IDE UI, including a TfpgMigSplitter
and MigLayout-managed status bar. - Session persistence: open files, window layout, and file dialog
directories are saved and restored per project. - Edit menu: Duplicate Line, Delete Line, Undo, and Redo added.
- Status bar shows cursor position, file path, and current git branch.
- Go to Declaration (Ctrl+B / Ctrl+Click) with cross-unit resolution
including FPC RTL and packages. - Find Usages (Alt+F7) with highlighted context column.
- Quick Documentation popup (Ctrl+F1).
- Navigate to File and Navigate to Symbol dialogs with fuzzy matching.
- Cursor history back/forward navigation.
- Custom Pascal tokeniser replacing vendored fcl-passrc, used by the
highlighter, symbol finder, procedure list, and declaration finder. - Debug session lifecycle: F9 starts a debug run, Ctrl+F2 stops it.
- Breakpoints panel and full breakpoint add/remove management; live
breakpoints routed through the ptrace owner thread. - Execution line highlighted in the editor at each debugger stop.
- Variables panel showing Locals and Globals groups; Show Globals
toggle persisted across sessions. - Call Stack panel.
- Watches panel.
- Evaluate Expression dialog.
- Exception notification bar.
- OPDF/PDR integration via a dedicated debugger worker thread.
Requires FPC 3.3.1 + OPDF debug format support.
Linux x86_64 only, until OPDF support more platforms. - Support for building the IDE with FPC 3.2.2 via a stub debugger
adapter (OPDF dependencies disabled by default). - Cross-module source file resolution for Ctrl+B navigation and
debugger stop-line lookup. - 'Reopen last project on startup' preference added.
- Messages tab now activates automatically when a build is triggered.
- Quick Documentation popup signature search stops at the
class/record declaration header. - Pascal modifiers and directives (virtual, override, stdcall, etc.)
now highlighted as secondary keywords.
- PasBuild backend integration: TPasBuildProjectBackend
- DocView
- Project restructured and added as a PasBuild module.
- Fixed rendering stopping prematurely, leaving a blank area at the
bottom of the document. - Fixed DocView statusbar colour being reset to the wrong default.
- DocView navigation toolbar now uses some HVIF vector icons.
- UI Designer
- Added style preview support, showing the designer form in the
user-selected style.
- Added style preview support, showing the designer form in the
- Framework Bug Fixes
- Fixed FreeType font metrics producing squashed line spacing.
- Fixed XOR selection rendering in TfpgMemo — now uses proper theme
colours instead of XOR pixel inversion. - Fixed Open/Save dialog grid not growing correctly on resize.
- Fixed pagecontrol tab rendering to be font and DPI aware.
- Fixed Cocoa hybrid canvas rendering (drawRect instead of lockFocus).
- Fixed Cocoa font metrics and popup window visibility.
- Fixed FreeType font cache not being enabled on Windows.
- Fixed index out of bounds in File Open dialog under macOS.
- Compatibility fix for upcoming FPC 3.3.x release.
- Added wpMainFormCenter window position option; centralised window
positioning logic into fpg_form.pas. - Experimental multi-monitor and per-screen DPI support.
- Fixed several bounds-checking issues in the text editor component.
- Deprecated old DrawXXX widget paint methods in TfpgCanvas.
- Fixed ComboBox text not clipped to exclude the dropdown button area.
- Fixed TfpgLabel not auto-sizing to text content when no
PreferredSize was set. - Fixed developer-set text colour ignored by style DrawString.
- Fixed popup calendar generating deprecation warnings.
- Code Hygiene
- Replaced bundled SynRegExpr with FPC's standard RegExpr unit.
- Replaced bundled mPasLex with FPC's fcl-passrc for Procedure List.
- Replaced bundled sha1.pas (D5-era) with FPC's standard hash package.
- Removed Cairo rendering backend.
- Removed VLC units (now part of FPC's Free Component Library).
- Removed MigLayout Java reference source (porting complete).
- Removed unused and empty style units.
- Removed vendored fcl-passrc (replaced by custom Pascal tokeniser).
- Moved documentation and Lazarus IDE integration package out of the
framework source tree. - Legacy Agg2D canvas moved out of the framework source to
extras/aggpas/. - GDI & X11 native canvas classes marked "Deprecated" for future
removal. - TfpgCanvas.DrawXXX methods for widget painting marked "deprecated"
for future removal.
- HVIF (Haiku Vector Icon File) Icon Format
- New HVIF binary reader with AggPas renderer and unit tests.
- New HVIF binary writer with unit tests.
- svg2hvif CLI tool converts SVG files to HVIF; --inc flag emits a
Pascal byte-array include file for embedding icons in source. - hvif_dump inspection tool for examining HVIF binary files.
- Full rendering pipeline: multi-stop gradient LUT, gradient strokes,
transforms, arc segments, and LOD visibility scale. - TfpgIconStore: DPI-aware HVIF icon registry; fpgIcons global
initialised automatically in TfpgApplication. - HVIF icons wired into core framework widgets.
- New IconName and IconSize properties on TfpgBaseButton for
icon-store–driven button icons. - imageconvert utility added to the PasBuild ecosystem.
- Vertex HVIF Icon Editor (new application)
- Announcement thread with screenshot (link)
- Full HVIF vector icon editor added to the primary build.
- Tools: Select, Node edit, Pan, Zoom, Rectangle, Ellipse, and Pen.
- Bounding box and affine transform interactions; Shift+drag for
uniform scale, Ctrl+drag for shear. - Gradient style editing with multi-stop ramp widget and editor popup.
- Grid overlay with configurable snap-to-grid.
- Object tree with inline rename and sidecar metadata file.
- Bezier path outline overlay in node-edit mode.
- Undo support for path and shape property edits.
- File > New, Open, Save (.hvif), Export as .inc, and Export as PNG
at 16/32/48/64 px. - File > Open Recent with persistent last-used directory.
- Window position and size restored across sessions.
v2.0.3
v2.0.3 (2026-02-14)
- Bug Fixes
- Fixed AggPas canvas crash when using the 'plastic dark' theme.
Widget canvases now correctly route pixel operations through the
window canvas target instead of accessing a nil image buffer. - Added bounds checking in TfpgImageBase.SetColor to prevent
out-of-bounds memory writes when using the AggPas canvas. - Fixed incorrect pixel coordinates in plastic style DrawFocusRect
that used Width/Height as positions instead of Left+Width and
Top+Height. - Fixed GDI font reverting to bold stock font after device context
reallocation. - Fixed duplicate TranslateMessage call causing double keystrokes
on Windows. - Added Windows font paths to FreeType font cache.
- Fixed widget constructors using property setters for Width/Height
instead of direct field access, which caused issues with the
sizing API separation.
- Fixed AggPas canvas crash when using the 'plastic dark' theme.
- UI Designer
- Fixed resizer rendering and canvas sizing.
- Fixed property display and source generation to use
ActualWidth/ActualHeight for positioning. - Fixed widget placement to call UpdatePosition after positioning.
- Changed PasBuild module name to 'fpgui-uidesigner'.
fpGUI v2.0.1 release
v2.0.1 (2026-02-11)
- Bug Fixes
* Fixed infinite recursion crash when default font fails to load on
distros with non-standard font paths (Arch, Void, Fedora). Raises
a clear EfpGUIException instead. (Fixes #143)
* Added /usr/share/fonts/ as a recursive font search path, covering
all Linux distro font directory layouts. Added ~/.local/share/fonts/
for XDG user fonts.
* Fixed ERangeError in DoDrawImagePart when the image rectangle is
fully clipped out of the visible area. (Fixes #121)
* Fixed Canvas.GetClipRect returning an empty rectangle when no
explicit clip rect was set. (Fixes #113)
* Fixed access violation in timer list when a timer destroys itself
during its own callback, or after Windows hibernation. (Fixes #17)
* Widened TfpgMsgParmUser.Param1/2/3 from Integer to PtrInt for
correct 64-bit window handle passing.
* Added missing extrafpc.cfg in hexviewer example folder.
* Fixed AggPas Win32 font engine compilation and rendering: added
proper ifdef splits for Win32 TrueType vs FreeType font engines,
fixed font size DPI scaling, and removed unnecessary freetype.dll
dependency when using the default Win32 font engine.
- Improvements
* Timer architecture redesign:
- X11 message loop now uses the calculated timeout instead of a
hardcoded 10ms poll, reducing idle CPU wakeups
- GDI message loop replaced blocking GetMessage with
MsgWaitForMultipleObjects, enabling proper timeout support
- Removed redundant native Windows.SetTimer mechanism; timer
checking is now unified through the main loop
- All timer arithmetic switched from wall-clock time (TDateTime/Now)
to monotonic time (GetTickCount64/CLOCK_MONOTONIC), making timers
immune to NTP sync, DST changes, and system hibernation
* Normalized GDI clip rect storage to widget-local coordinates,
matching the X11 and Cocoa backends.
* About fpGUI dialog now shows the canvas backend type (AggPas or
Native) after the version number.
* Added 'freetype' build profile for PasBuild, allowing Windows
users to toggle between the Win32 TrueType and FreeType font
engines via: pasbuild compile -p windows,agg,freetype
fpGUI v2.0.0 release
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)
- 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.