Thread: Ready for GUI

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    110

    Ready for GUI

    My program is just about finished and working nicely, and now I want to make a very basic GUI for it, so instead of entering inputs in command prompt, I can enter them in text boxes, and things like that. Where do I start now? c is the only language I know, and I'm not an expert, but I'd like someone to give me some pointers please.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You would want to look at a GUI Framework.
    Obviously, this might depend on the platform you want to develop for, but there are portable frameworks out there.
    A lot is for C++, which is preferred by many when writing frameworks since it has features that lends itself well for that purpose, but there are those for C, as well.
    Two portable frameworks, I believe, that I can mention are: GTK and wxWidgets.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    110
    Thanks, I will look into those, I'd rather not learn too much c++ if possible, so can I use c for either?

    As for platforms, I would want it primarily for windows, but if possible porting to ubuntu would be good.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I believe wxWidgets is C++, but GTK is C. Not an expert on those frameworks, so I could be off.
    But if you wish to write GUI applications for PC, C++ might actually be worth looking into someday, even if that day is far away.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    110
    Well, thats the thing, this is only a one off thing really. Most programming I will be doing in the future will be for microcontrollers, and I don't want to get bogged down in too much c++.

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    110
    Can someone recommend some good reading material (preferably online) for someone switching from procedural programming in c to OOP in c using gtk+. I can't really grasp anything I've read so far, and some example problems would be nice too. I need a really basic guide, like how to use gtk, how to structure programs, and how to compile them.

    If anyone knows of anything please let me know, cheers.

  7. #7
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by bertazoid View Post
    Can someone recommend some good reading material (preferably online) for someone switching from procedural programming in c to OOP in c using gtk+. I can't really grasp anything I've read so far, and some example problems would be nice too. I need a really basic guide, like how to use gtk, how to structure programs, and how to compile them.

    If anyone knows of anything please let me know, cheers.
    You should check out www.gtkforums.com. I think there is maybe one book on gtk+ 2.0 and it's by one of the moderators, you'll see an ad. The Gtk Reference Manual is good, I think. The existing tutorials seem incomplete but are a decent introduction. If you've never done any GUI stuff before, it's just like the rest of c -- gives you an appreciation for how complicated something that seems simple can be. Keep in mind Gtk involves Gdk and Glib, use those ref manuals also.

    There is something called glade you might want to investigate, I've never used it because I just want to code but it seems widely used, and might suit your purposes vis. you don't really need to develop a proficiency in GUI stuff, you just want to do some.

    My current gtk+ project (I started with it in August, this was late september) needs updating soon but there's lots of functional code:

    http://www.intergate.com/~halfcountplus/see

    I also know that the example code from that book is available online thru the publisher.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #8
    Registered User
    Join Date
    Oct 2008
    Posts
    110
    Ok thanks I will check out those things

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. continuing program until ready to stop
    By jlmac2001 in forum C++ Programming
    Replies: 2
    Last Post: 01-19-2003, 07:19 PM
  2. Am i ready for openGL???
    By tetra in forum Game Programming
    Replies: 9
    Last Post: 01-14-2003, 05:19 AM
  3. trim string function (code)
    By ipe in forum C Programming
    Replies: 9
    Last Post: 01-06-2003, 12:28 AM
  4. Is Linux ready to enter the desktop market?
    By carrja99 in forum Tech Board
    Replies: 20
    Last Post: 11-04-2002, 01:11 AM
  5. Are you ready?
    By lostminds in forum Game Programming
    Replies: 6
    Last Post: 05-08-2002, 02:11 PM