Application.Toplevel.cs 912 B

12345678910111213141516171819202122232425262728
  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. internal static Toplevel? CachedRunStateToplevel
  17. {
  18. get => ApplicationImpl.Instance.CachedRunStateToplevel;
  19. private set => ApplicationImpl.Instance.CachedRunStateToplevel = value;
  20. }
  21. }