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: logical (unscaled) pixels per Em.
To convert to Points, multiply by three quarters.
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 PartialEq for Config
impl PartialEq for Config
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.