How wwrrj/hydrogenui works
HydrogenUI is an embedded C++ UI framework: an application loop updates widgets and a smoothed camera, renders through a hardware-independent graphics layer, then refreshes a display through a HAL. The README also documents adaptive scrolling lists, FPS monitoring, UTF-8 text, and a one-line U8g2 deployment helper. The sampled sources show list, widget, graphics, application, and U8g2 behavior; FPS implementation was not sampled, and the README’s Button capability is not evident in the supplied source.
Main entry points: app.cpp Application Manager · list.cpp Adaptive List · widget.cpp Widget Library · graphics.cpp Graphics Engine
Components 13
Application Core
- U8g2 Deploy
src/HydrogenUI.h - Application Manager
src/core/app.cpp - Virtual Camera
src/core/camera.h
UI Components
- Adaptive List
src/ui/list.cpp - Widget Library
src/ui/widget.cpp - FPS Counter
src/ui/fps_counter.h
Rendering
- Graphics Engine
src/core/graphics.cpp
Display Hardware
- Display HAL
src/hal/hal.h - U8g2 Adapter
src/hal/hal_u8g2.h
Other components
- Application Developer
- Embedded Main Loop
- U8g2 Driver
- Embedded Display
Connections 18
- Application Developer → U8g2 Deploy: calls optionally
- U8g2 Deploy → Application Manager: initializes
- Application Developer → Application Manager: adds widgets
- Embedded Main Loop → Application Manager: calls update
- Application Manager → Virtual Camera: updates
- Application Manager → Graphics Engine: sets camera
- Application Manager → Display HAL: clears and refreshes
- Application Manager → Widget Library: updates and draws
- Application Manager → Adaptive List: updates and draws
- Adaptive List → Virtual Camera: sets target and reads position
- Adaptive List → Graphics Engine: draws and measures text
- Adaptive List → Widget Library: updates and draws items
- Widget Library → Graphics Engine: draws controls
- FPS Counter → Widget Library: extends widget API
- Graphics Engine → Display HAL: draws pixels and text
- Display HAL → U8g2 Adapter: implemented by
- U8g2 Adapter → U8g2 Driver: invokes driver
- U8g2 Driver → Embedded Display: updates display