Commit Graph

51 Commits

Author SHA1 Message Date
tznind
1e40ad3bc9 Add csproj to sln 2025-03-21 08:18:46 +01:00
tznind
0b56a3d63b Remove dependency on fluent assertions and fix folder paths 2025-03-21 08:18:46 +01:00
tznind
79f289ce8f Rename to TerminalGuiFluentTesting 2025-03-21 08:18:46 +01:00
tznind
c511101dfe Investigate fluent assertions for testing v2 2025-03-21 08:18:46 +01:00
Tig
b0f32811eb Fixes #3930 - Splits tests to Tests/UnitTests, Tests/IntegrationTests, Tests/StressTests (#3954)
* Tons of API doc updates

* Removed stale test

* Removed stale tests

* Fixed Skipped Shadow test 1

* Fixed Skipped Shadow test 2

* Fixed Skipped Shadow test 3

* Removed stale test

* Removed stale test2

* Explicit unregister of event handler on Application.Driver!.ClearedContents

* Added Toplevels to dict

* code cleanup

* spelling error

* Removed stale test3

* Removed stale test4

* Removed stale test5

* added script

* tweaked script

* tweaked script

* Created StressTests project; moved some tests

* Created IntegrationTests project; moved some tests

* New yml

* made old yml just unit tests

* Tweaked Button_IsDefault_Raises_Accepted_Correctly

* tweaked script

* cleaned up ymls

* tweakled up ymls

* stress tests...

* stress tests on ubuntu only

* Fixed WindowsDriver in InvokeLeakTest

* Fixed WindowsDriver in InvokeLeakTest2

* Added Directory.Packages.props.
Added Directory.Build.props

* Shortened StressTest time

* Removed dupe file.

* DemoFiles

* Moved all tests to ./Tests dir.

* Fixed release build issue

* Fixed .sln file

* Fixed .sl* files

* Fixing ymls

* Fixing interation tests

* Create link to the file TestHelpers.

* Created Tests/UnitTestsParallelizable.
Moved all obviously parallelizable tests.
Updated yml.

* fixing logs

* fixing logs2

* fixing logs3

* don't require stress to pass for PRs

* Fix a failure?

* tweaked script

* Coudl this be it?

* Moved tons of tests to parallelizable

* Fixed some stuff

* Script to find duplicate tests

* Testing workflows

* Updated to v4

* Fix RelativeBasePath issue

* Replace powershell to pwsh

* Add ignore projects.

* Removed dupe unit tests

* Code cleanup of tests

* Cleaned up test warnings

* yml tweak

* Moved setter

* tweak ymls

* just randomly throwing spaghetti at a wall

* Enable runing 5 test runners in par

* Turned off DEBUG_DISPOSABLE for par tests

* RunningUnitTests=true

* code cleanup (forcing more Action runs)

* DISABLE_DEBUG_IDISPOSABLE

* Added View.DebugIDisposable. False by default.

* Remobed bogus tareet

* Remobed bogus tareet2

* fixed warning

* added api doc

* fixed warning

* fixed warning

* fixed warning2

* fixed warning3

* fixed warning4

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2025-03-05 23:44:27 -07:00
Tonttu
e24bd67658 Rune extensions micro-optimizations (#3910)
* Add benchmarks for potentially optimizable RuneExtensions

* Add new RuneExtensions.DecodeSurrogatePair benchmark implementation

Avoids intermediate heap array allocations which is especially nice when the rune is not surrogate pair because then array heap allocations are completely avoided.

* Enable nullable reference types in RuneExtensions

* Make RuneExtensions.MaxUnicodeCodePoint readonly

Makes sure no one can accidentally change the value. Ideally would be const value.

* Optimize RuneExtensions.DecodeSurrogatePair

* Remove duplicate Rune.GetUnicodeCategory call

* Add new RuneExtensions.IsSurrogatePair benchmark implementation

Avoids intermediate heap allocations by using stack allocated buffer.

* Optimize RuneExtensions.IsSurrogatePair

* Add RuneExtensions.GetEncodingLength tests

* Optimize RuneExtensions.GetEncodingLength

* Optimize RuneExtensions.Encode

* Print encoding name in benchmark results

* Rename variable to better match return description

* Add RuneExtensions.EncodeSurrogatePair benchmark

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-02-25 09:42:32 -07:00
BDisp
63e75b7413 Fixes #3109. AOT support with .Net 8. (#3638)
* Add a native AOT project.

* Fixes Text.Json to work with native AOT.

* Fix silent errors on unit tests when testing the Red color which has a length of 3.

* Allowing test custom configuration without the config.json file match the unit tests configurations.

* Fix unit test if tested alone.

* Add native project into solution.

* Fix merge errors.

* Setting ConfigurationManager.ThrowOnJsonErrors as true to throw any serialization issue when published file runs.

* Remove unnecessary using's.

* Added unit test to ensure all serialization is properly configured.

* Fix warnings.

* Remove ThrowOnJsonErrors.

* Fix warnings.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-06 12:05:36 -06:00
Tig
1b973eed5a Trying to fix publish issue 2024-08-06 08:45:31 -06:00
BDisp
f974861395 Resolving merge conflicts. 2024-07-11 11:20:22 +01:00
Brandon Thetford
b667c3de98 Remove analyzer projects from solution and project references 2024-07-09 21:45:21 -07:00
BDisp
b4f83bc61c Update project and solution. 2024-07-04 23:24:05 +01:00
Brandon Thetford
437e846ef5 Organized the solution items to make things easier to find
Doesn't affect the actual file paths.
2024-06-25 05:53:19 -07:00
John Baughman
dea0e5696f added recommendations; fixed .sln 2024-06-13 16:31:05 -05:00
John Baughman
12adcf3bf4 Add Community Toolkit example 2024-06-13 16:30:44 -05:00
Brandon Thetford
16fbee716b Include Roslyn debugging project in solution 2024-05-01 20:19:15 -07:00
Brandon Thetford
c9297372b3 Add analyzer test project to solution 2024-05-01 20:19:14 -07:00
Brandon Thetford
60242a252a Add analyzer project to solution (but not referenced by Terminal.Gui yet) 2024-05-01 20:19:13 -07:00
Brandon Thetford
b8d51bce34 Add solution folder for Analyzers
And let VS finish cleaning some old config out too...
2024-05-01 20:19:13 -07:00
Brandon Thetford
1ee8d33d14 Solution file cleanup
Remove unnecessary platform target (explicit x86 is useless here)
Remove monodevelop settings. They didn't match anyway and VSCode is a thing and supports .editorconfig.
2024-05-01 20:19:11 -07:00
Tig
2c725b877f Fixes #2944. Makes ColorScheme explicitly readonly, removes Colors.Base, etc..., Fixes intermittent TreeView unit test failures (#3175)
* Removed resharper settings from editorconfig

* Moved ColorScheme to ColorScheme.cs

* Moved ColorScheme to ColorScheme.cs

* Potential fix. PlatformColor was not being set by FakeDriver correctly.

* Made ColorScheme effectively readonly

* Removed Color.Base etc... Updated API docs.
2024-01-15 17:46:53 -07:00
Tig
c6570a5bfd Fixes #3098 & #3099 - Slider bugs (#3121)
* Fixed bugs

* Fixed #3098

* Fixed a slew of issues

* Fixed a slew more of issues

* Code cleanup. Fixed unit test failure

* Code cleanup.

* Code cleanup.

* Code cleanup.
2024-01-05 07:38:54 -07:00
Tig Kindel
b643e48104 more docfx stuff 2023-12-02 10:07:58 -07:00
Tig
6851b42a49 Fixes #2921 - MainLoop refactoring (#2922)
* Adds basic MainLoop unit tests

* Remove WinChange action from Curses

* Remove WinChange action from Curses

* Remove ProcessInput action from Windows MainLoop

* Simplified MainLoop/ConsoleDriver by making MainLoop internal and moving impt fns to Application

* Modernized Terminal resize events

* Modernized Terminal resize events

* Removed un used property

* for _isWindowsTerminal devenv->wininit; not sure what changed

* Modernized mouse/keyboard events (Action->EventHandler)

* Updated OnMouseEvent API docs

* Using WT_SESSION to detect WT

* removes hacky GetParentProcess

* Updates to fix #2634 (clear last line)

* removes hacky GetParentProcess2

* Addressed mac resize issue

* Addressed mac resize issue

* Removes ConsoleDriver.PrepareToRun, has Init return MainLoop

* Removes unneeded Attribute methods

* Removed GetProcesssName

* Removed GetProcesssName

* Refactored KeyEvent and KeyEventEventArgs into a single class

* Revert "Refactored KeyEvent and KeyEventEventArgs into a single class"

This reverts commit 88a00658db.

* Fixed key repeat issue; reverted stupidity on 1049/1047 confusion

* Updated CSI API Docs

* merge
2023-10-21 08:06:04 -07:00
Tigger Kindel
71dfc7c7d1 added nuget.config 2023-09-03 09:04:39 -06:00
Tigger Kindel
738a5ec539 setting up versioning 2023-08-17 11:42:45 -06:00
Tigger Kindel
dd75d4ea9f Initial commit 2023-08-12 10:39:17 -06:00
Tig
0df485a890 Fixes #666. Refactor ConsoleDrivers to simplify and remove duplicated code (#2612)
* Added ClipRegion; cleaned up driver code

* clip region unit tests

* api docs

* Moved color stuff from ConsoleDriver to Color.cs

* Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Work around https://github.com/gui-cs/Terminal.Gui/issues/2610

* adjusted unit tests

* initial commit

* Made Rows, Cols, Top, Left virtual

* Made Clipboard non-virtual

* Made EnableConsoleScrolling  non-virtual

* Made Contents non-virtual

* Pulled Row/Col up

* Made MoveTo virtual; fixed stupid FakeDriver cursor issue

* Made CurrentAttribute non-virtual

* Made SetAttribute  non-virtual

* Moved clipboard code out

* Code cleanup

* Removes dependecy on NStack from ConsoleDrivers - WIP

* Fixed unit tests

* Fixed unit tests

* Added list of unit tests needed

* Did some perf testing; tweaked code and charmap to address

* Brough in code from PR #2264 (but commented)

* Tons of code cleanup

* Fighting with ScrollView

* Fixing bugs

* Fixed TabView tests

* Fixed View.Visible test that was not really working

* Fixed unit tests

* Cleaned up clipboard APIs in attempt to track down unit test failure

* Add Cut_Preserves_Selection test

* Removed invalid code

* Removed invalid test code; unit tests now pass

* EscSeq* - Adjusted naming, added more sequences, made code more consistent, simplified, etc...

* Added CSI_SetGraphicsRendition

* NetDriver code cleanup

* code cleanup

* Cleaned up color handling in NetDriver

* refixed tabview unit test

* WindowsDriver color code cleanup

* WindowsDriver color code cleanup

* CursesDriver color code cleanup

* CursesDriver - Adding _BOLD has no effect. Further up the stack we cast the return of ColorToCursesColor from int to short and the _BOLD values don't fit in a short.

* CursesDriver color code - make code more accurate

* CursesDriver color code - make code more accurate

* Simplified ConsoleDriver.GetColors API

* Simplified ConsoleDriver.GetColors API further

* Improved encapslation of Attribute; prep for TrueColor & other attributes like blink

* Fixes #2249. CharacterMap isn't refreshing well non-BMP code points on scroll.

* Use GetRange to take some of the runes before convert to string.

* Attempting to fix unit tests not being cleaned up

* Fixes #2658 - ConsoleDriver.IsRuneSupported

* Fixes #2658 - ConsoleDriver.IsRuneSupported (for WindowsDriver)

* Check all the range values and not only the max value.

* Reducing code.

* Fixes #2674 - Unit test process doesn't exit

* Changed Cell to support IsDirty and list of Runes

* add support for rendering TrueColor output on Windows merging veeman & tznind code

* add colorconverter changes

* fixed merged v2_develop

* Fixing merge bugs

* Fixed merge bugs

* Fixed merge bugs - all unit tests pass

* Debugging netdriver

* More netdriver diag

* API docs for escutils

* Update unicode scenario to stress more stuff

* Contents: Now a 2D array of Cells; WIP

* AddRune and ClearContents no longer virtual/abstract

* WindowsDriver renders correctly again

* Progress on Curses

* Progress on Curses

* broke windowsdriver

* Cleaned up FakeMainLoop

* Cleaned up some build warnings

* Removed _init from AutoInitShutdown as it's not needed anymore

* Removed unused var

* Removed unused var

* Fixed nullabiltiy warning in LineCanvas

* Fixed charmap crash

* Fixes #2758 in v2

* Port testonfail fix to v2

* Remove EnableConsoleScrolling

* Backport #2764 from develop (clear last line)

* Remove uneeded usings

* Progress on unicode

* Merged in changes from PR #2786, Fixes #2784

* revamp charmap rendering

* Charmap option to show glyph widths

* Fixed issue with wide glpyhs being overwritten

* Fixed charmap startcodepoint change issue

* Added abiltiy to see ncurses verison/lib

* Fought with CursesDriver; giving up for now. See notes.

* Leverage Wcwidth nuget library instaed of our own tables

* enhanced charmap Details dialog

* Final attempt at fixing curses

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: adstep <stephensonadamj@gmail.com>
2023-08-09 14:28:36 -06:00
Tigger Kindel
9df14e80d9 Trying to get gitversion to do what I want 2023-06-07 09:51:52 -06:00
Tig
b4552ee14b Fixes #2493. Move all layout code out of View (and Toplevel) into a layout helper class (#2544)
* Comment/warning clean up

* Moved Text and Drawing out

* Moved Layout out

* Removed extra lines

* Removed Mouse out

* Reorgainzed View

* API docs

* removed border.cs

* TopLevel.Resized -> TerminalResized

* Mdi -> Overlapped

* Removed confusing and un-needed WillPresent

* privates -> _

* Tweaked RunLoop API
2023-04-14 10:26:10 -06:00
Tig
9425b2a720 Fixes #2181 - (Really) Adds configuration manager (#2365) 2023-02-21 00:34:18 +13:00
BDisp
49eefa617d Fixes #2081. Clipboard unit tests sometimes fail with WSL. 2022-10-12 23:46:37 +01: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
Tig Kindel
a95e06c15d Fixes #1741. Use gitversion instead of minver (#1746) 2022-05-26 16:36:50 -07:00
Tig Kindel
bf99d724db Makes it easier to use a local NStack.Core package (#1740)
* Removed defunct packages.config

* Enable local nstack
2022-05-25 19:25:19 -07:00
Charlie Kindel
a87bfdbb38 readmes 2020-10-22 10:00:41 -06:00
Charlie Kindel
a41eb25db8 removed Designer from .sln 2020-10-22 09:35:11 -06:00
Charlie Kindel
dd92a07fb0 updated readmes; bumped nuget version 2020-10-01 09:23:38 -07:00
Artyom
f6fa97a44c Bootstrap the reactive sample app 2020-09-30 23:30:01 +03:00
Charlie Kindel
49bfe6a6c2 progress...rabbit hole 2020-06-17 08:50:38 -07:00
Charlie Kindel
8730ac6f37 first unit tests 2020-06-07 21:44:03 -06:00
Charlie Kindel
e43b5c0d2d updated designer proj too 2020-05-28 12:28:49 -06:00
Charlie Kindel
c9df1f751b merged 2020-05-23 23:07:53 -06:00
Charlie Kindel
635b565097 merge 2020-05-23 23:06:31 -06:00
Charlie Kindel
2255f4970d make UI Catalog the default project for solution 2020-05-20 19:59:58 -06:00
Charlie Kindel
5b845307a2 UI catalog (#387)
* key down/up support

* line endings?

* line endings

* KeyDown/Up support

* line endings

* line endings

* Revert "Drop NuGet restore"

This reverts commit 5c7a0d05f0.

* Revert "Revert "Drop NuGet restore""

This reverts commit 2dc5fce865.

* updated demo

* defined styles

* Smarter StatusBar bottom tracking.

* Prepping for https://github.com/migueldeicaza/gui.cs/issues/376

* Oops.

* Fixed StatusBar 'snap to bottom'

* line endings

* Revert "Fixed StatusBar 'snap to bottom'"

This reverts commit 9a91c957e2.

* started UICatalog project

* Initial working POC.

* Fix newlines

* merge

* textalignment demo tweaks

* textalignment demo tweaks

* Unicode Menu Scenario

* not sure why this keeps changing

* re-added project to .sln file

* re-enabled status bar

* moved scenarios to dir

* building a dim and pos demo

* terminal.sln

* progress...barely

* fixed exit

* progress with some underlying fixes to Label

* added readme

* fixes build issue

* launch

* made default colors readable on Windows

* major UI Catalog upgrade

* added more demos and updated readme

* refactored and added more tests

* added ref to Issue #437

* added OnKeyUp support to Curses and Net drivers

* more tweaks - grab PR #438 first

* Added a OpenSelectedItem event to the ListView #429

* updates

* moved KeyUpHandler out of special ESC stuff

* more tweaks & improvements

* testing top window bug

* supported OpenSelectedItem

* lots of updates

* fixed regression, fixed #444

* better button scenario

* tweaks

* add Ready event to Toplevel

* dotfx .gitignroe

* ready for ready

* updated colors based on feedback; consolodated config code

* tweaked readme

* readme

* Added Editor demonstrating TextView

* Added Editor demonstrating TextView

* added hexeditor scenario

Co-authored-by: Miguel de Icaza <miguel@gnome.org>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
2020-05-20 13:37:12 -04:00
Charlie Kindel
ae5750dd1d upgraded Example to new .csproj format 2020-05-15 22:32:59 -06:00
Charlie Kindel
5df8500862 Status bar snap (#384)
* KeyDown/Up support

* updated demo

* defined styles

* Smarter StatusBar bottom tracking.

* Prepping for https://github.com/migueldeicaza/gui.cs/issues/376

* Fixed StatusBar 'snap to bottom'
2020-04-20 16:08:34 -04:00
miguel
6fbccd6659 Fix the Fill computations for layout, by only special casing the Pos.Center scenarios and unrolling the rest 2018-05-04 22:41:59 -04:00
miguel
4043be102c Move Example into a separate directory 2018-04-26 22:23:57 -04:00
Miguel de Icaza
152126473a Make it into a library 2018-01-17 16:02:27 -05:00