Skip to main content

Crate azul_layout

Crate azul_layout 

Source
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 via strfmt.
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=1 for 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 image crate). Image decoding and encoding utilities, wrapping the image crate 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 probe feature 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, Hash for a Callback with a .cb field.

Structs§

FcFontRegistry
Thread-safe, incrementally-populated font registry.
FullHitTest
Complete hit-test result across all DOMs, including the currently focused node.
IconProviderHandle
Icon provider stored in AppConfig.

Enums§

CmapTarget
Target cmap format to use when subsetting
OptionIconProviderHandle

Functions§

font_ref_to_parsed_font
Recovers a reference to the ParsedFont stored inside a FontRef.
parse_font_fn
Parses raw font bytes into a FontRef suitable for use in the layout system.
parsed_font_to_font_ref
Wraps a ParsedFont in a FontRef, transferring ownership to the returned handle.
resolve_icons_in_styled_dom
Resolve all Icon nodes in a StyledDom to their actual content.

Type Aliases§

IconResolverCallbackType
Callback type for resolving icon data to a StyledDom.