gtk.native_dialog
Module for [NativeDialog] class
Types 3
Native dialogs are platform dialogs that don't use #GtkDialog or #GtkWindow. 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 #GtkDialog functions cannot be used on such objects, but we need a similar API in order to drive them. The #GtkNativeDialog 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 #GtkNativeDialog::response signal when the user finished with the dialog.
There is also a [gtk.native_dialog.NativeDialog.run] helper that makes it easy to run any native dialog in a modal way with a recursive mainloop, similar to [gtk.dialog.Dialog.run].
NativeDialog self()Returns `this`, for use in `with` statements.NativeDialogGidBuilder builder()Get builder for [gtk.native_dialog.NativeDialog] Returns: New builder objectbool 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.void title(string propval) @propertySet `title` property. Params: propval = The title of the dialog windowgtk.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.void visible(bool propval) @propertySet `visible` property. Params: propval = Whether the window is currenlty visible.void destroy()Destroys a dialog.bool getModal()Returns whether the dialog is modal. See [gtk.native_dialog.NativeDialog.setModal]. Returns: true if the dialog is set to be modalstring getTitle()Gets the title of the #GtkNativeDialog. 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 modified or freed.gtk.window.Window getTransientFor()Fetches the transient parent for this window. See [gtk.native_dialog.NativeDialog.setTransientFor]. 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 visiblevoid hide()Hides the dialog if it is visilbe, aborting any interaction. Once this is called the #GtkNativeDialog::response signal will not be emitted until after the next call to [gtk.native_dialog.NativeDia...int run()Blocks in a recursive main loop until self emits the #GtkNativeDialog::response signal. It then returns the response ID from the ::response signal emission.void setModal(bool modal)Sets a dialog modal or non-modal. Modal dialogs prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use [gtk.native_dialog.Nati...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. This allows [window managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window, or cent...void show()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 #GtkNativeDialog::response sign...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.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 chainingT title(string propval)Set `title` property. Params: propval = The title of the dialog window Returns: Builder instance for fluent chainingT 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 chainingT visible(bool propval)Set `visible` property. Params: propval = Whether the window is currenlty visible. Returns: Builder instance for fluent chainingFluent builder for [gtk.native_dialog.NativeDialog]