NAME
std/gui/dialogue - Dialogue helpers.
SYNOPSIS
from std/gui/dialogue import *;
alert("Saved");
let ok := confirm("Continue?");
let name := prompt("Name:", value: "Ada");
IMPLEMENTATION SUPPORT
This module is supported by zuzu.pl, zuzu-rust, and zuzu-js on Electron and Browser. It is not supported by zuzu-js on Node.
DESCRIPTION
This module provides convenience dialogue helpers layered on top of the regular std/gui widgets.
EXPORTS
Functions
alert(String message, ... PairList p),alert_window(String message, ... PairList p)Parameters:
messageis display text andpcontains options. Returns:nullforalertorWindowforalert_window. Shows or builds an alert dialogue.confirm(String message, ... PairList p),confirm_window(String message, ... PairList p)Parameters:
messageis display text andpcontains options. Returns:BooleanforconfirmorWindowforconfirm_window. Shows or builds a confirmation dialogue.prompt(String message, ... PairList p),prompt_window(String message, ... PairList p)Parameters:
messageis prompt text andpcontains options such asvalue. Returns:Stringornullforprompt, orWindowforprompt_window. Shows or builds a text prompt.file_open(... PairList p),file_save(... PairList p)Parameters:
pcontains dialogue options. Returns: path value ornull. Opens a file selection dialogue.directory_open(... PairList p),directory_save(... PairList p)Parameters:
pcontains dialogue options. Returns: path value ornull. Opens a directory selection dialogue.colour_picker(... PairList p)Parameters:
pcontains dialogue options. Returns:Stringornull. Opens a colour picker and returns a normalized colour string.file_open_window(... PairList p),file_save_window(... PairList p),directory_open_window(... PairList p),directory_save_window(... PairList p),colour_picker_window(... PairList p)Parameters:
pcontains dialogue options. Returns:Window. Builds the corresponding GUI dialogue window.
COPYRIGHT AND LICENCE
std/gui/dialogue is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.