Struct gtk::StateFlags [−]
pub struct StateFlags { /* fields omitted */ }Methods
impl StateFlags
impl StateFlagspub const NORMAL: StateFlags
NORMAL: StateFlags = StateFlags{bits: 0,}
pub const ACTIVE: StateFlags
ACTIVE: StateFlags = StateFlags{bits: 1,}
pub const PRELIGHT: StateFlags
PRELIGHT: StateFlags = StateFlags{bits: 2,}
pub const SELECTED: StateFlags
SELECTED: StateFlags = StateFlags{bits: 4,}
pub const INSENSITIVE: StateFlags
INSENSITIVE: StateFlags = StateFlags{bits: 8,}
pub const INCONSISTENT: StateFlags
INCONSISTENT: StateFlags = StateFlags{bits: 16,}
pub const FOCUSED: StateFlags
FOCUSED: StateFlags = StateFlags{bits: 32,}
pub const BACKDROP: StateFlags
BACKDROP: StateFlags = StateFlags{bits: 64,}
pub const DIR_LTR: StateFlags
DIR_LTR: StateFlags = StateFlags{bits: 128,}
pub const DIR_RTL: StateFlags
DIR_RTL: StateFlags = StateFlags{bits: 256,}
pub const LINK: StateFlags
LINK: StateFlags = StateFlags{bits: 512,}
pub const VISITED: StateFlags
VISITED: StateFlags = StateFlags{bits: 1024,}
pub const CHECKED: StateFlags
CHECKED: StateFlags = StateFlags{bits: 2048,}
pub const DROP_ACTIVE: StateFlags
DROP_ACTIVE: StateFlags = StateFlags{bits: 4096,}
pub fn empty() -> StateFlags
pub fn empty() -> StateFlagsReturns an empty set of flags.
pub fn all() -> StateFlags
pub fn all() -> StateFlagsReturns the set containing all flags.
pub fn bits(&self) -> u32
pub fn bits(&self) -> u32Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<StateFlags>
pub fn from_bits(bits: u32) -> Option<StateFlags>Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u32) -> StateFlags
pub fn from_bits_truncate(bits: u32) -> StateFlagsConvert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> boolReturns true if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> boolReturns true if all flags are currently set.
pub fn intersects(&self, other: StateFlags) -> bool
pub fn intersects(&self, other: StateFlags) -> boolReturns true if there are flags common to both self and other.
pub fn contains(&self, other: StateFlags) -> bool
pub fn contains(&self, other: StateFlags) -> boolReturns true all of the flags in other are contained within self.
pub fn insert(&mut self, other: StateFlags)
pub fn insert(&mut self, other: StateFlags)Inserts the specified flags in-place.
pub fn remove(&mut self, other: StateFlags)
pub fn remove(&mut self, other: StateFlags)Removes the specified flags in-place.
pub fn toggle(&mut self, other: StateFlags)
pub fn toggle(&mut self, other: StateFlags)Toggles the specified flags in-place.
pub fn set(&mut self, other: StateFlags, value: bool)
pub fn set(&mut self, other: StateFlags, value: bool)Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for StateFlags
impl Copy for StateFlagsimpl PartialEq for StateFlags
impl PartialEq for StateFlagsfn eq(&self, other: &StateFlags) -> bool
fn eq(&self, other: &StateFlags) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &StateFlags) -> bool
fn ne(&self, other: &StateFlags) -> boolThis method tests for !=.
impl Eq for StateFlags
impl Eq for StateFlagsimpl Clone for StateFlags
impl Clone for StateFlagsfn clone(&self) -> StateFlags
fn clone(&self) -> StateFlagsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialOrd for StateFlags
impl PartialOrd for StateFlagsfn partial_cmp(&self, other: &StateFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &StateFlags) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &StateFlags) -> bool
fn lt(&self, other: &StateFlags) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &StateFlags) -> bool
fn le(&self, other: &StateFlags) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &StateFlags) -> bool
fn gt(&self, other: &StateFlags) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &StateFlags) -> bool
fn ge(&self, other: &StateFlags) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for StateFlags
impl Ord for StateFlagsfn cmp(&self, other: &StateFlags) -> Ordering
fn cmp(&self, other: &StateFlags) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for StateFlags
impl Hash for StateFlagsfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for StateFlags
impl Debug for StateFlagsimpl Binary for StateFlags
impl Binary for StateFlagsimpl Octal for StateFlags
impl Octal for StateFlagsimpl LowerHex for StateFlags
impl LowerHex for StateFlagsimpl UpperHex for StateFlags
impl UpperHex for StateFlagsimpl BitOr for StateFlags
impl BitOr for StateFlagstype Output = StateFlags
The resulting type after applying the | operator.
fn bitor(self, other: StateFlags) -> StateFlags
fn bitor(self, other: StateFlags) -> StateFlagsReturns the union of the two sets of flags.
impl BitOrAssign for StateFlags
impl BitOrAssign for StateFlagsfn bitor_assign(&mut self, other: StateFlags)
fn bitor_assign(&mut self, other: StateFlags)Adds the set of flags.
impl BitXor for StateFlags
impl BitXor for StateFlagstype Output = StateFlags
The resulting type after applying the ^ operator.
fn bitxor(self, other: StateFlags) -> StateFlags
fn bitxor(self, other: StateFlags) -> StateFlagsReturns the left flags, but with all the right flags toggled.
impl BitXorAssign for StateFlags
impl BitXorAssign for StateFlagsfn bitxor_assign(&mut self, other: StateFlags)
fn bitxor_assign(&mut self, other: StateFlags)Toggles the set of flags.
impl BitAnd for StateFlags
impl BitAnd for StateFlagstype Output = StateFlags
The resulting type after applying the & operator.
fn bitand(self, other: StateFlags) -> StateFlags
fn bitand(self, other: StateFlags) -> StateFlagsReturns the intersection between the two sets of flags.
impl BitAndAssign for StateFlags
impl BitAndAssign for StateFlagsfn bitand_assign(&mut self, other: StateFlags)
fn bitand_assign(&mut self, other: StateFlags)Disables all flags disabled in the set.
impl Sub for StateFlags
impl Sub for StateFlagstype Output = StateFlags
The resulting type after applying the - operator.
fn sub(self, other: StateFlags) -> StateFlags
fn sub(self, other: StateFlags) -> StateFlagsReturns the set difference of the two sets of flags.
impl SubAssign for StateFlags
impl SubAssign for StateFlagsfn sub_assign(&mut self, other: StateFlags)
fn sub_assign(&mut self, other: StateFlags)Disables all flags enabled in the set.
impl Not for StateFlags
impl Not for StateFlagstype Output = StateFlags
The resulting type after applying the ! operator.
fn not(self) -> StateFlags
fn not(self) -> StateFlagsReturns the complement of this set of flags.
impl Extend<StateFlags> for StateFlags
impl Extend<StateFlags> for StateFlagsfn extend<T: IntoIterator<Item = StateFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = StateFlags>>(&mut self, iterator: T)Extends a collection with the contents of an iterator. Read more
impl FromIterator<StateFlags> for StateFlags
impl FromIterator<StateFlags> for StateFlagsfn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlags
fn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlagsCreates a value from an iterator. Read more
impl StaticType for StateFlags[src]
impl StaticType for StateFlagsfn static_type() -> Type[src]
fn static_type() -> TypeReturns the type identifier of Self.
impl<'a> FromValueOptional<'a> for StateFlags[src]
impl<'a> FromValueOptional<'a> for StateFlagsunsafe fn from_value_optional(value: &Value) -> Option<Self>[src]
unsafe fn from_value_optional(value: &Value) -> Option<Self>impl<'a> FromValue<'a> for StateFlags[src]
impl<'a> FromValue<'a> for StateFlagsunsafe fn from_value(value: &Value) -> Self[src]
unsafe fn from_value(value: &Value) -> Selfimpl SetValue for StateFlags[src]
impl SetValue for StateFlagsAuto Trait Implementations
impl Send for StateFlags
impl Send for StateFlagsimpl Sync for StateFlags
impl Sync for StateFlags