Commit Graph

40 Commits

Author SHA1 Message Date
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
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
713b2c4725 Fixes #92. Remove dependency on ustring. (#2620)
* Remove NStack and replace ustring to string.

* Add unit test and improving some code.

* Adjust code and fix all unit tests errors.

* Add XML Document and move the Rune folder into the Text folder.

* Improve unit tests with byte array on DecodeRune and DecodeLastRune.

* Fix unit test.

* 😂Code review

* Reduce unit tests code.

* Change StringExtensions.Make to StringExtensions.ToString and added some more unit tests.

* Fix merge errors.

* Remove GetTextWidth and calls replaced with StringExtensions.GetColumns.

* Hack to use UseSystemConsole passed in the command line arguments.

* Revert "Hack to use UseSystemConsole passed in the command line arguments."

This reverts commit b74d11c786.

* Remove Application.UseSystemConsole from the config file.

* Fix errors related by removing UseSystemConsole from the config file.

* Fixes #2633. DecodeEscSeq throw an exception if cki is null.

* Fix an exception if SelectedItem is -1.

* Set SelectedItem to 0 and remove unnecessary ToString.

* Using a unique ToString method for Rune and other for byte.

* Fix a bug where a wider rune is added with only a width of 1.

* Force the SelectedGlyph is the one that was typed after jumpList is executed.

* Added more InlineData to RuneTests.

* Reducing significantly the code by using Theory attribute in the TextFormatterTests.

* Override PositionCursor to handle the CharMap cursor position.

* Fix merge errors.

* Minor tweaks to API docs

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2023-05-20 19:35:32 +02:00
Tig
b4552ee14b Fixes #2493. Move all layout code out of View (and Toplevel) into a layout helper class (#2544)
* Comment/warning clean up

* Moved Text and Drawing out

* Moved Layout out

* Removed extra lines

* Removed Mouse out

* Reorgainzed View

* API docs

* removed border.cs

* TopLevel.Resized -> TerminalResized

* Mdi -> Overlapped

* Removed confusing and un-needed WillPresent

* privates -> _

* Tweaked RunLoop API
2023-04-14 10:26:10 -06:00
BDisp
30a87c849a Added the StringExtensions.cs file with a public class. 2023-04-09 08:13:22 -06:00
Tig
574ed8fec7 Fixes #2469 - Revamp file structure and namespace (#2471)
* initial commit

* All tests pass

* Updated readme

* Revert "All tests pass"

This reverts commit 94ac462350.

* Revert "initial commit"

This reverts commit 36d92cc4e5.

* Moved Terminal.Gui files around

* Nuked .Graphs namespace

* Nuked .Graphs namespace

* Nuked .Trees namespace

* Nuked .Configuration namespace

* Nuked .Configuration namespace

* All tests pass

* tweaked tests

* removed unneeded usings

* re-enabled scrollview tests

* move scrollview test to ScrollViewTests

* Moved view navigation related tests to separate cs file

* Moved view scrollbarview related tests ScrollBarTestse

* Refactored View tests into smaller files

* Refactored driver tests

* Fixed a ton of BUGBUGs
2023-04-06 10:09:21 -06:00
Tigger Kindel
791976428e merged !!! woot. 2023-03-20 17:22:11 -06:00
Tig Kindel
7f1471283f mergeed 2023-03-18 16:09:08 -07:00
Tig Kindel
27ca37eed0 merged v2_develop 2023-03-17 13:14:50 -06:00
BDisp
846494ea7c Resolving merge conflicts. 2023-03-17 11:24:53 +00:00
Tig
c94f9165f4 Makes UI Catalog Scenarios use Theme and top-level color scheme (#2401)
* lots of clean up

* scenarios now get themes from uicatalog
2023-03-16 07:50:09 -06:00
tznind
3bec36ac47 Change Action to EventHandler for more events 2023-03-12 02:10:22 +00:00
tznind
43f67a6387 Convert more Actions to EventHandlers in View 2023-03-11 19:55:08 +00:00
Tig Kindel
d7b1192ca5 Merge branch 'v2' into v2_view2_experiment 2023-02-24 17:32:06 -07:00
Tig Kindel
d04bf94c74 merged from develop after accident 2023-02-25 05:42:43 +13:00
Tig Kindel
a8b75b6219 Refactored SetRelativeLayout etc; looks good but tests fail 2023-02-24 20:15:02 +13:00
Tig Kindel
4bbd359745 Removed a ton of code 2023-02-21 22:57:11 +13:00
Tig Kindel
d006d021dd view2 WIP mostly working 2023-02-20 21:58:45 +13:00
Charlie Kindel
bf1ed31281 Refactored UI Catalog and added tons of unit tests 2022-11-03 15:58:15 -06:00
BDisp
a82ac45843 Fixes AutoSize, Window Tile and added option to Border for fill or not. 2022-04-30 01:12:21 +01:00
Charlie Kindel
32ae3cb62f Cleaned up Categories and Scenario descripitons. 2022-04-17 15:48:48 -07:00
BDisp
239191cde0 Fixes #1434. Regenerating the docs. (#1528)
* Fixes #1434. Regenerating the docs.

* Fixing warnings on docs regeneration and improving.
2021-12-18 05:33:40 -08:00
BDisp
01d4b4f55f Added wide improvements on keys managements. 2020-10-26 00:46:51 +00:00
Artyom
6aef632633 Button.Clicked as a C# event 2020-09-23 01:01:53 +03:00
BDisp
89a4bdeb03 Changed from Terminal.Gui all EventHandler to Action. 2020-06-06 19:02:37 +01:00
Charlie Kindel
17163a76a9 initial implementation 2020-06-04 17:09:32 -06:00
Charlie Kindel
90b19a5e04 POC 2020-06-04 12:43:19 -06:00
Charlie Kindel
fddfcf8802 Charlie's Mondo Patch (#600)
This PR includes:

#586 - Fixed Clipping
#587 - LayoutComplete
#591 - Sys Console Scenario
#590 - Significantly improves MessageBox, Dialog, Frame drawning and more
See the PRs above for all the details.

Here are the issues this closes:

Closes #299 - MessageBox now auto sizes
Closes #557 - MessageBoxes on small screens
Closes #432 - MessageBox does not deal with long text; width/height params are goofy
Closes #521 - MessageBox should take ustrings (BREAKING CHANGE)
Closes #35 - Dialog should have 1 char padding around edges
Closes #570 - Dialog should use computed layout for buttons
Closes #470 - UI Catalog: Add Dialogs Scenario
Closes #569 - LayoutComplete event
Plus probably more.
2020-06-03 11:33:06 -04:00
Charlie Kindel
7c911ca830 Fix #522 - Last view of FrameView not drawn (#575)
* PoC

* PoC progress

* progress

* Fixed #522 - updated sample

* reverted untested PR

* reverted untested PR

* backed out more PRs that weren't ready
2020-05-28 16:29:35 -06:00
Charlie Kindel
9b53ff1eb4 Merge branch 'master' into drawwindowframe 2020-05-26 22:34:43 -06:00
Charlie Kindel
fe624dcbd5 new 'DrawFrame' impl 2020-05-26 22:33:27 -06:00
Charlie Kindel
1e813a213a rule 2020-05-26 08:09:43 -06:00
Charlie Kindel
119f922e4b demos text-based controls to show TAB behavior 2020-05-23 21:48:20 -06:00
Charlie Kindel
78cd1bbd1e updated docs further, added UICatalog API, clean up 2020-05-23 19:39:15 -06:00
Charlie Kindel
9b0fd2625f updated scenarios 2020-05-22 17:23:05 -06:00
Charlie Kindel
649680aab4 working: 2020-05-22 15:59:57 -06:00
Charlie Kindel
23f2f84671 showing Pos.Bottom issue 2020-05-21 19:04:47 -06:00
Charlie Kindel
f9d9044749 new resize api 2020-05-21 10:00:37 -06:00
Charlie Kindel
40d14e50ea fixed merge issue 2020-05-21 09:58:04 -06:00
Charlie Kindel
6cfcea28a1 renamed scenario and flushed out 2020-05-21 09:41:54 -06:00