# # Bindings for Menubuttons. # # Menubuttons have three interaction modes: # # Pulldown: Press menubutton, drag over menu, release to activate menu entry # Popdown: Click menubutton to post menu # Keyboard: or accelerator key to post menu # # (In addition, when menu system is active, "dropdown" -- menu posts # on mouse-over. Ttk menubuttons don't implement this). # # For keyboard and popdown mode, we hand off to tk_popup and let # the built-in Tk bindings handle the rest of the interaction. # # ON X11: # # Standard Tk menubuttons use a global grab on the menubutton. # This won't work for Ttk menubuttons in pulldown mode, # since we need to process the final event, # and this might be delivered to the menu. So instead we # rely on the passive grab that occurs on