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.
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.
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.
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.
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++.
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.
Originally Posted by bertazoid
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:
I also know that the example code from that book is available online thru the publisher.
Ok thanks I will check out those things