The ITextView interface contains a Closed event that is raised after a text view has been closed. But, is it also possible somehow to subscribe to a Closing event, that tells us that a text view is about to close? Just after the user has pressed the close button. It should also be possible to cancel the close operation.
I would like to show a similar pop-up window like the save popup that is shown when the document still has unsaved changes, but with a different purpose.