Commit Graph

6 Commits

Author SHA1 Message Date
Joe Wilm 1a7eda7b05
Terminal sets more attributes on grid Cells 2016-06-06 17:43:14 -07:00
Joe Wilm cdea958e71
Add support for drawing background colors 2016-06-06 16:54:15 -07:00
Joe Wilm 6636cf6b9f
Minor updates to terminal handling
Properly handles goto_col and goto_row. Additionally, input wrapping is
handled.

Truecolor specs are now set appropriately.
2016-06-06 15:13:45 -07:00
Joe Wilm 4fdd5280f1
Add iterator methods to Grid and Row types
The iterator methods simplify logic in the main grid render function. To
disambiguate iterator methods from those returning counts (and to free
up names), the `rows()` and `cols()` methods on `Grid` have been renamed
to `num_rows()` and `num_cols()`, respectively.
2016-06-04 19:40:30 -07:00
Joe Wilm 2f98871b02
Refactor renderer functions out of main.rs
This moves the rendering logic to draw the grid, to draw strings, and to
draw the cursor into the renderere module. In addition to being an
organizational improvement, this also allowed for some optimizations
managing OpenGL state. Render times for a moderate screen of text
dropped from ~10ms to ~4ms.
2016-06-02 20:27:07 -07:00
Joe Wilm 30ec145109
Initial support for Terminal Emulation (woo!)
This patch introduces basic support for terminal emulation. Basic means
commands that don't use paging and are not full screen applications like
vim or tmux. Some paging applications are working properly, such as as
`git log`. Other pagers work reasonably well as long as the help menu is
not accessed.

There is now a central Rgb color type which is shared by the renderer,
terminal emulation, and the pty parser.

The parser no longer owns a Handler. Instead, a mutable reference to a
Handler is provided whenever advancing the parser. This resolved some
potential ownership issues (eg parser owning the `Term` type would've
been unworkable).
2016-06-02 19:42:28 -07:00