Class: Gtk::NativeDialog
- Inherits:
-
Object
- Object
- Gtk::NativeDialog
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#destroy ⇒ nil
Destroys a dialog.
-
#hide ⇒ nil
Hides the dialog if it is visilbe, aborting any interaction.
-
#modal ⇒ TrueClass
Returns whether the dialog is modal.
-
#modal=(modal) ⇒ TrueClass
Whether the window should be modal with respect to its transient parent.
-
#modal? ⇒ TrueClass
Whether the window should be modal with respect to its transient parent.
-
#run ⇒ Integer
Blocks in a recursive main loop until self emits the Gtk::NativeDialog::response signal.
-
#show ⇒ nil
Shows the dialog on the display, allowing the user to interact with it.
-
#title ⇒ String
The title of the dialog window.
-
#title=(title) ⇒ String
The title of the dialog window.
-
#transient_for ⇒ Gtk::Window
The transient parent of the dialog, or nil for none.
-
#transient_for=(transient_for) ⇒ Gtk::Window
The transient parent of the dialog, or nil for none.
-
#visible ⇒ TrueClass
Determines whether the dialog is visible.
-
#visible=(visible) ⇒ TrueClass
Whether the window is currenlty visible.
-
#visible? ⇒ TrueClass
Whether the window is currenlty visible.
Instance Method Details
#destroy ⇒ nil
Destroys a dialog.
When a dialog is destroyed, it will break any references it holds to other objects. If it is visible it will be hidden and any underlying window system resources will be destroyed.
Note that this does not release any reference to the object (as opposed to destroying a GtkWindow) because there is no reference from the windowing system to the Gtk::NativeDialog.
#hide ⇒ nil
Hides the dialog if it is visilbe, aborting any interaction. Once this is called the Gtk::NativeDialog::response signal will not be emitted until after the next call to gtk_native_dialog_show().
If the dialog is not visible this does nothing.
#modal ⇒ TrueClass
Returns whether the dialog is modal. See gtk_native_dialog_set_modal().
#modal=(modal) ⇒ TrueClass
Whether the window should be modal with respect to its transient parent.
#modal? ⇒ TrueClass
Whether the window should be modal with respect to its transient parent.
#run ⇒ Integer
Blocks in a recursive main loop until self emits the Gtk::NativeDialog::response signal. It then returns the response ID from the ::response signal emission.
Before entering the recursive main loop, gtk_native_dialog_run() calls gtk_native_dialog_show() on the dialog for you.
After gtk_native_dialog_run() returns, then dialog will be hidden.
Typical usage of this function might be:
gint result = gtk_native_dialog_run (GTK_NATIVE_DIALOG (dialog));
switch (result)
{
case GTK_RESPONSE_ACCEPT:
do_application_specific_something ();
break;
default:
do_nothing_since_dialog_was_cancelled ();
break;
}
g_object_unref (dialog);
Note that even though the recursive main loop gives the effect of a modal dialog (it prevents the user from interacting with other windows in the same window group while the dialog is run), callbacks such as timeouts, IO channel watches, DND drops, etc, will be triggered during a gtk_nautilus_dialog_run() call.
#show ⇒ nil
Shows the dialog on the display, allowing the user to interact with it. When the user accepts the state of the dialog the dialog will be automatically hidden and the Gtk::NativeDialog::response signal will be emitted.
Multiple calls while the dialog is visible will be ignored.
#title ⇒ String
The title of the dialog window
#title=(title) ⇒ String
The title of the dialog window
#transient_for ⇒ Gtk::Window
The transient parent of the dialog, or nil for none.
#transient_for=(transient_for) ⇒ Gtk::Window
The transient parent of the dialog, or nil for none.
#visible ⇒ TrueClass
Determines whether the dialog is visible.
#visible=(visible) ⇒ TrueClass
Whether the window is currenlty visible.
#visible? ⇒ TrueClass
Whether the window is currenlty visible.