Struct pixels_graphics_lib::ui::styles::ToggleColorSet
source · pub struct ToggleColorSet {
pub normal: Option<Color>,
pub hover: Option<Color>,
pub toggled: Option<Color>,
pub hover_toggled: Option<Color>,
}
Fields§
§normal: Option<Color>
§hover: Option<Color>
§toggled: Option<Color>
§hover_toggled: Option<Color>
Implementations§
source§impl ToggleColorSet
impl ToggleColorSet
pub fn new(
normal: Option<Color>,
hover: Option<Color>,
toggled: Option<Color>,
hover_toggled: Option<Color>
) -> Self
pub fn new_values(
normal: Color,
hover: Color,
toggled: Color,
hover_toggled: Color
) -> Self
pub fn new_same_hover(
normal: Option<Color>,
hover: Option<Color>,
toggled: Option<Color>
) -> Self
pub fn new_same(color: Color) -> Self
pub fn get(&self, hovering: bool, toggled: bool) -> Option<Color>
Trait Implementations§
source§impl Clone for ToggleColorSet
impl Clone for ToggleColorSet
source§fn clone(&self) -> ToggleColorSet
fn clone(&self) -> ToggleColorSet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ToggleColorSet
impl Debug for ToggleColorSet
source§impl PartialEq<ToggleColorSet> for ToggleColorSet
impl PartialEq<ToggleColorSet> for ToggleColorSet
source§fn eq(&self, other: &ToggleColorSet) -> bool
fn eq(&self, other: &ToggleColorSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ToggleColorSet
impl StructuralEq for ToggleColorSet
impl StructuralPartialEq for ToggleColorSet
Auto Trait Implementations§
impl RefUnwindSafe for ToggleColorSet
impl Send for ToggleColorSet
impl Sync for ToggleColorSet
impl Unpin for ToggleColorSet
impl UnwindSafe for ToggleColorSet
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.