Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
595b30f
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 7, 2025
122e828
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 15, 2025
ceaee09
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 16, 2025
33402ba
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 16, 2025
2a0a540
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 19, 2025
6fc8f7c
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 19, 2025
27bd778
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 19, 2025
bac51e9
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 19, 2025
8c5d437
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 19, 2025
845bfe4
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 20, 2025
4c8f701
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 20, 2025
497fc88
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 20, 2025
9662ecb
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 20, 2025
c959118
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 20, 2025
61b9d49
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 20, 2025
ef34957
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 20, 2025
6cd468e
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 20, 2025
f9f7caf
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 21, 2025
8fe7812
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 22, 2025
d72cfcd
Merge branch 'v2_develop' of tig:gui-cs/Terminal.Gui into v2_develop
tig Oct 24, 2025
0c8f7a7
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 24, 2025
34caa52
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 25, 2025
4c303a0
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 25, 2025
257e206
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 25, 2025
600c5d7
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 25, 2025
d1a709a
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 26, 2025
7b4ad8c
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 26, 2025
76b8f02
Refactor newinv2.md deep dive doc
tig Oct 26, 2025
6a9dfb1
merged
tig Oct 26, 2025
7194b88
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 26, 2025
8483214
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 27, 2025
9dcbab1
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 27, 2025
e058038
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 27, 2025
0884eea
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 27, 2025
55468fa
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 28, 2025
1e124ac
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 28, 2025
55d1972
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 29, 2025
e264301
Fixes #4368 - Clarify and Fix CWPPropertyHelper Property Change Workflow
tig Oct 29, 2025
ecc0719
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 29, 2025
bf977e6
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 29, 2025
1c00aae
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Oct 29, 2025
056f06d
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 29, 2025
a701508
Refactor selectors and improve UI components
tig Oct 29, 2025
4b46887
Refactor UI components and remove unused classes
tig Oct 29, 2025
289bb6b
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Oct 30, 2025
0786a87
Fixes #4374 - 'Application.Screen' is empty when 'Init' returns
tig Oct 30, 2025
db66c70
Merge branch 'v2_4374-AppScreenEmpty' into v2_seletors
tig Oct 30, 2025
93310f7
Disable "windows" test case in SynchronizationContextTests
tig Oct 30, 2025
04b83c9
Disable "windows" test case in SynchronizationContextTests
tig Oct 30, 2025
2909afd
Update Terminal.Gui/Drivers/FakeDriver/FakeConsole.cs
tig Oct 30, 2025
f8e764c
Update Terminal.Gui/Views/Selectors/SelectorStyles.cs
tig Oct 30, 2025
10d5e33
Update Terminal.Gui/Views/Selectors/SelectorBase.cs
tig Oct 30, 2025
4c21f35
Update Terminal.Gui/Views/Selectors/OptionSelector.cs
tig Oct 30, 2025
808a5aa
Update Terminal.Gui/Views/Selectors/OptionSelector.cs
tig Oct 30, 2025
47292b5
Update Terminal.Gui/Views/Selectors/OptionSelector.cs
tig Oct 30, 2025
3f3a504
Update Terminal.Gui/Views/Selectors/SelectorBase.cs
tig Oct 30, 2025
3311e7b
Merge branch 'v2_seletors' of tig:tig/Terminal.Gui into v2_seletors
tig Oct 30, 2025
8aefa3f
Backported Checkbox from Activate PR
tig Oct 30, 2025
39323fd
Backported Checkbox from Activate PR 2
tig Oct 30, 2025
c641d23
Backported Checkbox from Activate PR 3
tig Oct 30, 2025
0279af3
Backported Selctors Scenario
tig Oct 30, 2025
35742aa
Backported Bars Scenario
tig Oct 30, 2025
88b6714
Backported AllViewsTester Scenario
tig Oct 30, 2025
623d7b4
Backported Dialogs Scenario
tig Oct 30, 2025
3c1f051
Backported MessageBoxes Scenario
tig Oct 30, 2025
179c0f0
Backported ArrangementEditor
tig Oct 30, 2025
4780906
Backported mouse binding fix
tig Oct 30, 2025
87223bc
Update Terminal.Gui/Views/Selectors/OptionSelector.cs
tig Oct 30, 2025
1d19357
Update Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs
tig Oct 30, 2025
2ad5df5
Update Terminal.Gui/Views/CheckBox.cs
tig Oct 30, 2025
012acb8
Fixed typo
tig Oct 30, 2025
c7a38b4
Merge branch 'v2_seletors' of tig:tig/Terminal.Gui into v2_seletors
tig Oct 30, 2025
75743d8
Refactor ArrangementEditor event handling
tig Oct 30, 2025
a29e747
Refactor AlignKeys for type safety and readability
tig Oct 30, 2025
a98aecd
Refactor ArrangementEditor for clarity and consistency
tig Oct 30, 2025
20ac983
Update Examples/UICatalog/Scenarios/Shortcuts.cs
tig Oct 30, 2025
8ede174
Update Terminal.Gui/Views/Selectors/OptionSelector.cs
tig Oct 30, 2025
4069bae
Merge branch 'v2_seletors' of tig:tig/Terminal.Gui into v2_seletors
tig Oct 30, 2025
f3590b7
Refactor and enhance OptionSelector and SelectorBase
tig Oct 30, 2025
d7feafa
add FlagSelector comprehensive tests
tig Oct 30, 2025
26c5324
Fixes #4375. UnixDriver fails Toplevel_TabGroup_Forward_Backward Flue…
BDisp Oct 30, 2025
061b4d9
Merge pull request #50 from BDisp/v2_4374-AppScreenEmpty-unix-fix
tig Oct 30, 2025
b4d98c9
Refactor RadioGroup to use OptionSelector
tig Oct 30, 2025
dd03ae0
Backported focus tests and add bug-exposing test case
tig Oct 30, 2025
6343a70
Remove all tests for RadioGroup component
tig Oct 30, 2025
6c4aaf2
Fix unix and fake fluent tests.
BDisp Oct 31, 2025
ecdb91f
More fixes for unix and fake drivers
BDisp Oct 31, 2025
c5476d1
Change classes names for more consistency
BDisp Oct 31, 2025
340a0c5
Merge branch 'v2_4374-AppScreenEmpty' of tig:tig/Terminal.Gui into v2…
tig Oct 31, 2025
b35fef4
Fix typos in docs and method signature
tig Oct 31, 2025
0ee8d27
Merge pull request #51 from BDisp/v2_4374-AppScreenEmpty-unix-fix
tig Oct 31, 2025
090c068
Merge branch 'v2_4374-AppScreenEmpty' of tig:tig/Terminal.Gui into v2…
tig Oct 31, 2025
8d9c7a2
Refactor: Replace RadioGroup with OptionSelector
tig Oct 31, 2025
79263fc
Refactor OptionSelector to use Value instead of SelectedItem
tig Oct 31, 2025
834f98c
Refactor OptionSelector: Replace RadioLabels with Labels
tig Oct 31, 2025
429ed31
Refactor: Replace "radio group" with "option selector"
tig Oct 31, 2025
96eabf1
Replace RadioGroup with OptionSelector and update docs
tig Oct 31, 2025
2eb3a7c
Fixed `EndAfterFirstIteration`
tig Oct 31, 2025
1c136cb
Enhance selectors and clean up documentation
tig Oct 31, 2025
0c8ae49
Update event handling and expand UI documentation
tig Oct 31, 2025
4c78673
Merge branch 'v2_seletors' of tig:tig/Terminal.Gui into v2_seletors
tig Oct 31, 2025
b411d1f
Fixed `EndAfterFirstIteration` in `ApplicationImpl`
tig Oct 31, 2025
582630e
Fixed EndfterFirstIteration in ApplicaitonImpl
tig Oct 31, 2025
b7419f8
Merged latest v2_4374-AppScreenEmpty
tig Oct 31, 2025
7884fc5
Refactor Value handling and improve type safety
tig Oct 31, 2025
0fff9b6
Merge branch 'v2_seletors' of tig:tig/Terminal.Gui into v2_seletors
tig Oct 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Examples/UICatalog/Scenarios/AllViewsTester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ public override void Main ()

_eventLog = new ()
{
// X = Pos.Right(_layoutEditor),
X = Pos.AnchorEnd () - 1,
Y = 0,
Width = 30,
Height = Dim.Fill (),
SuperViewRendersLineCanvas = true
};
_eventLog.Border!.Thickness = new (1);
_eventLog.X = Pos.AnchorEnd () - 1;
_eventLog.Y = 0;

_eventLog.Height = Dim.Height (_classListView);

//_eventLog.Width = 30;

_layoutEditor.Width = Dim.Fill (
Dim.Func (
Expand All @@ -194,7 +191,6 @@ public override void Main ()
Height = Dim.Fill (),
CanFocus = true,
TabStop = TabBehavior.TabStop,
//SchemeName = SchemeManager.SchemesToSchemeName (Schemes.Base),
Arrangement = ViewArrangement.LeftResizable | ViewArrangement.BottomResizable | ViewArrangement.RightResizable,
BorderStyle = LineStyle.Double,
SuperViewRendersLineCanvas = true
Expand Down Expand Up @@ -228,7 +224,7 @@ private void CreateCurrentView (Type type)
if (type.IsGenericType)
{
// For each of the <T> arguments
List<Type> typeArguments = new ();
List<Type> typeArguments = [];

// use <object> or the original type if applicable
foreach (Type arg in type.GetGenericArguments ())
Expand Down
4 changes: 2 additions & 2 deletions Examples/UICatalog/Scenarios/Bars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ void PopOverMenuOnAccept (object o, CommandEventArgs args)

menuLikeExamples.Add (popOverMenu);

menuLikeExamples.MouseClick += MenuLikeExamplesMouseClick;
menuLikeExamples.MouseEvent += MenuLikeExamplesMouseEvent;

void MenuLikeExamplesMouseClick (object sender, MouseEventArgs e)
void MenuLikeExamplesMouseEvent (object _, MouseEventArgs e)
{
if (e.Flags.HasFlag (MouseFlags.Button3Clicked))
{
Expand Down
71 changes: 22 additions & 49 deletions Examples/UICatalog/Scenarios/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,17 @@ static void DoMessage (Button button, string txt)
};
main.Add (label);

var radioGroup = new RadioGroup
OptionSelector<Alignment> osAlignment = new ()
{
X = 4,
Y = Pos.Bottom (label) + 1,
SelectedItem = 2,
RadioLabels = new [] { "_Start", "_End", "_Center", "_Fill" },
Title = "_9 RadioGroup",
Value = Alignment.Center,
AssignHotKeys = true,
Title = "_9 OptionSelector",
BorderStyle = LineStyle.Dotted,
// CanFocus = false
};
main.Add (radioGroup);
main.Add (osAlignment);

// Demo changing hotkey
string MoveHotkey (string txt)
Expand Down Expand Up @@ -292,7 +292,7 @@ string MoveHotkey (string txt)
var moveHotKeyBtn = new Button
{
X = 2,
Y = Pos.Bottom (radioGroup) + 1,
Y = Pos.Bottom (osAlignment) + 1,
Width = Dim.Width (computedFrame) - 2,
SchemeName = "TopLevel",
Text = mhkb
Expand All @@ -309,7 +309,7 @@ string MoveHotkey (string txt)
var moveUnicodeHotKeyBtn = new Button
{
X = Pos.Left (absoluteFrame) + 1,
Y = Pos.Bottom (radioGroup) + 1,
Y = Pos.Bottom (osAlignment) + 1,
Width = Dim.Width (absoluteFrame) - 2,
SchemeName = "TopLevel",
Text = muhkb
Expand All @@ -321,48 +321,21 @@ string MoveHotkey (string txt)
};
main.Add (moveUnicodeHotKeyBtn);

radioGroup.SelectedItemChanged += (s, args) =>
{
switch (args.SelectedItem)
{
case 0:
moveBtn.TextAlignment = Alignment.Start;
sizeBtn.TextAlignment = Alignment.Start;
moveBtnA.TextAlignment = Alignment.Start;
sizeBtnA.TextAlignment = Alignment.Start;
moveHotKeyBtn.TextAlignment = Alignment.Start;
moveUnicodeHotKeyBtn.TextAlignment = Alignment.Start;

break;
case 1:
moveBtn.TextAlignment = Alignment.End;
sizeBtn.TextAlignment = Alignment.End;
moveBtnA.TextAlignment = Alignment.End;
sizeBtnA.TextAlignment = Alignment.End;
moveHotKeyBtn.TextAlignment = Alignment.End;
moveUnicodeHotKeyBtn.TextAlignment = Alignment.End;

break;
case 2:
moveBtn.TextAlignment = Alignment.Center;
sizeBtn.TextAlignment = Alignment.Center;
moveBtnA.TextAlignment = Alignment.Center;
sizeBtnA.TextAlignment = Alignment.Center;
moveHotKeyBtn.TextAlignment = Alignment.Center;
moveUnicodeHotKeyBtn.TextAlignment = Alignment.Center;

break;
case 3:
moveBtn.TextAlignment = Alignment.Fill;
sizeBtn.TextAlignment = Alignment.Fill;
moveBtnA.TextAlignment = Alignment.Fill;
sizeBtnA.TextAlignment = Alignment.Fill;
moveHotKeyBtn.TextAlignment = Alignment.Fill;
moveUnicodeHotKeyBtn.TextAlignment = Alignment.Fill;

break;
}
};
osAlignment.ValueChanged += (s, args) =>
{
if (args.Value is null)
{
return;
}

Alignment newValue = args.Value.Value;
moveBtn.TextAlignment = newValue;
sizeBtn.TextAlignment = newValue;
moveBtnA.TextAlignment = newValue;
sizeBtnA.TextAlignment = newValue;
moveHotKeyBtn.TextAlignment = newValue;
moveUnicodeHotKeyBtn.TextAlignment = newValue;
};

label = new ()
{
Expand Down
36 changes: 6 additions & 30 deletions Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,40 +365,16 @@ private MenuItemv2 CreateMenuUnicodeCategorySelector ()
options [0] = "All";
Array.Copy (allCategoryNames, 0, options, 1, allCategoryNames.Length);

// TODO: When #4126 is merged update this to use OptionSelector<UnicodeCategory?>
var selector = new OptionSelector
{
AssignHotKeysToCheckBoxes = true,
Options = options
};
// TODO: Add a "None" option
OptionSelector<UnicodeCategory> selector = new ();

_unicodeCategorySelector = selector;

// Default to "All"
selector.SelectedItem = 0;
selector.Value = null;
_charMap!.ShowUnicodeCategory = null;

selector.SelectedItemChanged += (s, e) =>
{
int? idx = selector.SelectedItem;

if (idx is null)
{
return;
}

if (idx.Value == 0)
{
_charMap.ShowUnicodeCategory = null;
}
else
{
// Map index to UnicodeCategory (offset by 1 because 0 is "All")
UnicodeCategory cat = Enum.GetValues<UnicodeCategory> () [idx.Value - 1];
_charMap.ShowUnicodeCategory = cat;
}
};

return new() { CommandView = selector };
selector.ValueChanged += (_, e) => _charMap.ShowUnicodeCategory = e.Value;

return new () { CommandView = selector };
}
}
34 changes: 19 additions & 15 deletions Examples/UICatalog/Scenarios/ColorPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,25 @@ public override void Main ()
app.Add (_demoView);


// Radio for switching color models
var rgColorModel = new RadioGroup ()
var osColorModel = new OptionSelector ()
{
Y = Pos.Bottom (_demoView),
Width = Dim.Auto (),
Height = Dim.Auto (),
RadioLabels = new []
{
Labels =
[
"_RGB",
"_HSV",
"H_SL",
"_16 Colors"
},
SelectedItem = (int)foregroundColorPicker.Style.ColorModel,
],
Value = (int)foregroundColorPicker.Style.ColorModel,
};

rgColorModel.SelectedItemChanged += (_, e) =>
osColorModel.ValueChanged += (_, e) =>
{
// 16 colors
if (e.SelectedItem == 3)
if (e.Value == 3)
{

foregroundColorPicker16.Visible = true;
Expand All @@ -161,12 +160,17 @@ public override void Main ()
{
foregroundColorPicker16.Visible = false;
foregroundColorPicker.Visible = true;
foregroundColorPicker.Style.ColorModel = (ColorModel)e.SelectedItem;
foregroundColorPicker.ApplyStyleChanges ();

backgroundColorPicker16.Visible = false;
backgroundColorPicker.Visible = true;
backgroundColorPicker.Style.ColorModel = (ColorModel)e.SelectedItem;
if (e.Value is { })
{
foregroundColorPicker.Style.ColorModel = (ColorModel)e.Value;
foregroundColorPicker.ApplyStyleChanges ();

backgroundColorPicker16.Visible = false;
backgroundColorPicker.Visible = true;
backgroundColorPicker.Style.ColorModel = (ColorModel)e.Value;
}

backgroundColorPicker.ApplyStyleChanges ();


Expand All @@ -176,13 +180,13 @@ public override void Main ()
}
};

app.Add (rgColorModel);
app.Add (osColorModel);

// Checkbox for switching show text fields on and off
var cbShowTextFields = new CheckBox ()
{
Text = "Show _Text Fields",
Y = Pos.Bottom (rgColorModel) + 1,
Y = Pos.Bottom (osColorModel) + 1,
Width = Dim.Auto (),
Height = Dim.Auto (),
CheckedState = foregroundColorPicker.Style.ShowTextFields ? CheckState.Checked : CheckState.UnChecked,
Expand Down
17 changes: 7 additions & 10 deletions Examples/UICatalog/Scenarios/Dialogs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,15 @@ public override void Main ()
};
frame.Add (label);

// Add hotkeys
var labels = Enum.GetNames<Alignment> ().Select (n => n = "_" + n);
var alignmentGroup = new RadioGroup
OptionSelector<Alignment> alignmentOptionSelector = new ()
{
X = Pos.Right (label) + 1,
Y = Pos.Top (label),
RadioLabels = labels.ToArray (),
Title = "Ali_gn",
BorderStyle = LineStyle.Dashed
AssignHotKeys = true
};
frame.Add (alignmentGroup);
alignmentGroup.SelectedItem = labels.ToList ().IndexOf ("_" + Dialog.DefaultButtonAlignment.ToString ());
frame.Add (alignmentOptionSelector);
alignmentOptionSelector.Value = Dialog.DefaultButtonAlignment;

frame.ValidatePosDim = true;

Expand Down Expand Up @@ -192,7 +189,7 @@ public override void Main ()
titleEdit,
numButtonsEdit,
glyphsNotWords,
alignmentGroup,
alignmentOptionSelector,
buttonPressedLabel
);
Application.Run (dlg);
Expand All @@ -216,7 +213,7 @@ private Dialog CreateDemoDialog (
TextField titleEdit,
TextField numButtonsEdit,
CheckBox glyphsNotWords,
RadioGroup alignmentRadioGroup,
OptionSelector alignmentGroup,
Label buttonPressedLabel
)
{
Expand Down Expand Up @@ -269,7 +266,7 @@ Label buttonPressedLabel
{
Title = titleEdit.Text,
Text = "Dialog Text",
ButtonAlignment = (Alignment)Enum.Parse (typeof (Alignment), alignmentRadioGroup.RadioLabels [alignmentRadioGroup.SelectedItem].Substring (1)),
ButtonAlignment = (Alignment)Enum.Parse (typeof (Alignment), alignmentGroup.Labels! [(int)alignmentGroup.Value!.Value] [1..]),

Buttons = buttons.ToArray ()
};
Expand Down
8 changes: 4 additions & 4 deletions Examples/UICatalog/Scenarios/DimAutoDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ private static FrameView CreateDimAutoContentFrameView ()
dimAutoFrameView.Add (resetButton);


var radioGroup = new RadioGroup ()
var optionSelector = new OptionSelector ()
{
RadioLabels = ["One", "Two", "Three"],
Labels = ["One", "Two", "Three"],
X = 0,
Y = Pos.AnchorEnd (),
Title = "Radios",
Title = "Options",
BorderStyle = LineStyle.Dotted
};
dimAutoFrameView.Add (radioGroup);
dimAutoFrameView.Add (optionSelector);
return dimAutoFrameView;
}

Expand Down
Loading
Loading