Commit Graph

55 Commits (c5b1a7d8182083ba32f8341c2a3bcd4dbf9e44c7)

Author SHA1 Message Date
Oliver c5b1a7d818 Finished Image implementation. 1 year ago
Oliver 1480dc5b05 Fixed mouse focus issue in List. Fixes #773 2 years ago
Oliver f5cddba6f0 Fixed out of bounds error in List. Fixes #480 2 years ago
Oliver cecb44578c Setting focus is now based on a "mouse down" event instead of a "click" event. 2 years ago
Oliver 3bcc8f325a Added List methods to set styles in addition to colors. See #611 2 years ago
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>
3 years ago
Oliver ae9464cc35 Upgraded printing and style handling to the new definition of tcell.ColorDefault. 3 years ago
Oliver dfabe788d4 Allowing list items to shift horizontally. Resolves #512, fixes #513 3 years ago
Oliver 675ed5b96b Removed Focusable interface. 4 years ago
Oliver e4d167311d Upgraded to latest tcell version. Results in a minor incompatibility in the Table class. 4 years ago
rivo ba71c7df7c
Merge pull request #418 from abitrolly/patch-2
Use List height for scrolling with PgUp/PgDn
4 years ago
Oliver f395cf6e33 Added mouse scrolling to List, Table, TextView, and TreeView. 4 years ago
Oliver 9af6826328 Added/fixed comments, some structural changes/bugfixes for mouse support. Table, TextView, and TreeView still open. Closes #363 4 years ago
rivo 160d8fda1d
Merge pull request #363 from millerlogic/mouse-support
Mouse support
4 years ago
Anatoli Babenia 37ec5d08a6
Use List height for scrolling with PgUp/PgDn
Fixes #417.
4 years ago
Chris Miller 1fb9862c00 Separate action events 4 years ago
Oliver ba670d23ba The inner area of a Box does not clamp to screen borders anymore. Consequently added some drawing optimization to primitives. Resolves #405 4 years ago
Trevor Slocum babee1042c Fix panic when navigating empty list
Resolves #407.
4 years ago
Chris Miller 8abbf770ec Change mouse handler func 4 years ago
Chris Miller 9598ca2519 New mouse design
capture bool not finalized
4 years ago
Oliver 6e00e540f2 Added a wrap-around flag to the List. Resolves #380 4 years ago
Chris Miller cd3c60e6d1 Refactor EventMouse 5 years ago
Chris Miller 93c0edc4a8 Get mouse actions rather than just mouse state 5 years ago
Chris Miller d891191b78 Fire Selected on list item click 5 years ago
Chris Miller d7250288e2 More mouse handling for primitives 5 years ago
Oliver f63eca142c List changed event was not fired when SetCurrentItem() was called. Fixes #315 5 years ago
Oliver 8d5eba0c2f Replaced runewidth.StringWidth() with my own implementation. Fixes #236 5 years ago
Oliver 03d744dee3 SetOffset() also turns off end-tracking in Table. Fixes #238 5 years ago
ardnew c43d107310 merge https://github.com/rivo/tview into list-spanhighlight, resolving conflicts for rivo/tview#220 5 years ago
ardnew 26ff9c763a renaming new struct field as requested in rivo/tview#220 5 years ago
Oliver 84fdb36408 Fixed confusing comments. Fixes #231 5 years ago
Oliver 0a179573ae Improved List scrolling (using an offset member variable). Fixes #217 5 years ago
Oliver bbe0f17f96 Added FindItems() and InsertItem() to List. Also allowed negative indices for some List functions. Resolves #213, resolves #215 5 years ago
ardnew e0f6e89550 change: added option to span selection highlight across width of list view 5 years ago
Oliver 08411f6e81 Added an option to List which hides the selection when List has no focus. Resolves #193 6 years ago
Oliver 2590cd6434 Added RemoveItem() function to List. Resolves #158 6 years ago
Oliver 7afc7ac893 Index out of range bugfix. Fixes #101 6 years ago
Rob Warner 2899c719ca Fix panic with empty list 6 years ago
Oliver f291602d9a Added functions to retrieve and set a list item's texts. Resolves #102 6 years ago
Oliver 761e3d72da Added Primitive demo to go along with the GitHub Wiki entry on how to create your own primitive. 6 years ago
Oliver b357eaf10f Drop-down allows typing to directly jump to options. Resolves #77 6 years ago
Oliver 7e4958256f List (and therefore also DropDown) will scroll if currently selected item is not on screen anymore. Fixes #71 6 years ago
Oliver 4db30f9ed4 "FieldLength" is now "FieldWidth" everywhere for clarity and consistency. Sorry for this breaking change. It is better in the long run. 6 years ago
Oliver 258f212e5e Added color tag functionality to all strings. Resolves #25 6 years ago
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 6 years ago
Oliver 61d8ea30f8 Added support for wide unicode characters (e.g. Chinese). Resolves #9 6 years ago
Oliver 2874294d89 Added Styles variable with default colors for primitives. 6 years ago
Oliver e4f97a6436 Added links to Wiki to documentation. Also replaced screenshot with GIF screencast. 6 years ago
Oliver 7b5ab63e8c List selections should be visible even when they don't have focus. Also added screenshot for Postgres demo. 6 years ago
Oliver 997b92f1b4 More callback handlers for lists. And more consistency. 7 years ago