Skip to main content

Crate xengui

Crate xengui 

Source

Re-exports§

pub use macros::WidgetContent;
pub use style::system_theme::SystemTheme;
pub use widget::Widget;
pub use widget::scaled_layout_box;
pub use widget_base::WidgetBase;
pub use animation::AnimKey;
pub use animation::AnimLayer;
pub use animation::AnimProperty;
pub use animation::AnimationManager;
pub use animation::animate_computed_style;
pub use hooks::component;
pub use hooks::use_effect;
pub use hooks::use_state;
pub use hooks::ComponentId;
pub use hooks::ComponentKey;
pub use hooks::EffectCleanup;
pub use hooks::EffectDeps;
pub use hooks::SetState;
pub use input::InputEvent;
pub use input::Key;
pub use input::KeyState;
pub use input::find_widget_mut;
pub use input::any_wants_animation;
pub use input::dispatch_animation_tick;
pub use dispatcher::Dispatcher;
pub use style::current_theme;
pub use style::set_active_theme;
pub use style::set_active_theme_by_name;
pub use style::BoxShadow;
pub use style::Color;
pub use style::Cursor;
pub use style::IntoThemed;
pub use style::Length;
pub use style::Border;
pub use style::Edges;
pub use style::Style;
pub use style::StyleBuilder;
pub use style::Theme;
pub use style::ThemeMode;
pub use style::FlexDirection;
pub use style::FlexWrap;
pub use style::FontStyle;
pub use style::FontWeight;
pub use style::Overflow;
pub use style::Overscroll;
pub use widgets::image_source_from_bytes;
pub use widgets::Button;
pub use widgets::IconPosition;
pub use widgets::Checkbox;
pub use widgets::ContextMenu;
pub use widgets::ContextMenuHandle;
pub use widgets::ContextMenuItem;
pub use widgets::Image;
pub use widgets::ImageSource;
pub use widgets::Label;
pub use widgets::ObjectFit;
pub use widgets::Svg;
pub use widgets::SvgCircleBuilder;
pub use widgets::SvgGroupBuilder;
pub use widgets::SvgLineBuilder;
pub use widgets::SvgPathBuilder;
pub use widgets::SvgRectBuilder;
pub use widgets::View;
pub use widgets::TextBox;
pub use widgets::Tooltip;
pub use widgets::TooltipPlacement;
pub use redraw::RedrawRequester;
pub use svg_compat::IntoSvgColor;
pub use widgets::image_source_from_path;
pub use layout::*;
pub use paint::*;
pub use style::*;
pub use input::*;
pub use interaction::*;
pub use text::*;
pub use constants::*;
pub use types::*;

Modules§

animation
constants
devtools
Minimal event-timeline recorder used to diagnose frame-timing issues (e.g. the borderless-window resize jitter on Windows). Any crate in the workspace can push timestamped events into it and dump them as a single ordered log at a convenient moment (e.g. WM_EXITSIZEMOVE).
dispatcher
hooks
input
interaction
layout
macros
paint
reconciler
Interruptible tree reconciler.
redraw
style
svg_compat
Bridges xen-svg’s framework-agnostic color type to xengui’s own Color. Lives here (not in xen-svg) since xen-svg must stay independent of xengui; the conversion trait is local to this crate so it doesn’t run into orphan-rule restrictions on either foreign type.
text
types
widget
widget_base
widgets

Macros§

impl_common_style_builders
impl_interaction_builders
impl_themed_style_builders
impl_widget_boilerplate
Generates the Widget trait accessor methods every base: WidgetBase + layout_box: LayoutBox widget needs (identity, dirty flag, style pointers, interaction, layout box). Widget-specific behavior (debug_name, children, measure, paint, event, …) is still implemented by hand next to this macro call.
pct
props
px
vh
view
view_props
vw

Structs§

AnimValue
Generic animatable payload; every property (color, scale, opacity…) is flattened into up to 4 floats so the manager can interpolate anything without knowing what it represents.
SvgDocument
Parsed SVG document: the viewBox (used as the local coordinate space every element is authored in) plus the top-level element tree.
Transform2D
2D affine transform matrix, laid out the same way as SVG’s matrix(a,b,c,d,e,f).
Transition
Describes how a single animated value should move from its current value to a new target: how long it takes, how long to wait before starting, and the easing curve applied over that duration.
TransitionOverrides
Per-group transition overrides layered on top of a base Transition. Each field takes priority over the general transition for its own property group, so e.g. colors and transforms can animate with different durations/easings while sharing one base transition.
TransitionProperty
Which groups of style properties Style::transition should animate.

Enums§

Easing
A named or custom timing function used to shape how progress [0.0, 1.0] maps to eased progress over the course of a crate::Transition.
SvgColor
Paint value for SVG fill/stroke attributes.
SvgElement