pdwidgets
pdwidgets
Provides a collection of widgets for creating graphical user interfaces on embedded systems. It includes base classes for widgets, as well as specific widgets such as buttons, labels, sliders, and more.
Core (always imported): Display, Screen, Task, Widget, themes, constants.
Widgets load lazily via __getattr__ so MCU images only pay for modules you
touch. Lean path:
from pdwidgets.widgets.button import Button
Convenience:
import pdwidgets as pd
pd.Button(...) # imports widgets.button on first access
See widget-dependencies.md for the peer import graph.
- Proportional fonts:
Label(and widgets built on it) gains proportional-font rendering when afontmodule is supplied. That path uses the privatepdwidgets._write_fonthelper (fonts fromwrite_font_converter).- Timer architecture:
pdwidgets owns no timer of its own. Each
Displaywires itself into the sharedappdev.Appat construction. Apps just build the UI; the app keeps itself alive past the end of the script.
- pdwidgets.DEBUG = False
When
True, enable extra debug logging in pdwidgets.
- pdwidgets.MARK_UPDATES = False
When
True, draw a colored border around flushed areas.