Expand description
Layout crate for the Azul GUI framework.
Provides the layout solver (solver3), text shaping (text3), font
management (font), hit testing, page fragmentation, and widget support.
Integrates with azul-core for DOM types and azul-css for style
properties.
Re-exports§
pub use fmt::FmtArg;pub use fmt::FmtArgVec;pub use fmt::FmtArgVecDestructor;pub use fmt::FmtValue;pub use fmt::fmt_string;pub use file::dir_create;pub use file::dir_create_all;pub use file::dir_list;pub use file::dir_delete;pub use file::dir_delete_all;pub use file::file_copy;pub use file::path_exists;pub use file::file_metadata;pub use file::file_read;pub use file::file_delete;pub use file::file_rename;pub use file::file_write;pub use file::path_is_dir;pub use file::path_is_file;pub use file::path_join;pub use file::temp_dir;pub use file::DirEntry;pub use file::DirEntryVec;pub use file::DirEntryVecDestructor;pub use file::DirEntryVecDestructorType;pub use file::FileError;pub use file::FileErrorKind;pub use file::FileMetadata;pub use file::FilePath;pub use file::OptionFilePath;pub use zip::zip_create;pub use zip::zip_create_from_files;pub use zip::zip_extract_all;pub use zip::zip_list_contents;pub use zip::ZipFile;pub use zip::ZipFileEntry;pub use zip::ZipFileEntryVec;pub use zip::ZipPathEntry;pub use zip::ZipPathEntryVec;pub use zip::ZipReadConfig;pub use zip::ZipWriteConfig;pub use zip::ZipReadError;pub use zip::ZipWriteError;pub use icon::default_icon_resolver;pub use icon::ImageIconData;pub use icon::FontIconData;pub use icon::create_default_icon_provider;pub use icon::register_material_icons;pub use icon::register_embedded_material_icons;pub use font::parsed::FontParseWarning;pub use font::parsed::FontParseWarningSeverity;pub use font::parsed::FontType;pub use font::parsed::OwnedGlyph;pub use font::parsed::ParsedFont;pub use font::parsed::PdfFontMetrics;pub use font::parsed::SubsetFont;pub use fragmentation::BoxBreakBehavior;pub use fragmentation::BreakDecision;pub use fragmentation::FragmentationDefaults;pub use fragmentation::FragmentationLayoutContext;pub use fragmentation::KeepTogetherPriority;pub use fragmentation::PageCounter;pub use fragmentation::PageFragment;pub use fragmentation::PageMargins;pub use fragmentation::PageNumberStyle;pub use fragmentation::PageSlot;pub use fragmentation::PageSlotContent;pub use fragmentation::PageSlotPosition;pub use fragmentation::PageTemplate;pub use hit_test::CursorTypeHitTest;pub use paged::FragmentationState;pub use solver3::cache::LayoutCache as Solver3LayoutCache;pub use solver3::display_list::DisplayList as DisplayList3;pub use solver3::layout_document;pub use solver3::paged_layout::layout_document_paged;pub use solver3::LayoutContext;pub use solver3::LayoutError;pub use solver3::Result as LayoutResult3;pub use text3::cache::FontContext;pub use text3::cache::FontManager;pub use text3::cache::TextShapingCache;pub use text3::cache::TextShapingCache as TextLayoutCache;pub use window::CursorBlinkTimerAction;pub use window::LayoutWindow;pub use window::ScrollbarDragState;pub use window::TooltipTimerAction;pub use managers::text_input::PendingTextEdit;pub use managers::text_input::OptionPendingTextEdit;pub use hyphenation;
Modules§
- callbacks
- Callback handling for layout events (invocation, result processing). Callback handling for layout events
- cpurender
- CPU-based software rendering (no GPU required). CPU rendering for solver3 DisplayList
- default_
actions - Default keyboard actions (copy, paste, select-all, undo, etc.). Default Action Processing for Keyboard Events
- desktop
- Desktop platform helpers (file dialogs, notifications). Desktop-specific APIs (dialogs, file operations)
- event_
determination - Event determination: maps raw input to DOM node callbacks. Unified Event Determination
- extra
- Color parsing, XML DOM construction, and misc utilities. Utility functions for color parsing and XML DOM construction.
- file
- File system operations (C-compatible wrappers for
std::fs). File system operations module for C API - fmt
- C-compatible string formatting via
strfmt. C-compatible string formatting viastrfmt. - font
- Font parsing, metrics extraction, and subsetting. Font parsing, metrics extraction, and subsetting.
- font_
traits - Font traits available regardless of text layout feature. Font traits that are always available, regardless of text_layout feature.
- fragmentation
- CSS fragmentation engine for paged media (page/column breaks). CSS Fragmentation Engine for Paged Media
- glyph_
cache - Glyph path and cell cache for CPU text rendering. Glyph path and cell cache for CPU rendering.
- headless
- Headless backend for CPU-only rendering without a display server.
Used with
AZUL_HEADLESS=1for E2E testing, CI, and screenshot capture. Headless backend for CPU-only rendering without a display server. - hit_
test - Hit-testing: maps screen coordinates to DOM nodes. Hit-testing logic for layout windows
- icon
- Icon provider: resolves icons from Material Icons font, images, or ZIP packs. Default icon resolver implementations for Azul
- image
- Image decoding and encoding (wraps the
imagecrate). Image decoding and encoding utilities, wrapping theimagecrate with Azul’s FFI-compatible types (RawImage,RawImageFormat). - managers
- Scroll, hover, clipboard, cursor, and focus managers. Manager types responsible for stateful input and UI concerns.
- paged
- Paged media layout engine (infinite canvas with physical spacers). Paged media layout engine.
- probe
- Optional probe instrumentation. With the
probefeature off this is a tiny module of no-op stubs and pays zero cost. Optional fine-grained timing + RSS instrumentation. - scroll_
timer - Scroll physics timer for momentum-based smooth scrolling. Scroll physics timer callback — the core of the timer-based scroll architecture.
- solver3
- CSS layout solver: block, inline, flex, grid, and table formatting. solver3/mod.rs
- text3
- Text shaping, line breaking (Knuth-Plass), and inline formatting. Text layout and shaping system.
- thread
- Thread callback wrappers for the C API. Thread callback information and utilities for azul-layout
- timer
- Timer callback wrappers for the C API. Timer callback information and utilities for azul-layout
- widgets
- Built-in widgets: button, text input, tabs, tree view, node graph, etc. Built-in widgets for the Azul GUI system
- window
- Window layout management: relayout, event processing, state sync. Window layout management for solver3/text3
- window_
state - Window state types (keyboard, mouse, DPI, focus). Window state types for azul-layout
- xml
- XML and XHTML parsing for declarative UI definitions. XML/HTML parsing module for the Azul toolkit.
- zip
- ZIP file creation, extraction, and listing. ZIP file manipulation module for C API exposure
Macros§
- debug_
bfc_ layout - Lazy debug_bfc_layout macro - only evaluates format args when debug_messages is Some
- debug_
box_ props - Lazy debug_box_props macro - only evaluates format args when debug_messages is Some
- debug_
css_ getter - Lazy debug_css_getter macro - only evaluates format args when debug_messages is Some
- debug_
display_ type - Lazy debug_display_type macro - only evaluates format args when debug_messages is Some
- debug_
error - Lazy debug_error macro - only evaluates format args when debug_messages is Some
- debug_
ifc_ layout - Lazy debug_ifc_layout macro - only evaluates format args when debug_messages is Some
- debug_
info - Lazy debug_info macro - only evaluates format args when debug_messages is Some
- debug_
log - Lazy debug_log macro - only evaluates format args when debug_messages is Some
- debug_
table_ layout - Lazy debug_table_layout macro - only evaluates format args when debug_messages is Some
- debug_
warning - Lazy debug_warning macro - only evaluates format args when debug_messages is Some
- impl_
widget_ callback - Implements
Display, Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Hashfor a Callback with a.cbfield.
Structs§
- FcFont
Registry - Thread-safe, incrementally-populated font registry.
- Full
HitTest - Complete hit-test result across all DOMs, including the currently focused node.
- Icon
Provider Handle - Icon provider stored in AppConfig.
Enums§
- Cmap
Target - Target cmap format to use when subsetting
- Option
Icon Provider Handle
Functions§
- font_
ref_ to_ parsed_ font - Recovers a reference to the
ParsedFontstored inside aFontRef. - parse_
font_ fn - Parses raw font bytes into a
FontRefsuitable for use in the layout system. - parsed_
font_ to_ font_ ref - Wraps a
ParsedFontin aFontRef, transferring ownership to the returned handle. - resolve_
icons_ in_ styled_ dom - Resolve all Icon nodes in a StyledDom to their actual content.
Type Aliases§
- Icon
Resolver Callback Type - Callback type for resolving icon data to a StyledDom.