Module ambient_ui::prelude
source · Expand description
A prelude for users of the crate. Imports all the most commonly used types and functions.
Re-exports
pub use crate::with_rect;
pub use crate::Line;
pub use crate::Rectangle;
pub use crate::UIBase;
pub use crate::UIElement;
pub use crate::UIExt;
pub use ambient_element;
pub use crate::button::*;
pub use crate::clickarea::*;
pub use crate::default_theme::*;
pub use crate::dropdown::*;
pub use crate::editor::*;
pub use crate::layout::*;
pub use crate::prompt::*;
pub use crate::screens::*;
pub use crate::scroll_area::*;
pub use crate::select::*;
pub use crate::tabs::*;
pub use crate::text::*;
pub use crate::throbber::*;
pub use crate::window::*;
Macros
- Shorthand for
let x = x.to_owned();
Structs
- A rendered ElementComponent instance.
- A tree of instantiated Elements.
- Wrap multiple Elements in a flat hierarchy.
- Hooks are a way to hook into the state and lifecycle of an Element.
- Memoize the ElementComponent, such that it is only re-rendered if the component changes.
- Wraps the inner Element. This is useful for introducing an intermediate component node in a tree.
Traits
- The base trait for all element components. These are similar to React components.
- A convenience trait for converting an ElementComponent into an Element.
Functions
- Helper for constructing a Cb.
Type Aliases
- A helper type for callbacks that wraps around a function type with an
Arc
that implementsDebug
.
Attribute Macros
- Helper macro to implement a
ElementComponent
with a pure free function.