Module rstk::dialog

source ·
Expand description

Dialogs - various built-in dialogs.

All of the dialogs (apart from the font chooser) are built using a “builder” style. The named function creates a relevant struct value, and then functions on the relevant TkWIDGET struct alter the default values in that struct, until finally calling show will set up and display the dialog.

There is only one font chooser dialog instance, and commands are provided to interact with it directly.

Message boxes

The message-box is used to set up a simple alert, confirmation or information dialog:

rstk::message_box()
  .OPTION(VALUE) // 0 or more
  .show();
  1. message_box is called first, to get the TkMessageBox instance.
  2. show must be called last, to set up and display the dialog.
  3. zero or more options are added to the message box.

Chooser dialogs

For colours, directories, files and fonts!

Each dialog returns an Option type, with value None if cancelled.

Tk manual pages:

Structs

Functions