'return *True* if *event* should be ignored'

def ignore(self, event):

    if ((not self.active) or (not self.ax.get_visible())):
        return True
    if (not self.canvas.widgetlock.available(self)):
        return True
    if (not hasattr(event, u'button')):
        event.button = None
    if (self.validButtons is not None):
        if (event.button not in self.validButtons):
            return True
    if (self.eventpress is None):
        return (event.inaxes != self.ax)
    if (event.button == self.eventpress.button):
        return False
    return ((event.inaxes != self.ax) or (event.button != self.eventpress.button))
