Expand description
Immediate mode desktop UI with retained interaction state and cached geometry.
Implement App::update and call run to open a desktop window.
The runner handles events, repaint deadlines, and GPU recovery.
For custom integrations, feed window events to Context::on_window_event,
run Context::run on redraw, then present with Renderer::render. Every redraw evaluates the UI;
unchanged geometry stays cached. Widget activation and value changes automatically
schedule a follow-up redraw. Outside model changes only need a native redraw;
the host should sleep between events and honor Context::needs_repaint.
Re-exports§
pub use animation::Animated;pub use animation::Animation;pub use animation::AnimationOptions;pub use animation::AnimationSample;pub use animation::AnimationStatus;pub use animation::Decay;pub use animation::DecayOptions;pub use animation::Delay;pub use animation::Easing;pub use animation::Interpolate;pub use animation::Keyframe;pub use animation::Keyframes;pub use animation::MotionStyle;pub use animation::Oklab;pub use animation::Parallel;pub use animation::Path;pub use animation::PathFollow;pub use animation::PathPose;pub use animation::Procedural;pub use animation::Pulse;pub use animation::Repeat;pub use animation::Rotation;pub use animation::Sequence;pub use animation::Spring;pub use animation::SpringOptions;pub use animation::SpringState;pub use animation::SpringValue;pub use animation::Stagger;pub use animation::Tween;pub use animation::TweenOptions;pub use animation::Wake;pub use app::run;pub use app::run_with_options;pub use app::App;pub use app::AppStats;pub use app::CloseRequested;pub use app::CloseSource;pub use app::ExitPolicy;pub use app::Frame;pub use app::GlobalShortcut;pub use app::OpenOutcome;pub use app::RunError;pub use app::RunOptions;pub use app::WindowError;pub use app::WindowInfo;pub use app::WindowKey;pub use app::WindowOptions;pub use app::WindowPlan;pub use app::WindowStatus;pub use app::Windows;pub use components::move_item;pub use components::DragEffect;pub use components::DragEnd;pub use components::DragOutput;pub use components::DragReason;pub use components::DragSource;pub use components::DragStyle;pub use components::DropOutput;pub use components::DropTarget;pub use components::DropZones;pub use components::Dropped;pub use components::Insertion;pub use components::PreviewKind;pub use components::RowDrag;pub use components::RowMove;pub use components::TreeNodeDrag;pub use components::Align;pub use components::Blur;pub use components::Button;pub use components::ButtonVariant;pub use components::Card;pub use components::CardOutput;pub use components::CardVariant;pub use components::Checkbox;pub use components::ColorPicker;pub use components::ColorPickerType;pub use components::Column;pub use components::ColumnWidth;pub use components::ComboBox;pub use components::ComboBoxOption;pub use components::ComboBoxStyle;pub use components::ContextMenu;pub use components::ContextMenuItem;pub use components::ContextMenuOutput;pub use components::ContextMenuStyle;pub use components::ContextMenuWidget;pub use components::DragValue;pub use components::Field;pub use components::Grid;pub use components::GridOutput;pub use components::GridRow;pub use components::GridStyle;pub use components::GridUi;pub use components::Hover;pub use components::HoverFill;pub use components::HoverStyle;pub use components::Image;pub use components::ImageFit;pub use components::ImageOutput;pub use components::Loader;pub use components::NumberInput;pub use components::NumberStyle;pub use components::Numeric;pub use components::Popup;pub use components::PopupOutput;pub use components::Presence;pub use components::Progress;pub use components::ProgressState;pub use components::Reorder;pub use components::ReorderUi;pub use components::Response;pub use components::Root;pub use components::RowPresence;pub use components::ScrollArea;pub use components::ScrollAreaOutput;pub use components::ScrollStyle;pub use components::SelectionIndicator;pub use components::Sense;pub use components::Separator;pub use components::Skeleton;pub use components::Slider;pub use components::SliderStatus;pub use components::SortDirection;pub use components::SortRequest;pub use components::SplitBoundaryOutput;pub use components::SplitHandle;pub use components::SplitHandleStyle;pub use components::SplitOutput;pub use components::SplitPane;pub use components::SplitPanel;pub use components::SplitPanelOutput;pub use components::SplitSize;pub use components::SplitStyle;pub use components::SplitSurface;pub use components::SplitUi;pub use components::Style;pub use components::Switch;pub use components::Table;pub use components::TableBody;pub use components::TableOutput;pub use components::TableStyle;pub use components::Text;pub use components::TextEdit;pub use components::TitleBar;pub use components::TitleBarResponse;pub use components::Tooltip;pub use components::TooltipStyle;pub use components::TooltipWidget;pub use components::Ui;pub use components::Validation;pub use components::Widget;pub use components::WidgetState;pub use components::Window;pub use components::CloseReason;pub use components::Confirm;pub use components::Confirmation;pub use components::Dialog;pub use components::DialogAction;pub use components::DialogOutput;pub use components::Modal;pub use components::ModalAnchor;pub use components::ModalOutput;pub use components::CollapsingHeader;pub use components::CollapsingOutput;pub use components::CollapsingStyle;pub use components::DisclosureStyle;pub use components::TreeChildren;pub use components::TreeEvent;pub use components::TreeIssue;pub use components::TreeModel;pub use components::TreeNode;pub use components::TreeOutput;pub use components::TreeStyle;pub use components::TreeView;pub use context::CacheStats;pub use context::Context;pub use context::DebugOverlay;pub use context::Diagnostic;pub use context::DiagnosticKind;pub use context::EventResponse;pub use context::Id;pub use context::InputState;pub use images::DecodedImage;pub use images::ImageDecoder;pub use images::ImageError;pub use images::ImageHandle;pub use images::ImageLimits;pub use images::ImageMetrics;pub use images::ImageSource;pub use images::ImageStage;pub use images::ImageState;pub use images::ImageTiming;pub use layout::Layout;pub use layout::Padding;pub use protocol::DrawCommand;pub use protocol::DrawData;pub use protocol::GeometryUpdate;pub use protocol::TextureFilter;pub use protocol::TextureId;pub use protocol::TextureImage;pub use protocol::TextureOptions;pub use protocol::Vertex;pub use renderer::PresentationMode;pub use renderer::RenderError;pub use renderer::RenderStatus;pub use renderer::Renderer;pub use renderer::RendererStats;pub use shapes::Border;pub use shapes::Color;pub use shapes::CornerRadius;pub use shapes::Gradient;pub use shapes::GradientDirection;pub use shapes::Rect;pub use shapes::RectShape;pub use shapes::Shadow;pub use shapes::Shape;pub use shapes::Transform;pub use z_icons as icons;pub use wgpu;pub use winit;pub use components::theme::*;
Modules§
- animation
- Time-based motion with retained channels, extensible curves and value types.
- app
- Desktop runner: one or several native windows, each with its own context and surface. The low-level Context and Renderer remain available for custom hosts.
- components
- Immediate mode components and the shared UI API.
- context
- Global UI state, winit input integration, repaint scheduling, and geometry cache.
- images
- Built-in local image loading. All expensive work runs on bounded worker threads.
- layout
- Layout primitives. All UI distances are logical pixels (points).
- protocol
- Public drawing protocol shared by UI producers and rendering backends.
- renderer
- wgpu backend with persistent buffers, texture versioning, and surface recovery.
- shapes
- Typed drawing primitives and CPU tessellation.
- widgets
- Compatibility re-exports. New components are defined in crate::components.
Macros§
- impl_
interpolate - Implement
Interpolatefor a struct by interpolating the named fields, each of which must itself implementInterpolate. - impl_
spring_ value - Implement
SpringValuefor a struct whose named fields are allSpringValues. The norm is the Euclidean norm of the field norms.
Structs§
- Font
Family - A font family: the font files of one typeface, each declared for a weight.
- Font
Weight - A font weight on the CSS scale: 100 (thin) to 900 (black), 400 is regular.
- Monospace
Metrics - Cell size of the monospace family at one size and weight, from the same layout that paints and measures monospace text.
- Vec2
- A 2-dimensional vector.
Enums§
- Text
Family - The family a piece of text is shaped with. The two families are chosen independently of each other and of the weight.
Functions§
- vec2
- Creates a 2-dimensional vector.