Public Access
Steps 5 and 6 of M0. - lib/ui (host-tested): ListModel, LineEditor (UTF-8, byte-limited), wrapText, ToastQueue, DialogModel - lib/input (host-tested): KeyMapper turns keyboard state into logical keys (Fn arrows, ` Back, Fn+` Home) and composes accents with opt - src/ui: off-screen 16-bit frame pushed in one transfer (fixes the flicker), Status Bar, list, text, line editor, dialog, Toast widgets, Notifier (Toast + beep + LED), vendored public-domain Latin-1 fonts - Apps: minimal Launcher, Widget demo, Diagnostics (SD erase now behind a confirmation dialog) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
16 lines
463 B
C++
16 lines
463 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace roro {
|
|
|
|
using MeasureText = std::function<int(const std::string&)>;
|
|
|
|
// Splits UTF-8 text into lines no wider than maxWidth: breaks at spaces when possible, inside
|
|
// words only when a word alone is too wide, never inside a character. '\n' forces a break.
|
|
std::vector<std::string> wrapText(const std::string& text, int maxWidth, const MeasureText& measure);
|
|
|
|
} // namespace roro
|