How mateusgpe/tkblend works
tkblend is a Tkinter vector-UI toolkit combining Python widgets and drawing APIs with a Blend2D C++ renderer. The main user workflow is to build or update a widget/canvas, draw through a Surface, then display the result in Tkinter; the README documents direct zero-copy blitting. Separate capabilities include themes, font/icon support, a CustomTkinter bridge, and PrismTK’s markup-to-rendering stack. Source excerpts and the index support the Python module relationships; several native and widget details are documented but not sampled, so those links are identified as documented or left unasserted.
Main entry points: surface.py Drawing Surface · widget.py PrismTK Widget · base.py Widget Base · dom.py Scene DOM
Components 29
Tkinter UI
- Public API
tkblend/__init__.py - Vector Widgets
tkblend/widgets - Widget Base
tkblend/widgets/base.py - BlendCanvas
tkblend/canvas.py - Data Table
tkblend/widgets/table.py - Interactive Inputs
tkblend/widgets/inputs.py
Vector Rendering
- Drawing Surface
tkblend/surface.py - Native Bindings
src/bindings.cpp - Blend2D Rasterizer
src/surface.cpp - Native Blitting
src/blit/blit_backend.h - Shadow Engine
src/shadow_engine.cpp
Style and Assets
- Theme Manager
tkblend/theme.py - Style Engine
src/style_engine.cpp - Default Styles
src/default_styles.hpp - Font Support
tkblend/font.py - Native Font Manager
src/font_manager.cpp - Font Resolver
src/font/font_resolver.hpp - Icon Registry
tkblend/icons.py
PrismTK
- PrismTK Widget
tkblend/prismtk/widget.py - Markup Parser
tkblend/prismtk/parser.py - Scene DOM
tkblend/prismtk/dom.py - CSS Styles
tkblend/prismtk/css.py - Layout Engine
tkblend/prismtk/layout.py - Event Handling
tkblend/prismtk/events.py - Render State
tkblend/prismtk/state.py - Prism Renderer
tkblend/prismtk/render.py
Compatibility
- CustomTkinter Bridge
tkblend/ctk
Other components
- Application Developer
- Tkinter Display
Connections 38
- Application Developer → Public API: uses API
README.md - Public API → Vector Widgets: exports widgets
tkblend/__init__.py - Application Developer → BlendCanvas: creates canvas
README.md - Vector Widgets → Widget Base: uses base
tkblend/widgets/inputs.py - Data Table → Widget Base: uses base
tkblend/widgets/table.py - Interactive Inputs → Widget Base: uses base
tkblend/widgets/inputs.py - Widget Base → Drawing Surface: draws with
tkblend/widgets/base.py - BlendCanvas → Drawing Surface: draws with
tkblend/canvas.py - Data Table → Drawing Surface: draws with
tkblend/widgets/table.py - Interactive Inputs → Drawing Surface: draws with
tkblend/widgets/inputs.py - Drawing Surface → Native Bindings: calls bindings
- Native Bindings → Blend2D Rasterizer: dispatches rendering
- Blend2D Rasterizer → Native Blitting: blits pixels
README.md - Native Blitting → Tkinter Display: updates display
README.md - Widget Base → Theme Manager: reads palette
tkblend/widgets/base.py - Widget Base → Style Engine: resolves style
tkblend/widgets/base.py - Style Engine → Default Styles: loads defaults
src/style_engine.cpp - Theme Manager → Style Engine: registers theme
tkblend/theme.py - Theme Manager → Font Support: syncs fonts
tkblend/theme.py - Drawing Surface → Icon Registry: looks up icons
tkblend/surface.py - Drawing Surface → Font Support: uses fonts
tkblend/surface.py - Native Font Manager → Font Resolver: resolves fonts
src/font_manager.cpp - Application Developer → PrismTK Widget: builds scene
README.md - PrismTK Widget → Markup Parser: parses markup
tkblend/prismtk/widget.py - Markup Parser → Scene DOM: creates nodes
tkblend/prismtk/parser.py - PrismTK Widget → CSS Styles: loads styles
tkblend/prismtk/widget.py - CSS Styles → Scene DOM: styles nodes
tkblend/prismtk/css.py - PrismTK Widget → Layout Engine: computes layout
tkblend/prismtk/widget.py - Layout Engine → Scene DOM: positions nodes
tkblend/prismtk/layout.py - PrismTK Widget → Event Handling: routes events
tkblend/prismtk/widget.py - Event Handling → Scene DOM: updates states
tkblend/prismtk/events.py - PrismTK Widget → Render State: tracks state
tkblend/prismtk/widget.py - PrismTK Widget → Prism Renderer: renders scene
tkblend/prismtk/widget.py - Prism Renderer → Drawing Surface: draws with
tkblend/prismtk/render.py - Prism Renderer → Scene DOM: reads nodes
tkblend/prismtk/render.py - Prism Renderer → Render State: reads state
tkblend/prismtk/render.py - CustomTkinter Bridge → Drawing Surface: accelerates drawing
README.md - Drawing Surface → Shadow Engine: renders shadows