Garrett D'Amore
7fbbefd986
Improved drop down list usability.
10 months ago
Trevor Slocum
454d759a42
Add Button.SetCursorRune and CheckBox.SetCursorRune
...
Cursors are now shown within Buttons and CheckBoxes by default.
Resolves #62 .
2 years ago
Trevor Slocum
71e3cc57f7
Add relevant info to pages of the presentation demo
...
Also, only draw DropDown symbols when focused by default.
Resolves #61 .
2 years ago
Trevor Slocum
4ac48a9748
Replace FormItem.SetAttributes with individual methods
3 years ago
Trevor Slocum
ed5e6d94dd
Remove return values from methods which return their primitive (breaks chaining)
3 years ago
Trevor Slocum
6b34a95e75
Print text using []byte instead of string, calculate string width using runewidth instead of uniseg
3 years ago
Trevor Slocum
db81e43e00
Remove wrapper methods
3 years ago
Trevor Slocum
357a49e9e7
Do not set focus-related style attributes by default
3 years ago
Trevor Slocum
a709a929d9
Fix FormItem.SetAttributes race condition
...
Resolves #35 .
3 years ago
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
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
9142563f22
feat(inputfield): Add ability to show a note below the inputfield
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
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
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
Trevor Slocum
8292f9baf2
Upgrade tcell to v2
...
Resolves #32 .
3 years ago
Trevor Slocum
48c31ff1a0
Remove wiki references
3 years ago
rivo
1f765c8695
Merge pull request #422 from rivo/mouse
...
Add mouse support
3 years ago
Trevor Slocum
e29d4b73b9
Make cview thread-safe
3 years ago
Trevor Slocum
de6819cc76
Fix applying ScrollBarNever to DropDown or InputField
3 years ago
Trevor Slocum
96f3c15040
Add scroll bar to List, DropDown, Table and TreeView
3 years ago
Trevor Slocum
5f880bc2c7
Migrate to GitLab
3 years ago
Trevor Slocum
6d9b735867
Fix dropdown mouse capture behavior
3 years ago
Chris Miller
a52eae5a0d
Refactor EventMouse
3 years ago
Chris Miller
ad59b43801
Get mouse actions rather than just mouse state
3 years ago
Chris Miller
806d63d900
Fix dropdown focus
3 years ago
Chris Miller
5bac390ebc
Dismiss dropdown by click
3 years ago
Chris Miller
b243f370d8
DropDown mouse support
3 years ago
Chris Miller
5b47ba1f32
More mouse handling for primitives
3 years ago
Trevor Slocum
b61132eddf
Fork tview as cview
...
See FORK.md for details
3 years ago
Oliver
c3d1d4bcf9
Added autocomplete functionality to InputField. Resolves #299 , resolves #77
4 years ago
Oliver
95de965571
Selection bar in DropDown stretches entire width now. Also added SetTextOptions() with prefixes/suffixes etc. Resolves #289
4 years ago
Oliver
9d616aee87
DropDown's SetCurrentOption() will also trigger the selected event. Closes #256 , resolves #260
4 years ago
Oliver
8d5eba0c2f
Replaced runewidth.StringWidth() with my own implementation. Fixes #236
4 years ago
Oliver
997b18eeff
Introduced a separate class-wide "selected" handler for DropDown. Resolves #206
4 years ago
Oliver
768070ef7b
Hitting Escape on a drop-down selection resets it.
5 years ago
Oliver
7d789421e3
DropDown now only uses List's main selected callback. Fixes #115
5 years ago
Oliver
f855bee020
Separated form item "done" function from "finished" function. Resolves #39
5 years ago
Oliver
5bd22542e5
For Form.GetFormItemByLabel() to work, we must not modify the label text. Fixes #94 , fixes #99
5 years ago
Oliver
761e3d72da
Added Primitive demo to go along with the GitHub Wiki entry on how to create your own primitive.
5 years ago
Oliver
b357eaf10f
Drop-down allows typing to directly jump to options. Resolves #77
5 years ago