pub trait Component {
const NAME: &'static str;
const DOC: &'static str = "";
const DISPLAY_NAME: &'static str = "";
const ICON: &'static str = "";
const CATEGORY: &'static str = "";
const DESIGN_SIZE: (f32, f32) = _;
const TOOLBOX: bool = true;
const PROPS: &'static [Prop] = _;
// Required method
fn build(props: &Props) -> Widget;
}Expand description
A custom component — implemented by the code yog build generates
from a <Component> .yui (see the module docs).
Required Associated Constants§
Provided Associated Constants§
Sourceconst DOC: &'static str = ""
const DOC: &'static str = ""
Its description: the designer’s toolbox tooltip and property grid
header. Texts here and below may be @Set.key resource references.
Sourceconst DISPLAY_NAME: &'static str = ""
const DISPLAY_NAME: &'static str = ""
The designer’s toolbox label (empty: NAME).
Sourceconst ICON: &'static str = ""
const ICON: &'static str = ""
The toolbox icon, a Yog image source (item:…, sprite:…, mod:…)
or @Icons.x; empty: a generic glyph.
Sourceconst DESIGN_SIZE: (f32, f32) = _
const DESIGN_SIZE: (f32, f32) = _
Its size on the designer’s canvas and when dropped (0: unset).
Sourceconst TOOLBOX: bool = true
const TOOLBOX: bool = true
Whether the toolbox offers it (false: internal to the mod’s own markup).
const PROPS: &'static [Prop] = _
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".