Back in the day Blender was basically a pure OpenGL program with all the controls/widgets implemented directly. I guess that's not the case any more. Does it use any kind of widget library now?
I’m sure the little fiddly bits are still done how they always were because it has to work across all the different windowing libs.