Which GUI toolkit for editor?

Started by
25 comments, last by Chetanhl 13 years, 5 months ago
Hi guys,

I have a big question that will influence my work for the next years. I have a little 3D-Engine, writte in C++ and DirectX11. Now I want to write an 3D-editor (kinda like crytek's sandbox, but obviously less advanced) and I just can't decide with GUI toolkit I should use.

These are my candidates and my thoughts about them:

WinForms: I like it. But if I use WinForms I definitely will use C# and now I have the problem how to call my native C++ Engine Code from C#. Since my editor uses almost the entire engine I had to write C++/CLI wrappers around HUGE parts of my C++ engine. Basically I end up having my engine in 2 versions (native and C++/CLI wrapper around everything). Sounds tedious and frustrating:(

WPF: Sounds really cool, but basically the same native-wrapper problem as with WinForms.

QT: From all C++ Toolkits I have seen this looks the best (in terms of window presentation and code). Though it looks like the newest version does not work with DX11?

MFC: Old, ugly, but I could use my native C++ code as it is without any wrappers and performance hits.

As you can see I am kinda lost here. I would love to use WPF or Winforms with C# for my GUI, but the managed/unmanaged boundary problems sounds huge for me. On the other side are the native C++ toolkits, but none of them seems promising to me.

So could you guys tell me your thoughts about this or maybe even share your experiences? What would you recommend me?

Thanks!
Advertisement
Most UI toolkits leave some degree of nasty aftertaste in my experience, but if I had to choose a native one, I'd go with Qt. I doubt it would be too hard to hack in DX11 support if you start with the existing DX stuff.
One other choice you omitted is wxwidgets, however, I (funnily enough) just started working on my wxwidgets editor again recently, and I absolutely despise it, so I just gave up with it. It's probably just because I'm so used to laying out stuff easily in winforms. So personally I've gone back to doing it in C#. In regards to the CLR wrapper, you probably won't have to wrap as much as you think. Most of the work can be done on the C++ side with the C# side giving input, which often isn't all that much. It'd be things like telling it to select an object with a ray cast (all you actually pass is the mouse coordinates) and such. It really should be quite thin. Just a thought.
When i started making my application, i looked at wxWidgets and Qt. Qt won hands-down. It's more than just a GUI toolkit, it's a full application framework, and it makes creating both GUIs and application back-end a lot easier.
[Window Detective] - Windows UI spy utility for programmers
Quote:It's probably just because I'm so used to laying out stuff easily in winforms

wxWidgets has addons for Codeblocks (wxSmith and wxFormBuilder )so that you can generate GUIs using WYSIWYG editors, it has the added benefit of being C++ which you want, uses native controls and does its best to conform to any specified GUI guidelines for the OS.

If you want C++ and the kitchen sink then use Qt else I recommend wxWidgets.
I tend to agree with knighty33, but I would also challenge you as to why you're writing an engine. Are you trying to make a game, trying to enter the 3rd party engine market, or is it just a hobby and you're really only interesting in tinkering and not making a game?

if it's either of the first two, I'd call you silly and tell you to use something like Unity or UDK.

If it's the third, well, I agree with knighty33, failing that, Qt.
Quote:Original post by XTAL256
...i looked at wxWidgets and Qt. Qt won hands-down. It's more than just a GUI toolkit, it's a full application framework...

Well, actually, so is wxWidgets. At least, it does a lot more than GUI. It has its own string, containers, streams, network stuff, file classes, etc.

Not that that's necessarily a good aspect of wxWidgets. Having used it in the past, I can say its OK, but if I was starting a new project I would use QT.

MFC is old and a little cryptic, what with all those macros... but it is still updated by Microsoft, they recently added support for ribbon menus, for example. If you don't need complex compound controls, I would seriously consider this path.

Qt is good and complete, but it is a commercial library, and as such, the use of the free version has a few legal limitations. In addition, you have to use a pre-compiler so your code is not fully stand-alone. I doubt any of this is going to be an issue to anyone here, but this is certainly worth a mention.
If you want a free solution, Qt.
I have no development experience with Qt yet, but I read a lot about it (forum posts, documents) and seems it's the best choice for free GUI/app framework. Its framework is so good designed.

If you don't mind to pay a lot of money, C++ builder.
I had a lot of experience with Delphi (same GUI environment with C++ Builder) and it's really good.
But in my opinion, Delphi and C++ builder may be fading out the main stream stage...

So I highly recommend Qt. And I myself will also use Qt if I need to create an editor in C++.


@Bearhugger: Qt now is completely free for any use. They had changed the license for commercial use.

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.

Quote:Original post by BearhuggerIn addition, you have to use a pre-compiler so your code is not fully stand-alone.

Cite please. Google tells me nothing about this:
qt build precompiler.

This topic is closed to new replies.

Advertisement