def _close_event( self, event ) :
        """internal method - closes all menus of this object if event
        was mouse leftt click outside all menus or was Escape on any
        selectable menu widget. If it was Escape, only the current menu
        and any children are closed. If it was a mouse click,everything is
        closed
        """

        if event.keysym != 'Escape' :
           # mouse click - pass to highest level menu, so close will get
            # to everything
            if self._parent :
                self._parent._close_event( event )
                return
            # we're the top level menu and we've seen a mouse click, see if
            # it's within our frame or a child or ours'
            x = int( event.x_root )
            y = int( event.y_root )
            if self._is_my_window( x, y ) :
                return

            child = self._child
            while child :
                if child._is_my_window( x, y ) :
                    # bail out without action if mouse click was within a child
                    return
                child = child._child

        # in all other cases, close this menu and its children
        self.unpost()
internal method - closes all menus of this object if event
        was mouse leftt click outside all menus or was Escape on any
        selectable menu widget. If it was Escape, only the current menu
        and any children are closed. If it was a mouse click,everything is
        closed
        
recipes/Python/442500_ExtraMenu__TkInter_menu_arbitrary_widgets/recipe-442500.py