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_append;
pub use file::file_copy;
pub use file::path_exists;
pub use file::file_metadata;
pub use file::file_read;
pub use file::file_read_string;
pub use file::file_delete;
pub use file::file_rename;
pub use file::file_write;
pub use file::file_write_string;
pub use file::path_canonicalize;
pub use file::path_extension;
pub use file::path_file_name;
pub use file::path_is_dir;
pub use file::path_is_file;
pub use file::path_join;
pub use file::path_parent;
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 http::download_bytes;
pub use http::download_bytes_with_config;
pub use http::http_get;
pub use http::http_get_with_config;
pub use http::is_url_reachable;
pub use http::HttpError;
pub use http::HttpHeader;
pub use http::HttpRequestConfig;
pub use http::HttpResponse;
pub use http::HttpResponseTooLargeError;
pub use http::HttpResult;
pub use http::HttpStatusError;
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::register_image_icon;
pub use icon::register_font_icon;
pub use icon::register_icons_from_zip;
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 hit_test::CursorTypeHitTest;
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
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.
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.
hit_test
Hit-testing: maps screen coordinates to DOM nodes. Hit-testing logic for layout windows
http
HTTP client: GET/POST requests with pure-Rust TLS.
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: the FragmentationContext (continuous vs. paged) and page margins. The primitive types live in azul_core::paged; re-exported here so existing azul_layout::paged::* / crate::paged::* paths keep resolving. Paged-media primitives: the FragmentationContext (continuous vs. paged) and PageMargins. The pagination/slicing logic lives in azul_layout::solver3. Paged media layout primitives.
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
url
URL parsing (RFC 3986 compliant). Pure-Rust, always present (no TLS deps). URL types live in azul_core::url; re-exported so azul_layout::url::* keeps resolving. Url::parse/join are enabled via the http feature (which turns on azul-core/url). URL POD type (Url/UrlParseError); parsing gated behind the url feature. URL types for the C API.
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.
PageMargins
Canonical paged-media page margins (defined in paged). Page margins in points.
Url
A parsed URL
UrlParseError
Error when parsing a URL

Enums§

CmapTarget
Target cmap format to use when subsetting
OptionIconProviderHandle
ResultUrlUrlParseError

Functions§

az_mark
No-op const variant used when the web_lift feature is off.
az_mark_read
No-op const variant (returns 0) used when the web_lift feature is off.
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.