tk_popup is Tk's method of posting a popup menu. http://www.purl.org/tcl/home/man/tcl8.4/TkCmd/popup.html
Popups act funny on different platforms. Learn how to fix that in the Pragmatic use of Pernicious Popups.
Tk syntax help - Arts and crafts of Tcl-Tk programming - Category Command