From 8ca3d4ba95be90fb3cc01ec165eba7064470eae0 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 11:37:12 -0600 Subject: [PATCH] UI catalog (#387) * key down/up support * line endings? * line endings * KeyDown/Up support * line endings * line endings * Revert "Drop NuGet restore" This reverts commit 5c7a0d05f077755943ec66e6a82db890a24cd056. * Revert "Revert "Drop NuGet restore"" This reverts commit 2dc5fce8654ffeb6f3e570b0bdefcc6a5b6a6d2b. * updated demo * defined styles * Smarter StatusBar bottom tracking. * Prepping for https://github.com/migueldeicaza/gui.cs/issues/376 * Oops. * Fixed StatusBar 'snap to bottom' * line endings * Revert "Fixed StatusBar 'snap to bottom'" This reverts commit 9a91c957e2ed40f5b36c301eda3d107366aebb3d. * started UICatalog project * Initial working POC. * Fix newlines * merge * textalignment demo tweaks * textalignment demo tweaks * Unicode Menu Scenario * not sure why this keeps changing * re-added project to .sln file * re-enabled status bar * moved scenarios to dir * building a dim and pos demo * terminal.sln * progress...barely * fixed exit * progress with some underlying fixes to Label * added readme * fixes build issue * launch * made default colors readable on Windows * major UI Catalog upgrade * added more demos and updated readme * refactored and added more tests * added ref to Issue #437 * added OnKeyUp support to Curses and Net drivers * more tweaks - grab PR #438 first * Added a OpenSelectedItem event to the ListView #429 * updates * moved KeyUpHandler out of special ESC stuff * more tweaks & improvements * testing top window bug * supported OpenSelectedItem * lots of updates * fixed regression, fixed #444 * better button scenario * tweaks * add Ready event to Toplevel * dotfx .gitignroe * ready for ready * updated colors based on feedback; consolodated config code * tweaked readme * readme * Added Editor demonstrating TextView * Added Editor demonstrating TextView * added hexeditor scenario Co-authored-by: Miguel de Icaza Co-authored-by: BDisp --- Terminal.Gui/Views/ListView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index 4b08b92ab9..8203a83f39 100644 --- a/Terminal.Gui/Views/ListView.cs +++ b/Terminal.Gui/Views/ListView.cs @@ -338,7 +338,7 @@ public override bool ProcessKey (KeyEvent kb) break; case Key.Enter: - OnOpenSelectedItem (); + OpenSelectedItem?.Invoke (this, new EventArgs ()); break; } @@ -525,10 +525,10 @@ public override bool MouseEvent(MouseEvent me) SetNeedsDisplay (); return true; } - OnSelectedChanged (); + SelectedChanged?.Invoke (); SetNeedsDisplay (); if (me.Flags == MouseFlags.Button1DoubleClicked) - OnOpenSelectedItem (); + OpenSelectedItem?.Invoke (this, new EventArgs ()); return true; } }