1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-25 13:48:50 +08:00

54 Commits

Author SHA1 Message Date
Jakub Sobon
5c68b72bbe
Test coverage for closed focus groups. 2020-12-27 01:00:42 -05:00
Jakub Sobon
69bc767fb5
Containers can now belong to multiple focus groups. 2020-12-07 02:14:11 -05:00
Jakub Sobon
c1f1c03e95
Basic test cases for closed focus groups. 2020-12-02 01:06:23 -05:00
Jakub Sobon
2c1b1a4bfe
Allow widgets to request keyboard events exclusively. 2020-11-28 00:32:55 -05:00
Jakub Sobon
dd6acb15e1
Give metadata about events to widgets. 2020-11-24 22:03:58 -05:00
Jakub Sobon
bd1a2ef7a3
Improving comments. 2020-11-24 19:48:35 -05:00
Jakub Sobon
ff431b782d
e2e test cases for keyboard based focus changes. 2020-11-24 15:19:14 -05:00
Jakub Sobon
e4edc8f15a
Ability to focus the previous container using keyboard. 2020-11-24 14:24:08 -05:00
Jakub Sobon
0771a92dc2
Ability to move focus to the next container using a key. 2020-11-23 22:33:24 -05:00
Jakub Sobon
06eb7623bd
Modifying imports 'internal' -> 'private'. 2020-04-10 15:26:45 -04:00
nijynot
957330c387 Tweak comments and use Default const in validation 2019-05-11 15:27:39 +02:00
nijynot
70a5255d5e Refactor SplitFixed() to use SplitCells
* Add basic tests to `SplitFixed()`
* Panic when both `SplitFixed()` and `SplitPercent()` are used
* Refactor `validateOptions()` into two smaller functions
2019-05-08 21:58:48 +02:00
nijynot
4aa60fe8e7 Refactor fixed container feature to SplitFixed() which takes one arg 2019-05-06 21:51:53 +02:00
nijynot
7c5232b662 Add support for fixed heights in SplitHorizontal() 2019-05-05 22:11:51 +02:00
Jakub Sobon
f3ff03c1ed
Discover widgets dynamically.
Events now discover widgets when they are sent. Previously widgets
subscribed directly to events which is incompatible with dynamic
layouts. Only widgets currently placed into containers should be getting
events.
2019-03-30 00:30:13 -04:00
Jakub Sobon
782d7c3117
Container now supports dynamic layout changes. 2019-03-29 00:24:22 -04:00
Jakub Sobon
0f0f1d4bc8
Validate the tree only once at creation. 2019-03-28 22:50:29 -04:00
Jakub Sobon
461a242338
Margin to be set while Drawing only.
Background: #165
2019-03-28 22:48:10 -04:00
Jakub Sobon
96d136019e
Calculating container areas upon Draw only. 2019-03-28 22:30:09 -04:00
Jakub Sobon
4203d0e794
Correctly track container focus when the terminal size increases.
Fixes #169.
2019-03-11 01:04:03 -04:00
Jakub Sobon
74769824a4
Support margin around containers. 2019-03-03 02:38:35 -05:00
Jakub Sobon
9a021b52b1
Containers now support padding of their content. 2019-03-03 01:16:36 -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
0938ae91d8
Refactoring internal functions from align to internal/alignfor. 2019-02-24 15:44:13 -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
be90fe60ea
Documenting non-public method of container. 2019-02-23 21:25:03 -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
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
22946f2f65
Allowing widgets to select the scope for mouse events too. 2019-02-23 00:41:58 -05:00
Jakub Sobon
0df7387862
Widgets can now register for global keyboard events. 2019-02-22 00:33:55 -05:00
Jakub Sobon
006c021f63
Also throttling repetitive events to focus and widgets. 2019-02-21 01:44:31 -05:00
Jakub Sobon
8780433b62
Moving container to EDS. 2019-02-20 23:36:58 -05:00
Jakub Sobon
37d557d30f
Switching container to EDS.
TODO: rewrite tests to use Subscribe().
2019-02-20 02:20:11 -05:00
Jakub Sobon
768e3c306c
Generalizing the mouse button FSM.
Taking this out of the container package so it can be reused by widgets.
2019-02-12 22:37:00 -05:00
Jakub Sobon
9a7e7b5af8
Support variable size container splits. 2019-01-14 01:11:55 -05:00
Jakub Sobon
964d676e31
Allowing container.Option to report an error. 2019-01-14 00:08:20 -05:00
Jakub Sobon
79218c9233
Fixing lint errors.
- Missing comments.
- Invalid comments.
- Stuttering public name.
2018-05-11 16:32:37 +01:00
Jakub Sobon
74bdcd649f
Moving alignment code from container into its own package. 2018-05-07 17:44:32 +01:00
Jakub Sobon
48fb6a5e29
Widgets can now specify the maximum size of their canvas.
Also moving align types out of container so they can be reused.
2018-05-07 12:40:40 +01:00
Jakub Sobon
2d4d903f87 Container handles resize correctly.
And making container thread unsafe, thread safety will be implemented at
the top.
2018-04-23 00:45:17 +01:00
Jakub Sobon
2cd3343c81 Adding licences and a script to automate the same. 2018-04-14 23:06:57 +01:00
Jakub Sobon
5ce9e90d68
Test coverage for processing of Keyboard and Mouse events. 2018-04-14 22:00:25 +01:00
Jakub Sobon
5c32ca7f7f
Support for keyboard, mouse, widget options and alignment. 2018-04-09 03:17:40 +01:00
Jakub Sobon
c896b5160f
Containers now track focus. 2018-04-06 04:56:36 +02:00
Jakub Sobon
28f6bfdb3e
Adding option to draw container borders in color.
And updating the faketerm diff function to also display differences in
options.
2018-04-05 19:57:46 +02:00
Jakub Sobon
1911e2190a
Making the container API easier to use. 2018-04-01 16:00:20 +02:00