Thread: C GUI for Linux: which one should I learn?

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    7

    C GUI for Linux: which one should I learn?

    Hello, I'm a Linux user and I'll want to program with a GUI. I want to ask you which one should I learn, because I'm really confused... and, if you can, please give me a link to a manual, thanks!.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    If you're doing straight C, GTK+ is probably best. Most other toolkits (wxWidgets, Qt, FXWidgets) are designed for C++.

    http://www.gtk.org/
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    most linux ide's are multilanguage, and your distro will have the documentation for the ides they have available.

    for a "polished" look and feel to the gui, that is similar to ms visual c++, kdevelop, kde studio [ commercial version of kdevelop ]
    or qt designer [ c++ only }

    glade is a gtk/gdk ide for user interface and event handling.
    the only drawback to glade is that the documentation is not complete.


    almost all gui applications use c++ or delphi for the interface [ java being the exception ]
    [ delphi only if using borland's tools, which require the 2.4 kernel at the latest ] so you will have to learn to work with c++.

    unless you are using Xandros, which uses emacs as the default development environment, I would recommend using kdevelop to learn with. http://www.kdevelop.org/
    the full documentation for it is there, but use your distro supplied binary rather than build from sources, some distro's have altered a few things making build from sources more difficult than it should be.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    7
    Ok, thanks for your help, now I'll learn C++ and then QT (I want to develop KDE applications), or maybe I won't learn C++ and I'll use PerlTK :P THANKS!

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    25
    Isn't GNOME gaining much faster acceptance than KDE? Would it therefore not be better to use GTK+ instead?

    Or is my thinking here completely incorrect?

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    From what I've seen, KDE has more acceptance, but I might be wrong. The recent GNOME versions are supposed to be very good. But bad experiences in the past have led me to use KDE exclusively.

    If GTK, though, use GTK--, the C++ wrapper for GTK+.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    25
    Apparently, most of the major distributions have either already accepted GNOME as their standard default, or they are in the process of doing so. Most government institutions corporations I know that use Linux use GNOME.

    However, and I am sure this counts for a lot, Linux Torvalds himself has come out quite strongly against GNOME and endorsed KDE. He says that GNOME's philosophy of assuming that "the user is an idiot" is most irksome to him.

    I prefer GNOME because I am more of a C guy than a C++ guy. But I do use both, and I think that KDE is very nice too.

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Well, I always had extreme problems with Gnome's session handling. It would launch all sorts of programs on startup that I might have had open at one point - but definitely not when I last shut it down. This became very tiresome, especially as it insisted on opening several instances of Firefox - and you probably know what that means. (Annoying profile selection dialogs.)

    I also find KDE to be better integrated - I get the feeling that everything works together perfectly when I right-click a file in amaroK, choose "Burn->This Album as Audio CD" and it launches K3B and burns. It's just ... smooth.

    On the other hand, and to get back on technical aspects, I have to admit I don't particularly like Qt's 2-step compilation.

    But then, I haven't done very much with either of the two toolkits. I'm more of a console guy.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    Registered User
    Join Date
    Dec 2005
    Posts
    7
    Hello, I am a Linux user, but recently I have been using the J programming language. J is more powerful and terse, but it can get more cryptic. It is good though.

  10. #10
    Sr. Software Engineer filker0's Avatar
    Join Date
    Sep 2005
    Location
    West Virginia
    Posts
    235
    Quote Originally Posted by cvelasquez
    Ok, thanks for your help, now I'll learn C++ and then QT (I want to develop KDE applications), or maybe I won't learn C++ and I'll use PerlTK :P THANKS!
    Ah... If you're going to use PerlTk, why not go all the way back to it's roots and learn Tcl; then you can use Tcl/Tk, which is where it all began.
    Insert obnoxious but pithy remark here

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    J? I know Java, J++, J#, JRuby, and Jython, but I never heard of anything called J.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Registered User
    Join Date
    Dec 2005
    Posts
    7
    What is J++? I guess it is like C++ for J (haha). Well, J was made in the late 90's by two programmers. It is yet again an object oriented language. It is basically the most powerful language out there.

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    You have a link describing the language? I am extremely wary of "most powerful languages". I've seen too many of those.

    J++ was Microsoft's early Java dialect, which they were forced to discontinue after Sun sued.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Hi

    "Apparently, most of the major distributions have either already accepted GNOME as their standard default, or they are in the process of doing so"

    I am a Slackware user and after Slackware 10.2, GNOME will not be supported by the Slackware any more. But i use WindowMaker and actulay don't like KDE!

    "He says that GNOME's philosophy of assuming that "the user is an idiot" is most irksome to him."

    Yes, i read something about this!

    GTK is gives you a C apı but there is a C++ wrapper called GTK--. Although GTK gives you a C API, the programming technique requires a OO language I think.

    For exmaple
    Code:
    	windw=gtk_window_new(GTK_WINDOW_TOPLEVEL);
    	gtk_window_set_title(GTK_WINDOW(windw),"Title comes here");
    	gtk_container_set_border_width(GTK_CONTAINER(windw),0);
            g_signal_connect(G_OBJECT(windw),"delete_event",G_CALLBACK(delete_event),NULL);
    can be done better by something like this...
    Code:
            GtkWidow windw;
            windw.set_title("Title comes here");
            windw.set_border_width(0);
            windw.signal("delete_event",G_CALLBACK(delete_event),NULL);
    Looks easier...
    Maybe GTK-- provies such an interface (I have never used it!).

    And also, one advantage GTK over Qt (according to me), some simple programs that does not require lots of system dependets features, written in GTK can be ported to Windows, there is a GTK lib for Windows! As I know, there is no Qt library for Windows.

  15. #15
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    Quote Originally Posted by fnoyan
    And also, one advantage GTK over Qt (according to me), some simple programs that does not require lots of system dependets features, written in GTK can be ported to Windows, there is a GTK lib for Windows! As I know, there is no Qt library for Windows.
    yup, QT for windows does exist.
    QT windows

    I personally like the enlightenment desktop environment, as far as possible from looking like windows.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI building, is RAD the way to go?
    By indigo0086 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-21-2007, 09:36 PM
  2. How many ways to program a Windows GUI?
    By thetinman in forum Windows Programming
    Replies: 12
    Last Post: 11-29-2006, 09:43 AM
  3. Easiest way to help a friend learn GUI programming?
    By Cat in forum Windows Programming
    Replies: 5
    Last Post: 10-19-2006, 10:16 AM
  4. Trying to learn guitar
    By Ben_Robotics in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 07-10-2003, 03:15 AM
  5. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM