aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/context.go
Commit message (Collapse)AuthorAgeFilesLines
* vaxis: update to v0.7.2 and update ansi parserTim Culverhouse2024-02-121-14/+7
| | | | | | | | | | | | Update Vaxis to v0.7.2 to gain performance improvements and StyledString parsing. The Vaxis parser fully accounts for the terminal's capability to display wide characters. Use the Vaxis StyledString parser to parse and style ansi-encoded strings. Remove unneeded code and tests. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* terminal: replace tcell-term with vaxis terminalTim Culverhouse2024-02-121-14/+0
| | | | | | | | Replace tcell terminal with the vaxis terminal. The vaxis terminal is a port of tcell term. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* style: use vaxis style everywhereTim Culverhouse2024-02-121-4/+4
| | | | | | | Replace all tcell.Style objects with vaxis.Style objects Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* fill: replace tcell.Style with vaxis.StyleTim Culverhouse2024-02-121-2/+2
| | | | | | | Replace the Fill implementation with vaxis style objects Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: initialize vaxis directly, drop tcell.Screen initializationTim Culverhouse2024-02-121-1/+1
| | | | | | | | Use Vaxis library directly to initialize the UI, dropping the need for a tcell Screen implementation Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: remove screen and viewportsTim Culverhouse2024-02-121-44/+45
| | | | | | | | Remove references to tcell.Screen or views.Viewports. Convert Contexts and the core UI struct to use Vaxis objects only. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: create and expose vaxis Window with ContextTim Culverhouse2024-02-121-2/+11
| | | | | | | | | Create and expose a vaxis.Window object with each Context. vaxis.Windows are used for creating local coordinates (similar to the views.View API that tcell provides). Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: parse strings for ansi stylesTim Culverhouse2023-03-021-8/+11
| | | | | | | | | Parse UI strings for ANSI styles. If there are styles in the string, use those as the display style in tcell. This is in preparation for a template function which can apply arbitrary styles to UI elements. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: avoid panic when terminal window is shrunkJason Stewart2022-09-261-2/+4
| | | | | | | | | | | When using a tiling window manager, aerc terminal dimensions may be greatly reduced after a new window has been created by :open. When the ui attempts to render to formerly-valid coordinates, SetCell & Printf may panic. Replace panic() with no-op in both functions to prevent aerc from crashing after a window shrink. Signed-off-by: Jason Stewart <support@eggplantsd.com> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: export context.viewport, screen.show, add SetCursorStyleTim Culverhouse2022-09-141-0/+12
| | | | | | | | | | Export context.viewport for use in implementing tcell-term. Bump tcell version to enable SetCursorStyle feature. Add this function to the ui for future use with tcell-term. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* lint: apply new formatting rulesMoritz Poldrack2022-08-011-1/+2
| | | | | | | Run `make fmt`. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* update tcell to v2 and enable TrueColor supporty0ast2020-12-181-2/+2
| | | | | | | | | Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
* Add popoversBen Burwell2019-12-211-6/+17
| | | | | | | | | | | | A popover is a special UI element which can be layered over the rest of the UI (i.e. it is painted last) and can fall anywhere on the screen, not just with the bounds of its parent's viewport/context. With these special abilities comes the restriction that only one popover may be visible on screen at once. Popovers are requested from the UI context passed to Draw calls and specify the anchor point and the desired dimensions. The popover is then fit to the available space and placed relative to the anchor point.
* Add cursor handling in ex lineDrew DeVault2019-01-141-8/+9
|
* Apply gofmtDrew DeVault2018-06-111-4/+4
|
* Clean up some old codeDrew DeVault2018-06-111-7/+0
|
* switch to tcell from termboxMarkus Ongyerth2018-06-011-37/+49
| | | | | | | | | | | | | 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
* Split UI library and widgetsDrew DeVault2018-02-261-0/+109