[gtkmm] Trapping/cancelling window close events

I'm wondering how to trap window close events in order to, for example,
present a typical 'Save, Discard, or Cancel' dialog to the user.
Application generated events are, of course, easy to handle, since I can
just put code before the hide() call. I'm more concerned with when the
user uses a window decoration to close the window. The documentation
doesn't even mention this as a possibility. I think I could provide Save
or Discard by connecting to signal_hide, but since it returns void,
there's no way to cancel the close. Is there a way to do this? 

Jeffrey Yasskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]