// // Dialog.cs: Dialog box // // Authors: // Miguel de Icaza (miguel@gnome.org) // using System; using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; using NStack; using Terminal.Gui; using static Terminal.Gui.ConfigurationManager; namespace Terminal.Gui { /// /// The is a that by default is centered and contains one /// or more s. It defaults to the color scheme and has a 1 cell padding around the edges. /// /// /// To run the modally, create the , and pass it to . /// This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views /// or buttons added to the dialog calls . /// public class Dialog : Window { /// /// The default for . /// /// /// This property can be set in a Theme. /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope)), JsonConverter (typeof (JsonStringEnumConverter))] public static ButtonAlignments DefaultButtonAlignment { get; set; } = ButtonAlignments.Center; /// /// Defines the default border styling for . Can be configured via . /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] public static Border DefaultBorder { get; set; } = new Border () { BorderStyle = BorderStyle.Single, }; internal List