views:

51

answers:

2

I have been all over the web looking for an answer to this, and my question is this: How does a GUI framework work? for instance how does Qt work, is there any books or wibsites on the topic of writing a GUI framework from scratch? and also does the framework have to call methods from the operating systems GUI framework?

-- Thank you to any one who takes the time to try to answer this question, and forgive me if i misspelled anything.

A: 

Building a GUI framework isn't a 1,2,3 process.

All I can say is, take a look of some of those open source IDEs, like Netbeans source code for example.

Look inside the code, and then build the whole IDE.

medopal
I haven't used NetBeans but I looked at a few screenshots and it appears to just use Swing - I don't think this would give a good example of developing a UI framework since it simply uses an existing one, not implements its own. GTK+ (http://www.gtk.org/) would be a good example.
Michael Shimmins
Hay Thanks for the advice and your prompt response. I will do that.
AlexW.H.B.
+1  A: 

A GUI framework like Qt generally works by taking the existing OS's primitive objects (windows, fonts, bitmaps, etc), wrapping them in more platform-neutral and less clunky classes/structures/handles, and giving you the functionality you'll need to manipulate them. Yes, that almost always involves using the OS's own functions, but it doesn't HAVE to -- if you're designing an API to draw an OpenGL UI, for example, most of the underlying OS's GUI stuff won't even work, and you'll be doing just about everything on your own.

Either way, it's not for the faint of heart. If you have to ask how a GUI framework works, you're not even close to ready to design one. You're better off sticking with an existing framework and extending it to do the spiffy stuff it doesn't do already.

cHao
Hay thank you for your response, things are starting to make more sense. And I would have to agree with you on that im probably not yet ready to develop one yet, but hopefully someday I will be at that level of understanding. But thanks for your answer it helps.
AlexW.H.B.