Tinyfiledialogs
OCaml bindings for TinyFileDialogs
Display an input box dialog. Returns Some input
if the user provides input, None
if cancelled.
val message_box :
title:string ->
message:string ->
dialog_type:dialog_type ->
icon_type:icon_type ->
default_button:default_button ->
int
Display a message box. Returns 0, 1, or 2 depending on the button pressed:
val save_file_dialog :
title:string ->
default_path:string ->
filter_patterns:string list option ->
filter_desc:string ->
string option
Show a save file dialog. Returns Some filename
if a file was selected, None
if cancelled.
val open_file_dialog :
title:string ->
default_path:string ->
filter_patterns:string list option ->
filter_desc:string ->
allow_multiple:bool ->
string option
Show an open file dialog. If allow_multiple
is true, multiple filenames are returned separated by '|' in the string.
Show a folder selection dialog. Returns Some folder_path
if a folder is selected, None
if cancelled.
val color_chooser :
title:string ->
default_hex:string option ->
default_rgb:(int * int * int) ->
(string * int * int * int) option
Show a color chooser dialog. Returns Some (hex, r, g, b)
if a color is chosen, None
if cancelled. default_hex
can override default_rgb
.
val notify_popup :
title:string ->
message:string ->
icon_type:icon_type ->
unit
Display a system notification popup with the given title
, message
, and icon_type
.