Commit graph

14 commits

Author SHA1 Message Date
Jeffas
3b09c07e7a Add clickable tabs
This introduces a new interface `Clickable`. I'd imagine this would be
implemented for most widgets eventually and would allow for programs run
in the terminal to also have their mouse events forwarded to them.

For the tabs it was relatively simple to check that the position of the
click is within the boxes for the tabs. For other components I'd imagine
that some state representing their currently drawn bounding box would be
useful.
2019-07-11 19:45:53 -04:00
Kevin Kuehler
a54f4adb8f lib/ui/tab: Add Replace method
Also expose a light wrapper method in aerc.go for tab replacement

Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
2019-06-11 09:34:45 -04:00
Drew DeVault
207ecc39cd Fix #116 2019-06-03 07:56:08 -04:00
Reto Brunner
92b10fcef5 Add Tabs history
Fixes #77: When closing a tab, bring you back to the one you last had focused
2019-06-02 14:22:04 -04:00
Drew DeVault
2c486cb7f5 Update tab name as subject changes
Also moves truncation to the tab widget
2019-05-14 16:18:59 -04:00
Drew DeVault
84965d680c Use tcell.Style.Reverse instead of black on white 2019-03-30 12:59:18 -04:00
Drew DeVault
dee0f8938b Add :term-close 2019-03-17 17:23:53 -04:00
Drew DeVault
589db742cb Move exline handling up to aerc, add :term 2019-03-17 16:19:15 -04:00
Drew DeVault
a0c2b1caf0 Implement the Container interface in lib/ui/ 2019-01-20 15:06:44 -05:00
Markus Ongyerth
2f5c1db63c refactor lib/ui/tab to ensure staying in bounds
Fix a few potential out of bounds by placing proper checks, which should
be relevant if all tabs are removed for some reason.

Also avoid iterating all tabs in the invalidate handler, since we are
only interested in whether it's the selected tab either way
2018-06-13 07:00:12 -04:00
Drew DeVault
dc90be24de Fix tab invalidation bugs 2018-06-11 20:13:02 -04:00
Drew DeVault
e463c38476 Use default color for selected tab 2018-06-07 13:43:17 -04:00
Markus Ongyerth
80e891a802 switch to tcell from termbox
This is a simple mostly straight forward switch to tcell in favor of
termbox.
It uses the tcell native api (not the compat layer) but does not make
use of most features.

Further changes should include moving to tcell's views.TextArea and the
general built in widget behaviour instead of the current ad hoc
implementation.

Regression: Cursor isn't shown in ex-line
2018-06-01 16:04:43 -07:00
Drew DeVault
1418e1b9dc Split UI library and widgets 2018-02-26 22:54:39 -05:00
Renamed from ui/tab.go (Browse further)