Commit Graph

394 Commits

Author SHA1 Message Date
BDisp
702ef46727 Fixes #2069. KeyDown and KeyUp events must run before OnKeyDown and OnKeyUp. 2022-09-29 19:10:56 +01:00
BDisp
b6715863a3 Fixes #2071. DrawContentComplete event is never called from the base if it's overridden. 2022-09-28 17:16:48 +01:00
Tig Kindel
32e7b63b77 Merge pull request #2065 from BDisp/mouseGrabView-track-feature
Fixes #2064. mouseGrabView must have a track to allow the views who use it having some control.
2022-09-26 11:04:27 -07:00
dependabot[bot]
41072af7a2 Bump Microsoft.NET.Test.Sdk from 17.3.1 to 17.3.2
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.1 to 17.3.2.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.1...v17.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 15:03:58 +00:00
BDisp
10fb8cda63 Replacing to MouseGrabView. 2022-09-24 23:45:13 +01:00
BDisp
834a942302 Fixes #2064. mouseGrabView must have a track to allow the views who use it having some control. 2022-09-24 23:15:22 +01:00
BDisp
92dc7f04d4 Fixes #2053. MessageBox.Query still not wrapping with v1.8.0 on windows/net6.0. 2022-09-21 18:54:45 +01:00
BDisp
d542548595 Incremented the sleep timeout. 2022-09-18 02:16:11 +01:00
BDisp
17b98ad294 lock cannot have a null argument and sometime the Clipboard.Contents is null. 2022-09-18 01:26:52 +01:00
BDisp
e821435bac Including also the variables inside the lock. 2022-09-18 01:03:20 +01:00
BDisp
c350886b5d Fixes #2047. Tests are failing locally after merging #2046 2022-09-18 00:28:31 +01:00
BDisp
aa83e6c146 Fixes #2045. TrySetClipboardData test must be enclosed with a lock. 2022-09-17 19:50:25 +01:00
BDisp
6f891d4a02 Fixes #2039. Surrounding the Clipboard.Contents with a lock keyword. 2022-09-17 17:33:26 +01:00
BDisp
281a849c08 Fixes #2026. Added ClearOnVisibleFalse to flag if the view must be cleared or not. (#2020)
* Fixes #1984. Added ClearOnVisibleFalse to flag if the view must be cleared or not.

* Fixes #2022. ScrollBarView doesn't show the down arrow on vertical if there isn't horizontal.
2022-09-16 09:16:44 -07:00
BDisp
0f9abea9e4 Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test. (#2018)
* Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test.

* Fixes #2013. Starting having MainLoopTests.InvokeLeakTest failure.
2022-09-16 07:09:41 -07:00
BDisp
7ce2109a46 Fixes #2013. Starting having MainLoopTests.InvokeLeakTest failure. (#2016) 2022-09-16 06:05:10 -07:00
BDisp
28718e9c3c Fixes #2002. Added feature to fill the remaining width with spaces. (#2003)
* Added feature to fill the remaining width with spaces.

* Removing unnecessary parameter.

* Fixes a typo.

* Unit test rewritten to explain better main feature of this PR.

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-15 06:47:12 -07:00
BDisp
d70966a29c Fixes the justified text not adding the extra spaces. (#2005)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-14 19:18:41 -07:00
montekarlos
1cdf6a1b45 Fixes #1994. BREAKING CHANGE. Ensure only a single IdleHandlers list can exist. (#1997)
* Add unit test that demonstrates the loss of idle handlers added via Application.MainLoop.Invoke

* Fixes #1994. Ensure that only a single idle handlers list exists at one time

* Previous implementation locked on idleHandlers but this is dangerous because it is reallocated. It was therefore possible for two different threads to hold locks on two different instances of idleHandlers simultaneously. The idle handlers added to the older instance of idleHandlers would then be lost. This was particularity catastrophic when combined with async/await continuations being lost.

* Add dedicated lock object idleHandlersLock and use when modifying idleHandlers

* Fix additional bug in RemoveIdle that was locking the token instead of idleHandlers

* Return a copy via the IdleHandlers property as it was directly returning idleHandlers. This cannot safely be done without first acquiring idleHandlersLock

* Address code review feedback for #1994: Make IdleHandler immutable via ReadOnlyCollection

* Address code review feedback for #1994: Avoid the possibility of IdleHandlers changing while being used

Co-authored-by: Karl Janke <karl.janke@groundprobe.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-14 18:26:19 -07:00
BDisp
75c0160d96 Fixes #1999. Prevents the mouseGrabView being executed with a null view. (#2000)
* Unit test that will fail without the fix.

* ScrollView must return true after ungrab the mouse to allow the View property run after returned.

* Fixes #1999. Prevents the mouseGrabView being executed with a null view.

* Added one more assert null check.
2022-09-14 18:18:00 -07:00
dependabot[bot]
c983c2e65a Bump ReportGenerator from 5.1.9 to 5.1.10 (#1996)
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.9 to 5.1.10.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.9...v5.1.10)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-14 18:11:23 -07:00
BDisp
ff1eb9bea1 Fixes #1979. MessageBox.Query not wrapping since 1.7.1 (#1995)
* Added MaxWidthLine into the TextFormatter class.

* Some more test line to better verifying the mainloop idle handlers.

* Fixes #1979. MessageBox.Query not wrapping since 1.7.1

* Added MessageBox unit tests.

* States a button centered issue on a lower fixed size.

* Fixed the centered button issue 4d0a4b6.
2022-09-14 18:11:12 -07:00
BDisp
b21f203292 Fixes #820. Added HideDropdownListOnClick property. (#1983)
* Added HideDropdownListOnClick property.

* Invoking OpenSelectedItem on click.

* Added one more constructor and more unit tests.

* Added the ComboListView derived class.

* Added more features to ComboBox.

* Removes code not featured yet.

* Added HideDropdownListOnClick property to scenario.

* Ensures SetSource having the same behavior as the ListWrapper constructor.
2022-09-14 18:10:40 -07:00
BDisp
d368215e07 Fixes #1987. Textview insert text newline fix (#1988)
* Fixes #1987. TextView InsertText does not respect newlines

* Added support for CRLF as well.
2022-09-05 12:49:39 -07:00
BDisp
3866e65919 Fixes #1989. ListView: Ensures SelectedItem visibility on MoveDown and MoveUp. (#1990)
* Ensures visibility SelectedItem on MoveDown and MoveUp.

* Fix VisibleItems to Frame.Height.
2022-09-05 07:25:57 -07:00
BDisp
9505987d40 Fixes #1984. Setting Label.Visible to false does not hide the Label (#1985) 2022-09-05 07:25:11 -07:00
BDisp
31082c001c Added SplitNewLine method to the TextFormatter. (#1982) 2022-09-05 07:23:24 -07:00
BDisp
13948501d5 Fixes #1973. Avoid positioning Submenus off screen. (#1975)
* Fixes #1973. Avoid positioning Submenus off screen.

* Firstly avoids negative positions on the sub-menus and then avoids the bottom not exceeding the console height, as possible.
2022-09-05 07:17:58 -07:00
BDisp
2594706a69 Fixes #1967. New keys for DeleteAll on TextField and TextView. (#1968)
* Fixes #1967. New keys for DeleteAll on TextField and TextView.

* Changing unit test for the new keys.
2022-09-05 07:17:10 -07:00
Jeff Greene
bbbacf4514 Fixes #1963. Only remove one character on backspace when wordwrap is on (#1964)
* Fixed double delete when wordwrap is enabled

* Fixes #1963. Deletes multiple characters editing a TextView with WordWrap enabled.

Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-05 07:16:32 -07:00
dependabot[bot]
c6af956e22 Bump Microsoft.NET.Test.Sdk from 17.3.0 to 17.3.1 (#1977)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.0 to 17.3.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.0...v17.3.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 06:53:07 -07:00
Thomas Nind
8a90453bb2 Fixes #1962 - Change KeyBindings to allow chaining commands (#1966)
* Change KeyBindings to allow chaining commands

* Added more asserts for repeating the keybinding till at bottom of list

* Added tests for 'no command' and multiple commands return type
2022-08-30 05:58:22 -07:00
Juan Manuel Elosegui
73846b3c32 Fixes #1959: GoToEnd should not fail on an empty TreeView (#1960)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-24 19:41:50 -07:00
BDisp
c43183ff14 Fixes #1953. TextView cursor position is not updating by mouse. (#1954)
* Fixes #1953. TextView cursor position is not updating by mouse.

* Only invoking UnwrappedCursorPosition in the OnUnwrappedCursorPosition method.
2022-08-24 18:37:31 -07:00
dependabot[bot]
82c694b515 Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#1947)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-12 08:22:57 -07:00
saskathex
dc99fb354f Fix: The synchronization context method Send is now blocking (#1854)
* Fix: The sychronization context method send 

The send method of the synchronization context has to block the caller thread in case it is not the main thread.

* Fix: Send has to invoke the action instantly

Send has to invoke the action instantly instead of enqueuing in case of main thread call.

* Added unit tests for synchronization post/send methods.

* Code formating

* Added unit test for MainLoopSyncContext.CreateCopy

Co-authored-by: saskathex <>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-12 08:22:34 -07:00
BDisp
f01132ca0e Fixes #1948. It isn't possible to get unwrapped cursor position when word wrap is enabled on TextView. (#1949) 2022-08-11 06:53:08 -07:00
BDisp
4573990b46 Ensures that the isButtonShift flag is disabled in all situations. (#1945)
* Ensures that the isButtonShift flag is disabled in all situations.

* Improving this unit test.
2022-08-05 10:01:55 -07:00
BDisp
a23c1bee19 Fixes #1925. Preserve trailing spaces on word wrap must be refactored… (#1929)
* Fixes #1925. Preserve trailing spaces on word wrap must be refactored on TextFormatter.

* Fixes a bug on Format when the preserveTrailingSpaces is enabled.

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-04 10:15:21 -07:00
dependabot[bot]
e0e644c263 Bump xunit from 2.4.1 to 2.4.2 (#1933)
Bumps [xunit](https://github.com/xunit/xunit) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/xunit/xunit/releases)
- [Commits](https://github.com/xunit/xunit/compare/2.4.1...2.4.2)

---
updated-dependencies:
- dependency-name: xunit
  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>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-03 17:11:10 -07:00
BDisp
091eb5a956 Changes unit tests to support xunit 2.4.2 upgrade. (#1936) 2022-08-03 16:58:58 -07:00
BDisp
49e2b95625 Fixes #1861. Border: Title property is preferable to Text. (#1862)
* Fixes #1861. Border Title property is preferable than the Text.

* Fixes #1866. Bug when scrolling text and type in a TextView. (#1868)

* Some fixes for the WebConsole support. (#1865)

* Invoking NotifyStopRunState for all situations.

* Added Clicked property to support web console.

* Changing to MoveDown to stay always visible.

* Fixes #1849. Wizard as non-popup is broken (#1853)

* trying to make it work

* Fixes #1849. Wizard as non-modal doesn't work

* Fixes #1855. Window and Frame content view without the margin frame.

* Fixing layout of non-modal

* WizardSTep is now a FrameView

* Now use Modal = false to set visual style automatically

* Removed Controls as an explicit construct. Now just Add to WizardStep

Co-authored-by: BDisp <bd.bdisp@gmail.com>

* Update docs with keybindings, global key event and designer (#1869)

* Added docs on keybinding and global key event

* Added TerminalGuiDesigner to showcases/examples

* Regenerated Docs (#1870)

* Fixed cancel logic. Title now shows for non-modal. (#1871)

* Fixes #1874. API docs on github are broken. (#1875)

* Fixes #1874. API docs on github are broken.

* Rebuild with docfx 2.59.3.0 version.

* Fixes Wizard cancel logic and updates docs (#1878)

* Fixed cancel logic. Title now shows for non-modal.

* trying to fix docs

* trying to fix docs

* Fixes #1867. Use Undo and Redo commands with WordWrap enabled. (#1877)

* Updated docs; regeneraged docs (#1881)

* Added a 'Read Only' to the Editor scenario Format menu. (#1882)

* Fixes #1883. Toplevel now propogates Loaded & Ready events to child Toplevel views.

* Updated API doc theme. Added Wizard Sample

* Tweaked API docs format and content. Fixed build warnings.

* Fixes #1889. Docs broken after org move.

* Regen API docs

* Fixes readme links to API docs

* Avoiding breaking change.

* Fixes typos.

* Passing string.Empty to Title from the default constructor.

* Initializes title with string.Empty instead of null.

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: Thomas Nind <31306100+tznind@users.noreply.github.com>
2022-08-01 16:06:15 -07:00
BDisp
74b91a3979 Textview readonly wrap fix (#1898)
* Fixes LoadFile when word wrap is enabled.

* Fixes an extra space in end of line and error on deleting backwards.

* Removing unit tests with loading files.

* Fixes left column being bigger than zero if word wrap is true.

* Fixes #1820. TextView: Word Wrapping is not correct

* Made fix more surgical via ReadOnly

* Fixes TextView read only wrap issue.

* Rename method.

* Fixes word wrap with toggling read only .

Co-authored-by: Charlie Kindel <charlie@kindel.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-07-27 21:45:39 -07:00
Tig Kindel
61335e8788 Fixes #1893: Fix URLs to match gui-cs Org (#1900)
* Release v1.3.0

* regen docs

* change nuget publish script to use rohit version

* Release v1.3.1

* Force fix README.md API docs links

* tweak contrib instructions

* more doc fixes

* updated most urls
2022-07-26 12:09:03 -07:00
BDisp
a7a6886b72 Proves that the ScrollTo and CursorPosition methods work as expected. 2022-07-26 12:26:07 +01:00
BDisp
ec0822401a Fixes #1867. Use Undo and Redo commands with WordWrap enabled. (#1877) 2022-07-21 17:07:08 -07:00
Tig Kindel
492966048c Fixes #1849. Wizard as non-popup is broken (#1853)
* trying to make it work

* Fixes #1849. Wizard as non-modal doesn't work

* Fixes #1855. Window and Frame content view without the margin frame.

* Fixing layout of non-modal

* WizardSTep is now a FrameView

* Now use Modal = false to set visual style automatically

* Removed Controls as an explicit construct. Now just Add to WizardStep

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2022-07-21 05:57:25 -07:00
BDisp
57fc939e22 Fixes #1866. Bug when scrolling text and type in a TextView. (#1868) 2022-07-21 05:55:51 -07:00
BDisp
bcc3034db7 Fixes #1812. AutoSize stays true with empty text. (#1824)
* Fixes #1812. AutoSize stays true with empty text.

* Added some more features and bug fixes.

* Reformat files.
2022-07-05 18:04:24 -07:00
BDisp
63bcd2b1fc Fixes unit test after git rebase. 2022-07-04 11:22:27 -04:00