Commit Graph

59 Commits

Author SHA1 Message Date
Tig
2d48bc9d49 Working on shortcut 2024-10-19 10:25:53 -06:00
Tig
d104a56e42 WIP - prototyping... 2024-10-15 17:17:00 -06:00
Tig
a9e1f2a2cb View.Mouse cleanup - WIP 2024-10-14 18:30:21 -06:00
Tig
f536945df5 Application.Keyboard Code cleanup 2024-10-14 14:19:48 -06:00
Tig
78d0a8fc3b Accepted->Accepting 2024-10-07 08:58:17 -04:00
Tig
018dbc625e Accepted now takes CommandEventArgs 2024-10-07 08:51:35 -04:00
Tig
923e5d1cf3 Fixed ScreenPosition in tests 2024-10-06 08:39:05 -06:00
Tig
6adeec6548 More refactoring. Still WIP 2024-10-05 17:41:48 -06:00
Tig
af110d92d0 In the middle of another refactoroing 2024-10-05 12:43:09 -06:00
Tig
b717892235 Removed OverlappedTop.
Updated unit tess.
Fixed bad code paths.
2024-09-17 17:20:19 -06:00
Tig
f0508b9831 Improving Application.Navigation 2024-08-29 13:53:16 -04:00
Tig
667a8ee152 Fixed label tests 2024-08-23 14:09:44 -06:00
BDisp
c1d82947aa Fixes #3682. CanFocus true for Label works only for keyboard and not mouse. (#3683)
* Fixes #3682. CanFocus true for Label works only for keyboard and not mouse.

* Simplifying code.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-23 09:46:52 -06:00
Tig
a935ef83df Merge remote-tracking branch 'refs/remotes/origin/v2_2491-Toplevel-Redesign' into v2_2491-Toplevel-Redesign 2024-07-25 14:50:19 -06:00
Tig
44ce74a5c0 Refactored Application into smaller files.
Made Application #nullable enable
2024-07-22 16:52:02 -06:00
Tig
0e70444e08 Renamed Width/Height/Size 2024-07-20 11:36:05 -06:00
Tig
6550cde7b5 Nuked Textformatter.AutoSize.
Removed references to AutoSize throughout.
Updated unit tests.
2024-07-20 11:17:46 -06:00
Tig
a3b606fe6e New unit tests. Lots of fixes 2024-07-15 16:36:05 -06:00
Tig
7a712ad96a Accept now uses HandledEventARgs vs. Cancel 2024-06-27 12:40:26 -07:00
Tig
21c9097d52 pull squash 2024-06-20 18:02:09 -07:00
Tig
05613bb229 Start on replacing old StatusBar with new 2024-06-14 13:01:33 -07:00
Tig
6b089fb910 Fixed Labeltests 2024-05-30 07:42:48 -06:00
Tig
c877c1844d Simplified Alignment enum 2024-05-18 10:39:14 -07:00
Tig
ddd7e279c4 Merge/rebase with #3480 2024-05-17 16:10:51 -07:00
Tig
00daccfcf1 Renamed Pos.Function->Func to align iwth C# Func type.
Pos API doc fixes and code cleanup.
2024-05-16 06:50:19 -07:00
Tig
7bfefd27b0 Rebased with #3480 2024-05-15 07:53:15 -07:00
Tig
4e01779e0b Moved AutoSizeTrue tests to more logical locations; nuked invalid tests 2024-05-13 12:22:43 -06:00
Tig
a59c44d258 Rebased latest 2024-05-11 11:05:32 -06:00
Tig
ce1e243df2 Justification->Alignment 2024-05-10 11:27:02 -06:00
Tig
c5a6c907a4 Justifier->Aligner 2024-05-10 10:35:49 -06:00
Tig
c84dade64d WIP -> Getting rid of old TextAlignment enums 2024-05-10 08:52:47 -06:00
Tig
d391cc7ad2 MouseEvent: int X, int Y -> Point Position 2024-05-09 08:50:50 -06:00
Tig
3e1025897b AutoSize in comments i gone too. 2024-05-03 15:00:48 -06:00
Tig
65b36a9268 Updated almosta all tests to not use AutoSize 2024-05-03 14:01:02 -06:00
BDisp
75669a4a76 Rewritten this unit test. 2024-05-03 17:38:26 +01:00
Tig
09565a0ef1 Tons of changes - mostly experiments, but some goodness.
There's a huge issue that TextFormatter is confused about AutoSize.
a) It behaves 'automatically' even when AutoSize == false (e.g. in Text_set).
b) It doesn't support auto sizing only one dimension.
2024-04-25 13:29:18 -06:00
Tig
2fdbce4a76 Fixed all unit tests. Doesn't mean things aren't broken tho. 2024-04-21 12:35:32 -06:00
Tig
d3dfb16597 Initial commit. Made all calls to AnchorEnd() be AnchorEnd(0) in prep 2024-04-16 09:51:22 -06:00
Tig
50f9b3559e Merge branch 'v2_3269_Bounds-ContentArea' of tig:tig/Terminal.Gui into v2_3269_Bounds-ContentArea 2024-04-05 11:48:57 -04:00
Tig
c5b7b084a9 Way too big a committ.... but I got carried away.
- Started MouseEventEventArgs -> MouseEvent transition - for OnMouseEvent. Partially fixes #3029.
- Refactored Appliation.OnMouseEvent and View.OnMouseEvent to match design guidelines.
- Re-impleented highlight, enabling extensibility (see Border).
- Beefed up unit tests
2024-04-04 18:50:13 -04:00
Tig
df5f04b645 Merged v2_develop 2024-03-26 14:36:23 -06:00
BDisp
41971a6e5a Fix all tests. 2024-03-25 17:36:35 +00:00
Tig
9aec5b1c6d Merge branch 'v2_3269_Bounds-ContentArea' of tig:tig/Terminal.Gui into v2_3269_Bounds-ContentArea 2024-03-17 15:38:30 -07:00
Tig
73a6e66139 Tweaked unit tests 2024-03-16 08:46:29 -08:00
Tig
f6ff36968e Reamed Bounds -> ViewPort to see how it feels 2024-03-14 07:30:27 -08:00
Tig
7d6d5280f1 Adds CanFocus/SetFocus test 2024-03-10 07:30:42 -08:00
Tig
dabb8df0ac Adds Label mouse click test 2024-03-10 07:16:41 -08:00
dodexahedron
0f9e6f091d Stage 1 of #3256 - Prepare Rect for removal (#3260)
* Replace all 342 `== null` with `is null`

* Replace 354 `!= null` with `is { }`

* Wrap these in conditionals since they break tests against Release configuration

The members they depend on do not exist in Release configuration

* Split these up and dispose properly

This test needs to be revisited for several reasons at some point.

* Fix release configuration tests

* Declare interface these already support

* Annotate constructor properly and use throw helper

* Move class to its own file

* Rename these files so they nest in the solution explorer

* Make this a record type and remove now-redundant/illegal members

* Reference passing to avoid some struct copies

* Simplify this

* Carry reference passing through as appropriate

* Turn this into a record struct

* Remove unused internal constructor and its test

It was only used by that test.

* Simplify this constructor

* This should be a property

* Simplify constructor

* Simplify GetHashCode

* Mark this ignored just in case

* Missed a couple of opportunities for reference passing

* record struct already does this by value

* Remove unused class

* Simplify the type initializer and Reset method

* Implement INotifyCollectionChanged and IDictionary by delegating to ColorSchemes

* Fix for reflection-based configuration

* Make CI  build happy by disambiguiating this attribute

* Add PERF, NOTE, QUESTION, and CONCURRENCY tags for the todo explorer

* Make this string comparison faster.

* Add a tag for unclear intent

* This is a constant

* Turn this into a constant via use of a unicode literal

* Remove this method and its test

It is unused
There's no guarantee at all that the parent process is the terminal.
There are good reasons, including that one, why there's no simple way to do it in .net.
It's also of course a windows-only thing, if using WMI.

* With the WMI method gone, we no longer need this

* Make this more efficient

* Add detail to this property's XmlDoc

* Move the general properties up top because order matters

* Make sure any constants defined at higher levels are not clobbered and define a couple more

* Put InternalsVisibleTo in its own group

* Sort dependencies alphabetically and update

* Global usings

* Split to one type per file

* Collection expression

* Fix naming

* Inline to avoid copies

* This is already a value copy (struct)

* Combine to one non-destructive mutation

* Avoid some potential boxing

* Turn on null analysis here

* Remove unnecessary cast and use real type name

* Seal this

* Fix name

* Move nested class to a nested file (no type layout change made)

* Undo naming change that isn't changed globally until next batch

* Rename Rect to Rectangle in preparation for removal

* Add baseline test for ToString checking for current behavior.

* Change to behavior matching System.Drawing.Rectangle

* Fix this test

This is not a test of Rectangle, so trust that Rectangle gets it right.

* Fix these tests the same way as the previous commit

* These should be testing against the Rectangles, not the strings

* Slightly de-couple these as well

* Test against Rectangles, not strings

* Collection expressions and constants

* Remove this

* Perform proper platform-agnostic normalization

* Make this easier to follow (naming only)

* Add a category to this

* Use raw strings for better clarity

* Some more categorization

* Re-apply backed-out naming change from parent branch

* Change GetHashCode to be equivalent to System.Drawing.Rectangle

* Update this since 6.0.0 is no longer available and prevents build

* This check is redundant with the rectangle check below

* Re-apply Rect->Rectangle name changes in these files
2024-02-22 16:46:04 -07:00
Tig
16055c53b0 Fixes #3039. Fix View.HotKey (#3249)
* Added View.DefaultCommand etc... Started on dedicated scenario

* Fixed un-shifted hotkeys -> Fixed Key Equals. Fixed WindowsDriver passing wrong key. Etc.

* Fixed Key Bindings and HotKeys

* Fixed Key Bindings and HotKeys

* Label now correctly supports hotkey

* Disabled unix hot keys because they are annoying and get in the way

* Updated nuget. fixed warnings

* Trying to fix ci/ci issue

* Trying to fix ci/ci issue

* Trying to fix ci/ci issue

* Changed TextChangingEventArgs to inherit from CancelEventArgs

* TextChangingEventArgs -> TextEventArgs

* Simplified Text events by having only on args class

* Fixed unit tests fail

* Simplified by removing TitleEventArgs

* POC of Title being primary for hotkey. Label and Button hacked to work

* POC of Title being primary for hotkey. Label and Button hacked to work - all unit tests pass

* Dropped Microsoft.NETFramework.ReferenceAssemblies

* Fixed Dialogs scenario hotkeys

* Fixed build warnings

* Fixed Border Title render bug

* Regiggering default command handling

* Regiggering default command handling

* Checkbox clean up

* Added StateEventArgs POC

* Command.Default -> Command.HotKey

* Command.Default -> Command.HotKey - fixed TableView

* Command.Default -> Command.HotKey - fixed TableView

* Updated reactive example

* Fixed Toplevel.BringOverlappedTopToFront - was reordering SubViews when it shouldn't

* WIP - broke

* Finished impl of StateEventArgs

* Deleted ToggleEventArgs.cs. Added StateEventArgs.cs

* XML doc fix

* Removed old code

* Removed commented out code

* Label.Clicked -> Label.Accept (missed this before)

* Removed Labels as Buttons scenario as it's not really  useful

* Moved SubView tests to own file

* Moved SubView tests to own file

* Simplified Text test

* Added OnAccept test

* Deleted DefaultCommand

* Modernized CheckBox

* New button test

* Cleaned up RadioGroup; added tests

* KeyCode->Key in ListView

* Added ListView unit tests

* ListView now does Accept correctly

* TreeView now does Accept correctly

* Cleaned up some TextField tests

* TextView now handles Accept properly; updated CharMap and Adornments scenarios to test

* Fixed ComboBox to deal with TextView now handles Accept properly; updated CharMap and Adornments scenarios to test

* Removed un-needed using statement
2024-02-22 15:11:26 -07:00
BDisp
7a041fcc73 Fixes #3229. TextFormatter should have a FillRemaining property. (#3245)
* Fixes #3229. TextFormatter should have a FillRemaining property.

* Remove fillRemaining parameter from the Draw method.
2024-02-12 17:25:09 -07:00