Commit Graph

485 Commits (97f450fc343fdf0c72347dd6f7bb683d08fd9468)
 

Author SHA1 Message Date
Trevor Slocum 97f450fc34 Set DropDown options list width to at least as wide as the originating field 3 years ago
Trevor Slocum 89fa23ab00 Resolve lint warnings 3 years ago
Trevor Slocum 5505bb7a58 Document changes submitted by Andreas Bieber 3 years ago
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
3 years ago
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.
3 years ago
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))`
3 years ago
Andreas Bieber 1d019e9697 fix(treeview): Use `scrollBarColor` 3 years ago
Andreas Bieber 9142563f22 feat(inputfield): Add ability to show a note below the inputfield 3 years ago
Andreas Bieber 128c6692d4 fix(form/Draw): Use button colors for focused state 3 years ago
Andreas Bieber 367d377081 fix(form/GetFormItem): Check whether index is out of bounds, if so, return nil 3 years ago
Andreas Bieber 8bd1023ddc feat(dropdown): Add additional field for setting an optional reference (like in TreeView) 3 years ago
Andreas Bieber 6e9f09aec1 feat(dropdown): Draw rune at the end of the field to indicate that this field is a dropdown 3 years ago
Andreas Bieber 6fa4370332 fix(dropdown): Use `getFieldWidth` during draw 3 years ago
Andreas Bieber dedc2da113 feat(dropdown): Abbreviate text of current option when not fitting into field 3 years ago
Andreas Bieber 4ab3586259 feat(dropdown): Introduce `SetChangedFunc` 3 years ago
Andreas Bieber 40efd84aad feat(dropdown): Trigger `selected` when drop down list selection is cancelled 3 years ago
Andreas Bieber e716d0acb9 fix(dropdown): Select previous option in dropdown list when cancelling selection 3 years ago
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.
3 years ago
Andreas Bieber 75b6d31409 feat(inputfield/autocompletion): Draw selected autocomplete suggestion in `inputfield` without changing it till confirmed with `ENTER` 3 years ago
Andreas Bieber bace1ac630 feat(List): Add additional field for setting an optional reference (like in TreeView) 3 years ago
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
3 years ago
Andreas Bieber 22895b10bc feat(inputfield): Expose setters for autocomplete list colors 3 years ago
Andreas Bieber 32ed5f11d7 chore(inputfield): Compile regex only once 3 years ago
Andreas Bieber e7aaa8402f fix(inputfield): Use correct regex to detect left or right word/non-word 3 years ago
Andreas Bieber 1b44920167 feat(dropdown): Add setters for dropdown list colors 3 years ago
Andreas Bieber 41a24756f9 feat(FormItems): Allow specifying colors for focused state 3 years ago
Andreas Bieber e6bd3c5db9 feat(checkbox): Increase checkbox width by 2 cols 3 years ago
Andreas Bieber a6bb544c20 feat(checkbox): Add `SetCheckedRune` 3 years ago
Andreas Bieber 7678d84c66 feat(flex): Add `AddItemAtIndex` 3 years ago
Andreas Bieber 49e6b5bfe8 feat(treeview): Add `SetSelectedTextColor` and `SetSelectedBackgroundColor` 3 years ago
Andreas Bieber 60cca5d967 feat(box): Add `SetBorderColorFocused` 3 years ago
Trevor Slocum 441992fd77 Add scroll bar to TextView
Resolves #34.
3 years ago
Andreas Bieber ecfa14af14 feat(box): Add `GetBackgroundColor` 3 years ago
Andreas Bieber 02c4995bb2 feat(form): Add `IndexOfFormItem` 3 years ago
Andreas Bieber 85bc397af2 feat(flex): Add `GetDirection` 3 years ago
Andreas Bieber 2eac84df0b feat(box): Add `GetBorder` 3 years ago
Andreas Bieber 186ebd7dd6 feat(box): Add `GetBorderPadding` 3 years ago
Trevor Slocum 0974659c81 Release v1.4.9 3 years ago
Trevor Slocum f269c326f6 Base List PageUp and PageDown on the number of items displayed 3 years ago
Trevor Slocum a6a473f866 Add TextView.SetReindexBuffer 3 years ago
Trevor Slocum f35f86924a Add Table.Sort, Table.SetSortFunc and Table.SetSortClicked
Resolves #33.
3 years ago
Trevor Slocum 2ebdbde722 Update strikethrough implementation 3 years ago
Trevor Slocum 624a3fae3c Use updated tcell mouse buttons 3 years ago
Trevor Slocum a6258efb39 Expose strikethrough support
Resolves #17.
3 years ago
Trevor Slocum 8292f9baf2 Upgrade tcell to v2
Resolves #32.
3 years ago
Trevor Slocum d32ac6e3e9 Add InputField.GetCursorPosition and InputField.SetCursorPosition 3 years ago
Trevor Slocum 9ec0a6d3f2 Position ContextMenu on selected item when negative coordinates are provided 3 years ago
Trevor Slocum cdeff20296 Use sync.RWMutex in all widgets
Resolves #30.
3 years ago
Trevor Slocum cc7796c4ca Document TextView.GetText and GetRegionText fix 3 years ago
Oliver 81c828bfe0 TextView.GetText() and .GetRegionText() didn't filter out empty colour tags. Fixes #453 3 years ago