diff --git a/Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs b/Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs index bbbcd8e300..97c13654f8 100644 --- a/Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs +++ b/Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs @@ -16,6 +16,7 @@ namespace UICatalog.Scenarios; [ScenarioCategory ("Controls")] [ScenarioCategory ("Layout")] [ScenarioCategory ("Scrolling")] +[ScenarioCategory ("Unicode")] public class CharacterMap : Scenario { private Label? _errorLabel; diff --git a/Examples/UICatalog/Scenarios/ChineseUI.cs b/Examples/UICatalog/Scenarios/ChineseUI.cs index 829f5db0f5..d0c04d5460 100644 --- a/Examples/UICatalog/Scenarios/ChineseUI.cs +++ b/Examples/UICatalog/Scenarios/ChineseUI.cs @@ -3,6 +3,7 @@ namespace UICatalog.Scenarios; [ScenarioMetadata ("ChineseUI", "Chinese UI")] [ScenarioCategory ("Text and Formatting")] +[ScenarioCategory ("Unicode")] public class ChineseUI : Scenario { public override void Main () diff --git a/Examples/UICatalog/Scenarios/CombiningMarks.cs b/Examples/UICatalog/Scenarios/CombiningMarks.cs index 3c5698a072..6678cbdaee 100644 --- a/Examples/UICatalog/Scenarios/CombiningMarks.cs +++ b/Examples/UICatalog/Scenarios/CombiningMarks.cs @@ -3,6 +3,7 @@ namespace UICatalog.Scenarios; [ScenarioMetadata ("Combining Marks", "Illustrates how Unicode Combining Marks work (or don't).")] [ScenarioCategory ("Text and Formatting")] +[ScenarioCategory ("Unicode")] public class CombiningMarks : Scenario { public override void Main () diff --git a/Examples/UICatalog/Scenarios/Dialogs.cs b/Examples/UICatalog/Scenarios/Dialogs.cs index a2d757b577..0d2f57afd9 100644 --- a/Examples/UICatalog/Scenarios/Dialogs.cs +++ b/Examples/UICatalog/Scenarios/Dialogs.cs @@ -5,6 +5,7 @@ namespace UICatalog.Scenarios; [ScenarioMetadata ("Dialogs", "Demonstrates how to use the Dialog and Dialog classes")] [ScenarioCategory ("Dialogs")] +[ScenarioCategory ("Runnable")] public class Dialogs : Scenario { private const int WIDE_CODE_POINT = '你'; diff --git a/Examples/UICatalog/Scenarios/LineCanvasExperiment.cs b/Examples/UICatalog/Scenarios/LineCanvasExperiment.cs deleted file mode 100644 index f5cc2f3627..0000000000 --- a/Examples/UICatalog/Scenarios/LineCanvasExperiment.cs +++ /dev/null @@ -1,143 +0,0 @@ - -namespace UICatalog.Scenarios; - -[ScenarioMetadata ("LineCanvas Experiments", "Experiments with LineCanvas")] -[ScenarioCategory ("Drawing")] -[ScenarioCategory ("Adornments")] -[ScenarioCategory ("Proof of Concept")] -public class LineCanvasExperiment : Scenario -{ - public override void Main () - { - ConfigurationManager.Enable (ConfigLocations.All); - using IApplication app = Application.Create (); - app.Init (); - - using Window window = new () - { - Title = GetQuitKeyAndName (), - BorderStyle = LineStyle.None - }; - - var frame1 = new FrameView - { - Title = "_SuperView", - X = 0, - Y = 0, - Width = Dim.Fill (), - Height = Dim.Fill (), - SchemeName = "Base" - , - SuperViewRendersLineCanvas = true - }; - frame1.BorderStyle = LineStyle.None; - - //View.Diagnostics ^= DiagnosticFlags.FrameRuler; - - window.Add (frame1); - - var win1 = new Window - { - Title = "win1", - Text = "Win1 - 0,0", - X = 0, - Y = 0, - Width = 30, - Height = 10, - //BorderStyle = LineStyle.Heavy, - SuperViewRendersLineCanvas = true - }; - - frame1.Add (win1); - - var win2 = new Window - { - Title = "win2", - Text = "Win2 right of win1", - X = Pos.Right (win1) - 1, - Y = 0, - Width = Dim.Percent (30), - Height = Dim.Percent (70), - - //Scheme = Colors.Schemes ["Error"], - SuperViewRendersLineCanvas = true - }; - - - var subViewOfWin2 = new FrameView - { - Title = "subViewOfWin2", - X = 0, - Y = 0, - Width = Dim.Fill (), - Height = Dim.Fill (), - SuperViewRendersLineCanvas = true - - //Scheme = Colors.Schemes ["Menu"], - }; - - win2.Add (subViewOfWin2); - - frame1.Add (win2); - - - var view4 = new FrameView - { - Title = "View 4", - Text = "View4 below win2 win2.Width/5 Single", - X = Pos.Right (win1) - 1, - Y = Pos.Bottom (win2) - 1, - Width = win2.Width, - Height = 5, - SuperViewRendersLineCanvas = true - }; - - frame1.Add (view4); - - //var win5 = new Window - //{ - // Title = "Win 5", - // Text = "win5 below View4 view4.Width/5 Double", - // X = Pos.Left (win2), - // Y = Pos.Bottom (view4) - 1, - // Width = view4.Width, - // Height = 5, - - // //Scheme = Colors.Schemes ["Runnable"], - // SuperViewRendersLineCanvas = true, - // BorderStyle = LineStyle.Double - //}; - - //frame1.Add (win5); - - //var line = new Line - //{ - // X = 1, - // Y = 1, - // Width = 10, - // Height = 1, - // Orientation = Orientation.Horizontal, - // SuperViewRendersLineCanvas = true - //}; - //frame1.Add (line); - - //var marginWindow = new Window - //{ - // Title = "Positive Margin", - // X = 0, - // Y = 8, - // Width = 25, - // Height = 10, - - // //Scheme = Colors.Schemes ["Error"], - // SuperViewRendersLineCanvas = true - //}; - //marginWindow.Margin.Scheme = Colors.Schemes ["Error"]; - //marginWindow.Margin.Thickness = new (1); - //marginWindow.Border.Thickness = new (1, 2, 1, 1); - - //frame1.Add (marginWindow); - - app.Run (window); - } -} diff --git a/Examples/UICatalog/Scenarios/RuneWidthGreaterThanOne.cs b/Examples/UICatalog/Scenarios/RuneWidthGreaterThanOne.cs index 9ac8aaae8e..08d88f959f 100644 --- a/Examples/UICatalog/Scenarios/RuneWidthGreaterThanOne.cs +++ b/Examples/UICatalog/Scenarios/RuneWidthGreaterThanOne.cs @@ -5,9 +5,9 @@ namespace UICatalog.Scenarios; [ScenarioMetadata ("RuneWidthGreaterThanOne", "Test rune width greater than one")] -[ScenarioCategory ("Controls")] [ScenarioCategory ("Text and Formatting")] [ScenarioCategory ("Tests")] +[ScenarioCategory ("Unicode")] public class RuneWidthGreaterThanOne : Scenario { private IApplication? _app; diff --git a/Examples/UICatalog/Scenarios/Unicode.cs b/Examples/UICatalog/Scenarios/Unicode.cs index aae57890a5..bcca972a35 100644 --- a/Examples/UICatalog/Scenarios/Unicode.cs +++ b/Examples/UICatalog/Scenarios/Unicode.cs @@ -6,7 +6,7 @@ namespace UICatalog.Scenarios; [ScenarioMetadata ("Unicode", "Tries to test Unicode in all controls (#204)")] [ScenarioCategory ("Text and Formatting")] -[ScenarioCategory ("Controls")] +[ScenarioCategory ("Unicode")] public class UnicodeInMenu : Scenario { public override void Main () diff --git a/Examples/UICatalog/Scenarios/ViewExperiments.cs b/Examples/UICatalog/Scenarios/ViewExperiments.cs deleted file mode 100644 index bde8cbc988..0000000000 --- a/Examples/UICatalog/Scenarios/ViewExperiments.cs +++ /dev/null @@ -1,94 +0,0 @@ -namespace UICatalog.Scenarios; - -[ScenarioMetadata ("View Experiments", "v2 View Experiments")] -[ScenarioCategory ("Controls")] -[ScenarioCategory ("Adornments")] -[ScenarioCategory ("Layout")] -[ScenarioCategory ("Proof of Concept")] -public class ViewExperiments : Scenario -{ - public override void Main () - { - ConfigurationManager.Enable (ConfigLocations.All); - - using IApplication app = Application.Create (); - app.Init (); - - using Window window = new () { Title = GetQuitKeyAndName (), TabStop = TabBehavior.TabGroup }; - - AdornmentsEditor editor = new () - { - X = 0, - Y = 0, - TabStop = TabBehavior.NoStop, - AutoSelectViewToEdit = true, - ShowViewIdentifier = true - }; - window.Add (editor); - - FrameView testFrame = new () { Title = "_1 Test Frame", X = Pos.Right (editor), Width = Dim.Fill (), Height = Dim.Fill () }; - - window.Add (testFrame); - - Button button = new () { X = 0, Y = 0, Title = $"TopButton _{GetNextHotKey ()}" }; - - testFrame.Add (button); - - button = new Button { X = Pos.AnchorEnd (), Y = Pos.AnchorEnd (), Title = $"TopButton _{GetNextHotKey ()}" }; - - View popoverView = new () - { - X = Pos.Center (), - Y = Pos.Center (), - Width = 30, - Height = 10, - Title = "Popover", - Text = "This is a popover", - Visible = false, - CanFocus = true, - Arrangement = ViewArrangement.Resizable | ViewArrangement.Movable - }; - popoverView.BorderStyle = LineStyle.RoundedDotted; - - Button popoverButton = new () { X = Pos.Center (), Y = Pos.Center (), Title = Strings.cmdClose }; - - //popoverButton.Accepting += (sender, e) => App?.Popover!.Visible = false; - popoverView.Add (popoverButton); - - button.Accepting += ButtonAccepting; - - void ButtonAccepting (object sender, CommandEventArgs e) - { - //App?.Popover = popoverView; - //App?.Popover!.Visible = true; - } - - testFrame.Activating += (_, e) => - { - if (e.Context?.Binding is MouseBinding { MouseEvent: { } mouseArgs }) - { - if (mouseArgs.Flags == MouseFlags.RightButtonClicked) - { - popoverView.X = mouseArgs.ScreenPosition.X; - popoverView.Y = mouseArgs.ScreenPosition.Y; - - //App?.Popover = popoverView; - //App?.Popover!.Visible = true; - } - } - }; - - testFrame.Add (button); - - editor.AutoSelectViewToEdit = true; - editor.AutoSelectSuperView = testFrame; - editor.AutoSelectAdornments = true; - - app.Run (window); - popoverView.Dispose (); - } - - private int _hotkeyCount; - - private char GetNextHotKey () => (char)('A' + _hotkeyCount++); -}