3.3.2 Windows
3.3.2.1 Window
3.3.2.2 Dialog
On this page:
Dialog
Dialog.Style
Dialog.Style
Dialog.Style.no_  sheet
Dialog.Style.resize_  border
Dialog.Style.close_  button

image

class

class gui.Dialog():

  implements WindowView

  constructor (

    ~title: title :: ObsOrValue.of(String) = "Untitled",

    ~size: size :: ObsOrValue.of(View.Size) = [#false, #false],

    ~align: align :: ObsOrValue.of(View.Alignment) = [#'center, #'top],

    ~position: position :: ObsOrValue.of(View.Position) = #'center,

    ~min_size: min_size :: ObsOrValue.of(View.Size) = [#false, #false],

    ~stretch: stretch :: ObsOrValue.of(View.Stretch) = [#true, #true],

    ~enable: enable :: ObsOrValue.of(Boolean) = #true,

    ~styles: styles :: ObsOrValue.of(List.of(Dialog.Style)) = [],

    ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false,

    child :: ObsOrValue.of(WindowChildView && !WindowView), ...

  )

Similar to Window, but creates a modal dialog, instead.

A dialog style option:

  • #'no_title: Omits a title bar for the dialog.

  • #'no_sheet: Uses a movable dialog, even if a parent window is provided (Mac OS).

  • #'resize_border: Enables dialog resizing by a user.

  • #'close_button: Includes a close button in the dialog’s title bar.