Lazarus

Programming => LCL => Topic started by: timjones on July 17, 2019, 04:52:36 pm

Title: Custom UI Toolkits
Post by: timjones on July 17, 2019, 04:52:36 pm
Most web application development environments now support custom UI controls thru the simple use of images.  This allows companies to offer their own customized look and feel for applications.

However, most of the native apps still are locked into specific "looks" depending on the widgetset used on the platform they are deployed on.

Im part of a team of developers who are working on building industrial improvements into Lazarus (Realtime Threads, Native OPC-UA Client/Server), and I am trying to come up with a plan to address the above issue.   Does anyone have any thoughts on how they would suggest this is best done?  Im I missing something?  FireMonkey (while slow and bloated), seemed like an initial good idea, but seems poorly implemented.  Should we look at building something similar?
Title: Re: Custom UI Toolkits
Post by: avra on July 17, 2019, 07:42:40 pm
Most web application development environments now support custom UI controls thru the simple use of images.  This allows companies to offer their own customized look and feel for applications.
Maybe you can find something to your liking here:
https://wiki.freepascal.org/Lazarus_Custom_Drawn_Controls
https://wiki.freepascal.org/Custom_Drawn_Interface
https://wiki.freepascal.org/BGRAControls
https://wiki.freepascal.org/uE_Controls

Im part of a team of developers who are working on building industrial improvements into Lazarus (Realtime Threads, Native OPC-UA Client/Server)
You got me interested with real time threads, but the person who brings (native!) OPC-UA to the table will be my hero! Making embedded OPC-UA servers with plain FPC and creating OPC-UA HMI clients with PascalSCADA would really be fantastic!!!
Title: Re: Custom UI Toolkits
Post by: timjones on July 17, 2019, 10:10:18 pm
Maybe you can find something to your liking here:
https://wiki.freepascal.org/Lazarus_Custom_Drawn_Controls
https://wiki.freepascal.org/Custom_Drawn_Interface
https://wiki.freepascal.org/BGRAControls
https://wiki.freepascal.org/uE_Controls

Thanks!

You got me interested with real time threads, but the person who brings (native!) OPC-UA to the table will be my hero! Making embedded OPC-UA servers with plain FPC and creating OPC-UA HMI clients with PascalSCADA would really be fantastic!!!

Hero?  Wow... :-)

On Realtime Threads - We already have a proof of concept working.  It is Linux specific and built on the pre_empt kernel patch.  We are currently rewriting it to integrate it directly into the TThread class. Also, the POSIX implementation for TThreads on Linux is incomplete, so we are trying to fix that as well before submitting.  This will be published in the next couple of months.

We really need to design a realtime scheduler/manager as well, but struggle on the most efficient way to do it outside of the kernel.

On Native OPC-UA - We already have a "partially" native version still using Open62541.  We have written several clients and servers deployed on B&R Linux 9, but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Title: Re: Custom UI Toolkits
Post by: avra on July 18, 2019, 09:42:31 am
On Native OPC-UA - We already have a "partially" native version still using Open62541.
Yes, Open62541 is what I was playing with in C, too. Good to hear you have it working with FPC. I was thinking about making Pascal wrapper around it, but luck of time and other priorities played their part. Open62541 was also tempting for a wrapper because they provide everything in one huge C file. That would decrease conversion time significantly, but I just felt that wasn't right. And the other path would take too much time. So it all made me stick with C and Node-Red for OPC-UA.

We have written several clients and servers deployed on B&R Linux 9
I didn't know about B&R Linux before. Sounds interesting. I also see they have Automation Studio with complete IEC 61131-3. Nice. Especially since they also implemented CFC which I am pretty fond of. Sounds good on paper.

... but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Can't wait! I remember times when Delphi had not one but 4-5 open source OPC-DA client and server frameworks, while everything else for VC++/VB/Java was proprietary and $$$$. That was one of the reasons why Delphi was so popular with industrial automation solutions at the time. Unfortunately that all changed with OPC-UA which was a fortress that Pascal didn't conquer for a long time. But new hope is rising at the horizon...

I really wish you the best and will keep my fingers crossed for you!  :D

If you need help with OPC-UA testing then please let me know when time comes.
Title: Re: Custom UI Toolkits
Post by: marcov on July 18, 2019, 10:41:12 am
FireMonkey (while slow and bloated), seemed like an initial good idea, but seems poorly implemented.  Should we look at building something similar?

(and browsers are not slow and bloated ? I think if it is very general, it will always be that. If try something yourself, keep it focussed and don't generalize to early)

It is a very, very difficult road. Moreover it is not all or nothing, you can use owner drawn components in an otherwise standard widget set.  Windows has options to modify the standard bar that can be used.

Discussions about owner drawn vs standard widgetset have raged multiple times, I suggest you search the archives, but the main reasons are about nativeness of the application and the barrier to actually do and maintain the result.

Besides the already mentioned attempts (some of which are of the partial kind) you could also look to third party open source owner drawn libraries like wxwidgets and IUP.

There is also msegui and fpgui that tried to do something like it for FPC, and some lucky licensees dabbled with the commercial package that later became firemonkey after Embarcadero bought it. (or hired the author, I don't know exactly)

Afaik fpgui had some success in the POS world.

To make something simple is easy, but to get it to a decent level and to maintain it, that is harder.


Title: Re: Custom UI Toolkits
Post by: avra on December 12, 2019, 08:44:57 am
On Native OPC-UA - We already have a "partially" native version still using Open62541.  We have written several clients and servers deployed on B&R Linux 9, but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Is there any news on native OPC-UA implementation?
Title: Re: Custom UI Toolkits
Post by: PascalDragon on December 12, 2019, 09:26:40 am
Most web application development environments now support custom UI controls thru the simple use of images.  This allows companies to offer their own customized look and feel for applications.

However, most of the native apps still are locked into specific "looks" depending on the widgetset used on the platform they are deployed on.

Im part of a team of developers who are working on building industrial improvements into Lazarus (Realtime Threads, Native OPC-UA Client/Server), and I am trying to come up with a plan to address the above issue.   Does anyone have any thoughts on how they would suggest this is best done?  Im I missing something?  FireMonkey (while slow and bloated), seemed like an initial good idea, but seems poorly implemented.  Should we look at building something similar?

You could take a look at this (https://forum.lazarus.freepascal.org/index.php/topic,36502.msg343391.html#msg343391) thread about "Modern UI". The user ps has started to implement a CSS-controlled UI for Lazarus (you can see the results on the last pages). Maybe you can ask them for their code?
Title: Re: Custom UI Toolkits
Post by: Handoko on December 12, 2019, 09:38:41 am
You could take a look at this (http://this) thread about "Modern UI".

The link in the "this" above is incorrect.  :D
Title: Re: Custom UI Toolkits
Post by: devEric69 on December 12, 2019, 09:48:15 am
I think that @PascalDragon - with the broken "this" hyperlink - probably wanted to point towards this thread: https://forum.lazarus.freepascal.org/index.php/topic,36502.0.html (https://forum.lazarus.freepascal.org/index.php/topic,36502.0.html) (which explains how to use css, on LCL components).
Title: Re: Custom UI Toolkits
Post by: marcov on December 12, 2019, 09:52:59 am
(the initial version of the code is attached to one of the posts. I downloaded and compiled it)
Title: Re: Custom UI Toolkits
Post by: PascalDragon on December 20, 2019, 09:14:01 am
You could take a look at this (http://this) thread about "Modern UI".

The link in the "this" above is incorrect.  :D
Ooops. Fixed  :-[
Title: Re: Custom UI Toolkits
Post by: olivluca on February 06, 2020, 12:37:01 pm
On Native OPC-UA - We already have a "partially" native version still using Open62541.  We have written several clients and servers deployed on B&R Linux 9, but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Is there any news on native OPC-UA implementation?

I'd like to know too. I've no need for it currently but maybe in the future...
Title: Re: Custom UI Toolkits
Post by: Thaddy on February 06, 2020, 01:14:28 pm
(or hired the author, I don't know exactly)
Hired and fired, actually. He is again operating under his own name, although he is still involved to some extend.
Title: Re: Custom UI Toolkits
Post by: avra on February 06, 2020, 05:39:38 pm
On Native OPC-UA - We already have a "partially" native version still using Open62541.  We have written several clients and servers deployed on B&R Linux 9, but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Is there any news on native OPC-UA implementation?
I'd like to know too. I've no need for it currently but maybe in the future...
I would not hope too much. Last visit of timjones to this forum was on July 31st...
Title: Re: Custom UI Toolkits
Post by: lainz on February 10, 2020, 12:34:40 am
To make an ui toolkit with bitmaps check the custom draw theme I made some time ago, is included with bgracontrols sources. It uses 9 slice scaling technique to scale buttons for example.

With modern ui there is no need of bitmaps, everything is a square with plain color, at least on Windows, under linux there is some rounded border as well on mac.

If you need gradients even the normal canvas has it. :)
Title: Re: Custom UI Toolkits
Post by: avra on June 05, 2020, 11:43:48 pm
On Native OPC-UA - We already have a "partially" native version still using Open62541.  We have written several clients and servers deployed on B&R Linux 9, but have a goal of making it completely native pascal.  It will be OSS and will be published by the end of the year.
Is there any news on native OPC-UA implementation?
I'd like to know too. I've no need for it currently but maybe in the future...
I would not hope too much. Last visit of timjones to this forum was on July 31st...

Things have changed. Now there is an OPC UA wrapper around Open62541:
https://forum.lazarus.freepascal.org/index.php/topic,9912.msg364975.html#msg364975
TinyPortal © 2005-2018