Alex has written several GUI externals. I think he can give you some
pointers or link to some examples that might be more relevant for what
you want to do. Alternatively, you can look at the Pd source code itself.
This is what I've been doing, looking at source code of Vanilla's GUI and externals, but I have to say my knowledge is pretty limited. The keyboard GUI was the first in my library but someone else had coded it, I developed on it. Most of my GUIs are pretty simple and I still have to learn how to properly code properties windows. I also design GUIs with data structures because I still find it very hard to code GUIs myself, for instance, [slider2d], [multislider] and many others (most of my GUIs are actually just abstractions).
So, if anyone knows of a good tutorial on how to write GUIs in Pd, I'd love that too, hahahaha
cheers