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.
NativeDialogGidBuilder builder() static nothrowGet builder for [gtk.native_dialog.NativeDialog] Returns: New builder objectbool modal() @property nothrowGet `modal` property. Returns: Whether the window should be modal with respect to its transient parent.void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the window should be modal with respect to its transient parent.void title(string propval) @property nothrowSet `title` property. Params: propval = The title of the dialog windowgtk.window.Window transientFor() @property nothrowGet `transientFor` property. Returns: The transient parent of the dialog, or null for none.void transientFor(gtk.window.Window propval) @property nothrowSet `transientFor` property. Params: propval = The transient parent of the dialog, or null for none.bool visible() @property nothrowGet `visible` property. Returns: Whether the window is currenlty visible.void visible(bool propval) @property nothrowSet `visible` property. Params: propval = Whether the window is currenlty visible.bool getModal() nothrowReturns whether the dialog is modal. See [gtk.native_dialog.NativeDialog.setModal]. Returns: true if the dialog is set to be modalstring getTitle() nothrowGets 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() nothrowFetches 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() nothrowDetermines whether the dialog is visible. Returns: true if the dialog is visiblevoid hide() nothrowHides 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() nothrowBlocks 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) nothrowSets 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 setTransientFor(gtk.window.Window parent = null) nothrowDialog 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() nothrowShows 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) nothrowConnect to `Response` signal.Fluent builder implementation template for gtk.native_dialog.NativeDialog
T modal(bool propval) nothrowSet `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) nothrowSet `title` property. Params: propval = The title of the dialog window Returns: Builder instance for fluent chainingT transientFor(gtk.window.Window propval) nothrowSet `transientFor` property. Params: propval = The transient parent of the dialog, or null for none. Returns: Builder instance for fluent chainingT visible(bool propval) nothrowSet `visible` property. Params: propval = Whether the window is currenlty visible. Returns: Builder instance for fluent chainingFluent builder for gtk.native_dialog.NativeDialog