A TUI library for home TUI-based projects
All pmh-* fonts are taken from: https://github.com/PhMajerus/FIGfonts
- Pass custom on/off text to checkbox
- Text box text should fit the box (render last letters)
- Memory Leaks:
- Implement
ui_destroyto free the UI context and its controls - Implement
dispose_texturesinncurses_io.c - Close file descriptor on error paths in
load_figlet_texture - Check for allocation failure of
t->texturesinallocate_texture_atlas
- Implement
- Buffer Overflows & Safety:
- Add bounds checking against
box->text_buf_lenwhen typing in textboxes - Replace unsafe
strcpywithstrncpyinui_click_textboxandui_switch_mode_and_swap - Add bounds checking (or resizable array) for
ui_controlsinui_add_control
- Add bounds checking against
- CPU & Performance:
- Optimize the main loop to only redraw the screen when state changes or on resize
- UTF-8 Support:
- Use visual character width (e.g.
wcwidth) instead ofstrlenfor border rendering and text alignment - Scan backward on backspace (
DEL) to delete full UTF-8 multi-byte characters
- Use visual character width (e.g.
- Keyboard Navigation:
- Enable
keypad(stdscr, TRUE)inrender_init - Support Arrow keys,
Tab, andShift+Tabfor navigation
- Enable