Trait cushy::styles::ComponentDefinition

source ·
pub trait ComponentDefinition: NamedComponent {
    type ComponentType: ComponentType;

    // Required method
    fn default_value(&self, context: &WidgetContext<'_>) -> Self::ComponentType;
}
Expand description

A type that represents a named component with a default value of a specific Rust type.

Required Associated Types§

source

type ComponentType: ComponentType

The type that will be contained in the Component.

Required Methods§

source

fn default_value(&self, context: &WidgetContext<'_>) -> Self::ComponentType

Returns the default value to use for this component.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ComponentDefinition for ButtonActiveBackground

source§

impl ComponentDefinition for ButtonActiveForeground

source§

impl ComponentDefinition for ButtonActiveOutline

source§

impl ComponentDefinition for ButtonBackground

source§

impl ComponentDefinition for ButtonDisabledBackground

source§

impl ComponentDefinition for ButtonDisabledForeground

source§

impl ComponentDefinition for ButtonDisabledOutline

source§

impl ComponentDefinition for ButtonForeground

source§

impl ComponentDefinition for ButtonHoverBackground

source§

impl ComponentDefinition for ButtonHoverForeground

source§

impl ComponentDefinition for ButtonHoverOutline

source§

impl ComponentDefinition for ButtonOutline

source§

impl ComponentDefinition for CheckboxCornerRadius

source§

impl ComponentDefinition for CheckboxSize

source§

impl ComponentDefinition for CurrentContainerBackground

source§

impl ComponentDefinition for DelimiterColor

source§

impl ComponentDefinition for DelimiterSize

source§

impl ComponentDefinition for IndicatorSize

source§

impl ComponentDefinition for ImageCornerRadius

source§

impl ComponentDefinition for Delimiter

source§

impl ComponentDefinition for Prefix

source§

impl ComponentDefinition for TrailingDelimiter

source§

impl ComponentDefinition for RadioSize

source§

impl ComponentDefinition for ScrollBarThickness

source§

impl ComponentDefinition for ScrollBarThumbColor

source§

impl ComponentDefinition for ScrollBarThumbCornerRadius

source§

impl ComponentDefinition for ScrollBarThumbOutlineColor

source§

impl ComponentDefinition for ScrollBarThumbOutlineThickness

source§

impl ComponentDefinition for SelectedColor

source§

impl ComponentDefinition for DisabledInactiveTrackColor

source§

impl ComponentDefinition for DisabledKnobColor

source§

impl ComponentDefinition for DisabledTrackColor

source§

impl ComponentDefinition for InactiveTrackColor

source§

impl ComponentDefinition for KnobColor

source§

impl ComponentDefinition for KnobSize

source§

impl ComponentDefinition for MinimumSliderSize

source§

impl ComponentDefinition for TrackColor

source§

impl ComponentDefinition for TrackSize

source§

impl ComponentDefinition for HintTextColor

source§

impl ComponentDefinition for InvalidTextColor

source§

impl ComponentDefinition for ValidatedLineHeight

source§

impl ComponentDefinition for ValidatedTextSize

source§

impl ComponentDefinition for AutoFocusableControls

source§

impl ComponentDefinition for BaseLineHeight

source§

impl ComponentDefinition for BaseTextSize

source§

impl ComponentDefinition for CornerRadius

source§

impl ComponentDefinition for DefaultActiveBackgroundColor

source§

impl ComponentDefinition for DefaultActiveForegroundColor

source§

impl ComponentDefinition for DefaultBackgroundColor

source§

impl ComponentDefinition for DefaultDisabledBackgroundColor

source§

impl ComponentDefinition for DefaultDisabledForegroundColor

source§

impl ComponentDefinition for DefaultForegroundColor

source§

impl ComponentDefinition for DefaultHoveredBackgroundColor

source§

impl ComponentDefinition for DefaultHoveredForegroundColor

source§

impl ComponentDefinition for DisabledOutlineColor

source§

impl ComponentDefinition for DisabledWidgetAccentColor

source§

impl ComponentDefinition for Easing

source§

impl ComponentDefinition for EasingIn

source§

impl ComponentDefinition for EasingOut

source§

impl ComponentDefinition for ErrorColor

source§

impl ComponentDefinition for FocusColor

source§

impl ComponentDefinition for FontFamily

source§

impl ComponentDefinition for FontStyle

source§

impl ComponentDefinition for FontWeight

source§

impl ComponentDefinition for Heading1FontFamily

source§

impl ComponentDefinition for Heading1Style

source§

impl ComponentDefinition for Heading1Weight

source§

impl ComponentDefinition for Heading2FontFamily

source§

impl ComponentDefinition for Heading2Style

source§

impl ComponentDefinition for Heading2Weight

source§

impl ComponentDefinition for Heading3FontFamily

source§

impl ComponentDefinition for Heading3Style

source§

impl ComponentDefinition for Heading3Weight

source§

impl ComponentDefinition for Heading4FontFamily

source§

impl ComponentDefinition for Heading4Style

source§

impl ComponentDefinition for Heading4Weight

source§

impl ComponentDefinition for Heading5FontFamily

source§

impl ComponentDefinition for Heading5Style

source§

impl ComponentDefinition for Heading5Weight

source§

impl ComponentDefinition for Heading6FontFamily

source§

impl ComponentDefinition for Heading6Style

source§

impl ComponentDefinition for Heading6Weight

source§

impl ComponentDefinition for HeadingFontFamily

source§

impl ComponentDefinition for HeadingStyle

source§

impl ComponentDefinition for HeadingWeight

source§

impl ComponentDefinition for HighlightColor

source§

impl ComponentDefinition for HorizontalAlignment

source§

impl ComponentDefinition for IntrinsicPadding

source§

impl ComponentDefinition for LayoutOrder

source§

impl ComponentDefinition for LineHeight1

source§

impl ComponentDefinition for LineHeight2

source§

impl ComponentDefinition for LineHeight3

source§

impl ComponentDefinition for LineHeight4

source§

impl ComponentDefinition for LineHeight5

source§

impl ComponentDefinition for LineHeight6

source§

impl ComponentDefinition for LineHeight7

source§

impl ComponentDefinition for LineHeight8

source§

impl ComponentDefinition for LineHeight

source§

impl ComponentDefinition for Opacity

source§

impl ComponentDefinition for OpaqueWidgetColor

source§

impl ComponentDefinition for OutlineColor

source§

impl ComponentDefinition for OutlineWidth

source§

impl ComponentDefinition for PrimaryColor

source§

impl ComponentDefinition for ScrimColor

source§

impl ComponentDefinition for SecondaryColor

source§

impl ComponentDefinition for SurfaceColor

source§

impl ComponentDefinition for TertiaryColor

source§

impl ComponentDefinition for TextColor

source§

impl ComponentDefinition for TextColorVariant

source§

impl ComponentDefinition for TextSize1

source§

impl ComponentDefinition for TextSize2

source§

impl ComponentDefinition for TextSize3

source§

impl ComponentDefinition for TextSize4

source§

impl ComponentDefinition for TextSize5

source§

impl ComponentDefinition for TextSize6

source§

impl ComponentDefinition for TextSize7

source§

impl ComponentDefinition for TextSize8

source§

impl ComponentDefinition for TextSize

source§

impl ComponentDefinition for VerticalAlignment

source§

impl ComponentDefinition for WidgetAccentColor

source§

impl ComponentDefinition for WidgetBackground