NativeDialog

open class NativeDialog(pointer: <Error class: unknown class><<Error class: unknown class>>)

Native dialogs are platform dialogs that don't use GtkDialog.

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 class@Gtk.Dialog 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 signal@Gtk.NativeDialog::response signal when the user finished with the dialog.

Note that unlike GtkDialog, GtkNativeDialog 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.

Skipped during bindings generation

  • method title: Property TypeInfo of getter and setter do not match

Inheritors

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkNativeDialogPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var modal: Boolean

Whether the window should be modal with respect to its transient parent.

Link copied to clipboard
open var transientFor: Window?

The transient parent of the dialog, or null for none.

Link copied to clipboard
open val visible: Boolean

Whether the window is currently visible.

Functions

Link copied to clipboard
fun connectResponse(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (responseId: Int) -> Unit): <Error class: unknown class>

Emitted when the user responds to the dialog.

Link copied to clipboard
open fun destroy()

Destroys a dialog.

Link copied to clipboard
open fun getModal(): Boolean

Returns whether the dialog is modal.

Link copied to clipboard
open fun getTitle(): String?

Gets the title of the GtkNativeDialog.

Link copied to clipboard
open fun getTransientFor(): Window?

Fetches the transient parent for this window.

Link copied to clipboard
open fun getVisible(): Boolean

Determines whether the dialog is visible.

Link copied to clipboard
open fun hide()

Hides the dialog if it is visible, aborting any interaction.

Link copied to clipboard
open fun setModal(modal: Boolean)

Sets a dialog modal or non-modal.

Link copied to clipboard
open fun setTitle(title: String)

Sets the title of the GtkNativeDialog.

Link copied to clipboard
open fun setTransientFor(parent: Window? = null)

Dialog windows should be set transient for the main application window they were spawned from.

Link copied to clipboard
open fun show()

Shows the dialog on the display.