Commit Graph

705 Commits

Author SHA1 Message Date
BDisp
85c92f4b0d Fixes #2959. Some of the scroll features on v1 are broken. (#2960)
* Add GrabMouseEventArgs for GrabbingMouse and UnGrabbingMouse events.

* Implementing GrabbingMouse and UnGrabbingMouse in Toplevel class.

* Fix contentBottomRightCorner to draw with the right color.

* Fix a typo.

* Fix ListView to allow scrolling.

* Add a comment to explain an extra column for the cursor at the end of line.

* Add unit tests for GrabbingMouse and UnGrabbingMouse events.

* Add unit test for a Window inside a non Toplevel.

* Removes GrabMouseEventArgs.

* Prevents throwing an exception if not subscribed.

* GrabMouse must be first called before set the dragPosition.

* Add unit test to test null on GrabbingMouse and UnGrabbingMouse.

* Fix event name.

* Prevents a toplevel to overflows his bounds to allow it can be drag.

* Fix unit test.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-11-16 07:14:55 -07:00
usr
c7942ae3bb Fix issue where the TestViewsDisposeCorrectly was not doing what it was supposed to do (#2964)
* add Disposal Test and fix an ssue where the CopyClipboard test was failing

* Update ViewDisposalTest.cs

* Update ViewDisposalTest.cs: Some Formatting, and adding code comments.

* Fix ViewDisposalTests (Wasn't working the way it was supposed to)

* update test

* update test

* update test

* try to fix as many conflicts as possible

* make test output prettier

* fix formatting

* Fix Subviews not being empty after disposing on all views.

* The fail cause was Application.Top not being disposed.

* Fix others containers that weren't being removed.

* Revert "The fail cause was Application.Top not being disposed."

This reverts commit 0c2183ed9e.

* Application.Top isn't null and need disposing.

* Fixes #2985. Application.RunState must be responsible for dispose the Toplevel property.

* Change the unit test with ans without Application.Shutdown method.

* Update ViewDisposeTests to actually check wether ALL views have been disposed (not just container)

* small additional check just to be safe

* Update ViewDisposalTest.cs: Formatting

* Update ViewDisposalTest.cs: Minor change to re-trigger Action

TestVKPacket is acting up again. Maybe the test is running async and is receiving scan codes from other instances?

---------

Co-authored-by: John Züchler <john.zuechler@eks-intec.de>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
2023-11-15 09:22:22 -07:00
BDisp
3e1637aac8 Fixes #2775. Something in 1.13 broke centering child windows. (#2778)
* Fixes #2776. Pressing Alt key on a Window with only a MenuBar throws System.InvalidOperationException.

* Add unit test.

* Fix extra bracket.

* Prevents throw exception if Application.Current is null.

* Fix unit test because OnLeave is now invoked on toplevel removing, preventing two views having focus.

* Fix unit test method name.

* Fix Window by not layout on his subviews when adding a new view after the Application.Begin was already running.

* FindAndOpenMenuByHotkey now search inside Menus and inside his Children.

* Add unit test for Window LayoutSubviews and FindAndOpenChildrenMenuByHotkey menu method.

* Prevents button to be clear when it's invisible.

* Fixes 2780. Moving a Window that is Application.Top shouldn't be allowed.

* Fix condition if Window and Application.Top.

* Always LayoutSubviews and PositionToplevels after Clear.

* Fixes #2787. MenuItem with CanExecute returning false is select when a MenuBar is opened.

* Leveraging the power of CanExecute feature.

* Fixes #2789. StatusItem should have a disabled attribute if it can't execute.

* Allows positioning a child window outside the limits of the menu and the status bar.

* Change to a more appropriate name.

* Simplifies all the run actions.

* Prevents open menu bar if it's invisible and close all opened menus.

* Fix mdi run loop.

* Fix hot key on mdi toplevels.

* Fix position on mdi toplevels.

* Fix Top.Redraw by set state.Toplevel.SetNeedsDisplay if it's needed to redraw.

* Fix MdiTop by repainted when a keystroke is generated by keyboard.

* Rename local fields.

* Force redraw if application.Top needs display.

* Added more features to the scenario.

* Change the scenarios to run as Application.Top instead of sub-views.

* Add a new scenario similar but as Mdi Container.

* Add a bunch of new unit tests to prove all this PR.

* Only it's need to redraw Application.Top if it's a Mdi Container.

* Remove unnecessary code.

* Unit test that proves that a MDI child leaves no trace when the location is changed.

* Removes unnecessary Application.Init because theses uses Run<T> which already call it.

* Ensures a menu bar been closed after run an action.

* Ensures that another view can be focused if not IsMenuOpen and LastFocused is null, instead of focused the menu itself.

* Ensures a focused contentview subview being focused if MostFocused is null.

* Ensures a MdiTop subview to have priority if it's focused and thus  make it Current.

* Allow a MdiChild be closed when pressing Application.QuitKey.

* More unit tests proving the changes.

* Ensures the top.MostFocused is focused.

* Ensures MdiChild on the front if MdiTop.MostFocused isn't valid, like ContentView.

* Add unit test showing MdiChild on the front.

* Fix an issue where NullReferenceException can be throws everywhere while get the Application.MdiChildes property.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-10-17 13:34:28 -04:00
BDisp
a45d65bbdd Fixes #2847. CursesDriver doesn't processing response from task threading. 2023-08-31 19:03:05 +01:00
Tigger Kindel
568c251ed7 Merge branch 'develop' into v1_14_0 2023-08-30 07:11:58 -06:00
Tig
1856d0652f Merge branch 'develop' into v1_lang-version-9.0_2830 2023-08-30 06:58:22 -06:00
Tigger Kindel
7763704c50 Updated nuget deps 2023-08-30 06:51:12 -06:00
Tigger Kindel
17b4e3d56b cleaned out version info from csproj 2023-08-30 06:49:34 -06:00
Tigger Kindel
1a17ecabde Commented version info 2023-08-28 06:47:45 -06:00
Tigger Kindel
b8a0f415f2 Verifying builds 2023-08-28 06:44:01 -06:00
BDisp
bd58b58f63 Fixes #2830. v1 Allow use LangVersion 9.0 on the UICatalog project. 2023-08-25 00:08:33 +01:00
Tigger Kindel
a591314390 Set version to v1.14.0 2023-08-17 10:20:24 -06:00
Tigger Kindel
f7def42b5b tweaking gitversion 2023-08-17 10:20:24 -06:00
Tigger Kindel
6bf2ed25db tweaking gitversion 2023-08-17 10:20:24 -06:00
Tigger Kindel
0b149f9433 new version 2023-08-17 10:20:24 -06:00
Tigger Kindel
145751e590 tweaked csproj files 2023-08-17 10:20:24 -06:00
Tigger Kindel
f55c4e66ca Fixing source link 2023-08-17 10:20:24 -06:00
Tigger Kindel
af1768dad7 coimmented csproj 2023-08-17 10:20:24 -06:00
Tigger Kindel
db41d6a1f4 coimmented csproj 2023-08-17 10:20:24 -06:00
Tigger Kindel
93c234481a tweaking csproj 2023-08-17 10:20:24 -06:00
Tigger Kindel
4c5edaa27e Updated gitversion to test 2023-08-17 10:20:24 -06:00
Tigger Kindel
d474b2d521 Initial commit 2023-08-17 10:20:24 -06:00
BDisp
885ccb60e4 Added debug profile for Windows Terminal. 2023-08-14 16:11:33 -06:00
Tig Kindel
ed917781c9 Changing gitflow/gitversion scheme3.3 2023-08-04 10:10:39 -06:00
Tig Kindel
0610afaaa8 Changing gitflow/gitversion scheme2 2023-08-04 09:47:03 -06:00
Tig Kindel
9b94dfcbb0 Changing gitflow/gitversion scheme 2023-08-04 09:35:52 -06:00
Tigger Kindel
7ef51bad85 Remove EnableConsoleScrolling 2023-07-26 08:59:55 -06:00
BDisp
0faf530f16 Fixes #415. Colors: The native method "COLOR_PAIRS" does not exist (#2749)
* Fixes #415. Colors: The native method "COLOR_PAIRS" does not exist.

* Add Dockerfile with the opensuse/tumbleweed image.

* Ensures using the libncurses6 version in the case the issue is fixed.
2023-07-17 08:34:46 -06:00
BDisp
48a73b4756 Fixes #2739. UICatalog Text Editor Column / Row not be updated when cursor moving. (#2740) 2023-07-12 08:45:03 -07:00
Maciej
7936dd1e85 Add table example check to prevent crashes (#2691)
Co-authored-by: Tig <tig@users.noreply.github.com>
2023-07-05 16:52:13 -06:00
Thomas Nind
8f199cd765 Add ITreeViewFilter (#2599)
Co-authored-by: Tig <tig@users.noreply.github.com>
2023-05-10 06:37:24 +02:00
Tigger Kindel
443039a657 Release v1.10.1 2023-04-06 09:42:58 -06:00
Tigger Kindel
a7423f216c version info 2023-04-04 11:10:46 -06:00
dependabot[bot]
9a5f1edcf7 Bump SixLabors.ImageSharp from 3.0.0 to 3.0.1
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v3.0.0...v3.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 15:09:08 +00:00
I-Have-No-Idea-What-IAmDoing
d0345e55b8 Fix typo in link in a readme (#2409)
The link: (https://github.com/gui-cs/Terminal.Gui/issues/368) was typed out like (https://github.com/giu-cs/Terminal.Gui/issues/368).
2023-03-17 08:56:38 -06:00
Tig
094a9b57de Merge branch 'develop' into main 2023-03-16 07:56:10 -06:00
I-Have-No-Idea-What-IAmDoing
090d918aa7 Fix typo in link in a readme (#2409)
The link: (https://github.com/gui-cs/Terminal.Gui/issues/368) was typed out like (https://github.com/giu-cs/Terminal.Gui/issues/368).
2023-03-16 07:49:36 -06:00
dependabot[bot]
dae1c26cb7 Bump SixLabors.ImageSharp from 2.1.3 to 3.0.0 (#2388)
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 2.1.3 to 3.0.0.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v2.1.3...v3.0.0)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  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>
2023-03-02 15:35:06 -07:00
BDisp
1d2dc40c8a Fixes #2305. Improves the handling of escape sequence. (#2375)
* Changed ansi esc sequence used on exit.

* Changed ansi esc sequence used on exit.

* Improves HeightAsBuffer although currently only works on Windows.

* Fixes #2267. Toplevel.EnsureVisibleBounds throws an exception if border is null.

* Changing comment as requested.

* Fixes indentation.

* Seems not needed for now, maybe some update, comment for now.

* Renamed HeightAsBuffer to EnableConsoleScrolling and made it obsolete.

* Add comment on remarks for EnableConsoleScrolling.

* merged @bdisp's EnableConsoleScrolling PR

* Fixes buffer for Windows Terminal.

* Fixes issue in Windows Terminal on resizing causing some lines not be drawing after exceptions.

* merge #9

* merged #9

* use ESC [ ? 1047

* Tweaks with new esc codes

* Fixed curses driver to not nuke scroll buffer and to resize properly

* merge

* Cleand up netdriver escape codes

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed merge issue and  spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed  build error

* removed old comments

* Resolving merge conflicts.

* Ensuring reset the EnableConsoleScrolling.

* Changing from HeightAsBuffer to EnableConsoleScrolling.

* Done requested changes.

* Reformatting.

* Rename to EscSeqReqStatus.

* Removing Console.Out.Flush ();

---------

Co-authored-by: Charlie Kindel <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
2023-02-25 15:30:44 -07:00
BDisp
ed27696b9e Fixes 2342. Border: can't change border color in window by Border.BorderBrush. (#2345)
* Fixes 2342. Border: can't change border color in window by Border.BorderBrush.

* Fixes border initialization.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-02-25 15:26:04 -07:00
Thomas Nind
40af5ed98a Adds Snake Scenario (#2353)
* Add empty snake scenario

* Move snake head around

* Snake now has a tail

* Rest of logic implementation

* Ctrl K D layout fixes

* Game gets faster as you collect more apples

* Adjust speed increase rate down

* Use white on black for snake and border and red for apple

* Fix ScenarioTests not Disposing Scenario

* Add disposes and fix to use LineCanvas.GenerateImage

* Fix stack overflow, doh!

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-02-21 11:59:46 +13:00
BDisp
c85ff954aa Illustrates #2331 (Scrollview not respecting clip) does not reproduce (#2332)
* Proves that the issue #2331 don't have reason to happen.

* fixes #2336

* Fixes #2331. ScrollView may not be honoring clip region; CustomButton shows outside

* More appropriate solution for the issue #2331.

* Start refactoring LineCanvas for mixing line style support (e.g. double into single)

* Add remaining resolvers

* Implement corner border style mixing in LineCanvas

* Refactor and simplify resolvers

* Move tests to Core folder and namespace to Terminal.Gui.CoreTests

* Fixes #2333. TextField is selecting badly a word on double click.

* Add unit test deleting a word with accented char.

* Fixes 2331. ScrollView may not be honoring clip region.

* Add a custom button scenario.

* Fixes #2350. Clipping broke (see Clipping scenario).

* Is preferable use NeedDisplay instead of Bounds.

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: tznind <tznind@dundee.ac.uk>
2023-02-21 00:53:38 +13:00
Tig
81d3ad8aeb Merge pull request #2352 from tznind/animation
Adds Animation Scenario
2023-02-20 22:29:49 +13:00
Thomas Nind
1e5ab49827 Merge branch 'develop' into line-canvas-fix-offsets 2023-02-19 17:06:21 +00:00
Thomas
0e84090c31 Add caching and comments 2023-02-18 07:56:45 +00:00
Thomas
8371a74bf9 CC attribution 2023-02-17 23:18:20 +00:00
Thomas
2b0d14f41f Resizing 2023-02-17 23:12:48 +00:00
Thomas
db38b35bb7 spinning world 2023-02-17 22:56:02 +00:00
tznind
c28d97f203 Add gif 2023-02-17 22:10:40 +00:00
tznind
81a892ad11 Add image scenario 2023-02-17 22:09:29 +00:00