Commit Graph

7984 Commits

Author SHA1 Message Date
Tig
98f70b2632 Adds ViewportSettings.Transparent (#3886) 2025-03-01 15:22:23 -07:00
Tig
cae1d6c47e Fixes `Logging' init in UI Catalog and naming consistency (#3944) 2025-03-01 15:13:43 -07:00
Tonttu
a8d3d26528 Add UICatalog benchmark launch profiles for v2 drivers (#3942) 2025-03-01 09:36:50 -07:00
Tonttu
bc8bf380b2 Reduce legacy Windows driver ANSI escape sequence intermediate string allocations (#3936)
* Skip WindowsConsole StringBuilder append ANSI escape sequence intermediate string allocations

Appending InterpolatedStringHandler directly to StringBuilder skips the formatting related intermediate string allocation. This should also be usable in other console implementation but currently I have no WSL etc. setup to actually verify correct functionality.

* Add CSI_Set* and CSI_Append* comparison benchmark

* Clean up CSI_SetVsAppend benchmark

* Change benchmark names to match the method group
2025-03-01 09:36:31 -07:00
Thomas Nind
af9c6d7846 Change LayoutAndDraw in v2 applications to simply set draw/layout flags instead of force a buffer refresh (#3943) 2025-03-01 09:36:13 -07:00
Tig
61462ff9d0 local_packages 2025-02-28 15:08:36 -07:00
Tig
79cd4e92b7 Adds Logging level control to UICatalog (#3938)
* Tons of API doc updates

* Added logging control to UICatalog

* Added logging control to UICatalog - more

* fixed minor issues

* removed logs from .gitignore

* Fixed log file path

* Fixed app desc
2025-02-28 15:06:01 -07:00
Thomas Nind
c88c772462 Fixes #3692++ - Rearchitects drivers (#3837) 2025-02-28 12:09:29 -07:00
BDisp
3a240ecbe5 Fixes #3934. Test Explorer is showing some unit tests as 'not run' (#3935) 2025-02-28 12:09:04 -07:00
BDisp
80306c64c3 Fixes #3885. ableView's CollectionNavigator sometimes doesn't work right. (#3933) 2025-02-27 20:55:38 -07:00
Tig
cd0b68d174 merge 2025-02-27 17:05:29 -07:00
Tig
df9549e0a2 Tons of V2 API doc fixes (#3932)
* Tons of API doc updates

* tweaked scenario

* try to fix unit test crash in ubuntu action

* try to fix unit test crash in ubuntu action2
2025-02-27 17:00:47 -07:00
Tig
80032183c4 Tons of API doc updates 2025-02-27 16:25:26 -07:00
Tig
8733d9c88d Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-27 13:19:18 -07:00
Tig
c00de4a092 Makes Window default Arrangement not be movable/resizable (#3931)
* Window -> not sizeable/movable by default.
Window: Code cleanup.
Frameview: Code cleanup.

* View API docs updates

* View API docs updates
2025-02-27 12:24:31 -07:00
Tig
9c3be44632 Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-27 10:45:43 -07:00
Tig
b62e826576 API doc updates (#3928) 2025-02-27 10:45:31 -07:00
Tonttu
255114f0f2 Reduce IntersectionType[] allocations (#3924)
* Eliminate LineCanvas.Has params array allocation

Inline ReadOnlySpan arguments do not incur heap allocation compared to regular arrays.

* Allocate once LineCanvas.Exactly corner intersection arrays

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-02-27 10:44:39 -07:00
Tig
ebbcaffea0 Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-27 10:01:56 -07:00
BDisp
e632a12049 Fixes #3881. PositionCursor broke with recent ConsoleDriver changes. (#3927) 2025-02-27 10:01:42 -07:00
Tig
84b3d2a8ea Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-27 09:58:40 -07:00
Tig
aff7e2c6d5 Fixed nav (#3926) 2025-02-27 08:09:36 -07:00
Tig
f3697a99f4 Fixes #3839, #3922 - CM Glyphs not working (#3923)
* fixed

* Moved Glyphs to ThemeScope

* Removed test code
2025-02-26 15:24:58 -07:00
Tig
9aaaf1e0b3 Merge branch 'gui-cs:v2_develop' into v2_develop 2025-02-26 12:45:14 -07:00
Tig
7ba6d638bc Fixes #3918 and #3913 - Accepting behavior (#3921)
* Fixed #3905, #3918

* Tweaked Generic

* Label code cleanup

* Clean up.

* Clean up.

* Clean up2.
2025-02-26 12:40:45 -07:00
Tig
f7d9650b3d Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-25 10:19:10 -07:00
Tonttu
35522cc517 Reduce func allocations (#3919)
* Replace Region.Contains LINQ lambdas with foreach loop

Removes the lambda func allocations caused by captured outer variables.

* Replace LineCanvas.Has LINQ lambda with foreach loop

* Fix LineCanvas.GetMap intersects array nullability

It should be enough to add null-forgiving operator somewhere in the LINQ query to make the final result non-null. No need to shove the nullability further down the line to complicate things. :)

* Replace LineCanvas.All LINQ lambda with foreach loop

* Replace Region.Intersect LINQ lambdas and list allocation with foreach loop and rented array

* Use stackalloc buffer in Region.Intersect when max 8 rectangles

* Fix LineCanvas.GetCellMap intersects array nullability

* Remove leftover LineCanvas.GetRuneForIntersects null-conditional operators

* Remove leftover IntersectionRuneResolver.GetRuneForIntersects null-conditional operators

* PosAlign.CalculateMinDimension: calculate sum during loop

No need to first put the dimensions in a list and then sum the list when you can just add to sum while looping through dimensions.

* PosAlign.CalculateMinDimension: Remove intermediate list and related filter func allocation

* TextFormatter.GetRuneWidth: Remove intermediate list and related sum func allocation

* ReadOnlySpan refactor preparation for GetCellMap rewrite

* LineCanvas.GetCellMap: Reuse intersection list outside nested loops

GetCellMap would not benefit much from array pool because IntersectionDefinition is not struct. This  change eliminates majority of the rest of Func<,> allocations. As a bonus IntersectionDefinition[] allocations dropped nicely.

* Refactor local method UseRounded

* Wrap too long list of method parameters

* Region: Consistent location for #nullable enable

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-02-25 10:18:23 -07:00
Tig
8ad1d563ac Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop 2025-02-25 09:55:37 -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
Tig
dea28baa3d Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-19 13:15:40 -07:00
Tig
ff353fc57c testing versions 2025-02-18 16:54:33 -07:00
Tig
e7a784b27c Moved scripts 2025-02-18 16:53:38 -07:00
Tig
dfb3e92be8 Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop 2025-02-18 16:31:20 -07:00
Tig
0330cda9ed Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop 2025-02-18 16:30:46 -07:00
Tig
40be08beef Fixing versions 3 2025-02-18 16:30:26 -07:00
Tig
daf4f6ac8c Trying to fix versrions (#3912)
* Fixing versions

* Fixing versions 2
2025-02-18 16:13:02 -07:00
Tig
e6c8a58291 Merge branch 'v2_develop' into v2_develop 2025-02-18 15:12:44 -08:00
Tig
ac485498c2 Fixing versions 2 2025-02-18 16:11:40 -07:00
Tig
c0cb276361 Fixing versions 2025-02-18 16:07:37 -07:00
Tig
6fcd5efa6a Update GitVersion.yml (#3911) 2025-02-18 15:48:16 -07:00
Rishikeshan Sulochana/Lavakumar (Work)
dc004c4923 (Minor fix) Fix the link text, refer to the F# example too (#3901)
The sample code was removed and was replaced with a link; the markup was bleeding.

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-02-05 10:03:35 -07:00
Rishikeshan Sulochana/Lavakumar (Work)
da2d20e488 Add Terminal.Gui Designer (#3902)
Terminal.Gui Designer is special in the sense it is also a good companion tool, especially for rapid prototyping and for beginners.
2025-02-05 10:02:51 -07:00
Thomas Nind
81ad695ef7 Fix foreach runes bug with unicode surrogate pairs (#3894) 2025-01-12 10:05:52 -07:00
Tig
7676f89e39 Merge pull request #3880 from tig/v2_3778-Command-Decoupling
Fixes #3778: Decouples `Command` from `KeyBindings`
v2.0.0-develop.1 v2.0.0-v2-develop.3000
2024-12-10 07:02:40 -08:00
Tig
63b3ebf2f4 Fixed RadioGroup unit test that was previosly bogus 2024-12-10 06:51:53 -08:00
Tig
ea74179833 Refactored RadioGroup to just use Commands 2024-12-09 22:56:19 -08:00
Tig
97d4c0a0d8 Refactored RadioGroup to just use Commands 2024-12-09 22:52:45 -08:00
Tig
9563ec9734 Key -> nullable enable 2024-12-09 22:29:09 -08:00
Tig
1180b2fe31 Code cleanup 2024-12-09 22:18:25 -08:00
Tig
2b8884a881 Finished integrated tznind's work. 2024-12-09 22:03:40 -08:00