Commit Graph

187 Commits

Author SHA1 Message Date
Jakub Sobon 68fb7606d9
Prevent external mutation of data passed into widgets.
Fixes #174.
2019-03-20 23:20:16 -04:00
Jakub Sobon 62c56c5e58
Adding the ValueCapacity method to SparkLine. 2019-03-03 18:13:17 -05:00
Jakub Sobon 5018a08b1f
Adding ValueCapacity method to BarChart. 2019-03-03 17:59:30 -05:00
Jakub Sobon b020770733
Moving widgetapi out of internal.
This will allow external users to develop their own widgets.
2019-03-02 22:00:07 -05:00
Jakub Sobon 2742487fc0
The text widget now wraps at words. 2019-03-02 17:56:37 -05:00
Jakub Sobon c43e453038
Text validation moved to the wrap package. 2019-03-02 17:46:03 -05:00
Jakub Sobon 87cab66617
Simplifying the text widget.
This results in a better line wrapping abstraction which now works on
cells. Cells contain both the rune and the cell options which were
awkward to track separately.
2019-02-28 00:50:16 -05:00
Jakub Sobon 61aca3fb62
Removing Text's dependency on wrap.Needed.
It was rune based and thus incompatible with word wrapping.
2019-02-25 00:33:27 -05:00
Jakub Sobon 54c5dff63e
Factoring the line wrapping logic out of the text widget.
It will be needed for the Table too.
2019-02-24 23:10:52 -05:00
Jakub Sobon 80843ae031
Merge pull request #157 from mum4k/api-docs
Moving fakewidget to the internal subdirectory.
2019-02-24 22:42:39 -05:00
Jakub Sobon 50c00a2c8f
Moving fakewidget to the internal subdirectory. 2019-02-24 22:36:09 -05:00
Jakub Sobon cc460d43b7
Fixing one typo and adding two missing error checks. 2019-02-24 18:42:10 -05:00
Jakub Sobon 0938ae91d8
Refactoring internal functions from align to internal/alignfor. 2019-02-24 15:44:13 -05:00
Jakub Sobon 85902cf11a
Button is internal. 2019-02-24 02:09:27 -05:00
Jakub Sobon b25d20c8ae
Mouse and keyboard are also public. 2019-02-24 02:08:48 -05:00
Jakub Sobon 98394c921a
Moving draw back to internal.
Adding test for linestyle.
2019-02-24 01:54:37 -05:00
Jakub Sobon e4726e4240
Changing all call sites to linestyle. 2019-02-24 01:51:50 -05:00
Jakub Sobon b74f46509b
Moving runewidth, segdisp and testdraw to internal. 2019-02-24 01:27:17 -05:00
Jakub Sobon bf61ca1479
Moving draw out of internal. 2019-02-24 01:20:03 -05:00
Jakub Sobon 97ec73069f
Moving align, cell and terminalapi back from internal. 2019-02-24 01:13:26 -05:00
Jakub Sobon 6a7f3ff886
Fixing lint issue in button. 2019-02-24 01:10:29 -05:00
Jakub Sobon 8df9e3307c
Moving faketerm to internal. 2019-02-24 01:09:23 -05:00
Jakub Sobon bf38f10d25
Moving terminal back to public. 2019-02-24 01:04:57 -05:00
Jakub Sobon f0438f5f78
Moving linechart's zoom into internal subdirectory. 2019-02-23 21:22:52 -05:00
Jakub Sobon 24f608f708
Adding README under linechart's internal subdirectory. 2019-02-23 21:22:11 -05:00
Jakub Sobon 9517bd49e3
Moving linechart's axes to internal subdirectory. 2019-02-23 21:21:52 -05:00
Jakub Sobon 5ac468c10a
Moving terminal, terminalapi and widgetapi to internal subdirectory.
And adding a README under internal.
2019-02-23 21:19:16 -05:00
Jakub Sobon 55efbe07fe
Moving numbers to internal subdirectory. 2019-02-23 21:16:13 -05:00
Jakub Sobon 2ff1818c0e
Moving keyboard and mouse to internal. 2019-02-23 21:11:50 -05:00
Jakub Sobon 6c03991fb9
Moving draw and event to internal. 2019-02-23 21:10:51 -05:00
Jakub Sobon 7ee222ac58
Moving private libraries into internal subdirectory. 2019-02-23 21:09:38 -05:00
Jakub Sobon e7e8b29396
Fixing LineChart tests. 2019-02-23 20:50:29 -05:00
Jakub Sobon a2642ea039
The LineChart now continuous to accept mouse events after terminal resize.
And allowing it to receive global mouse events to be able to cancel
highlight on clicks outside of the widget.
2019-02-23 20:48:41 -05:00
Jakub Sobon b2a1f30fe1
Complete test coverage for button and tweaks to the demo. 2019-02-23 19:38:47 -05:00
Jakub Sobon e9cf1e1af7
Partially completed tests for button. 2019-02-23 02:18:06 -05:00
Jakub Sobon 0490734d1e
Running gofmt. 2019-02-23 00:42:47 -05:00
Jakub Sobon 22946f2f65
Allowing widgets to select the scope for mouse events too. 2019-02-23 00:41:58 -05:00
Jakub Sobon 4b4e245d60
The button in an intermediate dev state. 2019-02-23 00:07:54 -05:00
Jakub Sobon a16d908b5e
Adding options for global keyboard. 2019-02-22 01:07:53 -05:00
Jakub Sobon 8b3f1a146f Merge branch 'devel' into button 2019-02-22 00:49:26 -05:00
Jakub Sobon 495eaa4ee5
Merge pull request #146 from mum4k/widgets-global-keys
Allow widgets to subscribe to global keyboard events
2019-02-22 00:48:42 -05:00
Jakub Sobon 0df7387862
Widgets can now register for global keyboard events. 2019-02-22 00:33:55 -05:00
Jakub Sobon 793925feb8
Migrating all calls to the runewidth wrapper. 2019-02-21 23:24:42 -05:00
Jakub Sobon a8a965c555
Remove the debug hooks. 2019-02-18 22:35:30 -05:00
Jakub Sobon cecf39a9c7
Roll the zoom with the axis when XAxisUnscaled is provided. 2019-02-18 22:33:25 -05:00
Jakub Sobon 5b89dbc1a0
Undo the experiments in the LineChart demo. 2019-02-18 18:50:55 -05:00
Jakub Sobon 38ec4a9e1b
Fixing invalid zooming behaviors.
- stay unzoomed when we hit the largest view.
- correctly normalize zoom values when the base axis is in motion.
- test coverage for the edge cases.

Fixes #136
2019-02-18 18:48:19 -05:00
Jakub Sobon ec8160ef40
Don't zoom when only a single column was highlighted. 2019-02-18 15:13:45 -05:00
Jakub Sobon 705db137bc
Fixing existing Lint issues. 2019-02-18 02:14:14 -05:00
Jakub Sobon 72b3ac4ff9
The LineChart widget now supports zoom. 2019-02-18 01:28:30 -05:00