namespace Terminal.Gui.Views;
///
/// An overlapped container for other views with a border and optional title.
///
///
///
/// Window has set to ,
/// set to , and
/// uses the "Base" scheme by default.
///
///
/// To enable Window to be sized and moved by the user, adjust .
///
///
///
public class Window : Toplevel
{
private static ShadowStyle _defaultShadow = ShadowStyle.None; // Resources/config.json overrides
private static LineStyle _defaultBorderStyle = LineStyle.Single; // Resources/config.json overrides
///
/// Initializes a new instance of the class.
///
public Window ()
{
CanFocus = true;
TabStop = TabBehavior.TabGroup;
Arrangement = ViewArrangement.Overlapped;
SchemeName = SchemeManager.SchemesToSchemeName (Schemes.Base);
BorderStyle = DefaultBorderStyle;
base.ShadowStyle = DefaultShadow;
}
///
/// Gets or sets whether all s are shown with a shadow effect by default.
///
[ConfigurationProperty (Scope = typeof (ThemeScope))]
public static ShadowStyle DefaultShadow
{
get => _defaultShadow;
set => _defaultShadow = value;
}
// TODO: enable this
/////
///// The default for 's border. The default is .
/////
/////
///// This property can be set in a Theme to change the default for all s.
/////
/////[ConfigurationProperty (Scope = typeof (ThemeScope)), JsonConverter (typeof (JsonStringEnumConverter))]
////public static Scheme DefaultScheme { get; set; } = Colors.Schemes ["Base"];
///
/// The default for 's border. The default is
/// .
///
///
/// This property can be set in a Theme to change the default for all
/// s.
///
[ConfigurationProperty (Scope = typeof (ThemeScope))]
public static LineStyle DefaultBorderStyle
{
get => _defaultBorderStyle;
set => _defaultBorderStyle = value;
}
}