Commit Graph

260 Commits

Author SHA1 Message Date
dependabot[bot]
cdff51f1de Bump ReportGenerator from 5.1.4 to 5.1.5
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.4...v5.1.5)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 14:09:17 +00:00
BDisp
9c36ec7c83 Fixes #1675. ContextMenu MenuItens typo 2022-04-19 13:24:39 +01:00
Jocelyn NATALI
c873db07f0 Fix context menus tests on culture != of "en-US" machines.
The "en-US" culture is forced.
2022-04-13 10:13:11 +02:00
Tig Kindel
1595bbb39a Merge pull request #1634 from BDisp/UseSubMenusSingleFrame-feature
Feature to display the sub-menus on a single frame instead multiple frames.
2022-04-07 09:12:31 -07:00
dependabot[bot]
4c4fa982b7 Bump ReportGenerator from 5.1.2 to 5.1.4
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.2 to 5.1.4.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.2...v5.1.4)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 14:12:07 +00:00
BDisp
04f9817023 Fixes view to screen relative on the context menu. 2022-03-17 12:52:40 +00:00
BDisp
3e3b67889d It is needed to get rid of the first and the last line ending of expectedLook. 2022-03-17 12:49:56 +00:00
BDisp
d9f52fc2f2 Changing from AssertDriverContentsWithPosAre to AssertDriverContentsWithFrameAre to return a Rect. 2022-03-17 12:49:55 +00:00
BDisp
484e98998a Feature to display the sub-menus on a single frame instead multiple frames. 2022-03-17 12:49:43 +00:00
Tig Kindel
2414fcb11f Merge pull request #1645 from migueldeicaza/dependabot/nuget/ReportGenerator-5.1.2
Bump ReportGenerator from 5.0.4 to 5.1.2
2022-03-17 03:06:57 -06:00
Thomas Nind
f96c7001e4 Fixed TableView when redrawing a System.DataTable that has no columns (#1639) 2022-03-17 02:06:17 -07:00
Thomas Nind
6374ba5b56 Rootkeyevent (#1635)
* Added RootKeyEvent

* Tests for RootKeyEvent

* Fixed warnings for Assert.Equal parameter order
2022-03-17 02:04:19 -07:00
Tig Kindel
38d5e6c2bf Merge pull request #1630 from BDisp/textfield-localization-fix
Fixes TextField context menu not showing with the current localization.
2022-03-17 02:57:45 -06:00
Thomas Nind
7e04e31953 Table scroll fix (#1627)
* TableView scroll down goes one line at a time

Fixes #1626

* Removed accidentally committed test

* Updated test comments

* Added TableStyle.SmoothHorizontalScrolling

* Add explicit break into while for when scrolled to last column.

* Added tests for SmoothHorizontalScrolling
2022-03-17 01:56:21 -07:00
dependabot[bot]
29506d12f7 Bump ReportGenerator from 5.0.4 to 5.1.2
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.0.4 to 5.1.2.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.0.4...v5.1.2)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 14:12:24 +00:00
BDisp
17ed8dbed0 Only allows an open menu bar at a time. 2022-03-07 22:46:55 +00:00
BDisp
a822e1afa9 Adds a popup ContextMenu feature. Implements ContextMenu for TextField. (#1615)
* Implementing ContextMenu feature to being popup by keyboard or mouse.

* Implements ContextMenu into TextField.

* Ensures the context menu's right and bottom frame from being greater than the container.

* Added Host property. Improving scenario and unit tests.

* Only draw the RightTee if it is at the end of the menu.

* Implements cursor visibility on TextField.

* Fixes the sub-menu not showing.

* Avoids draw the menu help and shortcut if there no available space.

* Remove reference for the MenuClosing event.

* UpdateCursor must only run after the ScreenBuffer is initialized to use the cursor visibility.

* Implements Resized event on Toplevel class.

* Prevents writing overlay on the menu.

* Covering more unit tests.

* Changing from Views to Core namespace.

* Implementing MenuClosingEventArgs and MenuAllClosed event.

* Only close the menu if it's open.

* Implementing localization for en-US and pt-PT to the FileDialog.

* Implementing localization for en-US and pt-PT on the TextField context menu.

* Fixes a bug where DeleteSelectedText is updating the Text before operation completion.

* Added a method to get all the supported cultures from the Terminal.Gui.

* Improving context menu and adding more unit tests.
2022-03-06 22:01:51 -08:00
BDisp
da0ea09bed Implementing localization for en-US and pt-PT to the FileDialog. (#1625)
* Implementing localization for en-US and pt-PT to the FileDialog.

* Added a method to get all the supported cultures from the Terminal.Gui.
2022-03-06 22:00:47 -08:00
Freddie Mercurial (Jessica M.)
62ec263b02 test for #1612 (#1623) 2022-03-04 18:13:22 -08:00
BDisp
4281030361 Changed Button Text property to use override instead of new. (#1622)
* Changed Button Text property to use override instead of new.

* Fixing HotKey behavior.
2022-03-04 18:05:27 -08:00
BDisp
a9a0d176c1 The KeyPress event must only be used by the most focused view in the ProcessHotKey event. (#1614) 2022-02-26 23:59:50 -08:00
BDisp
56c28f6d37 Fixes the CanFocus equal to false from setting HasFocus to true again. (#1612)
* Fixes the CanFocus equal to false from setting HasFocus to true again.

* Unit test also proving setting a toplevel CanFocus to false focus the next toplevel.

* Unit test proving that a view with CanFocus equal to true can be focused on the same toplevel.
2022-02-24 05:49:34 -08:00
BDisp
e3b62cff38 Implementing undo/redo to back tab key. (#1608) 2022-02-24 05:49:05 -08:00
BDisp
1557f7a71e Fixes ComboBox text and list if the height is equal to one. (#1606)
* Fixes ComboBox text and list if the height is equal to one. End and Home navigate on text.

* Trying fix the all scenarios unit test.

* Removing unnecessary code.

* Avoiding the Collection was modified after the enumerator was instantiated exception.

* Also cover the IndexOfValue inside the lock.

* Disposing the DrawContent event.

* Increasing the time to test.

* Revert "Increasing the time to test."

This reverts commit b3c2ac871c.

* CharacterMap take more time to load.
2022-02-20 13:39:22 -08:00
BDisp
0168a3c054 Fixes the auto-size text bug. (#1603)
* Fixes the auto-size text bug.

* The superview is responsible to clearing the previous frame.
2022-02-20 08:02:38 -08:00
dependabot[bot]
6210c4e45d Bump Microsoft.NET.Test.Sdk from 17.0.0 to 17.1.0 (#1598)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.0.0 to 17.1.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.0.0...v17.1.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-18 07:37:33 -08:00
BDisp
0be59c9bc5 Fixes FileSystemWatcher exception on Linux. (#1600) 2022-02-18 07:36:59 -08:00
BDisp
d403b8b723 Adding unit test for the ListView RowRender event. (#1599) 2022-02-18 07:35:52 -08:00
BDisp
6c21b1ee6e Implementing HistoryText class for undo and redo text. (#1590)
* Implementing HistotyText class for undo and redo text.

* Untying newline based on 'n' but on Environment.NewLine.

* Prevent throwing exception if value is null.

* Also adding history text feature to the return key.

* Fixes WSL unit test failure.
2022-02-18 07:34:11 -08:00
Thomas Nind
40f11ecf63 Fixes #1588 - Documentation for keybinding (#1595) 2022-02-18 07:28:11 -08:00
BDisp
b185722ab6 Standalone update fix (#1596)
* Updating nuget package and fixing nonworking code.

* Adding some more improvements and launch for UseSystemConsole.

* Fixes layout issue.

* Also added a launch for UseSystemConsole for the Example project.

* Fixing unit tests.

* Trying fixing timeouts duplicate keys.
2022-02-18 07:23:46 -08:00
Thomas Nind
acaa7aa7b6 Fixes TableView not activating after keybinding refactor (#1593)
* Fixes TableView not activating after keybinding refactor

* Fix reading old value not new one
2022-02-18 07:17:12 -08:00
Thomas Nind
ea7981dc59 Adds Key Binding support. Also refactors Autocomplete and Undo/Redo. (#1556)
* Refactored ProcessKey to use public methods for case logic

* Added KeyBinding class

* Refactored key binding to split key->command from command->implementation

This reduces duplication and simplifies the API

* Finishing key bindings implementation in ListView.

* Adding more unit tests to the ListView.

* Added key bindings to the Button and more features.

* Replaces Action for Func<KeyEvent, bool> on CommandImplementations.

* Allowing commands to have any number of arguments.

* Implementing key bindings on Checkbox view.

* Added test for changing HotKey in Button and made ReplaceKeyBinding protected

* Changed `CommandImplementations` to `Func<KeyEvent, bool>` to better understand current command implementations

* Implementing key bindings in ComboBox.

* Renamed Command keys and fixed ComboBox issues:

- Fixed pressing Esc in ListAndCombos scenario without selecting cause an array out of bounds error
- Changed the Esc key in ComboBox to also collapse the list selection
- Added bool return to public virtual method Expand and Collapse (this is a breaking change)

* Implementing key bindings in DateField.

* Organizing some things.

* Implementing key bindings on TimeField.

* No key bindings on FrameView.

* Added keybinding support to TreeView

* Added mouse support and more features.

* Updating NuGet packages.

* Putting text on the same line.

* Changing function command to Func<bool>.

* Added a read only Position, CursorPosition properties and events.

* Keybindings for GraphView

* Added a stream argument to ApplyEdits to only save the edits.

* Implementing key bindings on the HexView.

* Added MenuOpened event and others bug fixes.

* Fixing typo.

* Unifying constructors initializations.

* Implementing keybindings in the Menu.

* Removing unnecessary variable.

* Implementing keybindings in RadioGroup view.

* Changing Home to TopHome and End to BottomEnd.

* Implementing keybindings in the ScrollView.

* Changing the PageLeft and PageRight keybindings.

* Fixing PageLeft and RightPage.

* Removing CleanUp command.

* Key bindings for TabView

* Keybindings for TableView

* Fixed unit tests for PageDown to correctly assign input focus to the TableView

* Fixes the CalculateLeftColumn method avoiding jump two columns on forward moving.

* Fixes #1525. Gives the same backspace behavior as TextView.

* Changes kill-to-start key to work on Linux too.

* Fixes SelectedStart, SelectedText and some cleaning.

* Implementing keybindings in TextField.

* Updated command names and merged as discussed with @BDisp

- Merged LeftItem and LeftChar to Left (same for Right).
- Also renamed Kill to Cut
- Added ScrollLeft / ScrollRight (and renamed ScrollLineUp to just ScrollUp

* Renamed Command.InsertChar to ToggleOverwriteMode and added Enable/Disable

* Removed 'Mode' suffix from toggle overwrite

* Allows navigation to outside a TextView if IsMdiContainer is true.

* Implementing keybindings in Toplevel.

* Fixing null reference exception.

* Changing to keys instances events instead static.

* Transferring the events to the Toplevel.

* Implementing keybindings in TextView.

* Removing static from the QuitKeyChanged and adding unit test.

* Replacing Added with the Initialized event.

* Ignore control characters and other special keys.

* Changing InvokeKeybindings to return Nullable bool and added two more keys to the Toplevel.

* Implementing keybindings in Autocomplete. I had to derive from View.

* Added keybindings menu item to UICatalog

* Added ClearBinding

* Implementing IAutocomplete, abstract Autocomplete and derived TextViewAutocomplete.

* Implementing keybindings in the TextValidateProvider

* Add keybinding to CellActivationKey.

* Fixing some formats.

* Add ObjectActivationKey to the keybindings.

* Made it much easier to implement abstract base `Autocomplete` in other views by moving methods up out of `TextViewAutocomplete` implementation

* Allowing Autocomplete to popup inside or outside the container.

* Fixes the cursor not being showing if the text length is equal to the view width.

* A unit test to prove the 4df5897.

* Removed unused method `GetCursorPosition` from Autocomplete

* Trimmed down implementation specific methods from IAutocomplete

* Fixed xmldoc comment tag

* Format Autocomplete on multiline and fixes wrap settings.

* Adding keys from a to z to avoid the Key.Space on ToString.

* Fixes the vertical position outside the container.

* Adding more key unit tests.

* Changing comment to upper case and proving that doesn't will breaking nothing.

* Replaces Pos.Bottom to Pos.AnchorEnd.

* Fixes popup on resizing.

* Should only using the Pos.Bottom to position outside the view.

* Fixes #1584

* Fixes https://github.com/migueldeicaza/gui.cs/issues/1584#issuecomment-1027987475

* Fixes some bugs with SelectedItem.

* Command must also return a nullable bool.

* Ensures updating the ComboBox text on leaving the control.

* Only with the nullable bool was possible to make the MoveUp and the MoveDown working.

* Added logging of which scenario failed in test

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2022-02-08 10:40:40 -08:00
dependabot[bot]
50018ce6f5 Bump coverlet.collector from 3.1.0 to 3.1.1 (#1583)
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-06 14:45:02 -08:00
dependabot[bot]
e46102885e Bump ReportGenerator from 5.0.0 to 5.0.3 (#1582)
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.0.0 to 5.0.3.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.0.0...v5.0.3)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-06 14:44:53 -08:00
BDisp
87f6cfc8ed Fixes #1557 - Border and PanelView fixes (#1563)
* Fixes #1557. Ensures the border child not to be null.

* Improves the PanelView and some bug fixes.

* Implementing rounded corners border.

* Fixes some items not showing on page down/up.
2022-02-06 14:43:38 -08:00
BDisp
ff962b64df Added MenuOpened event and others bug fixes. (#1572)
* Added MenuOpened event and others bug fixes.

* Fixing typo.

* Unifying constructors initializations.
2022-02-06 14:38:11 -08:00
BDisp
b28e8186dc Added mouse support and more features to the HexView. (#1571)
* Added mouse support and more features.

* Updating NuGet packages.

* Putting text on the same line.

* Added a read only Position, CursorPosition properties and events.

* Added a stream argument to ApplyEdits to only save the edits.

* Ignore control characters and other special keys.
2022-02-06 14:34:15 -08:00
BDisp
11f29d45ea A unit test to prove the 4df5897. 2022-01-23 23:37:46 +00:00
BDisp
4df5897318 Fixes the cursor not being showing if the text length is equal to the view width. 2022-01-23 23:14:47 +00:00
BDisp
3baf993b63 Fixes SelectedStart, SelectedText and some cleaning. 2022-01-14 01:12:47 +00:00
BDisp
32db62044e Changes kill-to-start key to work on Linux too. 2022-01-14 01:09:15 +00:00
BDisp
2513dbc0f9 Fixes the CalculateLeftColumn method avoiding jump two columns on forward moving. 2021-12-28 02:13:51 +00:00
BDisp
1b3668ca70 Upgrading to Net6.0 (#1515) 2021-12-18 05:26:00 -08:00
dependabot[bot]
024ce57430 Bump ReportGenerator from 4.8.13 to 5.0.0 (#1512)
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 4.8.13 to 5.0.0.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v4.8.13...v5.0.0)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-18 05:22:48 -08:00
BDisp
d84ab39ec3 Allows ListView trigger the Enter and Leave events. (#1508)
* Allows ListView trigger the Enter and Leave events.

* Added unit test for Enter and Leave events to all views.
2021-11-13 07:46:49 -08:00
dependabot[bot]
93b142b4bf Bump Microsoft.NET.Test.Sdk from 16.11.0 to 17.0.0 (#1497)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.11.0 to 17.0.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.11.0...v17.0.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-03 22:19:43 -07:00
BDisp
58e7698f4c Fixes #1475. Selection ending with a white space error. (#1478)
* Fixes #1475. Selection ending with a white space error.

* Prevents the mouse  double click processing twice.

* Removing unnecessary variable.

* Sets ScrollViewBar CanFocus to false to ensure the host always focused.

* Only navigates through TabView if winDialog is not null and ensures TextView being focused.

* Fixes both dynamic menu and status bar broken scenarios.

* Fix a bug where the subviews oldEnabled can be overridden, even the superview Enable property hasn't changed.

* Fixes CanFocus when set to false and HasFocus is true.

* Fixes the broken TextView DesiredCursorVisibility.

* Prevents TextField being focused by mouse if CanFocus is false.

* Fixes the CanFocus on content views.

* Fixes #1470. Not all WindowsConsole.InputRecord are caught in WindowsDriver.

* Changing the input for a Queue object.

* Suppress warnings.

* Fixed yet the visibility cursor and adding more unit tests.

* Suppressing more warnings.
2021-10-25 12:40:18 -07:00
BDisp
2ef4edd08e NetDriver fixes keys modifiers not reseting and enter key on Windows Terminal. (#1484)
* Fixes keys modifiers not reseting and enter key on Windows Terminal.

* Fixes summary warnings.

* Ensures MainIteration processes  input while count greater than zero.

* Adding UseSystemConsole to the launch settings profile.

* Improves the performance with Console.Write by writing faster.
2021-10-25 12:31:49 -07:00
Thomas Nind
b5799c3ded Fixed label positions to begin at Margins not just bottom left of screen (#1488)
* Fixed label positions to begin at Margins not just bottom left of screen

* Tidied up Axis GetLabels and added margin control to GraphViewExample

* Added tests for very large margins
2021-10-25 12:30:39 -07:00