That someone could write a book on UI programming and someone else would publish a book on UI programming without any actual depictions of UI is pretty much all I need to know about X and its community (although I know a lot more, and my actual exposure to X goes back to early versions that came on 9-track tapes directly from MIT and supported mostly just frame buffers on DEC Vaxen).
(For years -- and this may still be true -- the software to manage the equipment in Comcast's head end datacenters was controlled by some X-based UI. Now, I ain't gonna say "Them folks surely deserve it, because they done me wrong" but that miserable train-wreck of a system goes a long way towards explaining why it's often hard for Comcast to fix their stuff. I have un-fond memories of taking down whole QAMs because I was fool enough to click some check boxes in a dialog in the wrong order...)
You can write hideous UI in just about anything, but X seems to have a special place in the ecosystem.
Then TCL/Tk came along and emulated Motif's look and feel, only better because its default color was bisque.
"Bisque is Beautiful"
http://www.ucolick.org/~de/Tcl/pictures/
"The procedure tk_bisque is provided for backward compatibility: it restores the application's colors to the light brown (“bisque”) color scheme used in Tk 3.6 and earlier versions."
https://www.tcl.tk/man/tcl/TkCmd/palette.htm
http://mars.cs.utu.fi/BioInfer/files/doc/public/Tkinter.Misc...
I've written software that uses both and I don't remember thinking that one was significantly easier than the other, I did dislike that they took control of the main loop, Plan9's method of synchronous event polling is much nicer IMO.
And yeah it is heavier than Motif. It does a lot more with it, though. Whether you think those things are valuable or not presumably depends on what software you use and your own sense of aesthetics.
Also when GTK+ was created, Motif was proprietary. There was Lesstif, but if I recall correctly that wasn't all that good, so there was a good incentive to develop a Free Software GUI toolkit.
And Motif is based on that very same code.
http://www.art.net/studios/hackers/hopkins/Don/unix-haters/x...
At one point I got frustrated and hacked the window manager (probably piewm) so I could pass it a command line parameter telling it the window ID on which to run instead of the root framebuffer, and then I ran it on the XCalc window, so I got window frames around all the buttons and could pop up menus on them, move them back to where they belonged, resize them, iconify them, etc.
Yay ICCCM! How powerful! It was totally worth ICCM being that complicated and pushing all that complexity into every other toolkit and application, just in order to make that trick possible just once.
you know what, I love http://www.crynwr.com/piewm/ screens a lot. I'm deep into a retro 8bit mindset these days. Very fitting.
Alas I never had to write code for it, but I like the idea and look.
Here's a version of the original X10 "uwm" window manager from which "piewm" is a distant descendent (pre-ICCCM, for X10, not X11), that I hacked to implement my original version of pie menus, and then integrated with FORTH, so you could program the window manager in FORTH (foreshadowing programming NeWS in PostScript), and even fork off light weight FORTH tasks to bounce the windows around!
http://www.donhopkins.com/home/archive/piemenu/uwm1/
http://www.donhopkins.com/home/archive/piemenu/uwm1/fuwm-mai...
Here's the bouncy window code, including some reverse polish notation 68k assembler code for 256/ and 256*:
funny http://www.donhopkins.com/home/archive/piemenu/uwm1/call-ema... ;)
ps: I couldn't locate the actual exec_string that interpret Forth
That code you linked to is from Mitch Bradley's "Forthmacs", which ran on Sun workstations including 68k i86 and SPARC, and also Atari ST, Mac and other systems. He developed it into the "Open Boot ROM" architecture, which was used in Sun workstations and Apple PowerPC Macs as well as the OLPC children's laptop.
https://github.com/ForthHub/ForthFreak/blob/master/Forthmacs
https://en.wikipedia.org/wiki/Open_Firmware
http://wiki.laptop.org/go/Open_Firmware
On SunOS, Forthmacs had a library clink.f with the ability to dynamically relocate and link Unix libraries so that you could call them from Forthmacs, pass arguments on the stack, etc. SunOS didn't actually support shared libraries or dynamic address relocating at that time, so Forthmacs simply ran the Unix linker utility to create a file with the library relocated to the desired address space in the FORTH dictionary, and then read that file into memory, define its symbols in the FORTH dictionary, and let you access its variables and call its functions directly from FORTH!
That's how Mitch originally integrated MicroEmacs with Forth to make Forthmacs, and how I later integrated "uwm" into FORTH: I refactored uwm so instead of having an event loop in the main function, it was a library that could be called by FORTH, which would link the library in and run the main loop itself, calling into the library as needed to initialize and handle specific events (_uwm_init, _uwm_poop).
http://www.donhopkins.com/home/archive/piemenu/uwm1/fuwm-mai...
Here's the glue that links in the uwm library from fuwm.out:
http://www.donhopkins.com/home/archive/piemenu/uwm1/load-fuw...
.( Loading...) cr
requires tasking.f
requires uwm.f
requires clink.f
.( Linking...) cr
"" fuwm.out clink
.( Linked!) crYour xcalc screen shot made me think of that and smile a bit.