Skip to content

Commit

Permalink
Revert "Rebuildling TabView - WIP"
Browse files Browse the repository at this point in the history
This reverts commit 77ae7ae.
  • Loading branch information
tig committed Nov 6, 2024
1 parent 77ae7ae commit e6180b6
Show file tree
Hide file tree
Showing 7 changed files with 1,065 additions and 446 deletions.
8 changes: 2 additions & 6 deletions Terminal.Gui/Views/Tab.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#nullable enable
using System.Net.Security;

namespace Terminal.Gui;

/// <summary>A single tab in a <see cref="TabView"/>.</summary>
Expand All @@ -13,9 +11,7 @@ public Tab ()
{
BorderStyle = LineStyle.Rounded;
CanFocus = true;
TabStop = TabBehavior.TabStop;
Width = Dim.Auto (DimAutoStyle.Text);
SuperViewRendersLineCanvas = true;
TabStop = TabBehavior.NoStop;
}

/// <summary>The text to display in a <see cref="TabView"/>.</summary>
Expand All @@ -30,7 +26,7 @@ public string DisplayText
}
}

/// <summary>The View that will be made visible in the <see cref="TabView"/> content area when the tab is selected.</summary>
/// <summary>The control to display when the tab is selected.</summary>
/// <value></value>
public View? View { get; set; }
}
20 changes: 10 additions & 10 deletions Terminal.Gui/Views/TabChangedEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
namespace Terminal.Gui;

/// <summary>Describes a change in <see cref="TabView.SelectedTabIndex"/></summary>
/// <summary>Describes a change in <see cref="TabView.SelectedTab"/></summary>
public class TabChangedEventArgs : EventArgs
{
/// <summary>Documents a tab change</summary>
/// <param name="oldTabIndex"></param>
/// <param name="newTabIndex"></param>
public TabChangedEventArgs (int? oldTabIndex, int? newTabIndex)
/// <param name="oldTab"></param>
/// <param name="newTab"></param>
public TabChangedEventArgs (Tab oldTab, Tab newTab)
{
OldTabIndex = oldTabIndex;
NewTabIndex = newTabIndex;
OldTab = oldTab;
NewTab = newTab;
}

/// <summary>The currently selected tab.</summary>
public int? NewTabIndex { get; }
/// <summary>The currently selected tab. May be null</summary>
public Tab NewTab { get; }

/// <summary>The previously selected tab.</summary>
public int? OldTabIndex{ get; }
/// <summary>The previously selected tab. May be null</summary>
public Tab OldTab { get; }
}
Loading

0 comments on commit e6180b6

Please sign in to comment.