Trevor Slocum
ed5e6d94dd
Remove return values from methods which return their primitive (breaks chaining)
2020-10-07 16:35:21 -07:00
Trevor Slocum
2763609e05
Store InputField text data as []byte instead of string
2020-10-07 08:40:36 -07:00
Trevor Slocum
d5edb975b6
Store ListItem text as []byte instead of string
2020-10-06 18:19:40 -07:00
Trevor Slocum
96b2dd5523
Add Table test and benchmark, store TableCell as []byte instead of string
2020-10-06 18:02:37 -07:00
Trevor Slocum
4cbfd55a8e
Document TextView optimizations
2020-10-06 13:55:51 -07:00
Trevor Slocum
741bac61c6
Update .gitignore
2020-10-06 13:26:47 -07:00
Trevor Slocum
534661590c
Merge branch 'print' into 'master'
...
Print text using []byte instead of string, calculate string width using runewidth instead of uniseg
See merge request tslocum/cview!8
2020-10-06 20:20:13 +00:00
Trevor Slocum
6b34a95e75
Print text using []byte instead of string, calculate string width using runewidth instead of uniseg
2020-10-06 13:16:37 -07:00
Trevor Slocum
50a085333b
Use TrimRightFunc when wrapping text in TextView
2020-10-06 13:14:45 -07:00
Trevor Slocum
659788f590
Add TextView.SetBytes
2020-10-04 13:03:28 -07:00
Trevor Slocum
da799d93c0
Document addition of TextView.GetBytes
2020-10-04 12:54:31 -07:00
Trevor Slocum
b5fba43a01
Merge branch 'tvopt' into 'master'
...
Store TextView buffer as [][]byte instead of []string
Closes #36
See merge request tslocum/cview!7
2020-10-04 19:50:46 +00:00
Trevor Slocum
710303491e
Store TextView buffer as [][]byte instead of []string
...
Partially implements #36 .
2020-10-04 12:44:26 -07:00
Trevor Slocum
4de432d7aa
Release v1.5.0
2020-10-03 21:04:46 -07:00
Trevor Slocum
5a3409bfd6
Release lock on InputField while executing DoneFunc and FinishedFunc
2020-10-02 17:00:57 -07:00
Trevor Slocum
3d1844e33b
Panic when attempting to add an invalid FormItem
2020-10-02 16:31:31 -07:00
Trevor Slocum
db81e43e00
Remove wrapper methods
2020-10-02 16:28:32 -07:00
Trevor Slocum
e1cd3be7bb
Lock Mutex when setting InputField attributes
2020-10-02 11:23:49 -07:00
Trevor Slocum
f83115be61
Merge branch 'fix/inputfield-suggestion' into 'master'
...
fix(inputfield): Display suggestion correctly
Closes #37
See merge request tslocum/cview!6
2020-10-01 19:51:55 +00:00
Trevor Slocum
34b52f731a
Add TextView buffer indexing benchmark
2020-10-01 12:45:11 -07:00
Andreas Bieber
9acd4bf821
fix(inputfield): Display suggestion correctly
2020-10-01 19:58:30 +02:00
Trevor Slocum
018a7e47fe
Allow autocomplete selection value customization
2020-09-30 12:14:51 -07:00
Trevor Slocum
0e419707b0
Add link to list of applications using cview
2020-09-29 13:34:38 -07:00
Trevor Slocum
357a49e9e7
Do not set focus-related style attributes by default
2020-09-29 13:24:12 -07:00
Trevor Slocum
a709a929d9
Fix FormItem.SetAttributes race condition
...
Resolves #35 .
2020-09-28 22:34:38 -07:00
Trevor Slocum
d53f87d967
Update List scroll bar cursor when view offset changes (rather than selected item)
2020-09-24 20:51:51 -07:00
Trevor Slocum
0c4f526680
Add WindowManager requirement to Window docs
2020-09-24 08:35:12 -07:00
Trevor Slocum
e20e58147f
Add Window and WindowManager
2020-09-24 08:09:55 -07:00
Trevor Slocum
97f450fc34
Set DropDown options list width to at least as wide as the originating field
2020-09-23 16:22:12 -07:00
Trevor Slocum
89fa23ab00
Resolve lint warnings
2020-09-23 16:14:53 -07:00
Trevor Slocum
5505bb7a58
Document changes submitted by Andreas Bieber
2020-09-23 15:44:28 -07:00
Trevor Slocum
1cfb3711cf
Merge branch 'feat/alot-of-features' into 'master'
...
Revamp FormItem styling, add arrow symbol to DropDown, add focus-driven style
options, add InputField autocomplete style options, provide DropDownOption in
DropDown handlers and provide ListItem in List handlers.
See merge request tslocum/cview!5
2020-09-23 22:24:27 +00:00
Andreas Bieber
474a8c1a27
chore: Add makefile and use in `gitlab-ci.yml`
...
Gives an easy possibility to execute the same commands as in the pipeline.
2020-09-23 20:54:48 +02:00
Andreas Bieber
70857602a5
feat(FormItem): Replace `SetFormAttributes` with `SetAttributes`
...
BREAKING CHANGE:
`SetFormAttributes` has been removed. To migrate your project, use `SetAttributes` which expects any combination of attribute setters.
Example:
`formItem.SetAttributes(cview.WithLabelWidth(10), cview.WithLabelColor(tcell.ColorYellow))`
or
`formItem.SetAttributes(cview.WithBackgroundColor(tcell.ColorBlack))`
2020-09-23 20:54:48 +02:00
Andreas Bieber
1d019e9697
fix(treeview): Use `scrollBarColor`
2020-09-23 20:54:48 +02:00
Andreas Bieber
9142563f22
feat(inputfield): Add ability to show a note below the inputfield
2020-09-23 20:54:48 +02:00
Andreas Bieber
128c6692d4
fix(form/Draw): Use button colors for focused state
2020-09-23 20:54:48 +02:00
Andreas Bieber
367d377081
fix(form/GetFormItem): Check whether index is out of bounds, if so, return nil
2020-09-23 20:54:48 +02:00
Andreas Bieber
8bd1023ddc
feat(dropdown): Add additional field for setting an optional reference (like in TreeView)
2020-09-23 20:54:48 +02:00
Andreas Bieber
6e9f09aec1
feat(dropdown): Draw rune at the end of the field to indicate that this field is a dropdown
2020-09-23 20:54:43 +02:00
Andreas Bieber
6fa4370332
fix(dropdown): Use `getFieldWidth` during draw
2020-09-23 20:51:46 +02:00
Andreas Bieber
dedc2da113
feat(dropdown): Abbreviate text of current option when not fitting into field
2020-09-23 20:51:43 +02:00
Andreas Bieber
4ab3586259
feat(dropdown): Introduce `SetChangedFunc`
2020-09-23 20:46:36 +02:00
Andreas Bieber
40efd84aad
feat(dropdown): Trigger `selected` when drop down list selection is cancelled
2020-09-23 20:46:36 +02:00
Andreas Bieber
e716d0acb9
fix(dropdown): Select previous option in dropdown list when cancelling selection
2020-09-23 20:46:36 +02:00
Andreas Bieber
f71273b9c8
feat(dropdown): Expose `DropDownOption`
...
BREAKING CHANGE:
DropDown:
- The signature of `GetCurrentOption` has been changed to return the index and the newly exposed `DropDownOption`
- `AddOption` has been renamed to `AddOptions` and accepts now multiple `DropDownOption`s. A convenience func called `AddOptionsSimple` has been added to simply add options by only providing its text.
- The signature of `SetOptions` has been changed to accept the global `selected` handler with the newly exposed `DropDownOption` and multiple `DropDownOption`s to set. A convenience func, namely `SetOptionsSimple`, has been added to simply add options by only providing its text.
- The signature of `SetSelectedFunc` has been changed to accept a handler expecting an index and the newly exposed `DropDownOption`
Form:
- The signature of `AddDropDown` has been changed to accept an array of the newly exposed `DropDownOption`. A convenience func, namely `AddDropDownSimple`, has been added to simply add a DropDown by only providing the option's text.
2020-09-23 20:46:36 +02:00
Andreas Bieber
75b6d31409
feat(inputfield/autocompletion): Draw selected autocomplete suggestion in `inputfield` without changing it till confirmed with `ENTER`
2020-09-23 20:46:36 +02:00
Andreas Bieber
bace1ac630
feat(List): Add additional field for setting an optional reference (like in TreeView)
2020-09-23 20:46:36 +02:00
Andreas Bieber
d315a5c5b3
feat(List): Expose `ListItem`
...
BREAKING CHANGE:
- The signature of `SetChangedFunc` and `SetSelectedFunc` has changed to pass the newly exposed `ListItem` instead of its properties
- The signature of `AddItem` and `InsertItem` has changed to expect a `ListItem` instead of the properties them self
2020-09-23 20:46:36 +02:00
Andreas Bieber
22895b10bc
feat(inputfield): Expose setters for autocomplete list colors
2020-09-23 20:46:36 +02:00