Skip to content

Commit 8302398

Browse files
committed
Merge branch 'v2_3777-hexedit' of tig:tig/Terminal.Gui into v2_3777-hexedit
2 parents f3bdfc3 + 73ea9ec commit 8302398

File tree

14 files changed

+503
-324
lines changed

14 files changed

+503
-324
lines changed

Terminal.Gui/Application/ApplicationNavigation.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,19 @@ public ApplicationNavigation ()
2727
/// <summary>
2828
/// Gets the most focused <see cref="View"/> in the application, if there is one.
2929
/// </summary>
30-
public View? GetFocused () { return _focused; }
30+
public View? GetFocused ()
31+
{
32+
return _focused;
33+
34+
if (_focused is { CanFocus: true, HasFocus: true })
35+
{
36+
return _focused;
37+
}
38+
39+
_focused = null;
40+
41+
return null;
42+
}
3143

3244
/// <summary>
3345
/// Gets whether <paramref name="view"/> is in the Subview hierarchy of <paramref name="start"/>.

Terminal.Gui/Drawing/Glyphs.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public class GlyphDefinitions
9797
/// <summary>Dot. Default is (U+2219) - ∙.</summary>
9898
public Rune Dot { get; set; } = (Rune)'∙';
9999

100+
/// <summary>Dotted Square - ⬚ U+02b1a┝</summary>
101+
public Rune DottedSquare { get; set; } = (Rune)'⬚';
102+
100103
/// <summary>Black Circle . Default is (U+025cf) - ●.</summary>
101104
public Rune BlackCircle { get; set; } = (Rune)'●'; // Black Circle - ● U+025cf
102105

Terminal.Gui/Input/Command.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ public enum Command
166166
/// </summary>
167167
EnableOverwrite,
168168

169+
/// <summary>
170+
/// Inserts a character.
171+
/// </summary>
172+
Insert,
173+
169174
/// <summary>Disables overwrite mode (<see cref="EnableOverwrite"/>)</summary>
170175
DisableOverwrite,
171176

Terminal.Gui/View/CancelEventArgs.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public CancelEventArgs (ref readonly T currentValue, ref T newValue, bool cancel
2727
NewValue = newValue;
2828
}
2929

30+
protected CancelEventArgs () { }
31+
3032
/// <summary>The current value of the property.</summary>
3133
public T CurrentValue { get; }
3234

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Terminal.Gui;
2+
3+
/// <summary>The event arguments for <see cref="View.AdvanceFocus"/> events.</summary>
4+
public class AdvanceFocusEventArgs : CancelEventArgs<bool>
5+
{
6+
/// <summary>Initializes a new instance.</summary>
7+
public AdvanceFocusEventArgs (NavigationDirection direction, TabBehavior? behavior)
8+
{
9+
Direction = direction;
10+
Behavior = behavior;
11+
}
12+
13+
/// <summary>Gets or sets the view that is losing focus.</summary>
14+
public NavigationDirection Direction { get; set; }
15+
16+
/// <summary>Gets or sets the view that is gaining focus.</summary>
17+
public TabBehavior? Behavior { get; set; }
18+
}

Terminal.Gui/View/Navigation/FocusEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ public HasFocusEventArgs (bool currentHasFocus, bool newHasFocus, View currentFo
2020
/// <summary>Gets or sets the view that is gaining focus.</summary>
2121
public View NewFocused { get; set; }
2222

23-
}
23+
}

0 commit comments

Comments
 (0)