aui notebook prevent closing tab that's not current selection

I’m using aui notebook with style AUI_NB_CLOSE_ON_ALL_TABS so user can close tabs no longer needed without first selecting the tab.
But I need to check with the page first to make sure there are no outstanding actions, and if so call event.Veto.

Is there a way to determine which tab’s close button has been clicked?

Calling GetSelection() gives me the current active tab, not the one whose close button was clicked.