|
@@ -143,14 +143,14 @@ namespace Terminal.Gui {
|
|
|
Direction focusDirection;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Event fired when the view is added.
|
|
|
+ /// Event fired when a subview is being added to this view.
|
|
|
/// </summary>
|
|
|
- public Action<View> AddedView;
|
|
|
+ public Action<View> Adding;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Event fired when the view is being removing.
|
|
|
+ /// Event fired when a subview is being removed from this view.
|
|
|
/// </summary>
|
|
|
- public Action<View> RemovingView;
|
|
|
+ public Action<View> Removing;
|
|
|
|
|
|
/// <summary>
|
|
|
/// Event fired when the view gets focus.
|
|
@@ -498,7 +498,7 @@ namespace Terminal.Gui {
|
|
|
subviews = new List<View> ();
|
|
|
subviews.Add (view);
|
|
|
view.container = this;
|
|
|
- OnAddedView (view);
|
|
|
+ OnAdding (view);
|
|
|
if (view.CanFocus)
|
|
|
CanFocus = true;
|
|
|
SetNeedsLayout ();
|
|
@@ -543,7 +543,7 @@ namespace Terminal.Gui {
|
|
|
if (view == null || subviews == null)
|
|
|
return;
|
|
|
|
|
|
- OnRemovingView (view);
|
|
|
+ OnRemoving (view);
|
|
|
SetNeedsLayout ();
|
|
|
SetNeedsDisplay ();
|
|
|
var touched = view.Frame;
|
|
@@ -873,16 +873,22 @@ namespace Terminal.Gui {
|
|
|
public bool Handled { get; set; }
|
|
|
}
|
|
|
|
|
|
- /// <inheritdoc/>
|
|
|
- public override void OnAddedView (View view)
|
|
|
+ /// <summary>
|
|
|
+ /// Method invoked when a subview is being added to this view.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="view">The subview being added.</param>
|
|
|
+ public virtual void OnAdding (View view)
|
|
|
{
|
|
|
- AddedView?.Invoke (view);
|
|
|
+ Adding?.Invoke (view);
|
|
|
}
|
|
|
|
|
|
- /// <inheritdoc/>
|
|
|
- public override void OnRemovingView (View view)
|
|
|
+ /// <summary>
|
|
|
+ /// Method invoked when a subview is being removed from this view.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="view">The subview being removed.</param>
|
|
|
+ public virtual void OnRemoving (View view)
|
|
|
{
|
|
|
- RemovingView?.Invoke (view);
|
|
|
+ Removing?.Invoke (view);
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc/>
|