Commit Graph

85 Commits

Author SHA1 Message Date
Tig
550a263155 Tweaked r# settings and applied to View and ViewLayout.cs 2024-03-08 08:11:43 -07:00
Brandon Thetford
0b2df753f3 Make these parts match Terminal.Gui 2024-02-29 13:48:04 -07:00
Brandon Thetford
8196cb1735 Define that once 2024-02-29 13:46:52 -07:00
Brandon Thetford
1818c2441e Generic attributes were added in .net7 and c# 11. 2024-02-29 13:46:47 -07:00
Brandon Thetford
25bcb66281 Move that part to the top, like Terminal.Gui 2024-02-29 13:46:42 -07:00
Brandon Thetford
41feacc143 Reverse the order of these
Alphabetizing
2024-02-29 13:46:35 -07:00
Brandon Thetford
0c490602db Remove unneeded elements 2024-02-29 13:46:18 -07:00
Brandon Thetford
942e586f3c Switch to namespace import, now that the types are no longer ambiguous 2024-02-25 16:47:28 -07:00
Brandon Thetford
fde275c016 Add type aliases for RectangleF, Point, and PointF 2024-02-25 16:38:59 -07:00
Brandon Thetford
20a49c917b Remove Rectangle type and alias System.Drawing.Rectangle to Rectangle
Also remove a duplicate global using
2024-02-22 19:56:09 -07:00
Brandon Thetford
48becffb35 Update this since 6.0.0 is no longer available and prevents build 2024-02-22 15:56:55 -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
dodexahedron
92a601254e Fixes #3170. Color improvements (#3204)
* Reduces indentation by remove the namespace braces.

* Reduces indentation and removes unused using.

* Ensures clear selection if it isn't selecting.

* Turn on nullability context for TryParse and update usages as needed.

* Use IsNullOrWhiteSpace, which includes IsNullOrEmpty

All-whitespace values are also illegal, so may as well handle that here too

* Respect the nullable here

* It's a struct

* Use byte.MaxValue and add remark

* Just use the bytes directly

* Must respect endianness

* Add uint constructor so consumers don't have to do unchecked math

* Completely re-work parsing and implement ISpanParsable<Color>

All parsing is now almost-0 allocation, and is significantly faster than before

* Extension methods required by new code

* Use standard Math.Clamp method here

* Add some new unit tests for TryParse

* De-duplicate code and handle more cases

* Enable nullability context for the file

* Go ahead and enable the language features and analysis

* Implicit usings remove a lot of boilerplate usings.

* Add these to the dictionary to shut spell check up

* Make this thing a record struct and a union, and update constructors

This commit won't build. I'm just breaking out changes a little bit.

* Some additional XmlDoc standardizing

* Make FindClosestColor and CalculateColorDistance use the vector for SIMD

* Add a TryFormat method for support of I*Formattable

* Add an interface for support of custom formatting of Colors

* Pass by in reference

* Parse string delegates to Parse span

* Parse now does all the work

* Remove the old new code from TryParse

* Some new cast operators

* Add IFormattable.ToString implementation

* Add the rest of the code for Color in its current (unfinished) state

* Move that interface to its own file

* Add ColorParseException class

* Move Attribute to its own file, too.

* Re-implement these operators as explicit methods

* Get rid of fuzzy equality operators and update tests to use the named methods that replace them

* Add an explicit test case for ToString with null format string and explicitly specified Invariant culture

* Fix byte orders for hex format to be standard ARGB

* Prove that ToString and Parse can round-trip values

* Unroll this test into parameterized cases

* Fix a couple of comments to match byte order

* Update R# dictionary to match correct byte orders

* Remove stray comment

* Separate all types in this to their own files

* Convert this one to use the handy extension

* Add test for Argb property

* Add a file nesting rule to make some incoming file changes display nicely

* Move constructor tests to their own file and add some new tests

* Add implicit cast from uint

* More constructor tests

* Since this is now a record, the equality operators are compiler generated

Still spot-checking a few arbitrary values for completeness

* Override ToString to delegate to Attribute

* Simplify and clean up ToString. Delegate to ColorScheme

* Update the test to match new output

* These should be fields, really. It's a value type.

* Add some type checks for change control

* Allow unsafe and turn on implicit usings

* Make this one better

* Rename tests and remove redundant checks (the type checks already guarantee field consistency)

* Reorganize a bit

* Make these test 16 random values

* Existing operator tests converted

* That one is now redundant with both of the other tests that check all the named colors

* Move this to type checks and simplify a little bit

* These lambdas can be static

* Move operators to another file.

* Add global using for System.Text because it's EVERYWHERE

* Reorganization of Color and some related types.

Updated usages to reflect changes

* Update tests to reflect changes in Terminal.Gui

* Add missing keyword

* Add entry to dictionary

* Add dotsettings for Terminal.Gui

Only specifies language level

* Commit unsaved changes for usings here

* Implement last remaining TryFormat method

* A little cleanup/formality

* Sorting rules

Sort methods by name and interface they implement

* Sort code

* Match namespace for tests

None!

* Unroll ordinal check and reorganize.

* Sort before writing new tests

* These got reversed...

* Add test to prove explicit cast to Vector3 works properly

* Sort these too

* Add test for uint->Color implicit operator

* Add test for Color->uint implicit operator

* Correct this test name and re-order

* Add test for implicit conversion from Vector3 to Color

* Add test for implicit conversion from Vector4 to Color

* These also got reversed, like with Vector3

* Add test for implicit conversion from Color to Vector4

* Add test for GetHashCode

* Make sure these are all under the same namespace

* Remove a now-redundant test

* Reorganize formatting and parsing tests to another type part

* Tests moved back to Terminal.Gui.DrawingTests namespace as before.

* Add tests for the constructor taking 3 or 4 integers and sort

* Cleanup

 - Renamed some tests
 - Make a test even clearer
 - Removed redundant code
 - Got rid of unused parameter in Constructor_WithColorName_AllChannelsCorrect

* That needs to be from the reverse map

Not broken - just was sub-optimal due to my error.

* Enable nullability context in this file

Not sure how it got removed but whatev

* Respect nullability context in this file now that it's on 🤦‍♂️

* Add tests for expected exceptions with whitespace or null values

* Add test for parameterless constructor

* A couple more places for reference passing and some SkipLocalsInit attributes.

* Some XmlDoc corrections to reflect the final implementation

* Remove namespace qualifier

* Can't use these because of lambdas :(

* Removed a collection that never ended up being needed.

* Add bracing, newline, and modifier style rules

* Add spacing rules inside parens/brackets

* This was still under the Terminal.Gui.Drawing namespace. Revert that.

* Applied updated formatting settings and addressed XmlDoc reviews in #3204

* More places where spaces got added in dependent code.

Also a couple of null checks fixed to not use the equality operator

* More dependent code format fixes

* Finished re-formatting modified code that got spaces added everywhere

* Visual studio didn't actually write this file to disk til I closed out of VS...

Grr

* Delete the ReSharper settings files from this branch.

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2024-01-24 09:58:02 -07:00
Tig
a7ea48eb62 Fixes #3183 - OnMouseEvent calling OnMouseClick too often (#3184)
* Removed resharper settings from editorconfig

* Fixed bug; updated bad unit tests

* Fixed API doc issue

* Updated nuget
2024-01-16 06:39:45 -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
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
Tig
0d1bbdd0f9 Updates to xunit 2.6.2 which fixes issue in 2.6.1 (#3003) 2023-11-20 09:25:24 -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
8ea6b105fc Fixes #2923. Ensures only clear Instances if they really was disposed. (#2924)
* Fixes #2923. Ensures only clear Instances if they really was disposed and fix unit tests.

* Add Ubuntu-20.04.

* xunit nuget package update.
2023-10-20 11:13:55 -06:00
Tig Kindel
af7466efa2 updated xunit 2023-10-13 23:58:49 -06:00
Tigger Kindel
b8c4c792f7 Updated packages 2023-10-13 23:58:49 -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
Tig
816eb2a183 Updates project references for v2 (#2697)
* Updates project refs
2023-06-07 08:26:01 -06:00
Tig
dea5f0fe03 Fixes #2597. Enables standard glyphs to be set via ConfigurationManager (#2595)
* initial

* basically working

* removed test settings

* removed extra usings

* Improved API docs

* Renamed glyphs to be consistent and use unicode names; use char literals

* Refactored Glyphs class & Json format to not be static (startup perf)

* Refactored Glyphs class & Json format to not be static (startup perf)

* Fixed a bunch of API doc errors

* Switched checked/selected to glyhps from box drawing range

* Switched button glyphs to nicer looking ones that seem to work on standard fonts

* Upgraded LineDrawing scenario

* CrossHair->Cross

* Fixed unit tests

* Fixed unit tests; moved Glyphs from Application to ConfigurationManager; added CM global using alias

* Found and replaced all other special glyphs; fixed more unit tests
2023-05-07 07:34:02 +02:00
Thomas Nind
c1a578891b Fixes #2150. Revamping FileDialog (#2259)
* Investigating new file dialog

* Column sorting

* Add navigationStack

* Append autocomplete half working

* Change autocomplete append to use draw effect instead of selection effect

* WIP on FileDialog2

* Refactor sort order and add more 'ls' colors

* Refactor history to its own class

* FileDialog2 navigation fixes/improvements

* Added centered Title

* Add tree view and split container

* Add FileDialogState

* Add AllowsMultipleSelection

* Add result fields and Scenario

* Added FileDialo2 test file

* Fix FileDialog2 Redraw padding to respect max/min view bounds

* Fix unit tests and warnings

* Started on better keyboard navigation in FileDialog2

* Update to match new SplitContainer API

* Quality of Life improvements

* Fix recommending parent folder

* Remove border from SplitContainer in FileDialog2 and fixed tests

* Bugfixes and improvements to FileDialog2

* usability improvements to FileDialog2

* Add multi select and OpenMode

* Enforce OpenMode when making a multi selection

* Prevent typing illegal characters

* Added AllowedTypes to FileDialog2

* Added combo box filter AllowedType

* Improve code readability by reordering members

* Do not update FileDialog2 text box when selecting ".." in TableView

* Fix history navigation in FileDialog2

* Restore selection after navigating backwards in history

* Add FileDialog2 tests

* Make FileDialog2 Title user configurable

* Fix DirectTyping_Allowed unit test when running on linux

* Change Home/End to go to first/last cell in table in FileDialog2

* Remove overloaded Title property

* Switch to `ustring.IsNullOrEmpty`

* Update to latest TileView API

* Add TableView navigation by letter using CollectionNavigator

* Fix recreating search navigator too often

* Add tests for proper disposing

* Make Ctrl+F10 toggle split line focusability

* Fix layout bug in first tile when orientation is horizontal

* Switch to GenerateImage

* Fix not calling base constructor

* Revert "Merges latest LineCanvas into TileView"

* Fix keyboard tab navigation problems

* Workaround for changing CanFocus throwing Exceptions sometimes

* Update to latest splitcontainer API

* Adjust suggestions to be gray and properly update on keystrokes

* Move ok and cancel to bottom

* Add MustExist and fix multi selection of 1 result

* bugfixes and quality of life

* Navigating to .. clears path up to current dir

* Better arrow key navigation

* Make title pretty and informative

* Fix test

* Fix test

* Trim default Titles to be more compact and readable

* Fix bad merge changes

* Remove EscSeqReq files that are not in v2... came from develop?!

* Fix nullable and enable toggle select on table view

* Fix multi select return value

* Add icon and monochrome support

* Add search elements

* Add search for current directory

* WIP: Async search

* Thread safety and disposal

* Improve UX

* Fix for rapid search results

* Fix warnings and whitespace

* Don't add more than 10000 search results

* Add support for adjusting search matching

* Added ISearchMatcher example to FileDialog2Example

* Remove double spaces after periods

* Make MaxSearchResults a config setting

* Localization for FileDialog2

* Fix build error

* Support for custom open button Text

* Improve file dialog scenario UX

* Change feedback to a drawing effect in center of screen

* Explore MenuBar instead of ComboBox for AllowedTypes

* Fix prompt and move file open into try/catch for errors reading files

* Open menu when tabbed to

* FileDialog2 improvements
- Expose table/tree style properties
- Rename Monochrome to UseColors and default to false
- IconGetter no longer forces space
- On Windows in Scenario just use a backslash for folder icon (i.e. not unicode)
-

* Add style settings in scenario and make autocomplete case insensitive on Windows

* Move ok button text to Style

* xmldoc

* Remove old FileDialog and re-wire OpenDialog and SaveDialog to use FileDialog2 base

* localization

* Move open/save dialog to their own files

* Rename FileDialog2 to FileDialog

* Fix repetition in string

* Add IAllowedType

* Get rid of AllowedTypesIsStrict

User now adds the `IAllowedType` implementation `AllowedTypeAny`

* Add max length to AllowedType ToString

* Pressing Enter in find restarts search instead of confirm selection

* Add TreeRootGetter for customizing the quick access items in FileDialog

* Add FilesSelected event
Allows user to do things like confirm dialogs on selecting existing file(s)

* Update to new sender, event args signature

* Fix naming on MouseEventArgs

* Fix mouse events naming

* Revert "Fix naming on MouseEventArgs"

This reverts commit 2f557f52d9.

* Add deletion support

* Move delete keybinding to tableview

* Scaffold for rename and new operations

* Prevent delete dialog popping up again on cancel

* Add rename and new folder implementations

* Add rename,delete,new to context menu

* On rename or new, reselect the file in its new location in tree

* Support searching on multiple terms

* Localization support for new/rename/delete

* Refactor internal classes and add class diagram

* Move some visual properties to FileDialogStyle

* Ensure MultiSelected is never null and always contains Path if relevant

* Fix spacing/indentation

* WIP: Add new namespace Terminal.Gui.FileServices

* Improve appearance of back/forward/up

* Move SpinnerLabel to Views

* Add SpinnerView

* Code formatting

* Add AutoSpin test

* Avoid ever removing spinner timeout twice

* Make SpinnerView show/hide instead of stopping

* WIP: Refactor to use 3 sub PRs
- SpinnerView
- Suggest Append Autocomplete
- Caption TextField

* Add FilepathSuggestionGenerator

* WIP: FileDialog autocomplete append mostly working again

* Improve file autocomplete

* Move IconGetter to Style and provide default implementation

- Depends on `UseUnicodeCharacters`
- Also updated up/back/collapse/expand tree to use spicier icons

* Fix failing unit test

* Improved colors and layout

* Adjust use of unicode

* Fix UseUnicodeCharacters

* Update table style to include scroll indicators and lines

* Fix cycle suggestion with down cursor

* Adjust sort indicators

* Add default sort order on isDir then name

* Always use left/right unicode arrows

* Fix autocomplete suggesting in empty textbox

* Press escape to cancel ongoing search (when search box is focused)

* When entering a TreeView if there is no selection then select first object

* Move CursorIsAtEnd to TextField

* Improve layout

* Change UseColors to be a cell color fill

* Fxied tests for new apis

* Remove manual title drawing code

* Fix MoveEnd name conflicting with base class

* Fix merge conflicts

* Switched to IFileSystem for unit testing

* Add unit test

* Revert "Fix MoveEnd name conflicting with base class"

This reverts commit a5f9c07022.

* Fix MoveEnd name collision with 'new' keyword

* Fixed tree not toggling

* DateTime fixes and mocking

* Fix TestDirectoryContents_Windows

* Expose UseColors and UseUnicodeCharacters as config settings

* Fix linter settings having removed curly brackets

* Fix namespace on test

* Move tests to file services folder

* Remove the FileServices namespace

* Updated class diagram

* Clear title from tests for futureproofing

* Localization support for FileDialog title

* Remove trailing whitespace in "open existing"

* Fix listing suggestions immediately after folder path entered

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-04-09 03:28:56 -06:00
BDisp
ffc06ea59f Remove duplicates packages and updating. 2023-03-04 02:19:40 +00: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
Tig Kindel
c566a66bc0 merge develop to v2 2023-02-03 23:28:58 +09:00
Charlie Kindel
ab7d667217 merge 2022-12-31 06:23:49 -07:00
Charlie Kindel
eb8cb4408d misc changed done before I went on holiday 2022-12-31 06:20:17 -07:00
Tig Kindel
c65c57590d merge with develop 2022-12-20 18:02:31 -03:00
dependabot[bot]
e12167e45b Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.4.0 to 17.4.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.4.0...v17.4.1)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-16 14:07:56 +00:00
Charlie Kindel
a0b36d3457 merged develop 2022-12-04 08:09:27 -07:00
dependabot[bot]
1d1d4289d3 Bump ReportGenerator from 5.1.11 to 5.1.12
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.11 to 5.1.12.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.11...v5.1.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:16:28 +00:00
Charlie Kindel
d5e55a2f7f Merge branch 'develop' into fixes_2205_fakeclipboard 2022-11-11 11:38:27 -07:00
Charlie Kindel
1efb051379 Refactored AutoInitShutdown attribute - scary stuff 2022-11-11 10:06:21 -07:00
dependabot[bot]
6c2b74b1d7 Bump ReportGenerator from 5.1.10 to 5.1.11
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.10 to 5.1.11.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.10...v5.1.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 14:06:34 +00:00
dependabot[bot]
f2f2c2bc7e Bump Microsoft.NET.Test.Sdk from 17.3.2 to 17.4.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.2 to 17.4.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.2...v17.4.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 14:08:16 +00:00
dependabot[bot]
1a1df3f5cc Bump coverlet.collector from 3.1.2 to 3.2.0
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits/v3.2.0)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 15:06:13 +00:00
Charlie Kindel
0ddf097820 setting up v2.0 branch 2022-10-16 07:29:31 -06:00
dependabot[bot]
41072af7a2 Bump Microsoft.NET.Test.Sdk from 17.3.1 to 17.3.2
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.1 to 17.3.2.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.1...v17.3.2)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 15:03:58 +00:00
dependabot[bot]
c983c2e65a Bump ReportGenerator from 5.1.9 to 5.1.10 (#1996)
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.9 to 5.1.10.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.9...v5.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-14 18:11:23 -07:00
dependabot[bot]
c6af956e22 Bump Microsoft.NET.Test.Sdk from 17.3.0 to 17.3.1 (#1977)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.0 to 17.3.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.0...v17.3.1)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 06:53:07 -07:00
dependabot[bot]
82c694b515 Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#1947)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-12 08:22:57 -07:00
dependabot[bot]
e0e644c263 Bump xunit from 2.4.1 to 2.4.2 (#1933)
Bumps [xunit](https://github.com/xunit/xunit) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/xunit/xunit/releases)
- [Commits](https://github.com/xunit/xunit/compare/2.4.1...2.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-03 17:11:10 -07:00
Charlie Kindel
07ce68cd0f Updated version numbers 2022-05-29 10:18:16 +12:00
Tig Kindel
2971fc9134 Fixes #769. Include PDB symbols on Nuget (#1747)
* trying to get nuget symbols to work

* fixed nuget sybmols?
2022-05-26 19:33:31 -07:00
Tig Kindel
a95e06c15d Fixes #1741. Use gitversion instead of minver (#1746) 2022-05-26 16:36:50 -07:00
dependabot[bot]
bd8964dfeb Bump ReportGenerator from 5.1.7 to 5.1.9
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.7 to 5.1.9.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.7...v5.1.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 14:10:06 +00:00
dependabot[bot]
fc47aaee27 Bump ReportGenerator from 5.1.6 to 5.1.7
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.6 to 5.1.7.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.6...v5.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 14:10:15 +00:00