Trait oxytail_base::themes::ThemeStyling
source · pub trait ThemeStyling {
// Required methods
fn theme_defaults(&self) -> DefaultThemeProps;
fn get_button_style(
&self,
button_props: ButtonProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_checkbox_style(
&self,
checkbox_props: CheckboxProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_input_style(
&self,
checkbox_props: InputProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_toggle_style(
&self,
toggle_props: ToggleProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_radio_style(
&self,
radio_props: RadioProps
) -> (Box<dyn Fn(Style) -> Style + '_>, Box<dyn Fn(Style) -> Style + '_>);
fn get_header_style(
&self,
header_props: HeaderProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_divider_style(&self) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_tooltip_style(
&self,
tooltip_props: TooltipProps
) -> Box<dyn Fn(Style) -> Style + '_>;
fn get_badge_style(
&self,
badge_props: BadgeProps
) -> Box<dyn Fn(Style) -> Style + '_>;
}Expand description
To be implemented by themes.
Required Methods§
sourcefn theme_defaults(&self) -> DefaultThemeProps
fn theme_defaults(&self) -> DefaultThemeProps
Defines a set of colors to be used by the theme. This can be adjusted within specific widget function later if needed, but for a vast majority of themes the colors are reused.
Defines how a button style should look like.
sourcefn get_checkbox_style(
&self,
checkbox_props: CheckboxProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_checkbox_style( &self, checkbox_props: CheckboxProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a checkbox should look like.
sourcefn get_input_style(
&self,
checkbox_props: InputProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_input_style( &self, checkbox_props: InputProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a input should look like.
sourcefn get_toggle_style(
&self,
toggle_props: ToggleProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_toggle_style( &self, toggle_props: ToggleProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a toggle should look like.
sourcefn get_radio_style(
&self,
radio_props: RadioProps
) -> (Box<dyn Fn(Style) -> Style + '_>, Box<dyn Fn(Style) -> Style + '_>)
fn get_radio_style( &self, radio_props: RadioProps ) -> (Box<dyn Fn(Style) -> Style + '_>, Box<dyn Fn(Style) -> Style + '_>)
Defines how a radio_button should look like.
Returns a tuple, where first argument styles the “dot” of the active radio and the second one is the “outer circle”, containing the default state of the radio.
sourcefn get_header_style(
&self,
header_props: HeaderProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_header_style( &self, header_props: HeaderProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a text_header should look like.
sourcefn get_divider_style(&self) -> Box<dyn Fn(Style) -> Style + '_>
fn get_divider_style(&self) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a text_divider should look like.
sourcefn get_tooltip_style(
&self,
tooltip_props: TooltipProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_tooltip_style( &self, tooltip_props: TooltipProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a tooltip should look like.
sourcefn get_badge_style(
&self,
badge_props: BadgeProps
) -> Box<dyn Fn(Style) -> Style + '_>
fn get_badge_style( &self, badge_props: BadgeProps ) -> Box<dyn Fn(Style) -> Style + '_>
Defines how a badge should look like.