Dialog
public class Dialog : Window
The dialog box is a window that by default is centered and contains one or more buttons,
it defaults to the Colors.dialog
color scheme and has a 1 cell padding around the edges.
To run the dialog modally, create the Dialog
, and pass this to Application.run
which
will execute the dialog until it terminates via the [ESC] key, or when one of the views
-
Initializes a new instance of the
Dialog
class with an optional set of buttons to displayDeclaration
Swift
public init(title: String, width: Int, height: Int, buttons: [Button])
Parameters
title
Title for the dialog
width
Width for the dialog.
height
Height for the dialog
buttons
buttons to lay out at the bottom of the dialog
-
Adds the specified button to the dialog
Declaration
Swift
public func addButton(_ button: Button)
Parameters
button
the button to add to the dialog box
-
Undocumented
Declaration
Swift
public override func layoutSubviews() throws
-
Method to invoke if the dialog is closed with [ESC}, used by Dialog
Declaration
Swift
public var closedCallback: (() -> ())?
-
Declaration
Swift
public override func processKey(event: KeyEvent) -> Bool