Expand description
Frame = Buffer + metadata for a render pass.
The Frame is the render target that Model::view() methods write to.
It bundles the cell grid (Buffer) with metadata for cursor and
mouse hit testing.
§Design Rationale
Frame does NOT own pools (GraphemePool, LinkRegistry) - those are passed separately or accessed via RenderContext to allow sharing across frames.
§Usage
use ftui_render::frame::Frame;
use ftui_render::cell::Cell;
use ftui_render::grapheme_pool::GraphemePool;
let mut pool = GraphemePool::new();
let mut frame = Frame::new(80, 24, &mut pool);
// Draw content
frame.buffer.set_raw(0, 0, Cell::from_char('H'));
frame.buffer.set_raw(1, 0, Cell::from_char('i'));
// Set cursor
frame.set_cursor(Some((2, 0)));Structs§
- Frame
- Frame = Buffer + metadata for a render pass.
- HitCell
- A single hit cell in the grid.
- HitGrid
- Hit testing grid for mouse interaction.
- HitId
- Identifier for a clickable region in the hit grid.
- Widget
Budget - Widget render budget policy for a single frame.
- Widget
Signal - Per-widget scheduling signals captured during rendering.
Enums§
- Cost
Estimate Source - Source of the cost estimate for widget scheduling.
- HitRegion
- Regions within a widget for mouse interaction.
Type Aliases§
- HitData
- Opaque user data for hit callbacks.