Jakub Sobon
d0ca7ec5f5
Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options
2018-05-14 22:43:36 +01:00
Jakub Sobon
d3db859678
Adding licence.
2018-05-14 22:42:39 +01:00
Jakub Sobon
8df67c6d04
Merge branch 'text-widget/4/scroll-tracker' into text-widget/5/widget
2018-05-14 22:35:10 +01:00
Jakub Sobon
a13c1f6be2
Merge branch 'text-widget/3/line-scanner' into text-widget/4/scroll-tracker
2018-05-14 22:34:48 +01:00
Jakub Sobon
6b39babddf
Merge branch 'text-widget/2/write-options' into text-widget/3/line-scanner
2018-05-14 22:34:10 +01:00
Jakub Sobon
bb73338abb
Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options
2018-05-14 22:33:46 +01:00
Jakub Sobon
2f384b3b1c
Merge branch 'master' into text-widget/1/widget-options
2018-05-14 22:33:05 +01:00
Jakub Sobon
b98013ea45
Removing commit that doesn't belong to this history.
2018-05-14 22:32:07 +01:00
Jakub Sobon
cd35405fd7
Merge pull request #28 from mum4k/lint_errors
...
Fixing lint errors.
2018-05-14 22:20:18 +01:00
Jakub Sobon
d6c153fbaf
Implementing the text widget.
...
And adding a demo.
2018-05-14 22:16:14 +01:00
Jakub Sobon
4c54b8a46e
Adding an object that tracks the scrolling state.
2018-05-14 22:13:16 +01:00
Jakub Sobon
7d14d2219f
Adding line scanner.
...
The line scanner identifies and counts lines in the input text and
performs wrapping if required.
2018-05-14 22:12:08 +01:00
Jakub Sobon
e786777410
Defining options for text written to the widget.
...
Each set of options applies to a range of characters equal to the length
of the text added.
E.g. on write calls like:
Write("text", opts1)
Write("long text", opts2)
The two passed options will be stored as:
opts1 for byte range low:0, high:4
opts2 for byte range low:4, high:13
The text itself will be stored in a bytes.Buffer.
2018-05-14 22:08:53 +01:00
Jakub Sobon
a824210882
Defining options for the text widget.
2018-05-14 22:07:04 +01:00
Jakub Sobon
bf751529c4
Adding a disclaimer.
2018-05-14 21:42:25 +01:00
Jakub Sobon
ec590d6149
Adding missing keyword.
2018-05-14 01:57:00 +01:00
Jakub Sobon
79218c9233
Fixing lint errors.
...
- Missing comments.
- Invalid comments.
- Stuttering public name.
2018-05-11 16:32:37 +01:00
Jakub Sobon
f62bf80686
Deleting binary file.
2018-05-09 21:37:01 +01:00
Jakub Sobon
1e1c8cab3f
Merge branch 'master' of ssh://github.com/mum4k/termdash
2018-05-08 19:01:46 +01:00
Jakub Sobon
1bb3a422fc
Replacing strings.Builder with bytes.Buffer.
...
For backward compatibility.
2018-05-08 19:01:07 +01:00
Jakub Sobon
2db6184651
Adding links to documentation, build and coverage status.
2018-05-08 18:58:49 +01:00
Jakub Sobon
ea375744a7
Adding travis-ci and coveralls configuration.
2018-05-08 18:53:14 +01:00
Jakub Sobon
039a028ff9
Fixing issues reported by go vet.
2018-05-08 01:20:48 +01:00
Jakub Sobon
e2a4927612
Adding licences.
2018-05-08 01:14:36 +01:00
Jakub Sobon
c28cec560e
Implementing the Gauge widget.
...
Fixes #6 .
2018-05-08 01:12:36 +01:00
Jakub Sobon
72df12349c
Exposing alignment directly instead wrapping in options.
...
And removing experimental code in favor of individual widget demos.
2018-05-07 21:48:22 +01:00
Jakub Sobon
09464a2db7
Improving error handling.
2018-05-07 21:30:38 +01:00
Jakub Sobon
220f979fa6
Generalizing code that aligns text within a rectangle.
2018-05-07 20:32:14 +01:00
Jakub Sobon
5aed5ecf24
Changing the default alignment of widget canvases to center and middle.
...
Fixes #25 .
2018-05-07 18:53:29 +01:00
Jakub Sobon
f128e8508c
Container's border now supports a title.
...
Fixes #22 .
Fixes #19 .
2018-05-07 18:48:52 +01:00
Jakub Sobon
b4b1d8b2a6
Border now supports a title.
...
Updates #22 .
2018-05-07 18:32:41 +01:00
Jakub Sobon
74bdcd649f
Moving alignment code from container into its own package.
2018-05-07 17:44:32 +01:00
Jakub Sobon
88fc5b2782
Unifying the last API in the draw package.
...
Fixes #23 .
2018-05-07 16:50:27 +01:00
Jakub Sobon
b62c9406ab
Renaming draw.Box to draw.Border and improving its API.
...
Also adding tests for draw.Rectangle.
Updates #23 and #22 .
2018-05-07 13:33:18 +01:00
Jakub Sobon
f31887b63c
A widget option to specify the maximum canvas size.
2018-05-07 12:42:19 +01:00
Jakub Sobon
e249f6ffc4
Adding a test helper for draw.Rectangle.
2018-05-07 12:41:45 +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
d7cad7b9e4
Replacing project status with list of implemented widgets.
2018-05-07 12:39:45 +01:00
Jakub Sobon
a265a12bd6
Function that draws a Rectangle.
...
This time for real.
2018-05-06 19:30:20 +01:00
Jakub Sobon
2473cd46d6
A function that draws a rectangle.
...
Also:
- implementing text trimming and wrapping.
- Switching log.Fatalf to panic() for more understandable test errors.
2018-05-06 19:28:52 +01:00
Jakub Sobon
b42236a117
Adding missing licences.
2018-04-23 14:26:26 +01:00
Jakub Sobon
ffe665a306
Removing redundant word.
2018-04-23 01:36:27 +01:00
Jakub Sobon
8032b94f08
Updating project task list.
2018-04-23 01:11:59 +01:00
Jakub Sobon
6fe129c940
Implementing the infrastructure layer.
2018-04-23 01:05:54 +01:00
Jakub Sobon
0199ffbb9a
Supporting resize and events on the fake terminal.
2018-04-23 00:49:38 +01:00
Jakub Sobon
bf1fc73140
Adding an informative MinimumSize for the Fake widget.
2018-04-23 00:47:49 +01:00
Jakub Sobon
e18b9ba79b
Improving comment about thread un-safety.
2018-04-23 00:47:12 +01:00
Jakub Sobon
9b5caa35f5
Don't pop from the queue after context expiry.
2018-04-23 00:46:36 +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
abdbd82b29
Notes about design guidelines in the docs.
2018-04-23 00:44:32 +01:00