Commit Graph

30 Commits

Author SHA1 Message Date
Charlie Kindel
1efb051379 Refactored AutoInitShutdown attribute - scary stuff 2022-11-11 10:06:21 -07:00
Tig
368b759eaa Merge branch 'develop' into treeview-desiredCursorVisibility-set-fix 2022-10-31 08:47:33 -07:00
Tig Kindel
c1d976c781 refactored AssertDriverContents out of GraphView tests 2022-10-29 19:53:08 -06:00
BDisp
04a8395be5 Fixes #2133. TreeView: desiredCursorVisibility field is set before the if condition check. 2022-10-23 14:02:46 +01:00
Juan Manuel Elosegui
73846b3c32 Fixes #1959: GoToEnd should not fail on an empty TreeView (#1960)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-24 19:41:50 -07:00
Thomas
7deacf3bb9 Renamed to simply GetObjectOnRow and dropped unused X component 2022-05-13 22:37:01 +01:00
Thomas
6800113ff1 Changed name to GetObjectRow 2022-05-13 22:17:42 +01:00
Thomas
7f0671e10a Renamed new methods 2022-05-13 21:42:50 +01:00
Thomas Nind
e60d7f4363 Added IndexOf method to TreeView to allow for keyboard context menus 2022-05-10 16:05:09 +01:00
Thomas Nind
5c39f6af48 Added new method HitTest to TreeView to allow for better context menus 2022-05-10 15:39:15 +01:00
Thomas
8e148013ec Added ColorGetter to TreeView 2022-05-08 22:48:45 +01:00
Charlie Kindel
8d8025329e Added Attributes tests; balanced Application.Init/Shutdown 2021-05-17 18:22:46 -07:00
Thomas Nind
a8628e7c28 Feature/graphs (#1201)
* Empty GraphView with basic axis

* Added ISeries

* Added zoom

* Fixed zoom

* Tests and scrolling

* Refactored AxisView into abstract base

* Added atomic mass example

* Added Y axis labels

* Added Y axis labels

* comments

* Refactored axis to not be floating views

* Split axis drawing code to seperate draw line from draw labels

* Added MarginBottom and MarginLeft

* Added bar graph

* Fixes horizontal axis label generation

* Fixed axis labels changing during scrolling

* Added test for overlapping cells

* Added TestReversing_ScreenToGraphSpace

* Changed graph space from float to decimal

* Added axis labels

* Fixed issues where labels/axis overspilled bounds

* Fixed origin screen coordinates being off by 1 in y axis

* Added Orientation to BarSeries

* Added comments and standardised Name to Text

* Added prototype 'population pyramid'

* Fixed bar graphs not stopping at axis

* Added Reset and Ctrl to speed up scrolling

* Added line graph

* Fixed LineSeries implementation

* Made LineSeries Points readonly and sort on add

* Fixed RectangleD.GetHasCode()

* Improved performance of LineSeries

* Added color to graph

* Fixed colors not working on linux

* Added Visible and ColorGetter

* Added Ctrl+G Next Graph

* Added MultiBarSeries

* Fixed layout issue with population pyramid

* fixed y label overspill and origin rendering

* Fixed warnings

* Made examples prettier

* Fixed xAxis potentially drawing labels outside of control area

* Fixed multi bar example labels

* Added IAnnotation

* Added example of using GraphPosition in IAnnotation

* Fixed Annotations drawing outside of graph bounds

* Fixed Reset() not clearing Annotations and sp fixes

* Changed line drawing to Bresenham's line algorithm and deleted CohenSutherland
Testing for collisions with screen space is very slow and gives quite thick lines.  I looked at Xiaolin Wu which supports anti aliasing but this also would require more work to look good (out of the box it just looks thick).

* Fixed layout/whitespace

* Graph now renders without series if annotations are present

* Fixed ScreenToGraphSpace rect overload

* Added SeriesDrawMode for when it is easier/faster for a series to draw itself all in one go

* Added LegendAnnotation

* Added tests for correct bounds

* Added more tests

* Changed GraphView namespace to Terminal.Gui.Graphs

* Made Line2D and Horizontal/Vertical axis private classes

* Made AxisIncrementToRender.Text internal to avoid confusing user when implementing `LabelGetterDelegate`

* Changed back from decimal to float

* Refactored axis label drawing to avoid rounding errors

* Fixed over spilling bounds when drawing bars/axis increments

* Re-implemented disco colors

* Added Minimum to Axis

* Fixed tests build and render order

* Fixed test by adjusting epsilon

* tidyup, docs and warning fixes

* Standardised parameter order and added axis test

* Fixed x axis line drawing into margins and added tests

* Fixed axis increment rendering in margins, tests and tidyup examples

* Added test for BarSeries

* Added more BarSeriesTests

* Split GraphView.cs into sub files as suggested

* Fixed pointlessly passing around ConsoleDriver and Bounds

* Fixed colored bars not reseting color before drawing labels

* spelling fixes

* Replaced System.Drawing with code copied from dotnet/corefx repo

* Change to trigger CI

* Added tests for MultiBarSeries

* Added test support for Asserting exact graph contents

* Added xml doc where missing from System.Drawing Types

* Standardised unit test namespaces to Terminal.Gui

* Fixed namespace correctly this time after merging main

* Fixed test to avoid using Attribute constructor

* Reduced code duplication in test by moving InitFakeDriver to static in GraphViewTests

* Added TextAnnotationTests and improved GraphViewTests.AssertDriverContentsAre

* Added more TextAnnotation tests and fixed file indentation

* Added tests for Legend and Path
And fixed TruncateOrPad being off by 1 when truncating

* Removed unused paths in TruncateOrPad
2021-04-28 08:38:25 -07:00
Thomas Nind
444a01ae46 Extracted TreeView classes (builders, delegates, event args etc) into seperate files in namespace Terminal.Gui.Trees (#1246) 2021-04-26 08:59:35 -07:00
Charlie Kindel
b29240f362 Code coverage (#1235)
* tweaked version # for v1.0.0-beta.10

* tweaked version # for v1.0.0-beta.11

* Updated readme and revision history for 1.0

* excluding test results

* Added support for viewing code coverage results with Fine Code Coverage

* add generating CC to CI/CD

* refactored unit test namespaces

* more refactoring. commented out failing test.

* Removed UnitTests and UICatalog from code coverage reporting

* made Application and test more deterministic

* disabled Multi_Thread_Toplevels because it is currently broken and don't understand why

* updated threading test per @bdisp

* testing cc badge stuff

* another test

* using coverlet.settings

* trying copy

* trying cp. duh.

* trying mv.

* wrong path

* print

* chaging badge output for testing

* yaml error

* fixed code coverage

* moved dimtests to core
2021-04-25 10:18:31 -07:00
Thomas Nind
522745f559 Fix #1120 (#1124)
* Added ObjectActivationButton (mouse)

* Fixed layout to match coding guidelines
2021-03-08 19:42:25 -07:00
tznind
db322b27ef Added GoTo method and renamed 'model' parameter where appropriate 2021-03-08 10:11:11 +00:00
tznind
dc22a890e9 Updated to match coding guidelines (whitespace, brackets etc) 2021-03-08 09:22:17 +00:00
tznind
ec85340285 Added ObjectActivated event 2021-03-02 19:14:38 +00:00
tznind
01b899fb37 test for multi select, mouse fix and collapse selection fix 2021-02-16 20:06:29 +00:00
tznind
1a00376885 Added more tests and fixed GetContentWidth when Bounds have 0 Height 2021-01-24 11:12:44 +00:00
tznind
2884b8e94d Added horizontal scrollbar, fixed tests 2021-01-24 10:35:03 +00:00
tznind
dc184ba469 Changed from object to generic <T> for TreeView 2020-12-16 12:04:46 +00:00
tznind
8fe8128b0b Replaced delegates with new interface ITreeBuilder 2020-12-15 09:37:59 +00:00
tznind
5dad1d2221 Added test for TreeNode usage 2020-12-14 07:30:13 +00:00
tznind
7af2763f43 Added method RebuildTree
Similar to RefreshObject but for all visible branches.  Call this method when making large scale changes behind the scenes to objects including hierarchy changes.
2020-12-09 13:24:30 +00:00
tznind
8ce042eb52 Fixed RefreshObject when Equality method is overridden in model objects
Now when you call RefreshObject the Branch.Model is always updated to the latest reference even when Equals indicates we already have it in children
2020-12-08 14:13:27 +00:00
tznind
2bd3f76553 Added GetChildren and GetParent 2020-12-08 14:11:55 +00:00
tznind
b75b79b068 Added RefreshObject and IsExpanded
RefreshObject notifies tree of changes to a model (e.g. it's children) and clears cached knowledge but persists the branch expansion state
2020-12-02 15:10:54 +00:00
tznind
148b4d2784 Made ScrollOffset setter public and added helper method and tests 2020-12-02 13:28:46 +00:00