PixelUI Architecture

This page does not list every member of every class. It provides the most important mental model for the framework.

PixelUI architecture overview

Time updates and input events enter PixelUI, while renderer() advances managers and composes the final frame. The bottom of the diagram shows input priority: once a layer consumes an event, it is not passed any further.

PixelUI

PixelUI is the central entry point. It owns or connects:

  • the U8g2 display object;
  • UiDeadlineScheduler and the discrete timed states registered with it;
  • AnimationManager and PopupManager;
  • ViewManager, CoroutineScheduler, and FocusManager;
  • platform refresh, render-wakeup, and input callbacks;
  • the internal millisecond clock and fade state.

Time updates

Time enters PixelUI first. process() advances due state and marks the UI dirty, then renderer() composes any required frame. Except for tickFromISR(), every PixelUI API belongs to the same UI task. See Event-driven rendering for the complete rules.

Input priority

  1. PixelUI’s FocusManager first handles Widget navigation and the active Widget.
  2. The input route installed by ViewManager then passes the event to the active Popup.
  3. When no Popup exists, the event reaches the App at the top of the stack.
  4. Input is rejected while a page transition is being committed.

This order avoids duplicating Popup and Focus preemption logic in every App.

Drawing order

renderer() first draws the current IDrawable, normally the top App, then draws the Popup and finally the Focus cursor. Fade is a PixelUI-level page transition. ViewManager calls the pending App’s onEnter() only after the fade completes.

最新文章
网站信息
文章数目 :
1
本站访客数 :
本站总浏览量 :
最后更新时间 :