Commit Graph

294 Commits

Author SHA1 Message Date
Jakub Sobon 4238ac6f76
Implements a buffer limit for the Text widget. (#301)
See issue #293 where memory and performance can degrade with a high number of lines written to the Text widget. 

This is a very simplistic implementation to limit the possible length the text buffer can grow to with the `maxContent` option. 

Default value of -1 means there's no limit and therefore behaviour should remain standard.

It has been working in our test app and allows the use of the Text widget to monitor logs (ie tail) and therefore doesn't bloat over time, but happy to adjust as required.
2021-04-03 17:04:53 -04:00
Jakub Sobon 5ba573cd74
Moving formdemo under widgets/textinput. 2020-12-30 02:12:37 -05:00
Jakub Sobon c3be258da0
Self-review. 2020-12-30 00:59:39 -05:00
Jakub Sobon ba6224f5ae
Complete demo of a text input form with keyboard navigation. 2020-12-30 00:54:50 -05:00
Jakub Sobon d30bc47245 Merge branch 'devel' into 243-formdemo 2020-12-30 00:27:32 -05:00
Jakub Sobon 93428e8091
Allow a no-op button with a nil callback. 2020-12-30 00:22:36 -05:00
Jakub Sobon d70bcd1afb
Allow updating the callback function on an existing button instance. 2020-12-30 00:10:55 -05:00
Jakub Sobon fe052262d0
Refactor form construction. 2020-12-29 23:56:11 -05:00
Jakub Sobon b91eac380d
Formdemo now displays default text in the input boxes. 2020-12-28 03:54:36 -05:00
Jakub Sobon db2fcdcffc Merge branch 'devel' into 243-formdemo 2020-12-28 03:48:27 -05:00
Jakub Sobon 0912c9dbea
DefaultText option for textinput. 2020-12-28 03:41:52 -05:00
Jakub Sobon 0af5fbc606
Make the first input box focused by default. 2020-12-27 03:23:36 -05:00
Jakub Sobon b392e157dd Merge branch 'devel' into 243-formdemo 2020-12-27 02:25:27 -05:00
Jakub Sobon 912de88b90
Textinput can request keyboard exclusively. 2020-12-27 02:19:38 -05:00
Jakub Sobon 6c387a4be7
Adding a demo demonstrating form input. 2020-12-27 02:18:22 -05:00
Jakub Sobon dc90197592
Added method comment. 2020-11-28 14:25:29 -05:00
Jakub Sobon ee90ac89dc
Code refactor and self-review. 2020-11-28 14:24:22 -05:00
Jakub Sobon 79f696a100
Fixing a golint error. 2020-11-28 14:16:36 -05:00
Jakub Sobon 9da89424ee
Button can now be triggered by different global and focused keys. 2020-11-28 14:11:21 -05:00
Jakub Sobon 93438e3ef9
Moving formdemo out of this branch. 2020-11-28 13:31:47 -05:00
Jakub Sobon de41768dbc
Merge branch 'devel' into 243-form-demo 2020-11-28 00:06:14 -05:00
Jakub Sobon 31c7a24041
Button now supports separate color values for text chunks.
Custom color values can be specified for each of its main states.
2020-11-27 15:11:59 -05:00
Jakub Sobon cf9554ae9f
Renaming WriteOptions to TextOptions. 2020-11-25 10:16:51 -05:00
Jakub Sobon 0643120697
Button's support for cell options on each text cell. 2020-11-25 02:28:05 -05:00
Jakub Sobon 73644716a5
Button can be drawn without horizontal padding around its text. 2020-11-25 01:44:50 -05:00
Jakub Sobon ce3adfb084
Button can be drawn without the shadow and animation. 2020-11-25 01:24:38 -05:00
Jakub Sobon 3a0d044a4d
Allow button to specify multiple trigger keys. 2020-11-24 23:02:21 -05:00
Jakub Sobon dd6acb15e1
Give metadata about events to widgets. 2020-11-24 22:03:58 -05:00
Jakub Sobon 891a672716
WIP: Button can be configured to accept multiple keys as triggers. 2020-11-24 20:30:58 -05:00
Hoshea 283801e4ed Rename AxisWith to axisWith and add comments 2020-11-23 15:35:15 +08:00
Hoshea b7a73f0d40 dev 2020-11-23 10:57:07 +08:00
Hoshea f5dc3335b3 dev 2020-11-20 20:17:24 +08:00
Hoshea 2ac3bc52a4 dev 2020-11-19 21:31:59 +08:00
Hoshea e5e6097bdf Update comments 2020-11-18 17:22:49 +08:00
Hoshea 65debbb18f Design APIs of the HeatMap widget 2020-11-18 16:01:09 +08:00
Hoshea 29d7e65c6a dev 2020-11-17 21:19:50 +08:00
Hoshea 8072326b23 dev 2020-11-17 17:36:54 +08:00
Hoshea c0f1cfdc12 first commit 2020-11-17 17:36:54 +08:00
Jakub Sobon 3e476963e8
Changing Blue color in demos to a more readable shade. 2020-11-14 01:41:29 -05:00
Jakub Sobon 3cbd993521
Making tcell the default in all demos and examples. 2020-11-14 01:09:07 -05:00
Jakub Sobon b883d8b02f
Addressing some lint issues. 2020-11-14 00:44:45 -05:00
Jakub Sobon 9719c5f17a
Merge pull request #251 from dyc3/font-modifiers
add font modifier cell options: bold, italic, underline.
2020-11-14 00:06:56 -05:00
Jakub Sobon b2c182063b
Formatting files and adding test coverage. 2020-11-13 02:29:25 -05:00
“Carson 50310f4d29 add font modifier cell options: bold, italic, underline. 2020-11-12 15:54:58 -05:00
dank c3220f04f1
added the ability to change the scrolling runes 2020-10-13 00:42:25 -04:00
dank 8a316e6c1b
added the ability to swap the scrolling runes 2020-10-13 00:40:58 -04:00
Jakub Sobon 6f8d56b3c6
Fixing typo in a comment. 2020-07-15 09:54:19 -04:00
Jakub Sobon 06eb7623bd
Modifying imports 'internal' -> 'private'. 2020-04-10 15:26:45 -04:00
Jakub Sobon 0b75d06a3f
Improving test coverage of the Gauge widget. 2020-03-07 10:10:09 -05:00
Jakub Sobon 91ae185022
Merge pull request #212 from donaldww/master
Change MaxUint32 to MaxInt32 in scroll.go
2019-05-21 16:04:50 -04:00