2
0

FrameView.cs 1.3 KB

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