Click to See Complete Forum and Search --> : Starting to make GUIs....


PhatBarren
08-19-2002, 12:35 PM
Hey.

I've never made any GUI's other than Java AWT and Java Swing GUI's. I'm now in the relm of Linux and, I want to make some guis using C++ or tcl/tk or perl/tk or whatever. I have been checking out QT designer, and it seems to be making XML code from the GUI's I have designed. I think this is kool, but I'm really not sure whats going on. Somewhere there's going to have to be some event handling, and XML is not going to do that for me.

I am a competent programmer, but very inexperienced in GUI programming. If anyone can point me in the direction of some good URLs where I can learn how to do Linux GUIs, that'd be great. Any development software, too, is great. I'm really not sure what QTDesigner is all about, since I haven't been able to make it output any real programming code. I've seen some great GUI's done in tcl/tk, and that appeals to me, as well, since I've heard it's the fastest way to get GUI's happening.

So no concise questions, but I'm just looking for some direction.

THanks alot :)

X_console
08-19-2002, 01:09 PM
You might find this interesting: http://www.gtk.org/
There's a tutorial in there as well. Should be enough to get you started.

Gaccm
08-19-2002, 02:01 PM
the tutorial for qt is at doc.trolltech.com

cyberhwk
08-19-2002, 05:07 PM
I am just starting out learning programing. I first started wasting my time learning basic and visual basic and now I'm trying to learn c because I have made the switch (at least over to my laptop) but the problem is all the classes I've ever seen is so intrested on text based programs they never even look at a basic GUI. This is quite disapointing to me because I want to eventually learn videogame programing and I have no Idea how to manipulate a graphical environment.

any comments or Ideas on how to convince teachers that more and more software is being written for a gui environment and the only text based programs I see anydays is database programs.

PhatBarren
08-19-2002, 07:41 PM
I hear what you're saying. At least at the university level, they seem to be primarily interested in theoretical stuff, which you don't need GUI's to prgram. What's worse is that I'm going into 4th year of Software Engineering, and I've never once had to make a C/C++ program! It's all Java. The reason is because Java is so easy to teach principles with... they hardly teach any tecnologies (like EJBs, XML, GUIs, Web Services, etc). I think they should focus on practical things, like this, as well.

cyberhwk
08-19-2002, 10:16 PM
There are c and c++ courses in the community college I'm going to that are quite cheap but I dropped the intro class because I didn't like my teacher (he kept telling the students that you don't have to conserve code with the machines out there today :mad: and he seemed to think that c is great and I'm not sure he was fond of Gui environments. I think because of his lack of concern on speed and lack of knowledge of good gui environments I figured that he was fired from microsoft ;) and went to work at a community college.:D) Because I quit his class I can't take C++ or other C classes. I think its BS but so far I've learned more from books and experimenting. I'd appreciate anyone who can get me started in the right direction though.:D

Gaccm
08-20-2002, 12:34 AM
at the intro level, they would be happy to have the code simply work. Also, the problem with teaching GUI, is it's OS dependant, do you want to learn how to use MS visual c++? only the command line stuff is a standard.

cyberhwk
08-20-2002, 01:12 AM
I was more bugged about the guy ranting and raving about how you no longer have to write code consertively and that no one looks for it. I think this teacher truly believed that its not necessary to code programs that can run efficently. About the Gui I was less concerned with about being taught that at the moment but I would have liked to be given a small look. I understand trying to teach just getting the code to work but the programs we were supposed to be writing the syntax was simple enough that you should be able to write it with out twenty lines of useless code. I also disliked that people didn't want to write subs. Its not that hard and its something that should have been taught becuase it can save hours if your writing a large code.

Do you have any suggestions about programming programs that is similar to the tools avaliable in Microsofts version of C? Not C++ becuase I haven't really gotten into that. But if you have any suggestions on which programming tool I should use to write, test, debug, and compile basic C programs I would appreciate it. I do admit I'm going through windows with draws becuase I use it at work and for games and I miss some of the bells and whistles.
(that sounds stupid and probably shows I'm a noob)

Also since the gui environments are diffrent between linux and microsoft would it be worth my money to buy a $80 copy of microsoft's latest programing suite to get my feet a little wet. I really want to get into programming in linux. Also note that the C language is similar enought to PHP and Basic that I'm not feeling uncomfortable with the code. I have less problems with using the wrong tools for the job then I do spelling the tools correctly. :D

BTW sorry if I aggravate u with any under educated comments. I appreciate any feedback as long as I can build off of it.

PhatBarren
08-20-2002, 01:37 AM
I'm pretty sure that the most basic Windows GUI API is a C one, and that the C++ GUI's use object oriented wrapper APIs. So if you want to just use C that shouldn't be a problem.

I know that you can download the Borland compiler for free now, but you still have to buy the IDE if you want that. Alot of people prefer to do coding manually when learning new things, anyways.

Gaccm
08-20-2002, 12:03 PM
if you buy a windows version of Qt, then you can start learning in windows and when you move to linux all your code will still work fine. (linux version of qt is free).

JohnT
08-20-2002, 12:18 PM
You might find some interest here. It's C++, but very extensible .............................
http://www.wxwindows.org/

cyberhwk
08-20-2002, 03:03 PM
can anyone suggest some good starting books. I lost my C primer :( C++ good too. Also I'm starting Qt and I am lost any books or primers on that?

JohnT
08-20-2002, 04:33 PM
Originally posted by cyberhwk
can anyone suggest some good starting books. I lost my C primer :( C++ good too. Also I'm starting Qt and I am lost any books or primers on that?

Links to both on same page...........
http://www.oreilly.com/catalog/prowqt/

cyberhwk
08-21-2002, 12:16 AM
Yeah this is exactly what I'm looking for thank you, all!

f'lar
08-23-2002, 02:14 PM
www.borland.com/kylix

Learning GUI won't actually teach you as muich as you think if you're real goal is developing 3D video games. You're better off skipping the User Interface stuff and going straight for a good OpenGL book. Don't get me wrong: you'll still need it, but the real meat of game programming doesn't have as much to do with it as you might think.

thor4linux
08-26-2002, 04:10 AM
If you want to learn OpenGL and games on Linux there are two books by norman lin, Linux 3D Graphics Programming and the Advanced version with the same name. But he assumes that you know C++, But builds and graphics library that should be pretty portable. Although i'm not that far yet.

JSimmons
09-03-2002, 01:40 PM
Hey Cyberhawk, you can, indeed, take other courses without having to suffer through the moron's class. All you have to do is "test out". Most colleges allow people to do this in order to take advanced classes (and I think you even get college credits for the course your skip in this manner).

Further, just because your instructor believes what he says, doesn't mean you have to buy into it. Stick to your guns, write the tightest code you can, and pass the course. In this instance, the instructor you mentioned is a clear example of the idiom, "Those who can't, teach."

f'lar
09-03-2002, 09:56 PM
I think maybe you have to understand where he is coming from:
A lot of the teachers learned to code back in the late 60's/early 70's. Back then even first year students had to be very careful about the efficiency of their code, because they could accidently tie up a multi-million dollar "super computer" (read: antique that was really slower than my graphing calculator) for hours. Nowadays (I like that word) the programs you write as a first year student won't make a machine break a sweat (figuratively speaking), even in an infinite loop, and there will still be cycles left for other programs. So, yeah, first year students don't have to worry about that. At my school, that class was comp170, intro to programming. The next class, comp245, data structures, started teaching more efficient ways of handling large quantites of data.

Gui programming was a fourth year subject broken down into 3 6 week sections: win32 API (yuck), borland builder (didn't mind so much), and visual basic (yuck). The real focus of each section, though, was different concepts of event driven programming: win32 API taught the basic premise and a few of the low level commands, builder taught animation and intro to rad tools, vb taught business programming and "good interface design" concepts.

cyberhwk
09-04-2002, 12:05 AM
I completly understand where he is coming from. However there is no need to avoid good programing practice. Also this teacher could care less about programming anything more than a simple text program.
I have learned if you learn a bad practice it is quite hard to "un-learn" a teacher should teach the value of space and shouldn't over estimate how a program can lag a computer (I doubt this teacher runs computers more that just programing stuff anymore. Infact I think that is all the teacher ever ran his computer for personal use)
I can rant on this for a long time but as this is getting off topic and it is not fair to the thread's originator I shall discontinue this conversation for the time being. I might start a new thread later so people can lecture me, flame me, or agree with me at another time.

f'lar
09-06-2002, 11:43 PM
Bad programming practice is one thing, always programming for sheer speed is another. For example, if I have this array:
int A[10[;
I can access the 3rd node like this:
int b=A[2];
or like this:
int b=*(A+2);
The [] symbols are an operator in c++, and are translated by the compiler into a function call, while the pointer version is not. That means the second method is slightly faster, but it's rarely used because it's bad style. It can make a program a real pain to read later. There was a time when people wrote programs with ones and zeros (I'm sure one of the first programs they wrote was an assembler ;)), and both of these methods would be slow in comparison to using machine language.
Object Oriented Programming can be very wasteful of cpu cycles. I could be accessing an interface to a class, which has to use an interface to another class, which has to access an interface to a.... when all I really want to do is change the value of an integer somewhere from 6 to 7 (or something like that). Instead I end up generating a bunch of function calls first, but OOP is considered to be a much better way of doing it. The compiler will optimize around some of this, but not all of it.

Maybe right now he could care less whether or not you can write anything graphical, but that will change. Like I said earlier, it's a fourth year subject where I went, unless you count some of the web stuff they do (I don't: it's very different). It's a good idea if you learn more about classes/objects, polymorphics, OOP, dynamic memory, the STL, and other things before you start tackling graphical programs. Not that you can't right them without that stuff, but it's makes it a lot easier to handle, espescially because you've had more practice in the basics first.