pub struct Config { /* private fields */ }
Expand description
Event handling configuration
Implementations§
source§impl Config
impl Config
Getters
sourcepub fn font_size(&self) -> f32
pub fn font_size(&self) -> f32
Standard font size
Units: points per Em. Pixel size depends on the screen’s scale factor.
sourcepub fn active_scheme(&self) -> &str
pub fn active_scheme(&self) -> &str
Active colour scheme (name)
An empty string will resolve the default colour scheme.
sourcepub fn color_schemes_iter(&self) -> impl Iterator<Item = (&str, &ColorsSrgb)>
pub fn color_schemes_iter(&self) -> impl Iterator<Item = (&str, &ColorsSrgb)>
Iterate over all colour schemes
sourcepub fn get_color_scheme(&self, name: &str) -> Option<ColorsSrgb>
pub fn get_color_scheme(&self, name: &str) -> Option<ColorsSrgb>
Get a colour scheme by name
sourcepub fn get_active_scheme(&self) -> Option<ColorsSrgb>
pub fn get_active_scheme(&self) -> Option<ColorsSrgb>
Get the active colour scheme
Even this one isn’t guaranteed to exist.
sourcepub fn iter_fonts(
&self
) -> impl Iterator<Item = (&TextClass, &FontSelector<'static>)>
pub fn iter_fonts(
&self
) -> impl Iterator<Item = (&TextClass, &FontSelector<'static>)>
Get an iterator over font mappings
sourcepub fn cursor_blink_rate(&self) -> Duration
pub fn cursor_blink_rate(&self) -> Duration
Get the cursor blink rate (delay)
sourcepub fn transition_fade_duration(&self) -> Duration
pub fn transition_fade_duration(&self) -> Duration
Get the fade duration used in transition animations
source§impl Config
impl Config
Setters
sourcepub fn set_font_size(&mut self, pt_size: f32)
pub fn set_font_size(&mut self, pt_size: f32)
Set font size
sourcepub fn set_active_scheme(&mut self, scheme: impl ToString)
pub fn set_active_scheme(&mut self, scheme: impl ToString)
Set colour scheme
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl ThemeConfig for Config
impl ThemeConfig for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<S, T> Cast<T> for Swhere
T: Conv<S>,
impl<S, T> Cast<T> for Swhere
T: Conv<S>,
§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
§fn cast_approx(self) -> T
fn cast_approx(self) -> T
§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
§fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
§fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
§fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more