Commit Graph

354 Commits

Author SHA1 Message Date
miguel
79011c3e7a Bump to 0.81 2020-04-14 21:53:49 -04:00
BDisp
ee7fc3022d Fixes #355 stack overflow with Pos based on the size of windows at startup. Added a OnResized action to set the Pos after the terminal are resized. (#367) 2020-04-14 21:50:17 -04:00
miguel
12cfbb8231 Fix the demo 2020-04-14 21:49:09 -04:00
BDisp
d772cf4962 What it does is that if it doesn't allow multi-selection and you already have a different item selected, select the new one and deselect the previous one. (#361) 2020-04-14 09:34:54 -04:00
Charlie Kindel
c51e4177fe made it so Ctrl-X on status bar actually quits (#362) 2020-04-14 09:34:28 -04:00
Ollie
476e6e8a97 Add an menu on close event and a public property of the Menu to check if it is open (#364) 2020-04-14 09:34:14 -04:00
BDisp
501e43557c Ensures that the cursor is inside the button, even if all the text is in lower case. (#363) 2020-04-14 09:33:46 -04:00
miguel
6d08364ad9 Move the text alignment demo elsewhere, so I can debug other things 2020-04-13 14:43:46 -04:00
miguel
623e67692c The recent fix also applies to the - operator 2020-04-13 14:12:24 -04:00
miguel
f8548666ee Improve the UI of the ListView demo, and the demo; And add a crashing scenario that I will fix 2020-04-13 14:10:25 -04:00
miguel
ad8461d6af Prevent crash on Linux/Mac introduced in 0.80 2020-04-13 13:45:27 -04:00
miguel
72403fbd21 Prevent crash by avoiding using a cast that is not correct, fixes #356 2020-04-13 12:19:00 -04:00
Ryan Yandle
37095718ba Fix broken link (#354)
Fixing the TopLevel link
2020-04-09 17:06:38 -04:00
miguel
6253b4088b Remove XML tripping release note 2020-03-31 13:32:52 -04:00
miguel
06c760b399 Bump version number 2020-03-31 13:32:26 -04:00
miguel
7569b8e217 update release notes 2020-03-31 13:32:26 -04:00
copyliu
fcc38b9a45 fix for wide-character display (#330) 2020-03-31 09:53:21 -04:00
BDisp
49cd29853f All my pull-request at once (#345)
* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Fixes culture info of DataField from pr #250

* Fixes the rectangle drawing issue

* Fixes #290 issue "Redraw issue when setting coordinates of label"

* Added sub menus into menu bar with mouse and key navigation

* Needed to assume color for the Disable attribute

* Added Colors.Menu.Disabled to CursesDriver.cs

* Mouse text selection with cut, copy and paste on text fields

* Change sepChar from char to string in DateField

* Adding a disabled menu item in the demo file

* Adding a disabled menu item in the demo file

* Fixes Button repainting issue when changing the text length to one smaller

* Fixes #290 issue "Redraw issue when setting coordinates of label"

* Only demonstration of issue # 308 that even though the cursor is gray on a gray background can be viewed.

* Fixes issue #163 "ScrollView does not render some content"

* Fixed bug in Button that caused a loop redraw calling TerminalResized

* Fixes #282 "Repaint Issue"

* Removed white space

* Mouse features added to FileDialog including wheel support.

* Forget to delete this commented method.

* Changing back to MouseFlags.AllEvents in case some mouse event is not triggering.

* Add documentation on ISupportInitialize/ISupportInitializeNotification (#286)

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Fixed key events traversal for modal dialogs (#288)

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Add documentation on ISupportInitialize/ISupportInitializeNotification (#286)

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Fixed key events traversal for modal dialogs (#288)

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Added sub menus into menu bar with mouse and key navigation

* Fetch from upstream/master

* Fetch from upstream/master

* Fetch from upstream/master

* Fetch from upstream/master

* Fetch from upstream/master

* Add documentation on ISupportInitialize/ISupportInitializeNotification (#286)

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Fixed key events traversal for modal dialogs (#288)

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Fetch from upstream/master

* Fetch from upstream/master

* Fetch from upstream/master

* Add documentation on ISupportInitialize/ISupportInitializeNotification (#286)

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Fixed key events traversal for modal dialogs (#288)

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Fetch from upstream/master

* Switch netcoreapp target to netstandard2.0 (#284)

Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.

* Added TextView.TextChanged event (#264)

* Prepare for 0.25

* Remove travis link

* Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac

* Prepare for 0.26

* Restore some files that were deleted by Daniel's commit that I had not restored

* Fixed out of range exception and text redraw when navigate backward (#320)

* Typo fix (#321)

* Fixes issue #306 async/await hang (#312)

* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement

* Support menu items that are null so they can be drawn as a menu separator (#304)

* Fixed and Enabled Library reinitialization (#291)

- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.

* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)

* Resizing the MessageBox width to accommodate all message text (#299)

* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* extract methods on ListView to make it controlable from other controls (#310)

* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow

* Allowing list items selection (#302)

* Fetch from upstream/master

* Fixes #342 and improves color change interaction.
Usage:
Colors.Base.Normal = new Terminal.Gui.Attribute (Color.Green, Color.Black);

* Inserted new line at the end  of file .
Changed method name to SetAttribute in the  ColorScheme class.

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Prepare for 0.70

* Timefield format with bounds values (#303)

* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]

* Prepare for 0.70

* Removed duplicated Attribute Disabled property

* Fixed some bugs with the mouse event and text selection, copy, cut and paste. There is still a random failure in the mouse events that lock on button released and only trigger button clicked after moving the mouse.

* Failure behavior solved. It was a threading safe issue. Driver.Wakeup () moved to the Post method on MainLoopSyncContext class solved it.

* Changed the default for RightmostButtonPressed to Button4 and enabled  clicked-drag

* Added support for Button Triple Clicked too.  FileDialog changed to deal with ButtonClicked.

* Fixed a bug with the timer when dragging.

* Fixes #343 - Added AllowsMultipleSelection to the ListView

* Fixes #346 issue with enhancers characters, but it only could be apply after the pull requests at NStack are merged because of the Rune.ColumnWidth error.

* Fixes code format.

* Enabled Button Pressed with ReportMousePosition simultaneously.

* Dragging is already working. TODO: optimize, only SetNeedsDisplay on the before/after regions.

* Fixes the extra characters that remains in case the new text length is smaller than the older.

* Fixes #349 TextField user typed input no longer fires Changed event.

* Includes ControlKeyState for all the buttons events.

* Added SetSourceAsync to ListView

* Menu enhancement that works well, even if the top level has no other views. Working in further feature that if clicked outside of the menu it will closed.

* Some more features in mouse and in core.

* Added more mouse events flags, drag features, toplevel color and more...

* Remove unnecessary SetNeedsDisplay.

* Fixes a bug in the label

* Added StatusBar from pr #201 with a  little change.

* Added features to TextField like mouse selection with copy, cut and paste shortcut keys. Now it's possible to use the combination of the Alt+Control+delta keys. It also be possible use special characters like €.

* Simplifying the menu with better performance.

* Private keyword dropped in all files and added some documentation.

* Changed demo to reflect the added and changes features.

* Added csproj and config files to verify if it won't trigger errors from Travis.

* Demo with the StatusBar.

* Patch for position of the StatusBar

* Removed unnecessary nugget packages.

* It looks like packages.config files are obsolete. Travis verification test.

* Update Designer.csproj

Use Stack 0.14

* Use NStack 0.14

* Use NStack 0.14

* Use NStack 0.14

* Use NStack 0.14

* Changed the NStack.Core and System.ValueTuple versions.

* Added System.ValueTuple to Example project.

* Remove System.ValueTuple and added NETStandard.Library to Example project.

* Try to restore the nuget packages.

* Revert "Try to restore the nuget packages."

This reverts commit 3957e022c3.

* Added NETStandard.Library ti the root packages.config

* Upgrade to "Microsoft.NETCore.Platforms" version="
2.0.1"

* Added <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

* Targeting framework 472.

* Removed "System.ValueTuple" Version="4.5.0" from Terminal.Gui project.

* More cleaning to the projects.

* I guess you don't need this.

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>
Co-authored-by: Daniel Cazzulino <daniel@cazzulino.com>
Co-authored-by: Marius Ungureanu <teromario@yahoo.com>
Co-authored-by: miguel <miguel.de.icaza@gmail.com>
Co-authored-by: Miguel de Icaza <miguel@gnome.org>
Co-authored-by: imaras <imaras@net.hr>
Co-authored-by: Kasper B. Graversen <kbilsted@users.noreply.github.com>
Co-authored-by: Fabian R <kderazorback@me.com>
Co-authored-by: Timothy <timothyparez@gmail.com>
2020-03-31 09:26:54 -04:00
Miguel de Icaza
5c7a0d05f0 Drop NuGet restore 2020-03-31 09:22:32 -04:00
Miguel de Icaza
025b3b81ec Run nuget restore, hoping to fix the build issue 2020-03-30 17:38:43 -04:00
Daniel Cazzulino
c4509edbae Switch to stable version of .NET framework reference assemblies (#348)
* Switch to stable version of .NET framework reference assemblies

* Bump dotnet to get fix to nuget restore for unsigned packages

Related to https://github.com/NuGet/Home/issues/7574

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

Bump to latest stable
2020-03-29 23:09:53 -04:00
Miguel de Icaza
fc1faba745 Prepare for 0.70 2020-03-09 14:30:15 -04:00
BDisp
fa808348ee Allowing list items selection (#302) 2020-02-29 11:54:27 -05:00
Kasper B. Graversen
787d65b161 extract methods on ListView to make it controlable from other controls (#310)
* moveup

* MoveDown

* MovePageDown

* MovePageUp

* MarkUnmarkRow
2020-02-29 11:51:49 -05:00
BDisp
8a502e5f1b Timefield format with bounds values (#303)
* Implemented lower and upper bounds to TimeField

* Passing old text to the Changed event handler

* Change sepChar from char to string in TimeField

* Changing comparison from ':' to sepChar.ToCharArray () [0]
2020-02-29 11:51:15 -05:00
BDisp
832ff75973 Resizing the MessageBox width to accommodate all message text (#299)
* Fixed key events traversal for modal dialogs

The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68

* Resizing the MessageBox width to accommodate all message text

Co-authored-by: Adrian Alonso <adrianalonso@gmail.com>
2020-02-29 11:50:37 -05:00
Timothy
a24d29f50a Moved ListView.ListWrapper out of ListView migueldeicaza/gui.cs#313` (#315) 2020-02-29 11:48:46 -05:00
Fabian R
d3ec722bd9 Fixed and Enabled Library reinitialization (#291)
- Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
- Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
- Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
- Minor change to Core.cs::Application.Init(Func<Toplevel>) for better initialization status tracking, via backend property instead of relying on the Top field.
2020-02-29 11:47:29 -05:00
Kasper B. Graversen
d4a7cef9cb Support menu items that are null so they can be drawn as a menu separator (#304) 2020-02-29 11:46:18 -05:00
BDisp
0c72b8eae1 Fixes issue #306 async/await hang (#312)
* Fixed async/await hang

* Fixed async/await hang with calling Wakeup

* Moved Wake Up into lock statement
2020-02-29 11:45:29 -05:00
imaras
71b8678649 Typo fix (#321) 2020-02-29 11:44:46 -05:00
BDisp
35591b8399 Fixed out of range exception and text redraw when navigate backward (#320) 2020-02-29 11:44:16 -05:00
Miguel de Icaza
13b3ec2ce7 Restore some files that were deleted by Daniel's commit that I had not restored 2020-02-29 11:11:48 -05:00
Miguel de Icaza
92bc90e356 Prepare for 0.26 2020-02-29 10:51:36 -05:00
miguel
6c8917dd30 Revert Daniel's change 00c5997daa as it prevents the solution from building on Mac 2019-11-26 20:46:04 -05:00
Miguel de Icaza
b5ba302af4 Remove travis link 2019-11-05 12:49:27 -05:00
miguel
0276b12e65 Prepare for 0.25 2019-11-04 10:00:32 -05:00
Adrian Alonso
d0790712e5 Fixed key events traversal for modal dialogs (#288)
The key must be propagated initially to the first chain element
before evaluating if we should stop because of the handled or
the Modal condition. Otherwise the modal dialog
won't get any process key notification.

This fixes c072e29a68
2019-11-03 13:15:22 -05:00
Daniel Cazzulino
6944b755f5 Added TextView.TextChanged event (#264) 2019-11-02 22:22:55 -04:00
Marius Ungureanu
ec21bcec8e Switch netcoreapp target to netstandard2.0 (#284)
Fixes #283 

Instead of adding another target framework to the list, switch from netcoreapp2.0 to netstandard2.0, as ns2.0 is a subset of netcoreapp.
2019-11-02 22:20:08 -04:00
Daniel Cazzulino
20d87ae815 Add documentation on ISupportInitialize/ISupportInitializeNotification (#286) 2019-11-02 22:19:40 -04:00
Daniel Cazzulino
c072e29a68 Allow key events to traverse the TopLevel hierarchy unless IsModal=true (#262)
It's quite common for key events to flow up the containment hierarchy in
UI frameworks. This could simplify management of global hotkeys that can
be placed in a top-level "App" and have all views shown subsequently just
"inherit" that behavior as long as they let the key event flow.

Propagating keys upwards is typically undesirable in modal dialogs, so we
set it to true in the `Dialog` base class.

Make sure we make a copy of the items since a key handler could modify the
top-level collection (i.e. by closing a dialog in between this processing).
2019-11-01 21:41:41 -04:00
Daniel Cazzulino
a7c8594721 Add indent_size which is honored by VS2019 and behaves like tab_width (#285)
`indent_size` came before `tab_width` and the latter is basically a fallback for the former, 
as far as I can understand https://github.com/microsoft/vscode-editorconfig/blob/master/src/editorConfigMain.ts#L248. 

However, VS behaves weirdly when one is defined and not the other. It gets the tabs 
completely wrong. If both have the same value, however, it works as expected. So make 
it easy for contributors on VS to contribute by adding this value. 

Hopefully, this will be a no-op on VSM.
2019-11-01 21:35:23 -04:00
Daniel Cazzulino
ebb3c186ce Add support for ISupportInitialize/ISupportInitializeNotification for UIs (#261)
When building UIs, it's quite common to separate the UI/control building code
from the interaction logic by placing it all in a single method, usually
`InitializeComponent` or similar. This also allows other tooling to generate
such a method from potentially other UI languages (XML/Json/Yaml/whatever)
at build-time.

Even if no codegen is involved, having the UI building in a single place
allows for creating base views that provide some common boilerplate that
derived views can subsequently extend by overriding the base "initialize"
method.

The tricky part is that the base class cannot provide (at least that's
against the .NET guidelines and it certainly makes for some confusing and
potentially hard to reason bugs) a *virtual* method to do so and invoke
it from the constructor, since the base class constructor is called and
finishes *before* the derived class constructor does. This means that
fields that may be required by the derived view to build its UI in its
override of the "initialize" method would not be available by the time
the base class calls it.

Which is why the best place to handle such an approach is in the library
itself, which controls the exact time when a view is about to be shown.
Since no other method is provided for "initialize once before showing
for the first time" scenario, a good trade-off is to simply enable this
mechanism as totally opt-in by allowing views to implement `ISupportInitialize`
(which provides the `BeginInit`/`EndInit` pair) or `ISupportInitializeNotification`
(which adds `IsInitialized`/`Initialized` property/event). If the former
is implemented, the Begin/End will be called on every `Run`, since the
library has no way of knowing if the view has already been initialized
before. In these cases, the views could just clear all its controls in
the `BeginInit` and reconstruct the UI entirely in `EndInit`. The
`ISupportInitializeNotification` interface allows more control for views
that require that Begin/End init are called exactly once.
2019-10-25 16:43:48 -04:00
Daniel Cazzulino
00c5997daa Unify projects in SDK-style and PackageReference (#54)
* Unify projects in SDK-style and PackageReference

* Add a note on the known issue about dlls not being copied

* Bump CI to a more recent stable version of Mono

This adds support for .net472, the first version of .NET
with full support for netstandard2.0
2019-10-25 16:43:04 -04:00
Daniel Cazzulino
4e85b5117e Upgrade from PackageLicenseUrl to PackageLicenseExpression (#270)
The existing property is now considered legacy and results in a build warning: 

```
##[warning]C:\Program Files\dotnet\sdk\3.0.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): Warning NU5125: The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead.
```
2019-10-25 16:42:05 -04:00
Miguel de Icaza
0d9ea2c409 Comments 2019-10-25 13:39:09 -04:00
giladlevi
5424e6d43b [Core - Subviews]: added InternalSubview property without allocations (the calling to subviews.AsReadOnly() actually allocates and Copy the List) for internal usages and keeps the public Subview property for api compatibility. (#277) 2019-10-25 13:37:21 -04:00
Daniel Cazzulino
9a70c1319b Avoid throwing when the tokenSource is cancelled (#266)
When invoking an action in the main loop, the token will be cancelled (see
`MainLoop.Invoke` and `WindowsDriver.Wakeup`). At this point when the
EventsPending is running we must avoid throwing by waiting using a cancelled token:

`eventReady.Wait(waitTimeout, tokenSource.Token)`

And make sure we reach the disposal of the token source. Otherwise we keep throwing
over and over and cause a severe performance problem for the running app.
2019-10-25 13:34:36 -04:00
giladlevi
a20d244d59 bugfix in WindowsDriver: removed the TerminalResized member that hides the inherited one from ConsoleDriver (#273) 2019-10-25 13:32:33 -04:00