Commit Graph

1140 Commits

Author SHA1 Message Date
BDisp
a2c7e51db4 Remove constructors with frame parameters from ScrollView class. 2024-01-15 21:53:41 +00:00
BDisp
e42c80a439 Remove constructors with frame parameters from ListView class. 2024-01-15 21:31:54 +00:00
BDisp
01f8681846 Remove constructors with frame parameters from Label class. 2024-01-15 20:57:17 +00:00
BDisp
e71f970dea @BDisp
Remove constructors with frame parameters from FrameView class.
2024-01-15 20:24:17 +00:00
BDisp
61c1cab24e Remove constructors with frame parameters from ComboBox class. 2024-01-15 19:18:48 +00:00
BDisp
cdb3d6f355 Cleanup code. 2024-01-15 19:03:05 +00:00
BDisp
6d6553a2a4 Remove constructors with frame parameters from CheckBox class. 2024-01-15 18:32:13 +00:00
BDisp
6b190d6dfd Remove constructors with frame parameters from Button class. 2024-01-15 17:55:54 +00:00
Tig
b84862d0bd Fixes #3172. Application.ResetState wasn't resetting all it should (#3173)
* Removed resharper settings from editorconfig

* Fixed Applicaton.ResetState. New unit tests

* Tweaked pull request template
2024-01-14 16:35:17 -07:00
BDisp
17e7673cd3 Fixes #2981. LegendAnnotation: 'Frame.DrawFrame(Rect, bool)' is obsolete: 'This method is obsolete in v2. Use use LineCanvas or Frame (#2982)
* Fixes #2981. LegendAnnotation: 'Frame.DrawFrame(Rect, bool)' is obsolete: 'This method is obsolete in v2. Use use LineCanvas or Frame

* Fixes #2983. View need a alternative DrawFrame for the v2.

* Use new DrawFrame method.

* Add a view for the legend annotations.

* Prefix with underscore.

* Change LegendAnnotation class to derived from View.

* The Bounds isn't needed, it's enough to set the Pos/Dim.

* Fix unit test to differentiate Bounds from Frame.

* Add DrawIncompleteFrame method and unit tests.

* Add more unit tests to LineCanvas.

* Fix newline conflict errors.

* Add DrawIncompleteFrame method and unit tests.

* Add more unit tests to LineCanvas.

* Fix newline conflict errors.

* I will never rely on zero-location-based unit test again.

* Fix TestTreeViewColor unit test fail.

* Add BorderStyle option to the menu.

* Revert "I will never rely on zero-location-based unit test again."

This reverts commit 62adf6f285.

* Revert "Fix newline conflict errors."

This reverts commit 4acf72612d.

* Revert "Add more unit tests to LineCanvas."

This reverts commit 66bc6f514e.

* Revert "Add DrawIncompleteFrame method and unit tests."

This reverts commit 680ba264e1.

* Revert "Fixes #2983. View need a alternative DrawFrame for the v2."

This reverts commit dade9fd767.

* Removed resharper settings from editorconfig

* Rename to OnDrawAdornments.

* Added diagnostics as a double-check. Code cleanup. API doc improvements.

* Fix typo for retest again.

* Increase the graph size.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
2024-01-14 16:18:44 -07:00
BDisp
96f7597050 Fixes #3166. TimeField should use TextChanging instead of TextChanged event. (#3167)
* Reduces indentation by remove the namespace braces.

* Prefix private fields with underscore.

* Rename to SetInitialProperties.

* Reduces indentation and removes unused using.

* Using TextChanging instead of TextChanged event.

* Fixes #3160. TextField doesn't update correctly the CursorPosition on Paste.

* Rearrange code.

* Fix key bindings.

* Fix Non-numerics are ignored.

* Add format normalization.

* Improve cursor position adjustments.

* Ensures clear selection if it isn't selecting.

* Provides more text validation.

* Unit test with selection.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-01-14 16:03:03 -07:00
BDisp
43b889d1b1 Fixes #3157. DateField is validating wrong the date on different culture than us-US. (#3165)
* Remove the old short two digits year and done some cleanup.

* Fixes #3160. TextField doesn't update correctly the CursorPosition on Paste.

* Using TextChanging instead of TextChanged event.

* Removes old IsShortFormat.

* Removing unnecessary private fields and done code cleanup.

* Removes unnecessary GetShortDatePattern method,

* Fix AdjCursorPosition method.

* Create TestDateAttribute.

* Reduces indentation and removes unused using.

* Remove location from constructors parameters.
2024-01-14 15:54:07 -07:00
Tig
7fe95cb9c7 Renames Frame->Adornment; changes Frame to have a Border subclass (#3158) 2024-01-13 20:11:17 -07:00
Maciej
545c010731 Fixes #2019: Introduce DatePicker (#3134)
* Create POC of DatePicker

* Move DatePicker to dialog

* Move DatePicker to separate view

* Support user specified date format

* Added code documentation for public API

* Select day on calendar based on currently selected date

* Add new constuctors for DatePicker

* Fix constructors

* Add month navigation buttons

* Added support for user to specify a range of years in the calendar

* Update default format date in unit tests

* Add some more unit tests

* Improve UICatalog DatePicker example

* Change default date format to CultureInfo.CurrentCulture

* Address code review comments

* Fix DatePicker height and width

* Fix crashes on 'Esc' key during open combobox

* Add DatePicker to localizable strings

* Generate calendar labels based on current culture

* Replace Month enum with localized DateTime month names

* Remove setting culture to polish (used for test purposes)

* Prevent choosing not existing day from calendar

* Update DatePicker layout

* Handle year out of range

* Make DatePicker standalone view and simplfy code and component look

* Handle clicking on no exisitng days in calendar

* Add missing rows to calendar

* Update example in UICatalog

* Dispose SubViews of DatePicker

* Add case for DatePicker

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-01-13 08:59:58 -07:00
Tig
6ad36b7ac9 Fixes #2944. TreeView unit tests fail intermittently: Ensures Attribute and Color are read only value types (#3163)
* Removed resharper settings from editorconfig

* Initial work in progress

* API doc

* API doc

* initial commit

* Fixed color and attribute issues

* Made Color a value type (readonly struct) etc...

* Removed stuff from other PR

* Ensured Colors.ColorScheme has private setter

* oops

* oops 2

* Code cleanup

* Code cleanup

* oops 4

* Reverted Attrivte.Default to be readonly static

* Fixed [Fact] [AutoInitShutdown]
2024-01-13 08:54:20 -07:00
Tig
d2ad11248f Fixes #3127 - View Layout improvements - Redefines how LayoutStyle works. Fixes AutoSize etc... (#3130)
* Removes CheckAbsoulte and updates unit tests to match

* Fixed code that was dependent on ToString behavior vs. direct test for null

* Dim/Pos != null WIP

* Moved AutoSize specific tests out of Pos/Dim tests

* Broke out AutoSize = false tests to new file

* Commented test TODOs

* New test

* Removed unused API and cleaned up code

* Removed unused API and cleaned up code

* Cleaned up code

* Cleaned up code

* reorg'd Toplevel tests

* Fixed Create and related unit tests

* Added test from #3136

* Removed TopLevel.Create

* Fixed SetCurrentOverlappedAsTop

* Updated pull request template

* Updated pull request template

* Revert "Updated pull request template"

This reverts commit d807190dd9.

* reverting

* re-reverting

* Fixed every thing but autosize scenarios??

* Fixed hexview

* Fixed contextmenu

* Fixed more minor issues in tests

* Fixed more minor issues in tests

* Debugging Dialog test failure

* Fixed bad Dialog test. Was cleary invalid

* Fixed OnResizeNeeded bug

* Fixed OnResizeNeeded bug

* Fixed UICatalog to not eat exceptions

* Fixed TextView

* Removed Frame overrides

* Made Frame non-virtual

* Fixed radioGroup

* Fixed TabView

* Hcked ScrolLBarView unit tests to pass

* All AutoSize tests pass!

* All tests pass!!!!!!!

* Updated API docs. Cleaned up code.

* Fixed ColorPicker

* Added 'Bounds =' unit tests

* Refactored TextFormatter.Size setting logic

* Cleaned up OnResizeNeeded (api docs and usages)

* Merges in #3019 changes. Makes OnResizeNeeded non-virtual. If we find a use-case where someone wants to override it we can change this back.

* Fixed FileDialog bounds warning

* Removed resharper settings from editorconfig

* Added Pos.Center test to AllViewsTests.cs.
Modernized RadioGroup.
Fixed ProgressBar.

* Reverted formatting

* Reverted formatting

* Reverted formatting

* Reverted formatting

* Reverted formatting

* Reverted formatting

* Reverted formatting

* Code cleanup

* Code cleanup

* Code cleanup

* Code cleanup

* Code cleanup

* Code cleanup

* Code cleanup

* Code cleanup

* Reverted formatting
2024-01-12 17:43:35 -07:00
Tig
707dbda71b Fixes #3072, #3148. Dialog and MessageBox key binding do not handle Enter correctly (#3151)
* Moved Command.Accept/Enter key binding from Toplevel to Dialog and added unit tests

* Dialog binds Esc to Command.QuitTopLevel

* Better Dialog key binding tests

* Better MessageBox key binding tests

* List of changes:
1. Removed explicit type casting for `Application.QuitKey` in `KeyBindings.Add` method calls. This indicates that `Application.QuitKey` is already of type `KeyCode`.
2. Removed explicit type casting for `Application.AlternateForwardKey` in `KeyBindings.Add` method calls. This suggests that `Application.AlternateForwardKey` is already of type `KeyCode`.
3. Removed explicit type casting for `Application.AlternateBackwardKey` in `KeyBindings.Add` method calls. This implies that `Application.AlternateBackwardKey` is already of type `KeyCode`.

References to the code changes:
1. `KeyBindings.Add((KeyCode)Application.QuitKey, QuitApplication);` changed to `KeyBindings.Add(Application.QuitKey, QuitApplication);`
2. `KeyBindings.Add((KeyCode)Application.AlternateForwardKey, MoveForward);` changed to `KeyBindings.Add(Application.AlternateForwardKey, MoveForward);`
3. `KeyBindings.Add((KeyCode)Application.AlternateBackwardKey, MoveBackward);` changed to `KeyBindings.Add(Application.AlternateBackwardKey, MoveBackward);`

* The `Command.Accept` command now directly calls the `OnClicked` method and returns `true`, effectively incorporating the behavior of the now-removed `AcceptKey` method.

* Moved Command.Accept/Enter key binding from Toplevel to Window and added unit tests
2024-01-10 13:22:18 -07:00
Tig
12fb26a526 Updates Key unit tests with easier to edit/read MemberData (#3147)
* Prototype

* Makes MemberData test easier to write/read

* Makes MemberData test easier to write/read
2024-01-09 11:35:06 -07:00
joebart457
3150d43979 Fixes #3144. TextView Autocomplete does not insert capital letters (#3145)
* Fixes #3144. TextView Autocomplete does not insert capital letters

* Fixes #3144. Fix unit test for fix of TextView Autocomplete does not insert capital letters
2024-01-08 12:11:11 -07:00
BDisp
d69de86ba4 Fix Disposing unit tests that sometimes throws because some instances aren't cleared on others unit tests classes. (#3142) 2024-01-08 12:08:48 -07:00
BDisp
b2aeb3887d Fixes #3128. Some Key class unit tests does not run. (#3129)
* Fixes #3128. Some Key class unit tests does not run.

* Disabling duplicates warnings.

* Removes duplicate InlineData.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-01-08 02:06:13 -07:00
BDisp
93c6b1fe44 Fixes #3124. 0001 for year in DateField. (#3131)
* Prefix private fields with underscore.

* Rename to SetInitialProperties.

* Ensures clear all selection if there isn't selecting.

* Fix format and replace duplicate key bindings for DeleteCharLeft.

* Test the new key binding for DeleteCharLeft.

* Fix formating when typing with selection which may broken the format.

* Fix copy/paste.

* Test data from 01/01/0001 to 12/31/9999.
2024-01-07 19:25:20 -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
7af54f369d Robustness improvements in prep for implementing Virtual Terminal Sequences (#3094)
* Fixes #2616. Support combining sequences that don't normalize

* Decouples Application from ConsoleDriver in TestHelpers

* Updates driver tests to match new arch

* Start on making all driver tests test all drivers

* Improves handling if combining marks.

* Fix unit tests fails.

* Fix unit tests fails.

* Handling combining mask.

* Tying to fix this unit test that sometimes fail.

* Add support for combining mask on NetDriver.

* Enable CombiningMarks as List<Rune>.

* Prevents combining marks on invalid runes default and space.

* Formatting for CI tests.

* Fix non-normalized combining mark to add 1 to Col.

* Reformatting for retest the CI.

* Forces non-normalized CMs to be ignored.

* Initial experiment

* Created ANSiDriver. Updated UI Catalog command line handling

* Fixed ForceDriver logic

* Fixed ForceDriver logic

* Updating P/Invoke

* Force16 colors WIP

* Fixed 16 colo mode

* Updated unit tests

* UI catalog tweak

* Added chinese scenario from bdisp

* Disabled AnsiDriver unit tests for now.

* Code cleanup

* Initial commit (fork from v2_fixes_2610_WT_VTS)

* Code cleanup

* Removed nativemethods.txt

* Removed not needed native stuff

* Code cleanup

* Ensures command line handler doesn't eat exceptions

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2024-01-04 22:35:18 -07:00
BDisp
e2a59050fe Fixes #3122. Shift-Tab is broken on TextView. (#3123) 2024-01-04 22:15:14 -07:00
BDisp
0484fc8bf9 Cleans up key handling in drivers (was "fixes VkeyPacketSimulator is broken") (#3078)
* Fixes #3054. VkeyPacketSimulator scenario is broken.

* Fix some key handle and unit tests.

* Remove unnecessary conditional.

* Improves key handling.

* Also allow map capslock to shift with accented characters.

* Change to MemberData.

* Remove unnecessary using.

* Fix merge errors.

* Fixes #3095. WindowsDriver should return the mask keys to IsShift, IsAlt and IsCtrl return the right value.

* Modifiers keys are valid to be handled on key down and key up.

* Map KeyCode.Enter to ConsoleKey.Enter and vice versa.

* Updated ScanCodeMapping table with readable constants

* Documented bugs

* Implemented mapping using MapVirtualKeyEx

* Implemented mapping using MapVirtualKeyEx

* Changed KeyCode special keys to match ConsoleKey values + max unicode codepoint

* Fixed bogus CollectionNavigator impl and tests

* Nuked DeleteChar. renamed InsertChar to Insert

* KeyCode.Enter = ConsoleKey.Enter, not \n

* Code cleanup

* Added diag for keyboard layout name

* Fixed AltGr support (hopefully)

* Simplified code

* Simplified KeyCode by removing ShiftKeys

* Fixed TextView

* Code cleanup

* Fixes cursesdriver (somewhat)

* Code cleanup

* netdriver wip

* Fixed netdriver under WSL

* Turned off debug spew

* Removed old code

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
2024-01-04 12:37:01 -07:00
Tig
bc41d9bc09 Fixes #2465 - Simplify/Enforce LayoutStyle.Absolute when X, Y, Width, and/or Height are null or Absolute() (#2467)
* Merged v2_develop; updated API docs

* Code cleanup

* Fixed code that was using Dim/Pos before IsInit

* Fixed ComboBox using Bounds before IsInitalized and grabbing focus when it shouldn't

* Fixed ComboBox tests. Fixed FileDialog

* Fixed all !IsInitalized warnings

* Fixed AllviewsTester

* Fixed CharMap scenario

* Fixed ColorPicker (hack)

* Fixed CoputedLayout and Csv Editor

* Imrpoved warning

* Fixed more warnings

* Fixed GetTextFormatterSizeNeededForTextAndHotKey

* Fixed AllViewsTester

* AllViewsTester code cleanup

* AllViewsTester code cleanup

* AllViewsTester fixed for realz

* Decided Fill was better than Percent for default
2024-01-04 10:40:47 -07:00
Tig
3b394c8104 Fixes #3115. TextView should use Command.ShowContextMenu not Command.Accept (#3118)
* Command.Accept->Command.ShowContextMenu + Unit Test

* fixed unit test
2024-01-04 10:40:02 -07:00
BDisp
0b7ca7bf44 Fixes #3097. Now that View is IDisposable, it should expose a Disposing event. (#3104) 2024-01-04 07:13:31 -07:00
Maciej
3d829d71db Fixes #3106: Combo Box selection fixes (#3117)
* Search selected item on filtered set

* Fix unit test - don't return first item when combobox is not focused or showed

* Improve method readability

* Clean selection from previous search

* Update unit test - after changing search text unselect previously selected item
2024-01-03 17:07:33 -07:00
Thomas Nind
8954fa5ecf Add constructor overload to SliderOption<T> (#3101)
* Add constructor overload to SliderOption

* Adjust whitespace

* Move tests to SliderOptionTests

* Empty commit for CI
2023-12-31 05:45:20 -07:00
Thomas Nind
55bf53336a Add ToString implementation for SliderOption<T> (#3103)
* Add ToString implementation for SliderOption<T>

* Add test case for SliderOption ToString with more complex class
2023-12-31 05:44:42 -07:00
Tig
80ef4b5e19 Fixes #3071 & #3079. Key cast and static props are not correct (#3089)
* Removed char->Key cast. Added Key(char)

* Re-added char->key cast. Added unit tests

* Fixed standard keys to always return new instead of being readonly

* Re-fixed WindowsDriver to report shift/alt/ctrl as key/down/up

* Re-fixed WindowsDriver to report shift/alt/ctrl as key/down/up

* Adds string constructor to Key + tests.

* Simplified Key json

* Added string/Key cast operators.
2023-12-27 15:50:37 -07:00
Tig
a7209bcd88 Improves robustness of Dim, Pos, and SetRelativeLayout (#3077)
* Updated overview docs

* Updated toc

* Updated docs more

* Updated yml via dependabot

* Initial work in progress

* Fixed some autosize things

* Revamped Pos / Dim API docs

* Removed margin

* horiz->width

* Updated MessageBoxes and Dialogs Scenarios to use AutoSize

* AutoSize->Auxo

* Adds validation

* prep for Dialog to use Dim.Auto - Simplify unit tests to not depend on things not important to the unit test (like Dialog)

* prep for Dialog to use Dim.Auto - Simplify unit tests

* prep for Dialog to use Dim.Auto - Simplify unit tests

* prep for Dialog to use Dim.Auto - Make Dialog tests not depend on MessageBox

* Started on DimAuto unit tests

* started impl on min/max.

* started impl on min/max.

* Added DimAutoStyle

* Added arg checking for not implemented features

* Temporarily made DimAutoStyle.Subviews default

* Removed unneeded override of Anchor

* Fixed GethashCode warning

* Implemented DimAuto(min)

* Fixed unit tests

* renamed scenario

* WIP

* Moved ViewLayout.cs into Layout folder

* Clean up cocde formatting

* Renamed and moved SetFrameToFitText

* Fixed API docs for SetRelativeLayout

* Factored out SetRelativeLayout tests

* Better documented existing SetRelativeLayout behavior + unit tess

* Debugging Pos.Center + x in SetRelativeLayout - WIP

* Progress on low level unit tess

* Initial commit

* Restored unmodified scenarios

* Bump deps
2023-12-26 09:28:43 -07:00
BDisp
2c8f4034b8 Fixes #3080. Potentially unintended behavior of static pre-defined Attribute.Default in Attribute class (v2) (#3091) 2023-12-26 08:29:16 -07:00
BDisp
74afd18148 Fixes #3064. Pos.View returns PosCombine (#3065) 2023-12-19 16:34:17 -07:00
Tig
7f759b573b Fixes #3055: Remove Key.Unknown (#3057)
* Simplifies Key.IsValid

* Updated unit tests

* Fixed menu
2023-12-17 14:43:19 -07:00
Tig
dcb3b359ad Fixes #2926 - Refactor KeyEvent and KeyEventEventArgs to simplify (#2927)
* 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

* Rearranged Event.cs to Keyboard.cs and Mouse.cs

* Renamed KeyEventEventArgs KeyEventArgs

* temp renamed KeyEvent OldKeyEvent

* Merged KeyEvent into KeyEventArgs

* Renamed Application.ProcessKey members

* Renamed Application.ProcessKey members

* Renamed Application.ProcessKey members

* Added Responder.KeyPressed

* Removed unused references

* Fixed arg naming

* InvokeKeybindings->InvokeKeyBindings

* InvokeKeybindings->InvokeKeyBindings

* Fixed unit tests fail

* More progress on refactoring key input; still broken and probably wrong

* Moved OnKeyPressed out of Responder and made ProcessKeyPrssed non-virtual

* Updated API docs

* Moved key handling from Responder to View

* Updated API docs

* Updated HotKey API docs

* Updated shortcut API docs

* Fixed responder unit tests

* Removed Shortcut from View as it is not used

* Removed unneeded OnHotKey override from Button

* Fixed BackTab logic

* Button now uses Key Bindings exclusively

* Button now uses Key Bindings exclusively

* Updated keyboard.md docs

* Fixed unit tests to account for Toplevel handling default button

* Added View.InvokeCommand API

* Modernized RadioGroup

* Removed ColdKey

* Modernized (partially) StatusBar

* Worked around FileDialog issue with Ctrl-F

* Fixed driver unit test; view must be focused to reciev key pressed

* Application code cleanup

* Start on updaing menu

* Menu now mostly works

* Menu Select refinement

* Fixed known menu bugs!

* Enabled HotKey to cause focus- experimental

* Fixes #3022 & adds unit test to prove it

* Actually Fixes #3022 & adds unit test to prove it

* Working through hotkey issues

* Misc fixes

* removed hot/cold key stuff from Keys scenario

* Fixed scenarios

* Simplified shortcut string handling

* Modernized Checkbox

* Modernized TileView

* Updated API docs

* Updated API docs

* attempting to publish v2 docs

* Revert "attempting to publish v2 docs"

This reverts commit 59dcec111b.

* Playing with api docs

* Removed Key.BackTab

* Removed Caps/Scroll/Numlock

* Partial removal of keymodifiers - unit tests pass

* Partial removal of keymodifiers - broke netdriver somewhere

* WindowsDriver & added KeyEventArgsTests

* Fixing menu shortcut/hotkeys - broke Menu.cs into separate files

* Fixed MenuBar!

* Finished modernizing Menu/MenuBar

* Removed Key.a-z. Broke lots of stuff

* checkout@v4

* progress on key mapping and formatting

* VK tests are still failing

* Fixed some unit tests

* Added Hotkey and Keybinding unit tests

* fixed unit test

* All unit tests pass again...

* Fixed broken unit tests

* KeyEventArgs.KeyValue -> AsRune

* Fixed bugs. Still some broken

* Added KeyEventArgs.IsAlpha. Added KeyEventArgs.cast ops. Fixed bugs. Unit tests pass

* Fixed WindowsDriver

* Oops.

* Refactoring based on bdisp's help. Not complete!

* removed calling into subviews from OnKeyBindings

* removed calling into subviews from OnKeyBindings

* Improved View KeyEvent unit tests

* More hotkey unit tests

* BIg change - Got rid of KeyPress w/in Application/Drivers

* Unit tests now pass again

* Refreshed API docs

* Better HotKey logic. More progress. Getting close.

* Fixed handling of shifted chars like ö

* Minor code cleanup

* Minor code cleanup2

* Why is build Action failing?

* Why is build Action failing??

* upgraded to .net8 to try to fix weird CI/CD build errors

* upgraded to .net8 to try to fix weird CI/CD build errors2

* Disabling TextViewTests to diagnose build errors

* reenable TextViewTests to diagnose build errors

* Arrrrrrg

* Merged v2_develop

* Fixed uppercase accented keys in WindowsDriver

* Fixed key binding api docs

* Experimental impl of CommandScope.SubViews for MenuBar

* Removed dead code from application.cs

* Removed dead code from application.cs

* Removed dead code from ConsoleDriver.cs

* Cleaned up some key binding stuff

* Disabled Alt to activate menu for now

* Updated label commands

* Fixed menu bugs. Upgraded menu unit tests

* Fixed unit tests

* Working on NetDriver

* fixed netdriver

* Fixed issues called out by @bdisp CR

* fixed CursesDriver

* added todo to netdriver

* Cherry picked treeview test fix 1b415e5

* Fix NetDriver.

* CommandScope->KeyBindingScope

* Address some tznind feedback

* Refactored KeyBindings big time!

* Added key consts to KeyEventArgs and renamed Key to ConsoleDriverKey

* Fixed some API docs

* Moved ConsoleDriverKey to ConsoleDriver.cs

* Renamed Key->ConsoleDriverKey

* Renamed Key->ConsoleDriverKey

* Renamed Key->ConsoleDriverKey

* renamed file I forgot to rename before

* Updated name and API docs of KeyEventArgs.isAlpha

* Fixed issues with OnKeyUp not doing the right thing.

* Fixed MainLoop.Running never being used

* Fixed MainLoop.Running never being used - unit tests

* Claned up BUGBUG comments

* Disabled a unit test to see why ci/cd tests are failing

* Removed defunct commented code

* Removed more defunct commented code

* Re-eanbled unit test; jsut removing one test case...

* Disabled more...

* Renambed Global->Applicaton and updated scope API docs

* Disabled more unit tests...

* Removed dead code

* Disabled more unit tests...2

* Disabled more unit tests...3

* Renambed Global->Applicaton and updated scope API docs 2

* Added more KeyBinding scope tests

* Added more KeyBinding scope tests2

* ConsoleDriverKey too long. Key too ambiguous. Settled on KeyCode. (Partialy because eventually I want to intro a class named Key).

* KeyEventArgs improvements. cast to Rune must be explicit as it's lossy

* Fixed warnings

* Renamed KeyEventArgs to Key... progress on fixing broken stuff that resulted

* Fix ConsoleKeyMapping bugs.

* Fix NetDriver issue from converting a lower case to a upper case.

* Started migration to Key from KeyCode - e.g. made HotKeys all consistent.

* Fixed build warnings

* Added key defns to Key

* KeyBindings now uses Key vs. KeyCode

* Verified by tweaking UICatalog

* Fixed treeview test ... again

* Renamed ProcessKeyDown/Up to NewKeyDown/Up and OnKeyPressed to OnProcessKeyDown to make things more clear

* Added test AllViews_KeyDown_All_EventsFire unit tests and fixed a few Views that were wrong

* fixed stupid KeyUp event bug

* If key not handled, return false for datefield

* dotnet test --no-restore --verbosity diag

* dotnet test --blame

* run tests on windows

* Fix TestVKPacket unit test and move it to ConsoleKeyMappingTests.cs file.

* Remove unnecessary commented code.

* Tweaked unit tests and removed Key.BareKey

* Fixed little details and updated api docs

* updated api docs

* AddKeyBindingsForHotKey: KeyCode->Key

* Cleaned up more old KeyCode usages. Added TODOs

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2023-12-16 12:04:23 -07:00
BDisp
8f1b5aceb6 Fixes #3034. Text remains "invisible" in the TextView when WordWrap is activated. (#3036) 2023-12-07 07:30:23 -07:00
Tig
42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to View.Bounds (#2920)
* initial commit

* Clarified RootMouseEvent

* Added application mouse coord tests

* ViewToScreen -> BoundsToScreen

* Simplified View.Move

* Simplified View.Move

* Updated API docs; made some functions private

* more ViewLayout cleanup

* more ViewLayout cleanup

* Added View.ScreenToBounds and low-level coord unit tests

* Partial fix

* Refactored Application.OnMouseEvent... Tests still fail and views are broken

* Added Bounds/FrameToScreen

* Remamed ScreenToView->ScreenToFrame

* All unit tests pass

* Fixed ListView

* Fixed TableView

* Fixed ColorPicker

* Fixed RadioGroup

* Fixed ListView unit tests

* Fixed line drawing scenario

* Updated comment

* fixed api doc typo

* fixed formatting

* added some thickness Contains unit tests

* MouseEvent api doc updates

* More thickness tests

* More thickness tests
2023-11-26 16:58:52 -07:00
BDisp
3f4d96bec7 Fixes #3011. TextFormatter doesn't handle combining and tab runes. (#3012)
* Add horizontal and vertical support for combining glyphs.

* Fix text and auto size behavior.

* Add TabWidth property.

* Add unit test for WordWrap.

* Add MultiLine property and improve more code.

* Fix word wrap on MessageBox.

* Fix label unit test.

* Rename to GetTextFormatterSizeNeededForTextAndHotKey

* Proves that TextFormatter.Size not must to have the same View.Bounds.Size.

* Fix fails unit tests.

* Updates AutoSize document.

* Updates MultiLine document.

* Removes Application dependency from the TextFormatter class.

* Fix Draw XML comment.
2023-11-26 15:41:54 -07:00
Thomas Nind
8ed1b16ee1 Line canvas exclude method (#3004) 2023-11-26 06:57:23 -07:00
Tig
0d1bbdd0f9 Updates to xunit 2.6.2 which fixes issue in 2.6.1 (#3003) 2023-11-20 09:25:24 -07:00
BDisp
d2967c1ede Fixes #2883. ProgressBar: 'Frame.DrawFrame(Rect, bool)' is obsolete: 'This method is obsolete in v2. Use use LineCanvas or Frame (#2979)
* Fixes #2883. ProgressBar: 'Frame.DrawFrame(Rect, bool)' is obsolete: 'This method is obsolete in v2. Use use LineCanvas or Frame

* Refactored ProgressBar to use Frames correctly

* Hacked other FramesEditor scenarios to work... needs to be done more cleanly

* Prevents for null state.

* re-added my changs

* Fixed unit tests

* Fixed unit tests2

* Commit to run CI test again.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
2023-11-20 09:08:00 -07:00
Tig
cf947026ce v2 - Updates nuget dependencies (#2998)
* Updated dependencies

* Reverted to xunit 2.5.3 until 2.6.2 is out
2023-11-19 15:40:19 -07:00
BDisp
3810b7d3d5 Fixes #2944. TestTreeViewColor unit test sometimes fails (#3000) 2023-11-19 15:38:38 -07:00
BDisp
66ca7f887e Fixes #2970. ScrollView doesn't remove a view that was previously added on both versions. (#2973) 2023-11-15 08:36:36 -07:00
BDisp
e16205af85 Fixes #2954. Modal view is always refreshing only by moving the mouse. (#2958)
* Fixes #2954. Modal view is always refreshing only by moving the mouse.

* Fixes invisible topLevel to be cleaned up which should be a drawing task.

* Forcing Shutdown.
2023-11-06 17:49:06 -07:00
BDisp
7b46b1dea4 Add unit test for the #2892 fix. (#2956) 2023-11-06 14:39:20 -07:00
Tig
d40db95a8e Brings View disposal tests from develop (#2948)
* Pulled Viewdisposaltests from develop

* fixed namespace

* fixed namespace

* code cleanup
2023-10-30 15:58:00 -06:00