How do I create Popupmenus with API ?

And add the contents of the Start Menu to it ?