Sign in Join

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

Mailing lists / lazarus / 1999-06

R:

5 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Michele Manara
to Cliff Baeseman: Is GDK in any of our currently ported headers. I cannot remember and do not have the FPC…

I everybody,

I found the lazarus project looking for a tools as powerful and easy to use as the one I use on windows: Delphi of course.
I'm not an expert linux-unix-gtk programmer but I have a couple of thoughts to share.

Gtk vs Qt
If I'm using a windows app, I expect the app's look and feel to be the standard one. If I'm editing in an edit box I'm sure that ctrl-C will copy the text in the clipboard, if I change the system colors I expect all the apps will use the new scheme, and so on.
To write a new widget set with this common functionality is a huge work. Instead write TWO wrappers, one for QT and one for GTK, but with the same interface, at least for the basic widgets. I will insert in the uses list QTForm or GtkForm, but in code I will always use TForm. Changing the uses list and recompiling I will port my app from GNOME to KDE.

IDE
The IDE is by far more important of the widget set. Give me a good project manager - editor - INTEGRATED DEBUGGER and I will use plane gtk without problems.

Happy coding

Reply by email

John Margaglione
to Cliff Baeseman: Is GDK in any of our currently ported headers. I cannot remember and do not have the FPC…

I don't believe the GDK is wrapped, just GLIB and GTK. And now for a few comments:

Wrapping XLib is an ENOURMOUS amount of work. Period. I think it is important to note that we are developing an IDE. Integrated Development Environment. Delphi is an IDE. Delphi did NOT create a brand new widget set to address it's windowing controls. It used the *standard* widgets available for Windows, then wrapped them. Now, we don't have the luxury of choosing the standard widget set for XWindows and Windows, because there is none. We do, however, have two sets of widgets that are gaining VAST acceptence: Qt and GTK+. I think that using GTK+ would be a major *advantage* for us. Developers want the coolest looking widgets they can get their hands on. The GTK+ toolkit was developed by the makers of GIMP, some of the coolest graphics stuff out there. I simply doubt that any of us can make a cooler-looking widget set. Not in this century, anyway. There are other advantages to sticking to GTK+:
1. glade projects can be ported to Lazarus with minimal amounts of GUI recoding, as we can easily write a program that takes the XML and turns it into a .dfm.
2. We don't have to spend our lives keeping up with the latest component crazes, we just make a wrapper and get on with our own stuff.
3. It is currently *much* more important that we get the rest of the IDE working before we get our own widget libraries built. The most popular functions in IDE's today are: Intellisense
GUI Form Builders
Integrated Debuggers
Database Integration
Object Browsers/Class Trees
Syntax highlighting
Integration with COM/CORBA/whatever

None of these features are helped by the choice of widget set except the Form Builder, and since glade/gIDE/etc can build interface builders with GTK, so can we. I simply don't see the *relative* worth of spending months of coding time (and it will be months, not weeks, even with several of us working) just to get a little more control over the widgets. If drawing a custom widget is so important, then we can make a TCustomControl that only provides a GDK canvas (we are wrapping the TCanvas for this, right?). Then people can build any weird thing they want.

I simply think that very few application writers are in the business of subclassing controls. Sure, low level component developers do this, but that is a very small percentage of the workforce. Most developers want the list from above.

We need to prioritize some of this FAST, before we fragment into camps.

John

Earlier message 89 lines
----- Original Message ----- From: Cliff Baeseman To: Sent: Sunday, June 27, 1999 8:51 PM Subject: Re: [lazarus] : Is GDK in any of our currently ported headers. I cannot remember and do not : have the FPC loaded back just yet. : : Cliff : -----Original Message----- : From: Michael A. Hess : To: : Date: Sunday, June 27, 1999 8:41 PM : Subject: Re: [lazarus] : : : >Shane Miller wrote: : >> : >> I'm not real familiar with XLib so let me ask this. Is the XLib the : >> method that was used to write KDE and other GUI's? Or is it simply : >> another component library? : > : >Xlib is the X11 system. It is what was used to write the GDK. Then GTK : >was written using the GDK. Then Gnome is written using the GTK. The same : >kind of process goes for KDE. Qt's primatives (I don't know their name) : >are written to the Xlib. The Qt widgets are written to use the Qt : >primiatives. KDE is written using the Qt widgets. : > : >What we are talking about is writting our own GTK or Qt or what we would : >call the FCL. Our FCL would talk to the Xlib directly. To skip some of : >this headache we could use GDK instead of going all the way down to : >Xlib. : > : >> Can we then create a unit that has a CREATECOMPONENT and SENDMESSAGE : >> and such that will interface with X11 library? : > : >We would be able to do ANYTHING we wish. All of the messaging component : >interaction would be written by us in the FCL. We would not be calling : >or using any other libs other than the standard X11 libs which you have : >to use even with GTK. The GDK might be easier to use as the low level : >graphics primatives since it already takes care of many of the headaches : >involved with accessing the X11 libs. : > : >Think about it this way. If you look in the Delphi VCL most of the : >direct Windows API calls are only found within the Draw methods of any : >component. That is what we are talking about. All the rest of the : >component would be written entirely with FPC in Pascal. Only the Draw : >method would need to be written to address how the widget in question : >looks and is...well drawn. We could call Xlib directly or as I said : >overcome alot of Xlib headaches by using GDK. This is the "Graphics : >Drawing Kit" that is the basis of GTK. The other advantage to using the : >GDK is that it is already ported to Win32. If GTK has been ported to : >Win32, well then GDK has been as well. We would write our components : >once using GDK and any platform that has GTK/GDK would be able to use : >the FPC and the FCL. We still get the portability of the graphics : >primatives but aren't tied to the widget set of GTK. : > : >The GDK has all your basics: : > : >Draw Pixel : >Draw Lines : >Draw Rectangles : >Draw Polygons : > : >All of these than have the standard outlined or filled what color, etc. : >etc. : > : >I think this way of doing the FCL gives us the most flexibility within : >FPC. We will not be tied to a limited widget set established by some : >other third party API. : >-- : >==== Programming my first best destiny! ==== : > : >Michael A. Hess Miracle Concepts, Inc. : > http://www.miraclec.com : > : >_________________________________________________________________ : > To unsubscribe: mail with : > "unsubscribe" as the Subject : > archives at http://www.miraclec.com/list_archives/lazarus : > : : _________________________________________________________________ : To unsubscribe: mail with : "unsubscribe" as the Subject : archives at http://www.miraclec.com/list_archives/lazarus :

Reply by email

Cliff Baeseman

Is GDK in any of our currently ported headers. I cannot remember and do not have the FPC loaded back just yet.

Cliff

Earlier message 72 lines
-----Original Message----- From: Michael A. Hess To: Date: Sunday, June 27, 1999 8:41 PM Subject: Re: [lazarus] >Shane Miller wrote: >> >> I'm not real familiar with XLib so let me ask this. Is the XLib the >> method that was used to write KDE and other GUI's? Or is it simply >> another component library? > >Xlib is the X11 system. It is what was used to write the GDK. Then GTK >was written using the GDK. Then Gnome is written using the GTK. The same >kind of process goes for KDE. Qt's primatives (I don't know their name) >are written to the Xlib. The Qt widgets are written to use the Qt >primiatives. KDE is written using the Qt widgets. > >What we are talking about is writting our own GTK or Qt or what we would >call the FCL. Our FCL would talk to the Xlib directly. To skip some of >this headache we could use GDK instead of going all the way down to >Xlib. > >> Can we then create a unit that has a CREATECOMPONENT and SENDMESSAGE >> and such that will interface with X11 library? > >We would be able to do ANYTHING we wish. All of the messaging component >interaction would be written by us in the FCL. We would not be calling >or using any other libs other than the standard X11 libs which you have >to use even with GTK. The GDK might be easier to use as the low level >graphics primatives since it already takes care of many of the headaches >involved with accessing the X11 libs. > >Think about it this way. If you look in the Delphi VCL most of the >direct Windows API calls are only found within the Draw methods of any >component. That is what we are talking about. All the rest of the >component would be written entirely with FPC in Pascal. Only the Draw >method would need to be written to address how the widget in question >looks and is...well drawn. We could call Xlib directly or as I said >overcome alot of Xlib headaches by using GDK. This is the "Graphics >Drawing Kit" that is the basis of GTK. The other advantage to using the >GDK is that it is already ported to Win32. If GTK has been ported to >Win32, well then GDK has been as well. We would write our components >once using GDK and any platform that has GTK/GDK would be able to use >the FPC and the FCL. We still get the portability of the graphics >primatives but aren't tied to the widget set of GTK. > >The GDK has all your basics: > >Draw Pixel >Draw Lines >Draw Rectangles >Draw Polygons > >All of these than have the standard outlined or filled what color, etc. >etc. > >I think this way of doing the FCL gives us the most flexibility within >FPC. We will not be tied to a limited widget set established by some >other third party API. >-- >==== Programming my first best destiny! ==== > >Michael A. Hess Miracle Concepts, Inc. > http://www.miraclec.com > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Dan Damian
to Michele Manara: I found the lazarus project looking for a tools as powerful and easy to use as the one I…

Hi!

About the widget sets/drawing primitives issue...

GTK & Qt theme support would be great. GNOME & KDE session management & desktop integration would also be great, though I'd love to be able to write some apps that wouldn't require either GNOME or KDE, in a more efficient way than writing 'em directly in Xlib/Xt.

Supporting all these 'trends' (Xlib, GTK/GNOME, Qt/KDE) would probably boost Lazarus' acceptance. Wrapping both GTK and Qt widgets shouldn't be a big problem. But writing a Xlib-based component set is a totally different approach, and I don't know how you could parallelize it with GTK/Qt component development. That is, of course, if you still intend to wrap widgets from other popular toolkits.

I'd sure like to have Lazarus compile Xlib apps as a primary target with the option of creating GTK and Qt based apps, too (converting between these platforms could be a neat feature). But if the Xlib based app will have big disk & memory footprints (and if it wouldn't share memory with other apps), I'd question my choice...

I know wrapping GTK (and Qt) widgets can be pretty nasty... But I'm not so sure that writing another widget set is a good solution (even in objpas). Duplicating the code makes apps bigger and (maybe) slower. AFAIK fpc doesn't produce better (optimized) code than gcc/egcs (probably used by the GTK & Qt teams). So I'd go with GTK and Qt widgets wrapping and GDK and Qt drawing primitives for custom and abstract controls.

Anyway, my opinion is that FCL should be written along with the Lazarus IDE. It's nonsense to first create the IDE and then the class library...

-dan

Reply by email

Nicolas Aragon
to Cliff Baeseman: Is GDK in any of our currently ported headers. I cannot remember and do not have the FPC…

Hello,

Wrapping XLib is an ENOURMOUS amount of work. Period.

Do you know that headers are translated long time ago? Yes, I know that it isn't all the work to do. But after some tests, I haven't found much harder to program for Xlib than for gtk, provided that you are writing wrappers, not programs and that sooner or later you'll need to write some canvas stuff, UNLESS you intend to tell your customers "if you want to customize this component, learn C".

Please notice that I don't propose to throw away gtk. I propose to leave the door open to support gtk, qt, Xlib, winapi.... please read my other message about "multiplataform".

I think it is important to note that we are developing an IDE. Integrated Development Environment. Delphi is an IDE. Delphi did NOT create a brand new widget set to address it's windowing controls. It used the *standard* widgets available for Windows, then wrapped them.

They didn't do that because of saving code time. But looking for performance.

Now, we don't have the luxury of choosing the standard widget set for XWindows and Windows, because there is none.

Let the user choose his favourite widget set instead.

Developers want the coolest looking widgets they can get their hands on. The GTK+ toolkit was developed by the makers of GIMP, some of the coolest graphics stuff out there. I simply doubt that any of us can make a cooler-looking widget set.

The look is the smallest problem. The main problems are:

1. Creating efficient code to responde to paint events
2. Caring about alot of details about keyboard, mouse, coulours, captions...
3. Things like c&p and communication with other applications.

Not in this century, anyway. There are other advantages to sticking to GTK+: 1. glade projects can be ported to Lazarus with minimal amounts of GUI recoding, as we can easily write a program that takes the XML and turns it into a .dfm.

Why not use XML natively? Delphi 5 is said to abandon dfms in favour of XML, BTW.

2. We don't have to spend our lives keeping up with the latest component crazes, we just make a wrapper and get on with our own stuff.

You can also do it with my proposal.

Show quoted text 8 lines
3. It is currently *much* more important that we get the rest of the IDE working before we get our own widget libraries built. The most popular functions in IDE's today are: Intellisense GUI Form Builders Integrated Debuggers Database Integration Object Browsers/Class Trees Syntax highlighting Integration with COM/CORBA/whatever

Let's build the ide on top of a portable set of components, and use gtk at first, or simply work in parallel. There seem to be here enough people. And in Megido list. And KCL people seem to be quite advanced.

the *relative* worth of spending months of coding time (and it will be months, not weeks, even with several of us working)

It depends on what you want to do. Anyway, again: you don't need to choose. Versions for all libraries don't need to be completed at the same time.

just to get a little more control over the widgets. If drawing a custom widget is so important, then we can make a TCustomControl that only provides a GDK canvas (we are wrapping the TCanvas for this, right?). Then people can build any weird thing they want.

You'll find out that people wants that "weird" things most of time. No powerful language/library/environment is so poweful if you can't step down some levels when you need to.

I simply think that very few application writers are in the business of subclassing controls. Sure, low level component developers do this, but that is a very small percentage of the workforce. Most developers want the list from above.

I completely disagree. Take a look at Delphi sites. They're plenty of components using low level features. People love weird buttons, toolbars, labels... Of course, component users don't need to be aware of how they're implemented. But component writers do. I don't like the landscape of component programmers in the need of learning C in order to write custom components.

We need to prioritize some of this FAST, before we fragment into camps.

I don't think it would be bad if we keep a common part that works for everybody.

greetings

Nico

Reply by email