gtk.native_dialog

Module for [NativeDialog] class

Types 3

Native dialogs are platform dialogs that don't use [gtk.dialog.Dialog].

They are used in order to integrate better with a platform, by looking the same as other native applications and supporting platform specific features.

The [gtk.dialog.Dialog] functions cannot be used on such objects, but we need a similar API in order to drive them. The [gtk.native_dialog.NativeDialog] object is an API that allows you to do this. It allows you to set various common properties on the dialog, as well as show and hide it and get a [gtk.native_dialog.NativeDialog.response] signal when the user finished with the dialog.

Note that unlike [gtk.dialog.Dialog], [gtk.native_dialog.NativeDialog] objects are not toplevel widgets, and GTK does not keep them alive. It is your responsibility to keep a reference until you are done with the object.

Methods
GType _gType() @property
NativeDialog self()Returns `this`, for use in `with` statements.
NativeDialogGidBuilder builder()Get builder for [gtk.native_dialog.NativeDialog] Returns: New builder object
bool modal() @propertyGet `modal` property. Returns: Whether the window should be modal with respect to its transient parent.
void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the window should be modal with respect to its transient parent.
string title() @propertyGet `title` property. Returns: The title of the dialog window
void title(string propval) @propertySet `title` property. Params: propval = The title of the dialog window
gtk.window.Window transientFor() @propertyGet `transientFor` property. Returns: The transient parent of the dialog, or null for none.
void transientFor(gtk.window.Window propval) @propertySet `transientFor` property. Params: propval = The transient parent of the dialog, or null for none.
bool visible() @propertyGet `visible` property. Returns: Whether the window is currently visible.
void visible(bool propval) @propertySet `visible` property. Params: propval = Whether the window is currently visible.
void destroy()Destroys a dialog.
bool getModal()Returns whether the dialog is modal. Returns: true if the dialog is set to be modal
string getTitle()Gets the title of the [gtk.native_dialog.NativeDialog]. Returns: the title of the dialog, or null if none has been set explicitly. The returned string is owned by the widget and must not be modifie...
gtk.window.Window getTransientFor()Fetches the transient parent for this window. Returns: the transient parent for this window, or null if no transient parent has been set.
bool getVisible()Determines whether the dialog is visible. Returns: true if the dialog is visible
void hide()Hides the dialog if it is visible, aborting any interaction.
void setModal(bool modal)Sets a dialog modal or non-modal.
void setTitle(string title)Sets the title of the `GtkNativeDialog.`
void setTransientFor(gtk.window.Window parent = null)Dialog windows should be set transient for the main application window they were spawned from.
void show()Shows the dialog on the display.
gulong connectResponse(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.native_dialog.NativeDialog))) && Parameters!T.length < 3)Connect to `Response` signal.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
T modal(bool propval)Set `modal` property. Params: propval = Whether the window should be modal with respect to its transient parent. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = The title of the dialog window Returns: Builder instance for fluent chaining
T transientFor(gtk.window.Window propval)Set `transientFor` property. Params: propval = The transient parent of the dialog, or null for none. Returns: Builder instance for fluent chaining
T visible(bool propval)Set `visible` property. Params: propval = Whether the window is currently visible. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.native_dialog.NativeDialog]