Skip to main content

Crate goyda

Crate goyda 

Source

Re-exports§

pub use crate::components::Component;
pub use crate::components::LayoutDirection;
pub use crate::components::Modifier;
pub use crate::core::theme::ThemeMode;
pub use crate::core::theme::cycle_theme;
pub use crate::core::theme::set_theme;
pub use crate::core::theme::theme_index;
pub use crate::macros::IntoString;
pub use crate::platform::navigate;
pub use crate::platform::rerender;
pub use inventory;

Modules§

components
core
listeners
Every button { ... on_event: ... } handler goyda knows about, defined once per event via goyda_macros::define_listener with both an android (JNI) and a web (DOM) implementation inline. The macro emits a pub mod on_<name> per platform, each gated behind that platform’s feature, so exactly one is compiled into any given build - see crate::platform for how $crate::platform::active_listeners picks whichever one is active.
macros
platform
Platform-independent entry points (navigate, rerender) that work the same way regardless of which target the app is built for.
prelude
reactive
windows

Macros§

asset
Embeds a file from the crate’s assets/ directory into the binary at compile time, producing an Asset. A missing file is a compile error. Best for small-to-medium files (images, fonts, icons); for large or rarely-used assets, use crate::asset_ref! instead.
asset_ref
References a file in the crate’s assets/ directory without embedding it into the binary, producing an Asset that’s loaded at runtime. Use this for large or dynamic assets (video, audio, big image sets) instead of asset!.
parse_children
Expands the child list inside a crate::stack! into a Vec<Component>. Used internally by stack!; call stack! instead of using this macro directly.
stack
Builds a Component that lays out its children along an axis, with spacing between them.
style_methods
theme
Declares a set of named theme variants and the colors that vary between them. The first two variants should be a light and a dark equivalent, in that order, so OS theme detection picks a sensible default.

Structs§

Page
A route registered with #[page("...")], pairing a path with the component that renders it.
StyleProperty
A style property and its value, e.g. StyleProperty(Axis::Opacity, StyleValue::Number(0.5)).

Enums§

Axis
A stylable property of a component, paired with a value in StyleProperty.
Color
A named color from the theme’s palette, or a custom 0xAARRGGBB value.
Edge
A side (or combination of sides) of a component’s box, used with Axis::Padding and Axis::Margin.
StyleValue
The value of a style property.

Functions§

find_page
Looks up the Page registered for path, falling back to the page registered at "/" if there’s no exact match.