Commit Graph

2460 Commits

Author SHA1 Message Date
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
dependabot[bot]
9c8e92c2b5 Bump actions/setup-dotnet from 1 to 2 (#1621)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 1 to 2.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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>
2022-03-04 18:15:20 -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
Miguel de Icaza
6463c72528 Update issue templates 2022-02-06 22:40:00 -05:00
Miguel de Icaza
c3f3ee938b Update issue templates 2022-02-06 22:39:44 -05: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
Thomas Nind
3e7d2ef570 Fixes #1584 - ComboBox is hiding elements below from being clicked/focused (#1585)
* Fixes #1584

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

* Fixes some bugs with SelectedItem.

* Ensures updating the ComboBox text on leaving the control.

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2022-02-06 14:44:33 -08:00
henrikx
24bdaad9d7 Use custom resolver for libcoreclr.so also for .NET 6.0 (#1574)
* Use custom resolver for libcoreclr.so also for .NET 6.0

* Implement suggested changes
2022-02-06 14:44:01 -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
Aurélien VERBEKE
64d14d325d Fixes #1577 - Add Support for Colored ListView Items (#1578)
* We can now choose the color (background and foreground/text) we want to display each item.

* Added RowRender event.

* Colored ListView in action.

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2022-02-06 14:43:20 -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
Tig Kindel
05aa88389d Merge pull request #1564 from BDisp/calculateleftcolumn-fix
Fixes #1525 - Gives TextField the same backspace behavior as TextView
2022-02-06 14:32:33 -08:00
Thomas Nind
85c74b8357 Added DesiredCursorVisibility to TreeView (#1561) 2022-02-06 14:27:19 -08:00
Tig Kindel
aeb02fe8fe Merge pull request #1531 from BDisp/mdi-visible-fix
Fixes #1529 - Mdi container will deal with the visibility of their child's.
2022-02-06 14:25:03 -08:00
Tig Kindel
91ecc51e36 fixing #1560 - Fix docfx errors and warnings (#1586) 2022-02-06 14:18:04 -08:00
BDisp
1d287fabe7 Fixes #1560. Documentation link broken. (#1562) 2022-02-06 13:31:33 -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
eca55d7d42 Allows navigation to outside a TextView if IsMdiContainer is true. 2022-01-15 22:54:49 +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
3becde9c86 Fixes #1525. Gives the same backspace behavior as TextView. 2021-12-28 16:17:39 +00:00
BDisp
2513dbc0f9 Fixes the CalculateLeftColumn method avoiding jump two columns on forward moving. 2021-12-28 02:13:51 +00:00
BDisp
f96c63f57e Revert "Trying fixing the build action."
This reverts commit e96f017387.
2021-12-19 23:23:34 +00:00
BDisp
e96f017387 Trying fixing the build action. 2021-12-19 23:10:09 +00:00
Tig Kindel
d2e46ae300 Merge branch 'main' into mdi-visible-fix 2021-12-19 08:20:49 -08:00
BDisp
646a88e4ba Adding Application.Shutdown and updating ReactiveUI.Fody. (#1550)
Thanks.
2021-12-19 08:18:35 -08:00
dependabot[bot]
8d906dca18 Bump ReactiveUI from 14.2.1 to 17.1.9 (#1541)
Bumps [ReactiveUI](https://github.com/reactiveui/reactiveui) from 14.2.1 to 17.1.9.
- [Release notes](https://github.com/reactiveui/reactiveui/releases)
- [Commits](https://github.com/reactiveui/reactiveui/compare/14.2.1...17.1.9)

---
updated-dependencies:
- dependency-name: ReactiveUI
  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 16:48:28 +00:00
BDisp
8c07643d42 Fixes #1535. Added IsMouseDisabled prop to Application (#1546) 2021-12-18 16:48:28 +00:00
BDisp
5d76ec2da5 Fixes #1434. Regenerating the docs. (#1528)
* Fixes #1434. Regenerating the docs.

* Fixing warnings on docs regeneration and improving.
2021-12-18 16:48:27 +00:00
BDisp
9068277386 Upgrading to Net6.0 (#1515) 2021-12-18 16:48:26 +00:00
dependabot[bot]
b58110c07b 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 16:48:25 +00:00
BDisp
192771c7ea Fixes #1502. Prevents high CPU usage. (#1504)
* 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.

* Fixes #1502. Prevents high CPU usage.

* Added a HACK comment.

* Allowing NetDriver attributes to deal with more stuff than only colors.

* Allows append more escape sequences if necessary.
2021-12-18 16:48:13 +00:00
Tig Kindel
b89efce8a9 v1.4.0 Release (#1549) 2021-12-18 08:40:44 -08:00