Commit Graph

439 Commits

Author SHA1 Message Date
Thomas Nind
d60aed79e4 Autocomplete for TextView (#1406)
* Added basic autocomplete style dropdown (not working properly yet)

* Autocomplete basically working but rough around the edges

* Changed to Lists and added CloseKey

* Fixed test, made autocomplete equal length

* Added scrolling through autocomplete list

* Made Accept autocomplete do delete and replace instead of append to support caps changes

* Changed Autocomplete ColorScheme to cyan

* Fixed autocomplete render location when TextView is scrolled

* Fixed scrolling and overspill rendering

* Added wordwrap option to SyntaxHighlighting Scenario

* Moved Autocomplete to be member property of TextView

* Made Suggestions a readonly collection and enabled Autocomplete in Editor Scenario

* Added ClipOrPad tests

* Fixed bad merge

* Delayed init of ColorScheme on Autocomplete until needed

* Changed ColorScheme to match Menu bar
2021-08-24 08:19:43 -07:00
BDisp
52f48b2044 Fixes #1384. Added a VisibleChanged event on the View class. (#1385)
* Fixes #1384. Added a VisibleChanged event on the View class.

* Getting the last char.

* Fixes #871. Added Enable property to Responder and added Disabled color for all ColorSchemes.

* Added GetNormalColor method to the View being more readable.

* Fixes the contentBottomRightCorner Enable and Visible.

* Fixes #643. Added AddItemAt and RemoveItem to StatusBar and fixed more bugs.

* Typo fixes.

* Fixes #1387. Allowing the UnitTests project to test internal keywords.

* Fixes #1389. Added a unidirectional feature to the Marquee styles to the ProgressBar.

* Fixes #1394. Added ReflectedType to check for overridden.

* Fixes #1396. Using the Loaded event instead the Ready event.

* Fixes #1402. Only WindowsDriver supports horizontal scroll. (#1403)

* Fixes #1402. Only WindowsDriver supports horizontal scroll.

* Fixes ProcessContinuousButtonPressedAsync on all drivers.

* Fixed internal unit test.

* Fixing warning.

* Fixing Editor scenario error.

* Fixes double and triple click on a touchpad.

* Ensuring reset the counting.

* Allowing touchpad double and triple click with one finger on CursesDriver.

* Allowing touchpad double and triple click with one finger on WindowsDriver.

* Fixes #1414. Fixed multi toplevels and mdi container issues.

* Improving EnsureVisibleBounds and PositionToplevel.

* Added mouseGrabView to the ResetState method.

* Changing namespace.

* Allowing file type on the SaveDialog.

* Fixes SaveDialogs writing the extension twice.
2021-08-11 02:56:30 -07:00
Charlie Kindel
a660f21e3f Merge pull request #1397 from BDisp/uicatalog-focus-fix
Fixes #1396. Using the Loaded event instead the Ready event.
2021-08-04 22:53:40 -06:00
BDisp
f1f86c4288 Fixes #1396. Using the Loaded event instead the Ready event. 2021-07-26 13:12:02 +01:00
BDisp
bb4bbcba1e Fixes #1389. Added a unidirectional feature to the Marquee styles to the ProgressBar. 2021-07-24 13:23:20 +01:00
BDisp
e2d53d2d92 Fixes #546. Enhancement ProgressBar. (#1379)
* Fixes #546. Enhancement ProgressBar.

* Allows set the Text only on Marquee style.
2021-07-21 09:08:43 -07:00
Thomas Nind
02dfb2be2a Adds Lineview (#1374)
* Added LineView

* Added tests for LineView constructor

* Fixed tests

* fix typo
2021-07-21 09:02:48 -07:00
Charlie Kindel
c76793aaa1 Merge pull request #1371 from BDisp/autosize-direction-text-init
CheckBox AutoSize should initialize with the Label default.
2021-07-21 09:01:36 -07:00
Charlie Kindel
dcc126942a Merge pull request #1364 from BDisp/textview-load-file
Fixes #1314. TextView now exposes file exceptions from callers.
2021-07-21 08:55:05 -07:00
Charlie Kindel
ec2175b942 Merge pull request #1360 from BDisp/clipboard-not-supported-fix
Prevents application crash if OS clipboard is not supported.
2021-07-21 08:54:04 -07:00
Charlie Kindel
481bac9be7 Merge pull request #1359 from BDisp/cursesdriver-attribute-fix
Fixes #1358. Attribute.Foreground / Attribute.Background now working with CursesDriver
2021-07-21 08:52:59 -07:00
Charlie Kindel
1026f2145b Merge pull request #1357 from tznind/table-colors
Added support for coloring cells in TableView
2021-07-21 08:49:27 -07:00
BDisp
e22b52e665 Fixes HasFlag behavior by using == keyword. 2021-07-19 18:39:43 +01:00
BDisp
35cbf68a3a Revert "Fixes HasFlag behavior by using Equals keyword"
This reverts commit a6daa4d474.
2021-07-19 18:35:19 +01:00
BDisp
a6daa4d474 Fixes HasFlag behavior by using Equals keyword 2021-07-19 18:24:28 +01:00
BDisp
49e71b45af Fixes #1380. Setting AllowsTab in TextView keeps Multiline. 2021-07-19 14:21:05 +01:00
BDisp
138a14746d Using LayoutSubviews to fix the size height hiding first character. 2021-07-16 15:17:20 +01:00
BDisp
623b6bf24b Fixes the height from hiding the first character. 2021-07-15 19:27:13 +01:00
BDisp
f32a76b4a9 Fixes the View Menu to set current child if is visible. 2021-07-15 19:24:10 +01:00
BDisp
c29234c690 CheckBox AutoSize should initialize with the Label default. 2021-07-15 19:14:58 +01:00
BDisp
2608fe47f3 Handling Ctrl+Q 2021-07-13 10:58:50 +01:00
BDisp
e78bba0cc2 Fixes TextView to deal with CRLF format. 2021-07-12 21:59:16 +01:00
BDisp
8d6c2e0aa8 Some changes in the UICatalog and Scenarios. 2021-07-11 00:16:40 +01:00
Thomas Nind
e63650102b Changed text color to dark grey to make effect clearer 2021-07-07 13:00:47 +01:00
Thomas Nind
30508d9740 Added multi coloured cell example 2021-07-07 12:59:16 +01:00
Thomas Nind
446759a3f2 Made RowColorGetterDelegate follow same pattern as CellColorGetter 2021-07-07 12:32:22 +01:00
Thomas Nind
29c14876c0 Changed CellColorGetterDelegate to use its own class for args CellColorGetterArgs to future proof the API against breaking changes 2021-07-07 12:15:35 +01:00
BDisp
3f7e996187 Prevents application crash if OS clipboard is not supported. 2021-07-06 17:17:08 +01:00
BDisp
fb49513edb Improving the InvertColors scenario. Thanks @tznind. 2021-07-06 13:33:28 +01:00
BDisp
f256046984 Add InvertColors scenario. 2021-07-06 12:52:35 +01:00
Thomas Nind
f536d906d4 Made selected cell invert first character optional as a TableStyle 2021-06-29 09:27:28 +01:00
Thomas Nind
e460650a3c Changed Scenario alt colors to Win.ColorScheme instead of Colors.Base 2021-06-29 07:16:25 +01:00
tznind
98dfcc4959 Added support for full row coloring 2021-06-28 19:27:29 +01:00
tznind
b3ce131fbf Added support for coloring cells 2021-06-28 18:16:48 +01:00
BDisp
10613f79e4 Merge branch 'main' into toplevel-improvement 2021-06-15 09:40:49 +01:00
tznind
2b5c83d3dc Merge remote-tracking branch 'upstream/main' into color-text-view 2021-06-13 14:03:04 +01:00
Thomas Nind
e601a6bd39 Fixed keyword highlighting and added string literal highlighting 2021-06-13 13:57:20 +01:00
tznind
32e4e9dff8 Added word splitting 2021-06-13 09:33:57 +01:00
Thomas Nind
fb5830ea9d Made color methods in TextView protected virtual 2021-06-13 08:30:03 +01:00
BDisp
1a8316799d Merge branch 'main' into toplevel-improvement 2021-06-11 21:36:39 +01:00
BDisp
297bf42bd6 Fixes InvalidOperationException from throwing when removing the label. 2021-06-06 20:52:45 +01:00
BDisp
480a63d222 Toplevel improvement as a subviews container without frame borders. 2021-06-05 00:47:03 +01:00
BDisp
87926a7d3d Prevents output to the terminal on Linux. 2021-05-29 22:10:23 +01:00
Thomas Nind
0dd0f2e5c4 TableView - adds last column dividing line (#1289)
* Adds a final vertical column line at the end of the last header in TableView

* Added clear line as first step in RenderRow

* Added TableStyle.EnforceMaxWidthOnLastColumn

* Added Scenario toggle setting and tests

* Fixed EnforceMaxWidthOnLastColumn when Bounds match exactly the last column width

* Fixed whitespace and comment on ColumntoRender.Width

* Renamed EnforceMaxWidthOnLastColumn to ExpandLastColumn
2021-05-10 20:58:15 -07:00
BDisp
4af48392cc Fixes #1281. Fixed CursesDriver colors. Added BasicColors scenario. (#1282)
* Fixes #1281. Fixed CursesDriver colors. Added BasicColors scenario.

* Normalizing NetDriver too.

* Fixing others colors.
2021-05-06 10:29:50 -07:00
BDisp
8dabd16975 Fixes #1276. Added TextDirection constructor to View and Label and improving AutoSize. (#1277)
* Added AutoSize. CalcRect calculates vertical. Fixes Draw bug.

* Added TextDirection constructor. Ensuring set frame on Pos/Dim absolute. Improves AutoSize.

* Added a scenario for the AutoSize and TextDirection.

* Added more unit tests.

* Fixing some broken scenarios.

* Fixes others TextDirection that was not working.
2021-05-02 11:21:08 -07:00
José Miguel Perricone
028e7e5bf2 TextValidateField reimplementation without generics (#1261)
* TextValidateField reimplementation without generic

* mask change in catalog
2021-04-28 08:42:33 -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
BDisp
c27da1b982 Fixes #1210. Added AllowsReturn, AllowsTab and Multiline into the TextView. (#1249)
* Fixes #1234. Setting Handled to true in the KeyPress event avoids ProcessKey from running.

* Using literals values in Assert.Equal.

* Can't use numbers variables on the left side of an Assert.Equal/NotEqual, it must be literal (Linux only).

* Fixes #1241. Added SendKeys feature to the ConsoleDriver.

* Fixes SendKeys unit test.

* Changed Key.Null to '\0' (null string).

* Fixes the space bar when there are another previous char.

* Now the drivers are reading up to 255 from ASCII table.

* Fixes CursesDriver and WindowsDriver SendKeys.

* Fixes NetDriver SendKeys.

* Fixed unit test.

* Fixes #1210.  Added AllowsReturn, AllowsTab and Multiline into the TextView.

* Added a Single Line and Multiline toggle to the Text.cs scenario.

* Removing comment.
2021-04-27 08:48:35 -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