Recent

Author Topic: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]  (Read 5332 times)

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 210
    • http://www.lazarus.freepascal.org
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #15 on: March 21, 2026, 08:47:59 am »
Here is the wiki page about Fresnel:

https://wiki.freepascal.org/Fresnel

I added a Quickstart section.

As you can see in the roadmap Fresnel still lacks many features.

dbannon

  • Hero Member
  • *****
  • Posts: 3801
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #16 on: March 21, 2026, 11:53:22 am »
Thats great mattias ! I thank you.

Two questions if you don't mind ? 
  • Compiler ?  You mention FPC322 but later seem to say it must be FPC331 ?  Will FPC324 work ?
  • Install ? You say pull down the git repo but surely I must tell Lazarus where I have put it ?  Is that an -Fu in fpc.cfg or a lazarus setting ?


Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #17 on: March 21, 2026, 01:29:26 pm »
The plain lcl canvassed interface needs 3.2.2
The Skia canvassed interface needs main/trunk

Mattias clearly communicated that.
objects are fine constructs. You can even initialize them with constructors.

dbannon

  • Hero Member
  • *****
  • Posts: 3801
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #18 on: March 22, 2026, 01:21:32 am »
Gee, thanks for that Thaddy, it all works now. Well, except for the fatal error messages.

To reiterate -
  • Thaddy's comment suggests that Fresnel itself can be used with LCL or something called Skia (compiler differences). Thats OK but not clear to a new user.
  • Clone the repo. That works.
  • Open a fresnel LCL project in Lazarus, we get the results shown below. As I suggested, it must be necessary to inform Lazarus where the Fresnel units are. A Quick Start Guide needs to spell out things like that.

There appears to be a Lazarus package in ~/fresnel/src/fresnel.lpk. Maybe it needs to be installed ? Or some -Fu or whatever ?

A quick start guide is great, but sometimes it needs to be written or reviewed by someone who is not familiar with the topic.

Davo (edit : removed some whitespace)
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #19 on: March 22, 2026, 09:05:00 am »
compile fresnellcl.lpk first. Then open one of the demo's for lcl.
Don't expect the designer to work, work from code or install fresneldsgn.
Many demo's work, many don't work.
« Last Edit: March 22, 2026, 09:34:10 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

dbannon

  • Hero Member
  • *****
  • Posts: 3801
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #20 on: March 22, 2026, 12:22:33 pm »
compile fresnellcl.lpk first. Then open one of the demo's for lcl.

OK, yes, it works but only after compiling ~/src/base/fresnelbase.lpk and (as Thaddy notes)~/src/lcl/fresnellcl.lpk. Then, and only then, open one of the lcl demos. And, yep, the demo does exactly what it says it does. Promising !

I am guessing mattias would not mind if I added a mention of those two compiles to the wiki page ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #21 on: March 22, 2026, 01:13:32 pm »
OK, yes, it works but only after compiling ~/src/base/fresnelbase.lpk

As a general note (true for any download), if you download anything that has lpk (package) files. Open each such package once in the IDE (you can drag and drop).

After that the IDE knows the package. I.e. if it sees it required by name, it knows where to find it.

On top of that, of course if any of the packages is design time (e.g. components that should be visible in the form designer) then you need to install it into the IDE. Otherwise the IDE will handle all, once it knows it (the IDE will compile if needed, including dependencies, but you must have had each dependency open, so the IDE knows the location).


Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #22 on: March 22, 2026, 01:36:02 pm »
Note that the File|New|Fresnel Application works only for Skia, not LCL, so it limited to 3.3.1.
It is easy enough to extract a program file template from one of the working LCL demo's.
objects are fine constructs. You can even initialize them with constructors.

Fred vS

  • Hero Member
  • *****
  • Posts: 3919
    • StrumPract is the musicians best friend
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #23 on: March 22, 2026, 01:37:49 pm »
OK, yes, it works but only after compiling ~/src/base/fresnelbase.lpk and (as Thaddy notes)~/src/lcl/fresnellcl.lpk. Then, and only then, open one of the lcl demos. And, yep, the demo does exactly what it says it does. Promising !

Great project!

Thanks Davo for the infos, I was able to compile the "Button" demo but only, after installing the fresnelbase.lpk and removing FresnelDemoComps.lpk dependency.  (see picture).

I noted too that after closing the ButtonLCL demo using the X icon of the form, the app is still in memory.  (see picture)

But Fresnel is very promising.
« Last Edit: March 22, 2026, 01:50:59 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

dbannon

  • Hero Member
  • *****
  • Posts: 3801
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #24 on: March 23, 2026, 03:38:18 am »
I was able to compile the "Button" demo but only, after installing the fresnelbase.lpk and removing FresnelDemoComps.lpk dependency.  (see picture).
Hmm, I compiled but did not install the packages. I assume the project has a path to the necessary ppu (?).

Quote
I noted too that after closing the ButtonLCL demo using the X icon of the form, the app is still in memory.  (see picture)

Yeah, me too !  After closing the app, and Lazarus last night, I check today *(after seeing Fred's report) and sure eough, its still 'running'. Full zombie, see -

Code: Pascal  [Select][+][-]
  1. dbannon@dell:~/bash$ ps aux | grep Button
  2. dbannon   155507  0.0  0.2 544536 43740 pts/1    Ssl+ Mar22   0:00 /home/dbannon/Pascal/fresnel/demo/Button/ButtonLCL
  3. dbannon   170547  0.0  0.0   6340  2132 pts/0    S+   13:29   0:00 grep --color=auto Button
  4. dbannon@dell:~/Pascal$ kill 155507
  5. dbannon@dell:~/Pascal$ ps aux | grep Button
  6. dbannon   155507  0.0  0.2 544536 43740 pts/1    tsl+ Mar22   0:00 /home/dbannon/Pascal/fresnel/demo/Button/ButtonLCL
  7. dbannon   170717  0.0  0.0   6340  2080 pts/0    S+   13:34   0:00 grep --color=auto Button
  8. dbannon@dell:~/Pascal$ kill -9 155507
  9. dbannon@dell:~/Pascal$ ps aux | grep Button
  10. dbannon   155507  0.0  0.0      0     0 ?        Zsl  Mar22   0:00 [ButtonLCL] <defunct>
  11. dbannon   170727  0.0  0.0   6340  2164 pts/0    S+   13:34   0:00 grep --color=auto Button

Thats rather worrying !

Davo
 
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #25 on: March 23, 2026, 08:30:26 am »
Thats rather worrying !
Well, this issue is currently for all working lcl demos, it seems.
But as it is pre-alpha, I would not worry too much.
objects are fine constructs. You can even initialize them with constructors.

avra

  • Hero Member
  • *****
  • Posts: 2586
    • Additional info
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #26 on: March 23, 2026, 11:46:49 am »
Quote
Of course we will provide the latest development of AI for Lazarus:

the A.C.P. (Agent Client Protocol), which is built into Lazarus,

so you can handle your code straight with the help of AI, fully integrated.

Am I the only one to notice that ACP implementation is ready???  :) :D :)

ACP will allow use of Claude Code, Gemini CLI, OpenCode, Qwen, Kilo, Cline and other ACP compatible AI agentic tools directly from Lazarus !!!

I asked for it some time ago (https://forum.lazarus.freepascal.org/index.php/topic,72218.msg567167.html#msg567167) and I can't believe it is already live (https://gitlab.com/freepascal.org/acp) !!!

This is huge! LLM, MCP, ACP and Lazarus support are here!  8-)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1263
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #27 on: March 25, 2026, 10:07:12 pm »
Here is the wiki page about Fresnel:

https://wiki.freepascal.org/Fresnel

I added a Quickstart section.

As you can see in the roadmap Fresnel still lacks many features.

https://wiki.freepascal.org/Fresnel
Quote
Overview
Fresnel is a visual component library based on CSS and custom drawn components. It is in an early stage of development.

What is working?
As Fresnel is still in an early pre-alpha stage, a few things do work already:

Thanks.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1263
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #28 on: March 25, 2026, 11:16:22 pm »
Impressive!

I just implemented flex and grid layout for Fresnel, so I know how much work and trouble it is. Please make Pixie open source, so Pixie and Fresnel can learn from each other. The main difference is that Fresnel uses components as elements, editable in the Lazarus designer.



Some important differences between Fresnel and Pixie:
I have a dream, to put LCL controls inside a pixie document

That's not really possible - a completely different architecture.

What you want is probably the Fresnel project, but it's in early stages of development.

affonso

  • New Member
  • *
  • Posts: 23
Re: Status of Fresnel Project [CSS UI Layer for Lazarus IDE]
« Reply #29 on: April 12, 2026, 05:08:55 am »
Hi Matias,

I've been working on getting Fresnel's DemoImage example to run on Windows (using Lazarus Trunk and FPC 3.3.1) and I've implemented several fixes to the Win32 backend that were causing crashes and rendering failures.

Key segments addressed in this patch:

Win32 Message Loop Stability: Fixed a recursive WM_PAINT issue in fresnel.win32.pas that caused infinite loops and "Out of Memory" errors. I've also added missing ValidateRect handling.
GetCaption Implementation: Added the implementation for TWin32WSForm.GetCaption, which was missing and causing immediate crashes upon window creation.
DemoImage Stability: Converted the Image Example to a code-only initialization (CreateNew) to bypass .lfm resource loading crashes that are common on the current Windows implementation.
Skia Rendering for Windows:
Transitioned from AlphaBlend to BitBlt for more reliable buffer transfer to the window Device Context.
Ensured the Skia surface is correctly flushed and transferred during the paint cycle.
Verified that remote images (URLs) and local text render perfectly in the DemoImage demo.
Build Compatibility: Fixed Unix-specific linking issues in System.Skia.API.pas when compiling on Windows with FPC.
With these changes, the DemoImage application is now fully stable and functional on Windows 64-bit, whether launched from a terminal or directly through the Explorer.

I've attached the consolidated patch file. I hope this helps in stabilizing the Windows support!


 

TinyPortal © 2005-2018