[−][src]Struct orbtk_theming::Selector
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
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,