Commit Graph

20 Commits

Author SHA1 Message Date
52c1d9122b Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
91f910326c Fix maxWidth bug in Panel
Panel could pass a maxWidth to the child Render function that was greater than the maxWidth that was passed to the Panel render function.
I noticed this when trying to nest a table in a panel and the word wrapping was being disabled.

N.B It might be that Table.Measure ought to not return a measurment larger than maxWidth, but this Panel change seems defensivly sensible regardless.
2021-04-22 22:14:49 +02:00
20650f1e7e Change IAnsiConsole to render IRenderable
This makes it possible for encoders to output better representation
of the actual objects instead of working with chopped up segments.

* IAnsiConsole.Write now takes an IRenderable instead of segments
* Calculating cell width does no longer require a render context
* Removed RenderContext.LegacyConsole
* Removed RenderContext.Encoding
* Added Capabilities.Unicode
2021-03-28 09:06:06 -04:00
b64e016e8c Add breakdown chart support
This also cleans up the bar chart code slightly and fixes
some minor bugs that were detected in related code.

Closes #244
2021-02-01 01:03:39 +01:00
87e6b42409 Add tree example 2021-01-03 23:28:55 +01:00
b136d0299b Add tree widget 2021-01-02 10:01:16 +01:00
5c33b87a9c Add Verify for testing 2020-11-20 16:22:23 +01:00
b1da5e7ba8 Add support for markup text in panel header 2020-11-07 20:43:53 +01:00
e7f497050c Add row and column accessors for tables and grids 2020-10-26 18:15:27 +01:00
c9c0ad733f Fix rendering bug when splitting lines
The bug might occur if there are wide characters such as emojis
at the end of a line. The SplitLines method mixed cell width
and text length, which might give incorrect results. This commit
makes sure that comparison and calculation is done using cell width
where it's appropriate.
2020-10-24 01:45:41 +02:00
041bd016a2 Remove verbs from extension methods
Removed the verbs from all extension methods that manipulate
properties which makes the API more succinct and easier to read.

Also added implicit conversion from string to Style.

As a good OSS citizen, I've obsoleted the old methods with
a warning for now, so this shouldn't break anyone using
the old methods.
2020-10-23 15:08:18 +02:00
9afc1ea721 Add support for aligning tables 2020-10-21 18:15:51 +02:00
cb2924a609 Add table heading and footnote support
Closes #116
2020-10-19 15:46:57 +02:00
3c3afe7439 Add support for rendering exceptions 2020-10-05 07:03:02 +02:00
b1db8a9403 Clean up border code
Removed caching that really didn't do anything anymore.
2020-10-01 23:05:02 +02:00
93ec7401c8 Add support for markdown tables
Closes #85

* Split Border into BoxBorder and TableBorder
* Change how different table parts are composed
* Add markdown table border
2020-10-01 14:43:08 +02:00
090b30f731 Use Wcwidth library 2020-09-18 15:31:12 +02:00
7d6104ace4 Add padder widget
This commit adds a padder can be use to pad other IRenderable
objects such as tables, panels, grids, text, etc.
2020-09-17 10:58:50 +02:00
4f06687104 Restructure solution a bit 2020-09-09 08:43:48 +02:00