package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/App_chooser_button/index.html

Module Wrappers.App_chooser_button

type t = [ `app_chooser_button | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : string -> t

Create a new AppChooserButton

val set_show_dialog_item : t -> bool -> unit

Sets whether the dropdown menu of this button should show an entry to trigger a `GtkAppChooserDialog`.

val set_show_default_item : t -> bool -> unit

Sets whether the dropdown menu of this button should show the default application for the given content type at top.

val set_modal : t -> bool -> unit

Sets whether the dialog should be modal.

val set_heading : t -> string -> unit

Sets the text to display at the top of the dialog.

If the heading is not set, the dialog displays a default text.

val set_active_custom_item : t -> string -> unit

Selects a custom item.

See method@Gtk.AppChooserButton.append_custom_item.

Use method@Gtk.AppChooser.refresh to bring the selection to its initial state.

val get_show_dialog_item : t -> bool

Returns whether the dropdown menu shows an item for a `GtkAppChooserDialog`.

val get_show_default_item : t -> bool

Returns whether the dropdown menu should show the default application at the top.

val get_modal : t -> bool

Gets whether the dialog is modal.

val get_heading : t -> string option

Returns the text to display at the top of the dialog.

val append_separator : t -> unit

Appends a separator to the list of applications that is shown in the popup.

val append_custom_item : t -> string -> string -> Ocgtk_gio.Gio.Wrappers.Icon.t -> unit

Appends a custom item to the list of applications that is shown in the popup.

The item name must be unique per-widget. Clients can use the provided name as a detail for the signal@Gtk.AppChooserButton::custom-item-activated signal, to add a callback for the activation of a particular custom item in the list.

See also method@Gtk.AppChooserButton.append_separator.

val on_activate : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_custom_item_activated : ?after:bool -> t -> callback:(item_name:string -> unit) -> Gobject.Signal.handler_id