Class AppChooserDialog

All Implemented Interfaces:
PointerInterface

public class AppChooserDialog extends Dialog
`GtkAppChooserDialog` shows a `GtkAppChooserWidget` inside a `GtkDialog`.

![An example GtkAppChooserDialog](appchooserdialog.png)

Note that `GtkAppChooserDialog` does not have any interesting methods
of its own. Instead, you should get the embedded `GtkAppChooserWidget`
using [method@Gtk.AppChooserDialog.get_widget] and call its methods if
the generic [iface@Gtk.AppChooser] interface is not sufficient for
your needs.

To set the heading that is shown above the `GtkAppChooserWidget`,
use [method@Gtk.AppChooserDialog.set_heading].

https://docs.gtk.org/gtk4/class.AppChooserDialog.html

  • Constructor Details

    • AppChooserDialog

      public AppChooserDialog(PointerContainer pointer)
    • AppChooserDialog

      public AppChooserDialog(@Nullable Window parent, int flags, @Nonnull File file)
      Creates a new `GtkAppChooserDialog` for the provided `GFile`.

      The dialog will show applications that can open the file.
      Parameters:
      parent - a `GtkWindow`
      flags - flags for this dialog
      file - a `GFile`
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newForContentTypeAppChooserDialog

      public static AppChooserDialog newForContentTypeAppChooserDialog(@Nullable Window parent, int flags, @Nonnull Str content_type)
      Creates a new `GtkAppChooserDialog` for the provided content type.

      The dialog will show applications that can open the content type.
      Parameters:
      parent - a `GtkWindow`
      flags - flags for this dialog
      content_type - a content type string
      Returns:
      a newly created `GtkAppChooserDialog`
    • newForContentTypeAppChooserDialog

      public static AppChooserDialog newForContentTypeAppChooserDialog(@Nullable Window parent, int flags, String content_type)
      Creates a new `GtkAppChooserDialog` for the provided content type.

      The dialog will show applications that can open the content type.
      Parameters:
      parent - a `GtkWindow`
      flags - flags for this dialog
      content_type - a content type string
      Returns:
      a newly created `GtkAppChooserDialog`
    • getHeading

      public Str getHeading()
      Returns the text to display at the top of the dialog.
      Returns:
      the text to display at the top of the dialog, or %NULL, in which case a default text is displayed
    • getWidget

      public Widget getWidget()
      Returns the `GtkAppChooserWidget` of this dialog.
      Returns:
      the `GtkAppChooserWidget` of @self
    • setHeading

      public void setHeading(@Nonnull Str heading)
      Sets the text to display at the top of the dialog.

      If the heading is not set, the dialog displays a default text.
      Parameters:
      heading - a string containing Pango markup
    • setHeading

      public void setHeading(String heading)
      Sets the text to display at the top of the dialog.

      If the heading is not set, the dialog displays a default text.
      Parameters:
      heading - a string containing Pango markup
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Dialog
      Returns:
      Accessible
    • asAppChooser

      public AppChooser asAppChooser()
      Implements interface AppChooser. Call this to get access to interface functions.
      Returns:
      AppChooser
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Dialog
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Dialog
      Returns:
      ConstraintTarget
    • asNative

      public Native asNative()
      Implements interface Native. Call this to get access to interface functions.
      Overrides:
      asNative in class Dialog
      Returns:
      Native
    • asRoot

      public Root asRoot()
      Implements interface Root. Call this to get access to interface functions.
      Overrides:
      asRoot in class Dialog
      Returns:
      Root
    • asShortcutManager

      public ShortcutManager asShortcutManager()
      Implements interface ShortcutManager. Call this to get access to interface functions.
      Overrides:
      asShortcutManager in class Dialog
      Returns:
      ShortcutManager
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()