FrameView.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. // TODO: FrameView is mis-named, really. It's far more about it being a TabGroup than a frame.
  4. /// <summary>
  5. /// A non-overlapped container for other views with a border and optional title.
  6. /// </summary>
  7. /// <remarks>
  8. /// <para>
  9. /// FrameView has <see cref="View.BorderStyle"/> set to <see cref="LineStyle.Single"/> and
  10. /// inherits it's color scheme from the <see cref="SuperView"/>.
  11. /// </para>
  12. /// <para>
  13. ///
  14. /// </para>
  15. /// </remarks>
  16. /// <seealso cref="Window"/>
  17. public class FrameView : View
  18. {
  19. /// <summary>
  20. /// Initializes a new instance of the <see cref="Gui.FrameView"/> class.
  21. /// layout.
  22. /// </summary>
  23. public FrameView ()
  24. {
  25. CanFocus = true;
  26. TabStop = TabBehavior.TabGroup;
  27. BorderStyle = DefaultBorderStyle;
  28. }
  29. /// <summary>
  30. /// The default <see cref="LineStyle"/> for <see cref="FrameView"/>'s border. The default is
  31. /// <see cref="LineStyle.Single"/>.
  32. /// </summary>
  33. /// <remarks>
  34. /// This property can be set in a Theme to change the default <see cref="LineStyle"/> for all
  35. /// <see cref="FrameView"/>s.
  36. /// </remarks>
  37. [SerializableConfigurationProperty (Scope = typeof (ThemeScope))]
  38. public static LineStyle DefaultBorderStyle { get; set; } = LineStyle.Single;
  39. }