Skip to main content

Module prelude

Module prelude 

Source
Expand description

The GPUI prelude is a collection of traits and types that are widely used throughout the library. It is recommended to import this prelude into your application to avoid having to import each trait individually.

Re-exports§

pub use crate::AppContext as _;
pub use crate::AppContext as _;
pub use crate::BorrowAppContext;
pub use crate::BoundsExt;
pub use crate::Context;
pub use crate::Element;
pub use crate::FluentBuilder;
pub use crate::ImageExt;
pub use crate::InteractiveElement;
pub use crate::IntoElement;
pub use crate::LineLayoutExt;
pub use crate::ParentElement;
pub use crate::PathBuilder;
pub use crate::PlatformInputHandlerExt;
pub use crate::Render;
pub use crate::RenderOnce;
pub use crate::StatefulInteractiveElement;
pub use crate::Styled;
pub use crate::StyledImage;
pub use crate::TaskExt as _;
pub use crate::VisualContext;
pub use crate::WindowBoundsExt;

Structs§

Path
A line made up of a series of vertices and control points.

Traits§

Refineable
A trait for types that can be refined with partial updates.

Derive Macros§

IntoElement
#[derive(IntoElement)] generates an IntoElement impl for any RenderOnce type, wrapping it in a ViewElement so it can be used as a child.
Refineable
VisualContext
#[derive(VisualContext)] is used to create a visual context out of anything that holds a &mut Window and implements AppContext Note that a #[app] and a #[window] attribute are required to identify the variables holding the &mut App, and &mut Window respectively.