Trait cosmic::iced_style::text_input::StyleSheet
source · pub trait StyleSheet {
type Style: Default;
// Required methods
fn active(&self, style: &Self::Style) -> Appearance;
fn focused(&self, style: &Self::Style) -> Appearance;
fn placeholder_color(&self, style: &Self::Style) -> Color;
fn value_color(&self, style: &Self::Style) -> Color;
fn disabled_color(&self, style: &Self::Style) -> Color;
fn selection_color(&self, style: &Self::Style) -> Color;
fn disabled(&self, style: &Self::Style) -> Appearance;
// Provided method
fn hovered(&self, style: &Self::Style) -> Appearance { ... }
}
Expand description
A set of rules that dictate the style of a text input.
Required Associated Types§
sourcetype Style: Default
type Style: Default
The supported style of the StyleSheet
.
Required Methods§
sourcefn active(&self, style: &Self::Style) -> Appearance
fn active(&self, style: &Self::Style) -> Appearance
Produces the style of an active text input.
sourcefn focused(&self, style: &Self::Style) -> Appearance
fn focused(&self, style: &Self::Style) -> Appearance
Produces the style of a focused text input.
sourcefn placeholder_color(&self, style: &Self::Style) -> Color
fn placeholder_color(&self, style: &Self::Style) -> Color
Produces the Color
of the placeholder of a text input.
sourcefn value_color(&self, style: &Self::Style) -> Color
fn value_color(&self, style: &Self::Style) -> Color
Produces the Color
of the value of a text input.
sourcefn disabled_color(&self, style: &Self::Style) -> Color
fn disabled_color(&self, style: &Self::Style) -> Color
Produces the Color
of the value of a disabled text input.
sourcefn selection_color(&self, style: &Self::Style) -> Color
fn selection_color(&self, style: &Self::Style) -> Color
Produces the Color
of the selection of a text input.
sourcefn disabled(&self, style: &Self::Style) -> Appearance
fn disabled(&self, style: &Self::Style) -> Appearance
Produces the style of a disabled text input.
Provided Methods§
sourcefn hovered(&self, style: &Self::Style) -> Appearance
fn hovered(&self, style: &Self::Style) -> Appearance
Produces the style of an hovered text input.