|
@@ -61,6 +61,12 @@ namespace Terminal.Gui {
|
|
/// </summary>
|
|
/// </summary>
|
|
public event Action Ready;
|
|
public event Action Ready;
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// Fired once the Toplevel's <see cref="Application.RunState"/> has begin unloaded.
|
|
|
|
+ /// A Unloaded event handler is a good place to disposing after calling `<see cref="Application.End(Application.RunState)"/>.
|
|
|
|
+ /// </summary>
|
|
|
|
+ public event Action Unloaded;
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Called from <see cref="Application.Begin(Toplevel)"/> before the <see cref="Toplevel"/> is redraws for the first time.
|
|
/// Called from <see cref="Application.Begin(Toplevel)"/> before the <see cref="Toplevel"/> is redraws for the first time.
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -70,13 +76,21 @@ namespace Terminal.Gui {
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Called from <see cref="Application.RunLoop"/> after the <see cref="Toplevel"/> has entered it's first iteration of the loop.
|
|
|
|
|
|
+ /// Called from <see cref="Application.RunLoop"/> after the <see cref="Toplevel"/> has entered it's first iteration of the loop.
|
|
/// </summary>
|
|
/// </summary>
|
|
internal virtual void OnReady ()
|
|
internal virtual void OnReady ()
|
|
{
|
|
{
|
|
Ready?.Invoke ();
|
|
Ready?.Invoke ();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// Called from <see cref="Application.End(Application.RunState)"/> before the <see cref="Toplevel"/> is disposed.
|
|
|
|
+ /// </summary>
|
|
|
|
+ internal virtual void OnUnloaded ()
|
|
|
|
+ {
|
|
|
|
+ Unloaded?.Invoke ();
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="Toplevel"/> class with the specified absolute layout.
|
|
/// Initializes a new instance of the <see cref="Toplevel"/> class with the specified absolute layout.
|
|
/// </summary>
|
|
/// </summary>
|