Commit Graph

300 Commits

Author SHA1 Message Date
Jakub Sobon 1ee2c7bae2
Merge pull request #40 from mum4k/triggered_redraw
Support for manually triggered redraw of terminal.
2018-06-22 16:35:24 -04:00
Jakub Sobon 4da5097d66
Fixing the SparkLine demo. 2018-06-22 16:33:05 -04:00
Jakub Sobon f4d2edc3f9
Adding licenses. 2018-06-22 16:30:50 -04:00
Jakub Sobon 9d02f43c6f
Self-review. 2018-06-22 16:27:23 -04:00
Jakub Sobon a9813c4c76
Implementation of the SparkLine widget.
And completing the demo.
2018-06-22 09:40:41 -04:00
Jakub Sobon 2ce014d35a
Fix for compatibility with Go 1.8.
Local implementation of math.Round.
2018-06-21 22:19:17 -04:00
Jakub Sobon d430638eb0
More test cases for the SparkLine widget. 2018-06-21 22:12:13 -04:00
Jakub Sobon 630151301f
Code that determines which sparks runes to use. 2018-06-21 22:11:57 -04:00
Jakub Sobon 40bee03bc2
Fixing incorrect func name in test output. 2018-06-21 17:05:05 -04:00
Jakub Sobon 27f6d76dc6
Skeleton of the SparkLine widget, tests and demo. 2018-06-21 17:04:19 -04:00
Jakub Sobon 6a320ac68c
Adding colors to the demo. 2018-06-19 23:12:28 -04:00
Jakub Sobon a0f55ccf01
Improving the demo. 2018-06-19 23:02:15 -04:00
Jakub Sobon c2782a8f56
Improving test coverage. 2018-06-19 22:33:06 -04:00
Jakub Sobon 42fd5f8ccb
Improving test coverage. 2018-06-19 22:17:53 -04:00
Jakub Sobon 542948c6cf
Fixes after self-review. 2018-06-19 22:04:20 -04:00
Jakub Sobon 4785160c13
Adding some missing licences. 2018-06-19 21:54:27 -04:00
Jakub Sobon 1f41c7afee
First empty the queue, then redraw. 2018-06-19 21:46:03 -04:00
Jakub Sobon 77a9b30133
Implementation of the BarChart widget and its demo. 2018-06-20 02:37:06 +01:00
Jakub Sobon 774ad2479a
More test cases. 2018-06-18 22:36:20 +01:00
Jakub Sobon ff5ce85170
Skeleton of the barchart widget and its tests. 2018-06-18 21:36:29 +01:00
Jakub Sobon 7ceec7a572
Support manually triggered redraw.
This can be a more viable option for some users as it is less resource
intensive. The user knows when the data in any of the widget changed and
thus can trigger a redraw. External events still redraw the terminal
immediately.

Done here:
- Added a controller for the manually triggered redraws.
- Added an example of using termdash with triggered redraw.
- Removing couple of races in the test by waiting for the event queue to
empty before comparing values and by moving the test of terminal resize
into the test that triggers redraws.
2018-06-18 20:13:20 +01:00
Jakub Sobon 0e620cf3ca
The event queue can now report if it is empty. 2018-06-18 20:02:17 +01:00
Jakub Sobon fd186956f6
The fake widget can now draw custom text. 2018-06-18 20:01:48 +01:00
Jakub Sobon 0fb44ec8f3
Merge pull request #39 from mum4k/bugfix-rune-count
Support for full-width runes in the remaining code.
2018-06-13 17:35:49 +01:00
Jakub Sobon b98948326b
Comment from @chipmunkie. 2018-06-13 17:28:32 +01:00
Jakub Sobon 870e1bda00 Merge branch 'master' into bugfix-rune-count 2018-06-04 17:46:41 +01:00
Jakub Sobon c68e916c02
Move description above the image. 2018-06-04 17:46:21 +01:00
Jakub Sobon 405812665a
Merge branch 'master' into bugfix-rune-count 2018-06-04 17:43:30 +01:00
Jakub Sobon 4a65691668
Merge pull request #38 from mum4k/text-widget/6/wide-runes
Adds full-width rune support.
2018-06-04 17:42:30 +01:00
Jakub Sobon 5fd79c5d9e
Merge branch 'master' into text-widget/6/wide-runes 2018-06-04 17:39:02 +01:00
Jakub Sobon 1c17cb36f2
Updated doc as per comment. 2018-06-04 16:16:51 +01:00
Jakub Sobon 3969009573
Correcting link to the license file 2018-05-27 19:41:21 +01:00
Jakub Sobon bd92fdbabe
Adding badges for goreportcard and license.
Fixes #31
2018-05-27 19:40:08 +01:00
Jakub Sobon e5ca7023ef
Updating the gaugedemo image.
It contains full-width runes.
2018-05-27 19:32:25 +01:00
Jakub Sobon 945b48f4a3
Gauge widget now supports full-width runes. 2018-05-27 19:29:42 +01:00
Jakub Sobon 8a1bb34b05
Generalized text trimming logic.
So it can be reused in widgets.

Also adding some missing default values for options.
2018-05-27 19:28:49 +01:00
Jakub Sobon c148d8c171
Alignment now supports full-width runes. 2018-05-27 19:28:09 +01:00
Jakub Sobon 9786171a7a
Faketerm and diff on it supports partial cells.
Don't print out partial cells (cells that don't really exist since the
previous cell contains a full-width rune).
2018-05-27 19:27:11 +01:00
Jakub Sobon 7adc901811
Merge pull request #32 from mum4k/text-widget/1/widget-options
[1/5] Defining options for the text widget.
2018-05-27 16:37:04 +01:00
Jakub Sobon d21db77c79
Merge pull request #33 from mum4k/text-widget/2/write-options
[2/5] Defining options for text written to the widget.
2018-05-27 16:33:14 +01:00
Jakub Sobon e3a4106c4b
Merge pull request #34 from mum4k/text-widget/3/line-scanner
[3/5] Adding line scanner.
2018-05-27 16:30:36 +01:00
Jakub Sobon a211d11f6f
Merge pull request #35 from mum4k/text-widget/4/scroll-tracker
[4/5] Adding an object that tracks the scrolling state.
2018-05-27 16:27:52 +01:00
Jakub Sobon c7aaaed3ef
Merge pull request #36 from mum4k/text-widget/5/widget
[5/5] Implementing the text widget.
2018-05-27 16:23:28 +01:00
Jakub Sobon 367af3f86d
Merge branch 'text-widget/5/widget' into text-widget/6/wide-runes 2018-05-27 16:21:14 +01:00
Jakub Sobon 126cb00247
Rename newText field to contentChanged. 2018-05-27 16:15:56 +01:00
Jakub Sobon 06097229a9
Merge branch 'text-widget/4/scroll-tracker' into text-widget/5/widget 2018-05-27 16:12:25 +01:00
Jakub Sobon 6ab8088f51
Improving comments to make the scroll.go file more understandable. 2018-05-27 16:11:18 +01:00
Jakub Sobon c2db521710
Merge branch 'text-widget/3/line-scanner' into text-widget/4/scroll-tracker 2018-05-27 15:51:25 +01:00
Jakub Sobon 39c624a84c
Making it more obvious what width in the test cases is.
- renaming it to cvsWidth.
- adding a comment explaining that it is the width of the canvas.
2018-05-27 15:49:13 +01:00
Jakub Sobon 7104472cfa
Adding the text widget to the main README. 2018-05-20 23:27:57 +01:00