Struct graphics_style::StyleResolver
source · [−]pub struct StyleResolver { /* private fields */ }Expand description
Resolve when style is not specific or missing.
Implementations
sourceimpl StyleResolver
impl StyleResolver
sourcepub fn point_style(&self) -> PointStyle
pub fn point_style(&self) -> PointStyle
Get the PointStyle from theme and state.
sourcepub fn circle_style(&self) -> CircleStyle
pub fn circle_style(&self) -> CircleStyle
Get the CircleStyle from theme and state.
sourcepub fn disk_style(&self) -> DiskStyle
pub fn disk_style(&self) -> DiskStyle
Get the DiskStyle from theme and state.
sourcepub fn line_style(&self) -> LineStyle
pub fn line_style(&self) -> LineStyle
Get the LineStyle from theme and state.
sourcepub fn point_size(&self) -> PointSize
pub fn point_size(&self) -> PointSize
Get the PointSize from theme and state.
sourcepub fn point_color(&self) -> PointColor
pub fn point_color(&self) -> PointColor
Get the PointColor from theme and state.
sourcepub fn circle_width(&self) -> CircleWidth
pub fn circle_width(&self) -> CircleWidth
Get the CircleWidth from theme and state.
sourcepub fn circle_color(&self) -> CircleColor
pub fn circle_color(&self) -> CircleColor
Get the CircleColor from theme and state.
sourcepub fn disk_fill_color(&self) -> DiskFillColor
pub fn disk_fill_color(&self) -> DiskFillColor
Get the DiskFillColor from theme and state.
sourcepub fn disk_edge_width(&self) -> DiskEdgeWidth
pub fn disk_edge_width(&self) -> DiskEdgeWidth
Get the DiskEdgeWidth from theme and state.
sourcepub fn disk_edge_color(&self) -> DiskEdgeColor
pub fn disk_edge_color(&self) -> DiskEdgeColor
Get the DiskEdgeColor from theme and state.
sourcepub fn line_width(&self) -> LineWidth
pub fn line_width(&self) -> LineWidth
Get the LineWidth from theme and state.
sourcepub fn line_color(&self) -> LineColor
pub fn line_color(&self) -> LineColor
Get the LineColor from theme and state.
sourceimpl StyleResolver
impl StyleResolver
sourcepub fn get_theme_style(&self) -> &StyleContext
pub fn get_theme_style(&self) -> &StyleContext
Create a new style resolver
sourcepub fn set_theme_style(&mut self, theme: StyleContext)
pub fn set_theme_style(&mut self, theme: StyleContext)
Set the style of the given element.
sourcepub fn with_theme_style(theme: StyleContext) -> Self
pub fn with_theme_style(theme: StyleContext) -> Self
Set the style of the given element.
sourcepub fn get_local_style(&self) -> &StyleContext
pub fn get_local_style(&self) -> &StyleContext
Set the style of the given element.
sourcepub fn set_local_style<T>(&mut self, style: T) where
T: GraphicsStyle,
pub fn set_local_style<T>(&mut self, style: T) where
T: GraphicsStyle,
Set the style of the given element.
Trait Implementations
sourceimpl Clone for StyleResolver
impl Clone for StyleResolver
sourcefn clone(&self) -> StyleResolver
fn clone(&self) -> StyleResolver
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StyleResolver
impl Debug for StyleResolver
sourceimpl Default for StyleResolver
impl Default for StyleResolver
sourcefn default() -> StyleResolver
fn default() -> StyleResolver
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for StyleResolver
impl<'de> Deserialize<'de> for StyleResolver
sourcefn 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
sourceimpl PartialEq<StyleResolver> for StyleResolver
impl PartialEq<StyleResolver> for StyleResolver
sourcefn eq(&self, other: &StyleResolver) -> bool
fn eq(&self, other: &StyleResolver) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &StyleResolver) -> bool
fn ne(&self, other: &StyleResolver) -> bool
This method tests for !=.
sourceimpl Serialize for StyleResolver
impl Serialize for StyleResolver
impl StructuralPartialEq for StyleResolver
Auto Trait Implementations
impl RefUnwindSafe for StyleResolver
impl Send for StyleResolver
impl Sync for StyleResolver
impl Unpin for StyleResolver
impl UnwindSafe for StyleResolver
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more