Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-09

GUI confusion

22 messages · 12 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Patrick

Hi Everyone

I really like the pascal code I have looked at and I am very excited about FPC. I hope this email won't upset anyone, it is a bit negative.

I don't really like IDEs. I used gvim and I suppose it could almost be called an IDE as well but I mean I would rather use the shellr then clicking on a build button.

I am trying to learn what Lazarus is all about but I am still clueless.

There are screen shots of it being used to develop GTK and QT applications but I have also read that GTK 2 is new and buggy and then there is this line:

"The FPC Qt4 Binding is not meant to create Qt applications in FPC. But it should allow the Lazarus LCL developers to create a Qt Widget set for Lazarus"

Can I build GTK 2 (or 3) and QT applications in this? Could anyone point me to resources on how to build GUI applications without Lazarus?

Please don't RTFM me, I am trying, there just seems to be a lot of conflicting information and I am confused-Patrick

Reinier Olislagers
to Patrick
Patrick wrote 5 lines
I am trying to learn what Lazarus is all about but I am still clueless. There are screen shots of it being used to develop GTK and QT applications but I have also read that GTK 2 is new and buggy and then there is this line:

<snip>

Can I build GTK 2 (or 3) and QT applications in this? Could anyone point me to resources on how to build GUI applications without Lazarus?

This sounds like a blast from the past.

Yes, Lazarus has been able to build GTK applications for quite a while now, as well as Qt and Windows applications.
GTK2 is the default widgetset for Lazarus on Linux; GTK3 support probably is more experimental.

I'd suggest simply installing it and trying it.

About building GUI applications without Lazarus: Graeme, this is your cue! Try looking into fpgUI, MSEIDE+MSEGUI.
Presumably you could handcode pascal using the bindings to create forms etc as well but why you would want to do that escapes me.

Good luck.

Graeme Geldenhuys
to Patrick: Hi Everyone I really like the pascal code I have looked at and I am very excited about…
Patrick wrote
Could anyone point me to resources on how to build GUI applications without Lazarus?

There are alternatives, but first a distinction needs to me made. When you say "Lazarus", do you mean simply the IDE, or do you mean the LCL (Lazarus Component Library)?

From your earlier remard about IDE's I assume you simply don't like IDE,

but you might not mind building LCL-based applications.

Obviously you can create LCL-based GUI applications without using Lazarus IDE. It is a bit more work though. Just in case you didn't know, LCL uses other underlying widgetset's. So LCL can target GTK1, GTK2, Win32, fpGUI and Carbon toolkits.

Another alternatives is to use fpGUI, which is a 100% custom drawn GUI toolkit, that doesn't rely on any other underlying toolkits. fpGUI talks directly to X11 or GDI. fpGUI isn't tied to any specific editor or IDE, so you are free to code with Notepad or VI if you wanted to. fpGUI does come with its own tools to help you with some tasks, but in is still not a requirement to use them. For example, fpGUI includes a stand-alone GUI Designer for visually designing forms. All that the GUI Designer does, is generated Object Pascal source code, just like you would have done by had. It doesn't use external files like the *.lfm files which Lazarus IDE produces - which ain't Object Pascal source files.

Yet another alternative is MSEide+MSEgui, but as the name says, it is recommended to use the MSEide to write code.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Sven Barth
to Patrick: Hi Everyone I really like the pascal code I have looked at and I am very excited about…
Patrick wrote 8 lines
Hi Everyone I really like the pascal code I have looked at and I am very excited about FPC. I hope this email won't upset anyone, it is a bit negative. I don't really like IDEs. I used gvim and I suppose it could almost be called an IDE as well but I mean I would rather use the shellr then clicking on a build button.

IDEs are less about "build buttons", but about the additional features they provide:
- integrated debugging
- error location highlighting
- code completion
- code refactoring tools

Show quoted text 6 lines
I am trying to learn what Lazarus is all about but I am still clueless. There are screen shots of it being used to develop GTK and QT applications but I have also read that GTK 2 is new and buggy and then there is this line:

It seems that this wasn't updated for quite some time...GTK2 is no problem today and is the standard GUI interface for Lazarus on Linux

"The FPC Qt4 Binding is not meant to create Qt applications in FPC. But it should allow the Lazarus LCL developers to create a Qt Widget set for Lazarus"

I would say scratch that sentence. The first part can be more or less considered nonsense...

Can I build GTK 2 (or 3) and QT applications in this?

GTK 3 is not yet supported, but GTK 2 and QT are.

Could anyone point me to resources on how to build GUI applications without Lazarus?

You could take a look at the packages/gtk2/examples directory of a FPC source distribution.

Regards,
Sven

Patrick
to Sven Barth

Thanks again to Reinier and Sven

I just bought Getting Started with Lazarus IDE.

I actually tried to get started with FPC back In January. I felt that the language was too tied to Lazarus and that I didn't want to use an IDE so I gave up.

I will report back when I am a little further along this time. It is possible that the language is not being presented exactly as is intended or that there is too much room for people to misinterpret how the programming environment works.

-Patrick

Sven Barth wrote 52 lines
On 29.09.2013 15:24, Patrick wrote: > Hi Everyone > > I really like the pascal code I have looked at and I am very excited > about FPC. I hope this email won't upset anyone, it is a bit negative. > > I don't really like IDEs. I used gvim and I suppose it could almost be > called an IDE as well but I mean I would rather use the shellr then > clicking on a build button. IDEs are less about "build buttons", but about the additional features they provide: - integrated debugging - error location highlighting - code completion - code refactoring tools > > I am trying to learn what Lazarus is all about but I am still clueless. > > There are screen shots of it being used to develop GTK and QT > applications but I have also read that GTK 2 is new and buggy and then > there is this line: It seems that this wasn't updated for quite some time...GTK2 is no problem today and is the standard GUI interface for Lazarus on Linux > > "The FPC Qt4 Binding is not meant to create Qt applications in FPC. But > it should allow the Lazarus LCL developers to create a Qt Widget set for > Lazarus" I would say scratch that sentence. The first part can be more or less considered nonsense... > > Can I build GTK 2 (or 3) and QT applications in this? GTK 3 is not yet supported, but GTK 2 and QT are. > Could anyone point > me to resources on how to build GUI applications without Lazarus? You could take a look at the packages/gtk2/examples directory of a FPC source distribution. Regards, Sven _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sven Barth
to Patrick
Patrick wrote
I actually tried to get started with FPC back In January. I felt that the language was too tied to Lazarus and that I didn't want to use an IDE so I gave up.

FPC is definitely independant of Lazarus, but Lazarus on the one hand simplifies development significantly (I myself am using it e.g. for working on the compiler itself) and it also allows to develop user application in a way similar to Delphi. Most Object Pascal people are using either Delphi or Lazarus to develop GUI applications based on the VCL or LCL respectively. Few go the route of using another GUI (e.g. mseGUI and fpGUI) or use the native platform API (e.g. direct WinAPI, GTK 2, Carbon, etc.).

I will report back when I am a little further along this time. It is possible that the language is not being presented exactly as is intended or that there is too much room for people to misinterpret how the programming environment works.

I've never read the "Getting started with Lazarus" book, so I can not comment on this.

Regards,
Sven

Patrick
to Graeme Geldenhuys: There are alternatives, but first a distinction needs to me made. When you say "Lazarus",…
Show quoted text 29 lines
There are alternatives, but first a distinction needs to me made. When you say "Lazarus", do you mean simply the IDE, or do you mean the LCL (Lazarus Component Library)? >From your earlier remard about IDE's I assume you simply don't like IDE, but you might not mind building LCL-based applications. Obviously you can create LCL-based GUI applications without using Lazarus IDE. It is a bit more work though. Just in case you didn't know, LCL uses other underlying widgetset's. So LCL can target GTK1, GTK2, Win32, fpGUI and Carbon toolkits. Another alternatives is to use fpGUI, which is a 100% custom drawn GUI toolkit, that doesn't rely on any other underlying toolkits. fpGUI talks directly to X11 or GDI. fpGUI isn't tied to any specific editor or IDE, so you are free to code with Notepad or VI if you wanted to. fpGUI does come with its own tools to help you with some tasks, but in is still not a requirement to use them. For example, fpGUI includes a stand-alone GUI Designer for visually designing forms. All that the GUI Designer does, is generated Object Pascal source code, just like you would have done by had. It doesn't use external files like the *.lfm files which Lazarus IDE produces - which ain't Object Pascal source files. Yet another alternative is MSEide+MSEgui, but as the name says, it is recommended to use the MSEide to write code. Regards, Graeme

Thanks again Sven.

Hi Graeme

This was a very helpful post. I will definitely give fpGUI a try, along with Lazarus.

I don't really know anything about using LCL outside of Lazarus yet.

Your point about LCL is super helpful. I hope no one minds the constructive criticism but my lack of understanding of this was the tipping point that sent me away last time. I tried Lazarus but it did not seem to be creating GTK code or QT, it was just some sort of weirdo Lazarus only stuff and then in tandem with the QT binding statement I mentioned earlier, it wasn't even obvious whether or not it could generate GUI code outside of the IDE. The FUD circling around Pascal is that it is for teaching only. It would be painful to learn an IDE to only find out later that it is for teaching purposes.

I have family members with urgent care needs and I don't have too much time. However I would really like to start posting on the net about my experiences, maybe I can help to clear away the FUD.

BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that it is a meta-widget toolkit?

Thanks ! -Patrick

leledumbo
to Patrick
I tried Lazarus but it did

not seem to be creating GTK code or QT, it was just some sort of weirdo Lazarus only stuff and then in tandem with the QT binding statement I mentioned earlier

http://wiki.freepascal.org/Overview_of_Free_Pascal_and_Lazarus#Lazarus_Architecture

it wasn't even obvious whether or not it could

generate GUI code outside of the IDE

http://wiki.freepascal.org/LCL_Tips#Creating_a_GUI_by_code

By logic, there won't be anything that can be done by IDE but not by code, code is far more superior in terms of capability. After all, code is what works behind all those abstractions (forms, data module, etc.). The IDE does almost exactly the same thing as if you code everything by hand (but it does by reading and interpreting the form's definition).

It would be painful to learn an IDE to

only find out later that it is for teaching purposes.

Welcome to the world of Modern Pascal. Nah, Pascal itself has NEVER been designed for such a purpose only. Free Pascal and Lazarus despite volunteer only projects are designed for real world application. Both are written in itself (Free Pascal is bootstrapping compiler, Lazarus is built from LCL, the same framework you use for building GUI applications with Lazarus) which shows their power.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GUI-confusion-tp5716891p5716900.html Sent from the Free Pascal - General mailing list .
Michal Wallace
to Patrick: Hi Everyone I really like the pascal code I have looked at and I am very excited about…
"Patrick" wrote
I don't really like IDEs. I used gvim and I suppose it could almost be

called an IDE as well but I mean I would rather use the shellr then clicking on a build button.

For what its worth, I use free pascal practically every day, but rarely open Lazarus.

I write most of my code in emacs, running inside a tmux session: http://tangentstorm.imgur.com/all/

But if I were going to make a GUI app, it would be crazy of me to ignore Lazarus. :)

I also use it when I want to browse and navigate through other people's source code. You can ctrl-click on identifiers as id they were hyperlinks.

Also if part of what bothers you is all the floating panels, you can enable the anchor docking extension and put everything into one window. That made a tremendous difference for me.

Michael Schnell
to Patrick: Hi Everyone I really like the pascal code I have looked at and I am very excited about…
Patrick wrote
Could anyone point me to resources on how to build GUI applications without Lazarus?

If you mean the GUI library Lazarus offers there are alternatives that have been pointed out.

If you mean Lazarus the IDE, you always can create a GUI using the Lazarus Library GUI (LCL) by manually doing the calls to create and manage the Widgets. In fact the IDE just creates a program that does exactly this and supplies it with the information about the GUI elements in a linked-in resource.

-Michael

Graeme Geldenhuys
to Patrick: Thanks again Sven. Hi Graeme This was a very helpful post. I will definitely give fpGUI a…
Patrick wrote
BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that it is a meta-widget toolkit?

Yes, that would be an accurate comparison. LCL and WxWidgets are a "common front-end toolkit" to other underlying GUI toolkits. This obviously has its pros and cons, because not all GUI toolkits have the same functionality. So you "meta-widget toolkit", as you call it, often only uses functionality that all GUI toolkits have in common. Also if the underlying GUI toolkit has a bug, it is out of your control to fix it, so instead you need to find a way to work around it.

A 100% custom drawn toolkit like fpGUI or MSEgui are probably more work to develop initially, but you gain much greater flexibility and consistency. All functionality works identical on all platforms, and you have full control over everything (like fixing a toolkit bug etc).

Regards,
Graeme

Unknown author
to Michal Wallace: called an IDE as well but I mean I would rather use the shellr then clicking on a build…

But how do you enable the anchor docking extension for Lazarus 1.0.12 and get some control of all the floating panels.

I personally would want all the panels to come to the front when I click on any panel
instead of having to click a couple of times to bring console or messages panel to the fore.

md

Michal Wallace wrote 31 lines
On Sep 29, 2013 8:24 AM, "Patrick" < > wrote: > I don't really like IDEs. I used gvim and I suppose it could almost be called an IDE as well but I mean I would rather use the shellr then clicking on a build button. For what its worth, I use free pascal practically every day, but rarely open Lazarus. I write most of my code in emacs, running inside a tmux session: http://tangentstorm.imgur.com/all/ But if I were going to make a GUI app, it would be crazy of me to ignore Lazarus. :) I also use it when I want to browse and navigate through other people's source code. You can ctrl-click on identifiers as id they were hyperlinks. Also if part of what bothers you is all the floating panels, you can enable the anchor docking extension and put everything into one window. That made a tremendous difference for me. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sven Barth
to Unknown author

Am 30.09.2013 15:57, schrieb

But how do you enable the anchor docking extension for Lazarus 1.0.12 and get some control of all the floating panels.

Install AnchorDockingDsgn package, rebuild Lazarus and now you're able to dock.

Regards,
Sven

Unknown author
to Sven Barth: Am 30.09.2013 15:57, schrieb Install AnchorDockingDsgn package, rebuild Lazarus and now…

Sven:

You ROCK!

md

Sven Barth wrote 13 lines
Am 30.09.2013 15:57, schrieb > But how do you enable the anchor docking extension for Lazarus 1.0.12 > and get some control of all the floating panels. Install AnchorDockingDsgn package, rebuild Lazarus and now you're able to dock. Regards, Sven _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Patrick
to Unknown author: But how do you enable the anchor docking extension for Lazarus 1.0.12 and get some…

I am new.....

I use multiple monitors so, all of the panels could stay on one screen and the form widget on another, docking might be handy to move all the

Show quoted text 49 lines
But how do you enable the anchor docking extension for Lazarus 1.0.12 and get some control of all the floating panels. I personally would want all the panels to come to the front when I click on any panel instead of having to click a couple of times to bring console or messages panel to the fore. md On 9/30/2013 2:07 AM, Michal Wallace wrote: > > > On Sep 29, 2013 8:24 AM, "Patrick" < > > wrote: > > > I don't really like IDEs. I used gvim and I suppose it could almost > be called an IDE as well but I mean I would rather use the shellr > then clicking on a build button. > > For what its worth, I use free pascal practically every day, but > rarely open Lazarus. > > I write most of my code in emacs, running inside a tmux session: > http://tangentstorm.imgur.com/all/ > > But if I were going to make a GUI app, it would be crazy of me to > ignore Lazarus. :) > > I also use it when I want to browse and navigate through other > people's source code. You can ctrl-click on identifiers as id they > were hyperlinks. > > Also if part of what bothers you is all the floating panels, you can > enable the anchor docking extension and put everything into one > window. That made a tremendous difference for me. > > > > _______________________________________________ > fpc-pascal maillist > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fred van Stappen
to Michal Wallace: called an IDE as well but I mean I would rather use the shellr then clicking on a build…

Have you try fpGUI ?

https://github.com/graemeg/fpGUI/tree/develop

Date: Mon, 30 Sep 2013 01:07:56 -0500
Subject: Re: [fpc-pascal] GUI confusion
From:
To:

"Patrick" wrote
I don't really like IDEs. I used gvim and I suppose it could almost be called an IDE as well but I mean I would rather use the shellr then clicking on a build button.

For what its worth, I use free pascal practically every day, but rarely open Lazarus. I write most of my code in emacs, running inside a tmux session: http://tangentstorm.imgur.com/all/ But if I were going to make a GUI app, it would be crazy of me to ignore Lazarus. :) I also use it when I want to browse and navigate through other people's source code. You can ctrl-click on identifiers as id they were hyperlinks. Also if part of what bothers you is all the floating panels, you can enable the anchor docking extension and put everything into one window. That made a tremendous difference for me.

Ben Smith
to Michael Schnell
Michael Schnell wrote 7 lines
On 09/30/2013 12:25 PM, Graeme Geldenhuys wrote: > All functionality works identical on all platforms, > Which, regarding look and feel, does have pros and cons, depending on the users targeted.

Sometimes company branding in products are more important that the look of the OS. Many products use different "looks and feel" to stand out above a saturated market.

But I guess you can't please everybody. ;-)

Ben.

Henry Vermaak
to Graeme Geldenhuys: Yes, that would be an accurate comparison. LCL and WxWidgets are a "common front-end…
Graeme Geldenhuys wrote 16 lines
On 29/09/13 23:33, Patrick wrote: > BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that > it is a meta-widget toolkit? Yes, that would be an accurate comparison. LCL and WxWidgets are a "common front-end toolkit" to other underlying GUI toolkits. This obviously has its pros and cons, because not all GUI toolkits have the same functionality. So you "meta-widget toolkit", as you call it, often only uses functionality that all GUI toolkits have in common. Also if the underlying GUI toolkit has a bug, it is out of your control to fix it, so instead you need to find a way to work around it. A 100% custom drawn toolkit like fpGUI or MSEgui are probably more work to develop initially, but you gain much greater flexibility and consistency. All functionality works identical on all platforms, and you have full control over everything (like fixing a toolkit bug etc).

With the obvious drawback that it doesn't respond to theme/accessibility changes. If a user with impaired vision, for example, changes the GNOME theme to high contrast with bigger default fonts, the custom drawn toolkit doesn't know/respond, while an application that uses the GNOME toolkit automatically adjusts itself. The LCL, however, didn't respond to font changes last time I checked.

This functionality can probably be built into the custom drawn toolkit. Can fpgui pick up theme related changes from other widgetsets?

Henry

Graeme Geldenhuys
to Henry Vermaak
Henry Vermaak wrote
With the obvious drawback that it doesn't respond to theme/accessibility changes.

Audio accessibility is possible. I just recently had a developer implement that in his applications. He requested one or two small changes to fpGUI to accomplish that.

If a user with impaired vision, for example, changes the GNOME theme to high contrast with bigger default fonts,

This is already on my todo list, to add a high contrast theme as one of the standard themes in fpGUI. Obviously developers can already implement there own themes if they want to - it's dead simple.

the custom drawn toolkit doesn't know/respond From the research I have done, it will not be hard to detect such a

change from the OS. After all, other toolkits like Qt (which is also a custom drawn toolkit at heart) works just fine in that regard.

Can fpgui pick up theme related changes from other widgetsets?

Not yet, but already on my todo list. Windows is very easy. Gnome and KDE are a bit harder - I had to peak at the Qt source code to see what was required. But yes, definitely possible.

Anyway.... my point was that LCL, MSEgui and fpGUI have their pros and cons. You just can't please every user out there. So choose the right toolkit for the job. :)

Regards,
Graeme

Patrick
to Fred van Stappen: Have you try fpGUI ? https://github.com/graemeg/fpGUI/tree/develop Date: Mon, 30 Sep 2013…

Hi Fred

Yes ! I am evaluating both Lazarus and fpGUI.

At the moment I am steering towards fpGUI.

I like FLTK but I don't like C++ and the FLTK bindings are not so great.

Understanding GTK or QT "under the hood" is a massive undertaking. So far fpGUI reminds me of FLTK(but it prettier) I can imagine, without heroic effort, that people would be able to look inside it and see what's going on.

It looks to be 173K lines, while FLTK is about 100K(I forgot the exact number). However I am betting it will be much easier to read then C++ and of course I don't even have to read the source to understand it! It's just nice to know that it is possible for me.

Being able to fix bugs yourself is important to me. A small readable codebase means autonomy, projects do get abandoned and/or people can get sick and are unable to maintain them. fpGUI seems like a really good project.

Nice work Graeme.

-Patrick

Fred van Stappen wrote 46 lines
Have you try fpGUI ? https://github.com/graemeg/fpGUI/tree/develop ------------------------------------------------------------------------ Date: Mon, 30 Sep 2013 01:07:56 -0500 Subject: Re: [fpc-pascal] GUI confusion From: To: On Sep 29, 2013 8:24 AM, "Patrick" < > wrote: > I don't really like IDEs. I used gvim and I suppose it could almost be called an IDE as well but I mean I would rather use the shellr then clicking on a build button. For what its worth, I use free pascal practically every day, but rarely open Lazarus. I write most of my code in emacs, running inside a tmux session: http://tangentstorm.imgur.com/all/ But if I were going to make a GUI app, it would be crazy of me to ignore Lazarus. :) I also use it when I want to browse and navigate through other people's source code. You can ctrl-click on identifiers as id they were hyperlinks. Also if part of what bothers you is all the floating panels, you can enable the anchor docking extension and put everything into one window. That made a tremendous difference for me. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal