[][src]Struct orbtk_theming::Selector

pub struct Selector {
    pub style: Option<String>,
    pub state: Option<String>,
    // some fields omitted
}

The selector is used to read a property value from the Theme.

Fields

style: Option<String>

Represents the key of a style.

state: Option<String>

Used to reference the state property list of the given style.

Implementations

impl Selector[src]

pub fn new(style: impl Into<String>) -> Self[src]

Creates a new selector with the given style key.

pub fn set_state(&mut self, state: impl Into<String>)[src]

Set the current state of the selector.

pub fn clear_state(&mut self)[src]

Clears the current state and reset to default.

pub fn dirty(&self) -> bool[src]

Gets the dirty flag.

pub fn set_dirty(&mut self, dirty: bool)[src]

Sets the dirty flag.

pub fn has_state(&self, state: &str) -> bool[src]

Check if the selector has the given state.

Trait Implementations

impl Clone for Selector[src]

impl Debug for Selector[src]

impl Default for Selector[src]

impl Display for Selector[src]

impl<'_> From<&'_ str> for Selector[src]

impl From<String> for Selector[src]

impl PartialEq<Selector> for Selector[src]

impl StructuralPartialEq for Selector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.