C and GUIs

This is a discussion on C and GUIs within the C Programming forums, part of the General Programming Boards category; Hi again, Another newbie request: as a C programmer, how do you put together a GUI? Are there libraries available ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    Pointe Claire, Canada
    Posts
    9

    C and GUIs

    Hi again,

    Another newbie request: as a C programmer, how do you put together a GUI? Are there libraries available to help out? Or do you have to use a more 'visual' language and link it to your C code? I'm starting to get the hang of the basics of C, but I"m not sure where to start with developing a user interface. I'm working in GNU/Linux, but I'd like to use tools that work on Windows as well, if that's possible.

    Thanks again,

    Tyler

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    If it needs to be closs-platform, then you would have to look at something like SDL (libsdl.org). Maybe with a side of one of the libraries that help with GUI writing (buttons, bars, and things)

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    The SDL doesn't support buttons etc unless you download a supporting library or something. (Or write your own, which is what I did.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    Umeň, Sweden
    Posts
    555
    wxWidgets?

  5. #5
    Registered User
    Join Date
    Mar 2006
    Location
    Pointe Claire, Canada
    Posts
    9
    I'd be happy to write my own, or use an existing library, but I have no idea where to start. I looked at the SDL site, but that seems to be aimed at fairly complex stuff. I just want to make some forms for data entry, and present the output in a similar form. Most of my work is going to be ecological simulations and number-crunching stuff. I don't need fancy graphics, just something basic.

    Everything I've found in web tutorials or books is either like SDL, aimed at games programmers who already know a lot more than me, or is just the language basics, assuming everything will be run from the command line. Where does a beginner programmer go to learn how to program some boxes with buttons and check boxes and text fields?

    Cheers,

    Tyler

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Try a Windows programming book. Er, sorry, you're using Linux. In that case try KDE programming or whatever you have. Or use QT or some other library.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    GTK on Gnome, QT on KDE. QT is C++, not C so that really leaves you with GTK. QT and GTK can both be installed on Windows as well.

    (Keep in mind you can install the QT libraries if you are using Gnome, and the GTK libraries if you are using KDE, so you aren't necessary constrained by the desktop environment)

  8. #8
    Registered User
    Join Date
    Mar 2006
    Location
    Pointe Claire, Canada
    Posts
    9
    That's more like it! It looks like GTK does what I'm looking for, and the tutorial appears to be comprehensible to someone at my level of experience. I'll give that a shot.

    Thanks for your suggestions!

    TB

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21