Recent

Author Topic: Custom UI Toolkits  (Read 4778 times)

timjones

  • New Member
  • *
  • Posts: 14
Custom UI Toolkits
« 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?

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Custom UI Toolkits
« Reply #1 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!!!
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

timjones

  • New Member
  • *
  • Posts: 14
Re: Custom UI Toolkits
« Reply #2 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.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Custom UI Toolkits
« Reply #3 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.
« Last Edit: July 18, 2019, 09:44:26 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11444
  • FPC developer.
Re: Custom UI Toolkits
« Reply #4 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.


« Last Edit: July 18, 2019, 10:59:35 am by marcov »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Custom UI Toolkits
« Reply #5 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?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

PascalDragon

  • Hero Member
  • *****
  • Posts: 5462
  • Compiler Developer
Re: Custom UI Toolkits
« Reply #6 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 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?
« Last Edit: December 20, 2019, 09:13:49 am by PascalDragon »

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: Custom UI Toolkits
« Reply #7 on: December 12, 2019, 09:38:41 am »
You could take a look at this thread about "Modern UI".

The link in the "this" above is incorrect.  :D

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Custom UI Toolkits
« Reply #8 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 (which explains how to use css, on LCL components).
« Last Edit: December 12, 2019, 09:51:33 am by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11444
  • FPC developer.
Re: Custom UI Toolkits
« Reply #9 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)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5462
  • Compiler Developer
Re: Custom UI Toolkits
« Reply #10 on: December 20, 2019, 09:14:01 am »
You could take a look at this thread about "Modern UI".

The link in the "this" above is incorrect.  :D
Ooops. Fixed  :-[

olivluca

  • Newbie
  • Posts: 2
Re: Custom UI Toolkits
« Reply #11 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...

Thaddy

  • Hero Member
  • *****
  • Posts: 14357
  • Sensorship about opinions does not belong here.
Re: Custom UI Toolkits
« Reply #12 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.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Custom UI Toolkits
« Reply #13 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...
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Custom UI Toolkits
« Reply #14 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. :)

 

TinyPortal © 2005-2018