Package ch.bailu.gtk.gtk
Klasse NativeDialog
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gtk.NativeDialog
- Alle implementierten Schnittstellen:
PointerInterface
- Bekannte direkte Unterklassen:
FileChooserNative
Base class for platform dialogs that don't use `GtkDialog`.
Native dialogs 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.
Native dialogs 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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
destroy()
Destroys a dialog.static ClassHandler
static int
boolean
getModal()
Returns whether the dialog is modal.static long
static TypeSystem.TypeSize
getTitle()
Gets the title of the `GtkNativeDialog`.Fetches the transient parent for this window.static long
static TypeSystem.TypeSize
boolean
Determines whether the dialog is visible.void
hide()
Hides the dialog if it is visible, aborting any interaction.onResponse
(NativeDialog.OnResponse signal) Connect to signal "response".void
setModal
(boolean modal) Sets a dialog modal or non-modal.void
Sets the title of the `GtkNativeDialogvoid
Sets the title of the `GtkNativeDialogvoid
setTransientFor
(Window parent) Dialog windows should be set transient for the main application
window they were spawned from.void
show()
Shows the dialog on the display.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
Konstruktordetails
-
Methodendetails
-
getClassHandler
-
destroy
public void destroy()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 `GtkNativeDialog`. -
getModal
public boolean getModal()Returns whether the dialog is modal.- Gibt zurück:
- %TRUE if the dialog is set to be modal
-
getTitle
Gets the title of the `GtkNativeDialog`.- Gibt zurück:
- 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.
-
getTransientFor
Fetches the transient parent for this window.- Gibt zurück:
- the transient parent for this window, or %NULL if no transient parent has been set.
-
getVisible
public boolean getVisible()Determines whether the dialog is visible.- Gibt zurück:
- %TRUE if the dialog is visible
-
hide
public void hide()Hides the dialog if it is visible, aborting any interaction.
Once this is called the [signal@Gtk.NativeDialog::response] signal
will *not* be emitted until after the next call to
[method@Gtk.NativeDialog.show].
If the dialog is not visible this does nothing. -
setModal
public void setModal(boolean 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 [method@Gtk.NativeDialog.set_transient_for] to make
the dialog transient for the parent; most window managers will
then disallow lowering the dialog below the parent.- Parameter:
modal
- whether the window is modal
-
setTitle
Sets the title of the `GtkNativeDialog.`- Parameter:
title
- title of the dialog
-
setTitle
Sets the title of the `GtkNativeDialog.`- Parameter:
title
- title of the dialog
-
setTransientFor
Dialog windows should be set transient for the main application
window they were spawned from.
This allows window managers to e.g. keep the dialog on top of the
main window, or center the dialog over the main window.
Passing %NULL for @parent unsets the current transient window.- Parameter:
parent
- parent window
-
show
public void show()Shows the dialog on the display.
When the user accepts the state of the dialog the dialog will
be automatically hidden and the [signal@Gtk.NativeDialog::response]
signal will be emitted.
Multiple calls while the dialog is visible will be ignored. -
onResponse
Connect to signal "response".
SeeNativeDialog.OnResponse.onResponse(int)
for signal description.
FieldSIGNAL_ON_RESPONSE
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-