2
0
mirror of https://github.com/rivo/tview.git synced 2024-11-15 06:12:46 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Oliver
892d1a2eb0 Fixed offset adjustment for lists when they are temporarily of height 0, fixes #791 2023-01-04 16:33:04 +01:00
Oliver
062ee21d80 Merge branch 'master' into image 2023-01-01 15:11:50 +01:00
Oliver
c9f4e98e28 Adjusting offset in List.SetCurrentItem(), resolves #789 2023-01-01 15:08:11 +01:00
Oliver
b86a50a512 Added more control to the input field's autocomplete functionality. Also fixed mouse handling bugs. 2022-12-29 19:07:33 +01:00
Oliver
c5b1a7d818 Finished Image implementation. 2022-12-26 21:55:31 +01:00
Oliver
1480dc5b05 Fixed mouse focus issue in List. Fixes #773 2022-11-28 09:29:18 +01:00
Oliver
f5cddba6f0 Fixed out of bounds error in List. Fixes #480 2022-11-27 22:21:15 +01:00
Oliver
cecb44578c Setting focus is now based on a "mouse down" event instead of a "click" event. 2022-09-02 17:49:12 +02:00
Oliver
3bcc8f325a Added List methods to set styles in addition to colors. See #611 2022-02-15 17:59:36 +01:00
Daniel P. Berrangé
0bca6dadb3 Fix inverted handling of KeyPgDn/KeyPgUp in List widget
Consider a list with 5 items, and the currentItem index is 2, and
all items fit on the screen without scrolling.

KeyPgDn will set currentItem to 7 which is out of bounds, and
gets wrapped around to 0.

KeyPgUp will set currentItem to -3 which is out of bounds, and
gets wrapped around to 4.

Thus PgDn selects the first item, while PgUp selects the last item,
which is the opposite of expected behaviour for these keys. Fix
this by clamping currentItem to the boundaries in the key handler.

Fixes: https://github.com/rivo/tview/issues/580
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-03-15 18:40:20 +00:00
Oliver
ae9464cc35 Upgraded printing and style handling to the new definition of tcell.ColorDefault. 2021-03-12 18:48:52 +01:00
Oliver
dfabe788d4 Allowing list items to shift horizontally. Resolves #512, fixes #513 2021-02-15 18:26:27 +01:00
Oliver
675ed5b96b Removed Focusable interface. 2020-11-17 19:33:25 +01:00
Oliver
e4d167311d Upgraded to latest tcell version. Results in a minor incompatibility in the Table class. 2020-10-18 14:15:57 +02:00
rivo
ba71c7df7c
Merge pull request #418 from abitrolly/patch-2
Use List height for scrolling with PgUp/PgDn
2020-04-14 13:53:51 +02:00
Oliver
f395cf6e33 Added mouse scrolling to List, Table, TextView, and TreeView. 2020-03-29 21:36:06 +02:00
Oliver
9af6826328 Added/fixed comments, some structural changes/bugfixes for mouse support. Table, TextView, and TreeView still open. Closes #363 2020-03-27 18:41:44 +01:00
rivo
160d8fda1d
Merge pull request #363 from millerlogic/mouse-support
Mouse support
2020-03-26 19:28:51 +01:00
Anatoli Babenia
37ec5d08a6
Use List height for scrolling with PgUp/PgDn
Fixes #417.
2020-03-11 22:22:05 +03:00
Chris Miller
1fb9862c00 Separate action events 2020-02-28 01:19:36 +00:00
Oliver
ba670d23ba The inner area of a Box does not clamp to screen borders anymore. Consequently added some drawing optimization to primitives. Resolves #405 2020-02-19 18:31:32 +01:00
Trevor Slocum
babee1042c Fix panic when navigating empty list
Resolves #407.
2020-02-17 08:27:45 -08:00
Chris Miller
8abbf770ec Change mouse handler func 2020-02-14 02:09:09 +00:00
Chris Miller
9598ca2519 New mouse design
capture bool not finalized
2020-01-24 20:40:34 +00:00
Oliver
6e00e540f2 Added a wrap-around flag to the List. Resolves #380 2019-12-29 17:47:05 +01:00
Chris Miller
cd3c60e6d1 Refactor EventMouse 2019-11-05 09:19:40 +00:00
Chris Miller
93c0edc4a8 Get mouse actions rather than just mouse state 2019-11-05 06:03:04 +00:00
Chris Miller
d891191b78 Fire Selected on list item click 2019-11-04 06:55:58 +00:00
Chris Miller
d7250288e2 More mouse handling for primitives 2019-11-04 06:30:25 +00:00
Oliver
f63eca142c List changed event was not fired when SetCurrentItem() was called. Fixes #315 2019-07-11 11:37:27 +01:00
Oliver
8d5eba0c2f Replaced runewidth.StringWidth() with my own implementation. Fixes #236 2019-03-19 12:13:40 +01:00
Oliver
03d744dee3 SetOffset() also turns off end-tracking in Table. Fixes #238 2019-03-08 20:13:09 +01:00
ardnew
c43d107310 merge https://github.com/rivo/tview into list-spanhighlight, resolving conflicts for rivo/tview#220 2019-02-20 11:06:48 -06:00
ardnew
26ff9c763a renaming new struct field as requested in rivo/tview#220 2019-02-20 10:58:59 -06:00
Oliver
84fdb36408 Fixed confusing comments. Fixes #231 2019-01-24 13:01:53 +01:00
Oliver
0a179573ae Improved List scrolling (using an offset member variable). Fixes #217 2019-01-23 21:40:01 +01:00
Oliver
bbe0f17f96 Added FindItems() and InsertItem() to List. Also allowed negative indices for some List functions. Resolves #213, resolves #215 2019-01-12 21:22:58 +01:00
ardnew
e0f6e89550 change: added option to span selection highlight across width of list view 2019-01-03 00:51:11 -06:00
Oliver
08411f6e81 Added an option to List which hides the selection when List has no focus. Resolves #193 2018-11-26 11:00:48 +01:00
Oliver
2590cd6434 Added RemoveItem() function to List. Resolves #158 2018-09-05 12:57:35 +02:00
Oliver
7afc7ac893 Index out of range bugfix. Fixes #101 2018-05-18 23:46:33 +02:00
Rob Warner
2899c719ca Fix panic with empty list 2018-05-09 18:13:40 -04:00
Oliver
f291602d9a Added functions to retrieve and set a list item's texts. Resolves #102 2018-04-19 21:17:13 +02:00
Oliver
761e3d72da Added Primitive demo to go along with the GitHub Wiki entry on how to create your own primitive. 2018-03-19 21:25:30 +01:00
Oliver
b357eaf10f Drop-down allows typing to directly jump to options. Resolves #77 2018-03-18 20:42:51 +01:00
Oliver
7e4958256f List (and therefore also DropDown) will scroll if currently selected item is not on screen anymore. Fixes #71 2018-03-11 09:51:15 +01:00
Oliver
4db30f9ed4 "FieldLength" is now "FieldWidth" everywhere for clarity and consistency. Sorry for this breaking change. It is better in the long run. 2018-01-17 21:17:59 +01:00
Oliver
258f212e5e Added color tag functionality to all strings. Resolves #25 2018-01-17 17:13:36 +01:00
Oliver
626453b2a6 All primitives now offer a way to intercept all key events sent to them. Also made the global key event intercept handler more general/consistent. Resolves #22 2018-01-14 21:29:34 +01:00
Oliver
61d8ea30f8 Added support for wide unicode characters (e.g. Chinese). Resolves #9 2018-01-11 15:45:52 +01:00