package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/File_dialog/index.html
Module Wrappers.File_dialog
type t = [ `file_dialog | `object_ ] Gobject.objval new_ : unit -> tCreate a new FileDialog
val set_title : t -> string -> unitSets the title that will be shown on the file chooser dialog.
val set_modal : t -> bool -> unitSets whether the file chooser dialog blocks interaction with the parent window while it is presented.
val set_initial_name : t -> string option -> unitSets the name for the file that should be initially set. For saving dialogs, this will usually be pre-entered into the name field.
If a file with this name already exists in the directory set via property@Gtk.FileDialog:initial-folder, the dialog should preselect it.
val set_initial_folder : t -> Ocgtk_gio.Gio.Wrappers.File.t option -> unitSets the folder that will be set as the initial folder in the file chooser dialog.
val set_initial_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option -> unitSets the file that will be initially selected in the file chooser dialog.
This function is a shortcut for calling both gtk_file_dialog_set_initial_folder() and gtk_file_dialog_set_initial_name() with the directory and name of @file respectively.
val set_filters : t -> Ocgtk_gio.Gio.Wrappers.List_model.t option -> unitSets the filters that will be offered to the user in the file chooser dialog.
val set_default_filter :
t ->
[ `file_filter | `filter | `object_ ] Gobject.obj option ->
unitSets the filter that will be selected by default in the file chooser dialog.
If set to %NULL, the first item in property@Gtk.FileDialog:filters will be used as the default filter. If that list is empty, the dialog will be unfiltered.
val set_accept_label : t -> string option -> unitSets the label shown on the file chooser's accept button.
Leaving the accept label unset or setting it as `NULL` will fall back to a default label, depending on what API is used to launch the file dialog.
val select_multiple_folders_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(Ocgtk_gio.Gio.Wrappers.List_model.t option, GError.t) resultFinishes the method@Gtk.FileDialog.select_multiple_folders call and returns the resulting files in a `GListModel`.
val select_folder_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(Ocgtk_gio.Gio.Wrappers.File.t option, GError.t) resultFinishes the method@Gtk.FileDialog.select_folder call and returns the resulting file.
val save_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(Ocgtk_gio.Gio.Wrappers.File.t option, GError.t) resultFinishes the method@Gtk.FileDialog.save call and returns the resulting file.
val open_multiple_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(Ocgtk_gio.Gio.Wrappers.List_model.t option, GError.t) resultFinishes the method@Gtk.FileDialog.open call and returns the resulting files in a `GListModel`.
val open_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(Ocgtk_gio.Gio.Wrappers.File.t option, GError.t) resultFinishes the method@Gtk.FileDialog.open call and returns the resulting file.
val get_title : t -> stringReturns the title that will be shown on the file chooser dialog.
val get_modal : t -> boolReturns whether the file chooser dialog blocks interaction with the parent window while it is presented.
val get_initial_name : t -> string optionGets the name for the file that should be initially set.
val get_initial_folder : t -> Ocgtk_gio.Gio.Wrappers.File.t optionGets the folder that will be set as the initial folder in the file chooser dialog.
val get_initial_file : t -> Ocgtk_gio.Gio.Wrappers.File.t optionGets the file that will be initially selected in the file chooser dialog.
val get_filters : t -> Ocgtk_gio.Gio.Wrappers.List_model.t optionGets the filters that will be offered to the user in the file chooser dialog.
val get_default_filter :
t ->
[ `file_filter | `filter | `object_ ] Gobject.obj optionGets the filter that will be selected by default in the file chooser dialog.
val get_accept_label : t -> string option