Commit Graph

266 Commits

Author SHA1 Message Date
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 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 1bb3a422fc
Replacing strings.Builder with bytes.Buffer.
For backward compatibility.
2018-05-08 19:01:07 +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 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 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 bf1fc73140 Adding an informative MinimumSize for the Fake widget. 2018-04-23 00:47:49 +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 3a058b407f
Renaming widget to widgetapi for consistency with terminalapi. 2018-04-09 03:33:24 +01:00
Jakub Sobon 5c32ca7f7f
Support for keyboard, mouse, widget options and alignment. 2018-04-09 03:17:40 +01:00
Jakub Sobon 0bbb28d13d
Adding a fake widget. 2018-04-07 14:24:55 +02:00