Repository navigation
Releases: gavinhsmith/titrmlib
Release list
v0.4.2
titrmlib v0.4.2
Format strings for titles, list items and labels without linking the C library's printf.
New
term_snprintfandterm_vsnprintf: format into your own buffer with titrmlib's formatter, e.g.term_snprintf(title, sizeof title, "Password: %s", ssid). They follow C'ssnprintfrules: at mostsize - 1characters plus a terminator, and they return the full length. Usingsnprintfitself would link CEdev's printf again, about 8 KB.
No API changes. titrm.h now includes <stdarg.h>.
Using titrmlib
-
Unzip
titrmlib-v0.4.2.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/
v0.4.1
titrmlib v0.4.1
Less RAM and smaller programs, with no API changes.
Improved
- About 7.6 KB less RAM: screens are composed a row at a time instead of in a second copy of the screen (−6.2 KB), input buffers are allocated per input instead of in every panel (−1.2 KB), and scene and overlay panels store less.
- Smaller panel pool if you want it: build with e.g.
-DTERM_MAX_PANELS=12to save about 80 bytes per panel you don't need. The default is still 32. - Smaller demo: it avoids
snprintf, so the C library's printf (~8 KB) isn't linked. Useterm_text_appendfandterm_panel_printfin your own programs for the same saving. - Screens are drawn exactly as before.
Using titrmlib
-
Unzip
titrmlib-v0.4.1.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/
v0.4.0
titrmlib v0.4.0
Text formatting: styles, inline styles and tabs, plus smaller programs.
New
- Text styles:
TERM_ATTR_BOLD,TERM_ATTR_ITALIC,TERM_ATTR_UNDERLINEandTERM_ATTR_STRIKE, combinable with each other and with reverse video, anywhere an attribute works, including focus highlights. Underline and strikethrough join across cells. - Inline styles: style part of a string with
TERM_S_BOLD,TERM_S_NORMALand friends:"press " TERM_S_BOLD "enter" TERM_S_NORMAL " to connect". Works in printed text, text widgets, logs, list items and labels. - Tabs:
'\t'moves to the next stop, every 4 columns. - Smaller programs:
term_panel_printfandterm_text_appendfuse titrmlib's own formatter instead of the toolchain's printf, saving about 6 KB when your program doesn't use printf itself. It supports%d %u %x %X %c %s %%,land widths; output is no longer cut off at 106 characters.
Breaking changes
'\t'(0x09) and ESC (0x1B) are control codes, so their CP437 glyphs (○ and ←) can't be printed.- printf floats, precision and
%pare no longer supported; they print as written.
Using titrmlib
-
Unzip
titrmlib-v0.4.0.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/
v0.3.0
titrmlib v0.3.0
The full 256-character set: codes outside printable ASCII now follow code page 437, the IBM PC character set.
New
- Every code has a glyph: box drawing (single and double lines), blocks and shades, accented letters, Greek and math symbols.
- Joined lines: box drawing and blocks (0xB3–0xDF) join across cells.
- Signal icons stay at 0x13–0x16, so
TERM_CH_SIG0 + levelstill works.
Breaking changes
TERM_CH_CHECK,TERM_CH_CROSSMARK,TERM_CH_DOTandTERM_CH_DOT_EMPTYare removed; the checkbox shows[x]. OtherTERM_CH_*names keep their meaning at their CP437 codes.
Using titrmlib
-
Unzip
titrmlib-v0.3.0.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/
v0.2.0
titrmlib v0.2.0
A rework of rendering and input, plus scenes, overlays, new widgets and color.
New
- Faster screen updates: each panel keeps what was printed into it, and only cells that changed are redrawn. A typical update takes under 50 ms.
- No lost key presses: keys are queued, and the keypad is read even while a slow frame is drawing.
- Scenes: several full-screen layouts, one shown at a time, each with its own event handler (
term_scene_new,term_scene_switch). - Overlays: dialogs drawn on top of a scene, which give focus back when they close (
term_overlay_open,term_overlay_open_centered). - Widgets: new button and checkbox widgets. The text widget now scrolls and can follow new output, so it also works as a log.
- Custom widgets: give any panel your own key handling (
term_panel_set_keys) and send your own events (term_panel_send). Panels also get alignment, a focus style and an[enter]-to-submit option. - Color: foreground and background colors per panel (
term_panel_set_colors,TERM_COLOR_*). Panels split from a colored panel start with its colors. - Events: new
TERM_EV_CHANGE,TERM_EV_FOCUS_LOST,TERM_EV_SCENE_ENTERandTERM_EV_SCENE_LEAVE.
Breaking changes
- Focus is now controlled by the app.
term_focus_nextis removed, and[vars]arrives asTERM_KEY_VARS; callterm_focusyourself. - The log widget is removed; use a text widget with
term_text_appendandterm_text_autoscroll. term_panel_set_drawis removed. Output stays until you change it, so print when your state changes.- The event handler now returns
bool:trueif it handled the event. - The keypad is read with keypadc, so the CE C libraries must be on the calculator.
Using titrmlib
-
Unzip
titrmlib-v0.2.0.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/
v0.1.0
Initial release of titrmlib! Create TUI-styled UI's on your TI-84 Plus CE.
Using titrmlib
-
Unzip
titrmlib-v0.1.0.zipinto your CEdev project'slib/folder, givinglib/titrmlib/. -
Add its sources to your project's makefile:
CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
-
#include "titrm.h"and build withmake.
Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.
API reference: https://gavinhsmith.github.io/titrmlib/