On Wed, 2003-12-10 at 21:40, Richard Esplin wrote: > wearing off). Some problems you will need to think about include: > how to handle events, > how to determine the size of graphical elements and lay them out > correctly
In think a key here is to learn how a packing manager can facilitate the layout you want. Never ever used fixed-position widgets unless you have too. > even when a window is resized, > how to have a generic widget interface with a specific class's data, > the build process for compiling and linking executables, > memory management, > how to interface with currently unknown pieces of hardware and > software, > how to display persistent data on a non-persistent interface, > how to interact with the user, > how to handle portability across platforms, > and others that my mind is too numb to articulate at the moment. > <snipped many fine paragraphs of good advice> > I have had some success with both QT and Swing GUI's. I find their > documentation very complete, and they both have some good tutorials aimed at > newbies. They both have their downsides though; I don't think I've found my > toolkit nirvana yet. I tried GTK but couldn't find any really good > introductory tutorials. I hear that GUI's are easy in Objective C (check out > GNU-Step), Ruby, and Python. I've been sticking with Java/C++ so far though. > I think I'll try wxWindows next. The best documentation for any widget set is the API documentation. This lists all the possible method calls, attributes, signals, etc, that each object has. I would definitely start with a simple "hello world" program. All toolkits I've ever seen have this example program or tutorial to look at. QT's docs are really good, and GTK's are excellent (api-wise). Definitely check out the tutorials. Also, there are many fine mailing lists that have provided me with invaluable information and advice, many times from the head programmers themselves. Another tip for learning how to do the gui programming is to look into the source code of the toolkits themselves. Most toolkits are built using their own components. For example, most of my initial experience with GTK came from trying to build a better file dialog box. Looking at the source code I learned all kinds of things like how the signals work, how method calls are done (yes GTK is straight C and supports inheritance and pure virtual methods). I definitely second Richard's advice on ditching the gui tools for now. For the first few small programs, build them completely from scratch. It's not hard, but it helps you learn how the gui code works. Visual tools too often hide things from you and then when you run into their limitations, you're lost when you have to somehow modify the generated code (and still make sense of it all). The current mode of thinking amongst GTK developers is that no one should ever use generated code. They do use a gui designer tool (glade) which produces XML files. Then in your source code you use the xml file to build the gui and then connect your signals. Seems to be a better way than the MFC crap I remember doing in my CS 345 class. Michael > Good luck, and let us know what you decide to try and why. > Richard Esplin > > > On Wednesday 10 December 2003 21:00, Ross Werner wrote: > > Almighty Wise and Perspicacious UUG Members, > > > > For most of the things I've wanted to program, command-line interfaces > > have been sufficient. If I ever needed some sort of GUI, a web-based PHP > > interface worked peachily. However, I've now run into a case where I think > > I need to learn how to program some sort of GUI... Reader's Digest > > version: I want to create interactive card games that you can play with > > others over the network (think Microsoft Hearts). PHP just won't cut it in > > this situation, as much as that grieves me. *sigh* > > > > So, I turned to the programming language I know second-best--Java. After > > playing frustratedly with the source code for Swing demo applets for hours > > on end with no results, I gave up. Now I turn to you: what do you people > > use to program GUIs? Java Swing? Gtk? Qt? Perl-Tcl/Tk? What would be the > > easiest to learn? Are GUIs really as painful to program (especially > > without a fancy IDE) as I've heard? Are there resources to help clueless > > newbies like myself? Or do I just have to wait until CS Whatever, GUI > > programming? > > > > Thanks a ton in advance, > > ~ ross > > > ____________________ > BYU Unix Users Group > http://uug.byu.edu/ > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list -- Michael Torrie <[EMAIL PROTECTED]> ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
