Recent

Author Topic: Modern UI in Lazarus  (Read 190286 times)

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Modern UI in Lazarus
« Reply #90 on: April 25, 2017, 07:35:29 am »
You are living in some dream world it seems. Lets agree to disagree. Lazarus can't keep up either. Always behind VCL or FMX. Lazarus can't even keep up with its own lcl-xxx widgetsets (my comment about inconsistencies).

True, but that is not due LCL's choices. Are MSIDE and fpgui really that much better? IMHO not, not even close.
Yes they are. Because it is much simpler to build a high quality cross platform toolkit with the techniques used in fpGUI and MSEide+MSEgui than the techniques used by Lazarus.
I don't understand why you constantly fight against our alternatives. We invest huge time and effort into the projects on behalf of the Free Pascal users. As a Free Pascal core member you should  appreciate our commitment instead to battle against it.
BTW my IDE is is spelled "MSEide".

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: Modern UI in Lazarus
« Reply #91 on: April 25, 2017, 10:15:56 am »
Yes they are. Because it is much simpler to build a high quality cross platform toolkit with the techniques used in fpGUI and MSEide+MSEgui than the techniques used by Lazarus.

Opinion not fact.

Quote
I don't understand why you constantly fight against our alternatives. We invest huge time and effort into the projects on behalf of the Free Pascal users. As a Free Pascal core member you should  appreciate our commitment instead to battle against it.
BTW my IDE is is spelled "MSEide".

I do, I just don't like the way they are advocated by attacking Lazarus at every turn in discussions where  such opinions or alternatives were not even asked for, misrepresenting own opinion as universal facts.

If these projects were really that great, they didn't need that kind of advocacy.
« Last Edit: April 25, 2017, 11:10:24 am by marcov »

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Modern UI in Lazarus
« Reply #92 on: April 25, 2017, 10:32:14 am »
There are 2 ways to create a modern UI in Lazarus.

1. components /UI/Frameworks based on "custom paint"
2. implement basic CSS drawing and positioning around LCL

A long time ago I tried the second method. And it's quite easy to implement basic drawing using CSS. But there are too many challenges for me. So concept is helded for now.


Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Modern UI in Lazarus
« Reply #93 on: April 25, 2017, 10:48:27 am »
Yes they are. Because it is much simpler to build a high quality cross platform toolkit with the techniques used in fpGUI and MSEide+MSEgui than the techniques used by Lazarus.

Opinion not fact.

It is a fact. I tried both approaches.

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Modern UI in Lazarus
« Reply #94 on: April 25, 2017, 10:54:39 am »
The word "fact" has several alternative meanings these days.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #95 on: April 25, 2017, 10:59:25 am »
Yes they are. Because it is much simpler to build a high quality cross platform toolkit with the techniques used in fpGUI and MSEide+MSEgui than the techniques used by Lazarus.

Opinion not fact.


The fact is that neither fpGUI nor MSEgui suffer the inconsistencies so evident in LCL. That's enough proof for me. Also considering that I've used both LCL and fpGUI it multiple commercial applications for many years I feel very confident in knowing what I'm talking about. No guesswork required

Obviously you disagree with all this (as always), and I bet you have never actually used fpGUI or MSEgui in a commercial environment either (or any project for that matter). So that says a lot about your "one sided argument" without actually knowing the alternatives. But that's just my opinion. ;)
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

SunyD

  • Guest
Re: Modern UI in Lazarus
« Reply #96 on: April 25, 2017, 12:35:09 pm »
Hello!

Does Lazarus have the ability to create modern user interfaces (for example: Modern UI from Microsoft, Material Design from Google)?

Like this (see attachments):

These are internet pages. You can do this with Lazarus. You have the choice between InternetExplorer,  Qt-Webkit,  GTK-Webkit,  Cacao-Webkit.
You can do this even with TFrameViewer. I use this technique with some of my applications.

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Modern UI in Lazarus
« Reply #97 on: April 25, 2017, 01:50:07 pm »
There are 2 ways to create a modern UI in Lazarus.

1. components /UI/Frameworks based on "custom paint"
2. implement basic CSS drawing and positioning around LCL

A long time ago I tried the second method. And it's quite easy to implement basic drawing using CSS. ....


Hey, that (second choice) is cool !!
your proof picture is beautiful for my eyes. Is there any source code to try?
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: Modern UI in Lazarus
« Reply #98 on: April 25, 2017, 02:54:53 pm »
Afaik QT has some CSS like properrty system nowadays.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #99 on: April 25, 2017, 03:51:01 pm »
There are 2 ways to create a modern UI in Lazarus.

1. components /UI/Frameworks based on "custom paint"
2. implement basic CSS drawing and positioning around LCL

A long time ago I tried the second method. And it's quite easy to implement basic drawing using CSS. ....


Hey, that (second choice) is cool !!
your proof picture is beautiful for my eyes. Is there any source code to try?

It's ok. But you have to code every css feature you need. And that doesn't give you the controls, only the drawing, then you need to create the controls also.

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Modern UI in Lazarus
« Reply #100 on: April 25, 2017, 04:17:11 pm »
It's ok. But you have to code every css feature you need. And that doesn't give you the controls, only the drawing, then you need to create the controls also.


Actually there was controls (for Delphi) built from HTML. Even, it acts like just in normal html, plus support additional custom control (or TWinControl?)
made by someone. But it doesn't support CSS3 nor CSS2.
It is not WebBrowser, it just html-viewer. I might be wrong, because I tried it years ago; today it possible improved
>> https://sourceforge.net/projects/htmlviewer/
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #101 on: April 25, 2017, 05:36:36 pm »
It's ok. But you have to code every css feature you need. And that doesn't give you the controls, only the drawing, then you need to create the controls also.


Actually there was controls (for Delphi) built from HTML. Even, it acts like just in normal html, plus support additional custom control (or TWinControl?)
made by someone. But it doesn't support CSS3 nor CSS2.
It is not WebBrowser, it just html-viewer. I might be wrong, because I tried it years ago; today it possible improved
>> https://sourceforge.net/projects/htmlviewer/

The problem -again- is that there are 3 things needed to work with existing stuff: html, css and js. If you miss one then all existing components, styles, are not usable at all.

Wargan

  • New Member
  • *
  • Posts: 48
    • 'This way' site
Re: Modern UI in Lazarus
« Reply #102 on: April 28, 2017, 01:03:33 pm »
So, I did not go to the forum much time and was very surprised by how many ideas were voiced about my topic. As it turned out, this issue is very interesting for programmers on FPC.
I hope, here we discuss the conceptual questions of how the future framework will look on Lazarus / FPC.

Gentlemen, how do you see the method of drawing UI? I think we should not do it like the others do. We must come up with something of our own. Something that should be very fast, should be easily customizable to the needs of the graphic designer, should be understandable and freely distributed.

Given my knowledge of programming, I think there are several options:
  • Drawing elements and controls using DirectX / OpenGL. Fast and modern. But the GPU will be loaded, not the CPU. In addition, you will need bindings to libraries (such as ZenGL, for example) and a lot of new code. A lot of code, very much.
  • Drawing elements and controls using GDI. Old and, moreover, very inhibited method. It has one plus - it's much easier to do using standard drawing tools, such as Canvas. But with a complex interface, the performance will fall dramatically, I guarantee this.
  • CSS & HTML + JS. In fact - again dirty copying from Electron.
Lazarus 1.8RC5+ FPC 3.0.4.
Windows 7 x32, RAM 3 Gb.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #103 on: April 28, 2017, 01:21:24 pm »
  • Drawing elements and controls using DirectX / OpenGL. Fast and modern. But the GPU will be loaded, not the CPU. In addition, you will need bindings to libraries (such as ZenGL, for example) and a lot of new code. A lot of code, very much.
Both fpGUI and MSEgui have experimental OpenGL backends. Both toolkits are design to be flexible in that sense and configurable at compile time.

Quote
  • Drawing elements and controls using GDI. Old and, moreover, very inhibited method. It has one plus - it's much easier to do using standard drawing tools, such as Canvas. But with a complex interface, the performance will fall dramatically, I guarantee this.
As the author of fpGUI Toolkit (and as Martin - author of MSEgui will tell you the same), your statement about a fall in performance is absolute rubbish. In fact, I have had numerous people tell me that they are ecstatic about the performance of fpGUI and latency reduction they experienced compared to LCL for the same application. This was apparently very noticeable in video and sound intensive applications.

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

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Modern UI in Lazarus
« Reply #104 on: April 28, 2017, 01:27:48 pm »
Given my knowledge of programming, I think there are several options:
  • Drawing elements and controls using DirectX / OpenGL. Fast and modern. But the GPU will be loaded, not the CPU. In addition, you will need bindings to libraries (such as ZenGL, for example) and a lot of new code. A lot of code, very much.
  • Drawing elements and controls using GDI. Old and, moreover, very inhibited method. It has one plus - it's much easier to do using standard drawing tools, such as Canvas. But with a complex interface, the performance will fall dramatically, I guarantee this.
  • CSS & HTML + JS. In fact - again dirty copying from Electron.

I vote for OpenGL.

It is fast, cross-platform, has good backwards compatibility and almost all VGAs support it (except very old VGAs). Also with some efforts we can port it to support Android (OpengGL ES).

 

TinyPortal © 2005-2018