Commit Graph

5 Commits

Author SHA1 Message Date
Glen Whitney 253062e906 Add commands to edit color and add color rendering in terminal teapot
Now the foreground and background color can be set and displayed in
  either user interfaces, which finishes off #21.
  Closes #21.
2019-08-28 23:19:08 -07:00
Glen Whitney 96079b210e Make tpa the default file format for Teapot
There turned out to be one blocking technical issue for full adpotion of
  tpa format, and that was the fact that the printed representation of
  floating values inside the tpa file might not reproduce the same double
  when read. This change therefore introduces the "hexact" floating point
  format, based on the the %La format string, which produces a hex
  representation with exact round trips. While working on this, it was
  convenient to add a new representation "compact" which is basically the
  shorter of decimal and scientific representations, without trailing zeros.
  This is now the default float format, but of course one can select decimal
  or scientific formats to restore prior appearance. However, full-precision
  compact format is now the (only) format for editing cell contents, as it
  is accurate and efficient. Of course you can enter floating point values
  in any format you like when typing in a formula.

  The addition of several new floating point options overloaded the menus
  in terminal teapot, so this change also revamps those menus slightly,
  including eliminating the unused MenuChoice struct, and just specifying menus
  with an array of strings.

  Closes #63.
2019-08-24 09:58:46 -07:00
Glen Whitney 25bb787f08 Prepare for per-cell configurable colors
So far, this jst consists of initializing color in curses mode, and making
  the display start and end part of intializing and freeing a sheet (so that
  it can control allocating the palette, for example, where the data structure
  used depends on what kind of display it is.

  Next up will be to allocate and destroy the color palette, and set up the
  default colors for cells to use (0 for foreground,
  TEAPOT_WHITE for background.) The outline beyond that is to allow setting of
  the cell colors, then actually display those colors, and finally edit the
  palette.
2019-07-29 11:35:10 -04:00
Glen Whitney 39c12c08e0 Implement a fill-with menu item
This new option fills the entire marked region with copies of the current cell.
  Implements #35.
2019-07-27 04:08:42 -04:00
Glen Whitney ea230efc23 Move source code into subdirectory
Also removed a stray copy of the automatically generated config.h which
  had somehow gotten into the distribution. Closes #36.
2019-07-27 01:35:44 -04:00