What tools are used to create complex GUIs?

I've been learning programming for a couple years now and I want to start building some larger applications with more complex GUIs.

I'm aware of wigdet toolkits like qt and gtk for simpler more static things. And on the other end of the spectrum you could use openGL or SDL for games and the like.

But what do applications use in the middle. Something like a text editor (or IDE) or something like blender. Surely emacs, intellij, and sublime aren't opening an openGL instance and starting up your graphics card but at the same time is the text editing area possible in QT or swing? Is it really coded in pure X? If I wanted to create my own IDE (for educational purposes, not for real use) how would I go about implementing the GUI? Are there libraries for these more dynamic but not 3D graphics use cases or am I missing some of qt's use cases. Can you recommend any good learning resources?

Posted Aug 3, 2015, 7:38 AM UTC

1310
Tempus13•

Blender does it all through opengl.

Other than that trivia fact I have nothing left to contribute

7
fandingo•

They do the canvas in OpenGL, but the rest of the UI is GTK+.

5
[deleted]•

[deleted]

1
AiwendilH•

Since when? As far as I know blender uses an own toolkit intern....it doesn't depend on gtk at all. I can only check version 2.72 as that is the last one in portage and it has no gtk dependency..or dependency on any other toolkit. I can't imagine them changing that in the last three versions. Some years ago there were some plans to make that blender toolkit available as library for other programs as well...but I don't think there was much progress with that plan.

1
AiwendilH•

As u/Tempus13 said....blender is not exactly the "standard". First blender is old...really, really old. When the first versions of blender appeared there simply were no free and usable toolkits for linux. And second blender is a very specific tools with specific requirements...so in their case it made a lot of sense to build an own toolkit right on top of openGL. But that is really not the norm....

Games usually either use a simplified toolkit on top of openGL like fltk or also build their own toolkit. It's just that the majority of games hardly need UI widgets and those they use are pretty simple compared to what full blown toolkits like gtk or qt offer. It would be a waste of resources to use those complex toolkits.

But almost everything else is build upon toolkits like gtk or qt...often with additions even. For an IDE have a look at Kdevelop which is build upon qt and parts of the KDE framework or Gnome builder that is just developed on top of gtk and some gnome libs. If you are interested in programs integrating 3d graphics with toolkits...have a look at k3d maybe..though I think that one is still based on gtk2.

And as you mention qt a few times...the qt examples can give some nice insight what is actually possible with qt..like using qt controls to manipulate a 3d view or using effects on qt widgets.

6
tmewett•

Yes, complex apps can be made in these GUI libraries. You should look into Scintilla; it's a text-editor lib for GTK.

Making apps right on top of X is pretty rare.

3
srivats2•

Qt creator is an ide that is built on qt and all draws even in X are eventually translated to hardware calls..

(Wayland shall remove the "eventually" part of the pipeline by more lower and direct access to the hardware)

I am not sure of what that middle is though that you are describing. I personally use Qt a lot including for more complex guis that interact with a wide host of other code (a large tiled image viewer with options to display trajectories and complex overlays as an example)

2
Jasper1984•

HTML, CSS, javascript, a server, and a browser.

Believe there is a nodejs thingy that puts it in a window.(skipping the server) If it is server-able,(...why wouldnt it be) and you want GPL or something, consider AGPL.

If you like lua, wrote some Pegasus stuff to easily map over functions, and a way to make luakit chrome pages immediately server-able with pegasus.

Advantage is that users can chose any browser, and addons might work immediately if used as server. Coding it is fairly easy and transferrable skills. HTML very flexible. To some extent it'd be usable via a server.(though it might not perform well edit: though for a local server that'd be fine, of course)

Disadvantages: To some extent it'd be usable as a server, allowing dickwads to use it via "clouds".(hence AGPL, to force them to at least give back, hopefully) It might not look "native", it requires a browser. Might not easily fit into games.

1
grumbel•

Most atypical GUIs either just do it in raw OpenGL (Blender) or use Gtk+/Qt with a lot of custom widgets and custom drawing code (Emacs, Firefox).

There are also toolkits to deal with fancier UIs, such as Gnome's Clutter, but I don't have much experience with. Enlightenment also has a UI toolkit.

In the commercial video game world almost all the game UIs are done with Scaleform, which is basically a Flash derivative that can work inside a game. However I don't think there is a real Open Source equivalent to that at this point. The closest thing would probably something Qt/WebKit/HTML based with lots of Javascripting or the Clutter/Javascript mix that Gnome uses.

Unless you just need a simple UI for a game, which you can just code directly yourself, it's probably best to just stick with Qt and go from there. If needed you can always write a custom widget or open up an OpenGL context to do fancy stuff in there.

1
synn89•

Qt/GTK are full fledge GUI APIs that you can build complete desktop applications in. Usually people use C/C++ for them, but you can use other languages. I've written apps in PyQt and it worked really well.

Java has a UI called JavaFX(previously Swing) that's used to build desktop applications. The benefit with Java is you can write the application and it'll run on Mac, Windows and Linux without much work.

Most devs these days are targetting the web instead of writing desktop apps. The reason for this is that they end up cross platform this way(even work on mobile) and the end user doesn't have to deal with installing anything. Don't discount the web when it comes to application design. The UI's there are pretty powerful these days.

1
azy2OP•

Yeah, the thing is I want to make a text editor that runs natively. I'm used to emacs and vim and keyboard shortcuts get hijacked by the browser. All online text editors I've used have either been lackluster or wonky. And besides, I'm developing for myself, not a wide audience.

1