IToplevelTransitionManager.cs 963 B

12345678910111213141516171819202122232425262728
  1. namespace Terminal.Gui.App;
  2. // TODO: This whole concept is bogus and over-engineered.
  3. // TODO: Remove it and just subscribers use the IApplication.Iteration
  4. // TODO: If the requirement is they know if it's the first iteration, they can
  5. // TODO: count invocations.
  6. /// <summary>
  7. /// Interface for class that handles bespoke behaviours that occur when application
  8. /// top level changes.
  9. /// </summary>
  10. public interface IToplevelTransitionManager
  11. {
  12. /// <summary>
  13. /// Raises the <see cref="Toplevel.Ready"/> event on tahe current top level
  14. /// if it has not been raised before now.
  15. /// </summary>
  16. /// <param name="app"></param>
  17. void RaiseReadyEventIfNeeded (IApplication? app);
  18. /// <summary>
  19. /// Handles any state change needed when the application top changes e.g.
  20. /// setting redraw flags
  21. /// </summary>
  22. /// <param name="app"></param>
  23. void HandleTopMaybeChanging (IApplication? app);
  24. }