org.gnome.gtk
Interface Window.DELETE
- GtkWidget.DELETE_EVENT
public static interface Window.DELETE
extends GtkWidget.DELETE_EVENT
This signal arises when a user tries to close a top level window. As
you would expect, the default handler for this signal destroys the
Window.
If you want to prevent a Window from being closed, connect this signal,
and return
true
. Often the reason to do this is to pop
up a notification Dialog, for example asking you if you want to save an
unsaved document. Another technique is reusing a Window: rather than
going to all the trouble to create this Window again, you can just
temporarily hide it by calling
Widget's hide()
.
This signal is actually "delete-event" which lives on GtkWidget.
That, however, is for implementation reasons in GTK because all the
GdkEvents go to GtkWidget even though this particular signal only has
to do with Windows. So, we expose it here.
- Andrew Cowie
- Devdas Bhagat
onDeleteEvent
public boolean onDeleteEvent(Widget source,
Object event)
|  java-gnome |