Unfortunately, here is no instruction for doing that.
You could look through
the actual code and compare the GUI commands to the Garry's mod wiki on gui commands.
I believe Stickly man did most of the GUI code statically.
Over time, XGUI has included gui features from many years of Gmod GUI including pre-Derma, Derma, and GWEN