Is it possible to add a custom UI element to Blender with a custom, Python-defined design? For me that sounds like quite a basic task regarding how deep Python integration in Blender has gone. But I did not find any handy solution…
I see two ways to add custom UI element in Blender:
OpenGL: you can draw with the opengl wrapper https://docs.blender.org/api/2.78b/bgl.html
The preferred method because you do not need external libraries and this is very well integrated into Blender
Use external UI libraries like Qt and GTK.
It could not be easy to implement and will require a different setup/binary installation on each OS.
Hm, for 2. I have basically no idea on how to tell Blender that my new Qt or GTK-widget exists or how to integrate it in the Blender interface. I understand how to draw using 1., but there stays the problem on how to tell the Blender GUI layout system that a new widget exists. That is important because otherwise my addon cannot know where to draw the widget without possibly overdrawing another one.
The basic workaround would be to design a widget that does not integrate in the UI but is drawn on fixed coordinates somewhere on screen. That could become let’s say context-dependent annoying.