program with windows (or GUI)

Hi everybody.

This is my first time writing here.
I've started learning C++. I did a lot of programming
in the Atari-ST time with GFA, Fortran, C, Lisp, etc..
And I'm happy I can pick up things again.

I wonder, if anyone knows how to make programs, which run
in a console, how do I jump to programs with a GUI or
window with sliders, buttons etc. etc. Is it objects
in libraries. And ìf it is, what libraries?
I admit: it is my very inpatient curiosity.
Last edited on
There's the SDL library which works with C++, I believe.

Search around for game projects on sourceforge.net that use C++, you'll get a lot of good ideas.
Thank you. I found SDL libs at sourceforge and in my own repository.
(I use PCLOS.) Maybe GTK is a possibillity too?

I hope I can find some tutorial for how to do that kind of programming.
I mean with those namespace and #include things etc.
(And the reference of course.)

But I am not yet at that point. Thanks again.

Last edited on
The QT library is very nice as well. SDL is rather low-level, whereas QT gives you a more WYSIWYG approach (while still being very flexible).
Okay. I'm going to see all of it incl. the details. Thanks.

Last edited on
I already have noticed, that if I use an IDE, build connects the program
to a terminalwindow. (Compile does not so.)
So if you run the compiled program, there is automatically a window.
By the way: with the install of Anjuta IDE came the program Glade, which
has something to do with GTK and graphical interfaces.
To be continued..

Last edited on
After starting Anjuta it comes with a wizard which will try to make a framework
for a GUI. You can choose for example out of Gnome of Glade (GTK).
Glade on it's own should be usable too. And yes Mikosz there is QT.
It is a beauty. But I'm not good in it yet. It all takes some time.. But it's fun.

Last edited on
What I´m beginning to notice working through the C++ matter is, that it looks like
drawing (in a window), write simple graphics and mix it with graphic text in some GUI etc. etc. is a problem.
Or to put it in other words no KISS (keep it simple): it looks like it would be a hell of a job to get simple drawing done.

I developed a lot in the now archaic Atari GFA-basic on an Atari 1040 ST. Later I did it on PC in an Atari emulator. Drawing lines, sprite, circles, elipses etc was immediatly possible in the output-window because you could very easy handle those commands in your code. There was a complete programming-command-set for those quite common things. Just like GEM, the graphics-part of the Atari-Operating System which made it possible with a simple C-include-library when one used C, or direct from GFA to program in that environment windows, buttons, notificationboxes, text and for instance sliders. So if you kept it simple you also did not need to make GUI. The outputwindow was enough. And so without too much trouble I could make quite complicated programs (for instance an technical analytic program for stockvalue with linegraphics etc.) with relativ little commands. So I think I'm spoiled.

I can't find that ease in the C++ documentation at hand (quite a lot), not on the internet, nowhere. To be more exact, I don't find it in any language at present. I'm also learning Lua, Ruby, Python and Perl.
Logo or (K)Turtle hás the ease, but of course is much, much, much too small; it is not a serious language. But the principle is right.

Is C++ really that problematic or am I missing or misunderstanding something somewhere?
And if it is, what would be a modern language relatively comparable with the old, old GFA? Has any-one an idea?
(I already have X11basic in my machine, almost the same they say like GFA, but it is less
compared to GFA, so that's not the solution.)
If sprites were possible in C++ I could make my own graphics environment. But I don't know
where to find the sprite although I have here the 'grand cru C++' book from Easy Computing and other documentation. But that could be because I don't know where to look.
Hope some-one can give me a little extra advice. In the meantime I don't stop learning.

Last edited on
You could look into OpenGL. This is a standard, and very powerful. Documentation is online,

http://www.opengl.org/documentation/red_book/

You can learn about modern computer graphics and twist your brain up learning C syntax at the same time!
You could use drawing functions, in Qt as describe here : http://doc.trolltech.com/4.3/paintsystem.html

Qt is a really good framework. SDL, OpenGL, and many others are good too, but you have to consider the differences between :
- making a gui application, with standard widgets (menu, comboboxes, etc.)
and
- drawing on the screen,

To draw on the screen, you can :
- use sdl, opengl, directx and a lot of others (for Python have a look at panda3d and pygame)
- use a widget in the gui to draw on it

but making a gui app and drawing on a device is not the same work

hope this help :-)
Hi all. My first contribution. Reitsma, I think another option in between Qt (which is great) is Tcl/tk. I worked with it some years ago. I don't know what is the state of this package of software now, but at the moment I saw pretty amazing graphic applications built with it.

Regards
Fernando
Thank you all very much. I appreciate it.
I'm trying them all and I get somewhere.

But it is not simple.
And in fact simplicity was what I'm looking for.
I don't have to do candy.
Normal line-graphics is sufficiënt. But no problem.

Topic archived. No new replies allowed.