6 ex_gui_kvtable_8c example
gullradriel edited this page 2026-10-09 00:55:18 +02:00

ex_gui_kvtable.c

N_GUI_KVTABLE adaptive-resize regression test. Headless test (no display, builtin font) that exercises the kvtable layout across N_GUI_WIN_RESIZE_SCALE display resizes and clear/add cycles. Asserts:

  • "+" button sits below the last active row at all sizes.
  • New rows added after a resize match the height of previously scaled rows.
  • After clear-all + add, the "+" button does not overlap the "Key" header label.
  • n_gui_kvtable_clear() + repopulate reuses freed row slots instead of growing nb_rows (no unbounded widget accumulation on reload).
  • n_gui_kvtable_set_columns(0,0,0) single-column mode: value, description and enabled widgets (and headers) are hidden and the key column widens to fill the row; set_placeholders is applied.