2
0

Application.Toplevel.cs 700 B

1234567891011121314151617181920
  1. #nullable enable
  2. using System.Collections.Concurrent;
  3. namespace Terminal.Gui.App;
  4. public static partial class Application // Toplevel handling
  5. {
  6. // BUGBUG: Technically, this is not the full lst of TopLevels. There be dragons here, e.g. see how Toplevel.Id is used. What
  7. /// <summary>Holds the stack of TopLevel views.</summary>
  8. internal static ConcurrentStack<Toplevel> TopLevels => ApplicationImpl.Instance.TopLevels;
  9. /// <summary>The <see cref="Toplevel"/> that is currently active.</summary>
  10. /// <value>The top.</value>
  11. public static Toplevel? Top
  12. {
  13. get => ApplicationImpl.Instance.Top;
  14. internal set => ApplicationImpl.Instance.Top = value;
  15. }
  16. }