
Hi Reece, did you know of the existence of the following list of C++ GUI frameworks? I think they are currently the most important ones. http://www.fltk.org/index.php http://www.fox-toolkit.org/ http://gtkmm.sourceforge.net/ http://inti.sourceforge.net/ http://www.trolltech.com/ http://vcf.sourceforge.net/ http://www.wxwindows.org/ http://www.torjo.com/win32gui/ All of them have some strength and some weaknesses. It may be worth to look at least at the gtkmm, vcf and the win32gui frameworks. Johannes

"Johannes Brunen" <jbrunen@datasolid.de> writes:
Hi Reece,
did you know of the existence of the following list of C++ GUI frameworks? I think they are currently the most important ones.
http://www.fltk.org/index.php http://www.fox-toolkit.org/ http://gtkmm.sourceforge.net/ http://inti.sourceforge.net/ http://www.trolltech.com/ http://vcf.sourceforge.net/ http://www.wxwindows.org/ http://www.torjo.com/win32gui/
And: http://www.nedprod.com/TnFOX/index.html -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

"Johannes Brunen" <jbrunen@datasolid.de> writes:
Hi Reece,
did you know of the existence of the following list of C++ GUI
David Abrahams wrote: frameworks?
I think they are currently the most important ones.
http://www.fltk.org/index.php http://www.fox-toolkit.org/ http://gtkmm.sourceforge.net/ http://inti.sourceforge.net/ http://www.trolltech.com/ http://vcf.sourceforge.net/ http://www.wxwindows.org/ http://www.torjo.com/win32gui/
And: http://notus.sourceforge.net/ (Boost related) http://upp.sourceforge.net/ Regards, Janusz

Hi, Janusz Piwowarski wrote:
Hi Reece,
did you know of the existence of the following list of C++ GUI
frameworks?
http://www.fltk.org/index.php http://www.fox-toolkit.org/ http://gtkmm.sourceforge.net/ http://inti.sourceforge.net/ http://www.trolltech.com/ http://vcf.sourceforge.net/ http://www.wxwindows.org/ http://www.torjo.com/win32gui/
http://notus.sourceforge.net/ (Boost related) http://upp.sourceforge.net/
And WTL - Windows Template Library: http://sourceforge.net/projects/wtl/ The Sourceforge page is not very rich, but you may ask Google for a couple of screenfuls of relevant links. OK, you will write it by yourself anyway. :) I would strongly recommend that you take a look at how the GUI is done in Tcl/Tk (Tkinter in Python is also based on it). It is a complete different language and technology, but using the packer interface is extreme fun and may give you some ideas for your own library development. IMHO, porting Tk to C++ (and I mean extensive use of templates and operator overloading to achieve minimal syntax, not just thin class wrappers) would result in *THE* GUI library for C++. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/

http://www.fltk.org/index.php http://www.fox-toolkit.org/ http://gtkmm.sourceforge.net/ http://inti.sourceforge.net/ http://www.trolltech.com/ http://vcf.sourceforge.net/ http://www.wxwindows.org/ http://www.torjo.com/win32gui/
http://notus.sourceforge.net/ (Boost related) http://upp.sourceforge.net/
And WTL - Windows Template Library: http://sourceforge.net/projects/wtl/
To stop it: ultimate list of all (dozens) known GUI frameworks is on http://www.free-soft.org/guitool/. /Pavel

did you know of the existence of the following list of C++ GUI frameworks?
[snip]
[snip]
I would strongly recommend that you take a look at how the GUI is done in Tcl/Tk (Tkinter in Python is also based on it). It is a complete different language and technology, but using the packer interface is extreme fun and may give you some ideas for your own library development. IMHO, porting Tk to C++ (and I mean extensive use of templates and operator overloading to achieve minimal syntax, not just thin class wrappers) would result in *THE* GUI library for C++.
[Note: I subscribe to one of the mailing lists mentioned in this thread - ie the one mentioned above...] On the FOX mailing list, a number of people subscribe to quite a few of the GUI toolkit mailing lists that have been mentioned. The general consensus was that a templated approach to building GUI's, just doesn't work... and it has been tried a number of times... The main reason is that GUI's require dynamic / run-time binding between different widgets/components. For example: - To bind a mouse click to an onscreen button, you may use a templated approch to the binding. - Then you would like a keyboard shortcut to be bound to the same event -> no problem, as both of these cases can be coded by end-programmer. In particular, it works because the library knows about these event types. What happens if you decide to embed the Gecko HTML redering engine inside a window frame (ie so that it saves you from having to build your own HTML rendering engine)? The problem is that you have to dynamically route messages from the foreign window, into you own event processing mechanism - which simply doesn't work with a compile-time approach. Admittedly, this is a contrived example, but the premise holds for a number of common usage scenarios. Also, static event mapping systems result in a N x M mapping of events to widgets. If you have say 20 event types and 100 widgets, you end up with 200 combinations of actions that need to be coded by the end-programmer. Dynamic binding allows some toolkits to make this an N + M problem, which greatly reduces the size of your end-programmer code that needs to be written. All that said, we are welcome to try as there are definately some pieces of widget functionality (eg event map creation) that are currently done a runtime (usually application startup), which could probably be moved to compile-time. I personally wouldn't mind seeing a toolkit which uses templates. On a slightly different note, as someone else mentioned, and I would aggree with, programming GUI's using listeners (Java style) is more work than using an event handling mechanism. regards, Mathew Robertson

On the FOX mailing list, a number of people subscribe to quite a few of the GUI toolkit mailing lists that have been mentioned. The general consensus was that a templated approach to building GUI's, just doesn't work... and it has been tried a number of times... The main reason is that GUI's require dynamic / run-time binding between different widgets/components.
How about win32gui ;) ? Note that it's Windows specific.
For example:
- To bind a mouse click to an onscreen button, you may use a templated approch to the binding.
Got that right! More specifically, take a look at how I allow handling of events for win32gui. I requires no message loop.
- Then you would like a keyboard shortcut to be bound to the same event
-> no problem, as both of these cases can be coded by end-programmer. In particular, it works because the library knows about these event types.
Not necessary. Actually, I need not know of any events. The programmer knows which event/command/notification to bind to, and it simply does so. Example: handle_event on_size( [some_args]) { .... return event<WM_SIZE>().HANDLED_BY(&me::on_size); } (note: I only comment here for Win32 issues. You might be right for cross-platform issues though)
What happens if you decide to embed the Gecko HTML redering engine inside a window frame (ie so that it saves you from having to build your own HTML rendering engine)? The problem is that you have to dynamically route messages from the foreign window, into you own event processing mechanism - which simply doesn't work with a compile-time approach. Admittedly, this is a contrived example, but the premise holds for a number of common usage scenarios.
Why would you say that? See above.
Also, static event mapping systems result in a N x M mapping of events to widgets. If you have say 20 event types and 100 widgets, you end up with 200 combinations of actions that need to be coded by the end-programmer. Dynamic binding allows some toolkits to make this an N + M problem, which greatly reduces the size of your end-programmer code that needs to be written.
Note: I think I've solved this problem with the way win32gui is handing events. Also note that there is so much more to GUI programming than events. Best, John -- John Torjo Freelancer -- john@torjo.com Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -- v1.3beta released - check out splitter/simple_viewer, a File Explorer/Viewer all in about 200 lines of code! Professional Logging Solution for FREE -- http://www.torjo.com/code/logging.zip (logging - C++) -- http://www.torjo.com/logview/ (viewing/filtering - Win32) -- http://www.torjo.com/logbreak/ (debugging - Win32)
participants (7)
-
David Abrahams
-
Janusz Piwowarski
-
Johannes Brunen
-
John Torjo
-
Maciej Sobczak
-
Mathew Robertson
-
Pavel Vozenilek