Struct gtk::StateFlags [−]
pub struct StateFlags { /* fields omitted */ }
Methods
impl StateFlags
impl StateFlags
pub 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() -> StateFlags
Returns an empty set of flags.
pub fn all() -> StateFlags
pub fn all() -> StateFlags
Returns the set containing all flags.
pub fn bits(&self) -> u32
pub fn bits(&self) -> u32
Returns 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) -> StateFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: StateFlags) -> bool
pub fn intersects(&self, other: StateFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: StateFlags) -> bool
pub fn contains(&self, other: StateFlags) -> bool
Returns 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 StateFlags
impl PartialEq for StateFlags
impl PartialEq for StateFlags
fn eq(&self, other: &StateFlags) -> bool
fn eq(&self, other: &StateFlags) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for StateFlags
impl Eq for StateFlags
impl Clone for StateFlags
impl Clone for StateFlags
fn clone(&self) -> StateFlags
fn clone(&self) -> StateFlags
Returns 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 StateFlags
fn 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) -> bool
This 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) -> bool
This 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) -> bool
This 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) -> bool
This 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 StateFlags
fn cmp(&self, other: &StateFlags) -> Ordering
fn cmp(&self, other: &StateFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for StateFlags
impl Hash for StateFlags
fn 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 StateFlags
impl Binary for StateFlags
impl Binary for StateFlags
impl Octal for StateFlags
impl Octal for StateFlags
impl LowerHex for StateFlags
impl LowerHex for StateFlags
impl UpperHex for StateFlags
impl UpperHex for StateFlags
impl BitOr for StateFlags
impl BitOr for StateFlags
type Output = StateFlags
The resulting type after applying the |
operator.
fn bitor(self, other: StateFlags) -> StateFlags
fn bitor(self, other: StateFlags) -> StateFlags
Returns the union of the two sets of flags.
impl BitOrAssign for StateFlags
impl BitOrAssign for StateFlags
fn 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 StateFlags
type Output = StateFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: StateFlags) -> StateFlags
fn bitxor(self, other: StateFlags) -> StateFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for StateFlags
impl BitXorAssign for StateFlags
fn 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 StateFlags
type Output = StateFlags
The resulting type after applying the &
operator.
fn bitand(self, other: StateFlags) -> StateFlags
fn bitand(self, other: StateFlags) -> StateFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for StateFlags
impl BitAndAssign for StateFlags
fn 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 StateFlags
type Output = StateFlags
The resulting type after applying the -
operator.
fn sub(self, other: StateFlags) -> StateFlags
fn sub(self, other: StateFlags) -> StateFlags
Returns the set difference of the two sets of flags.
impl SubAssign for StateFlags
impl SubAssign for StateFlags
fn 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 StateFlags
type Output = StateFlags
The resulting type after applying the !
operator.
fn not(self) -> StateFlags
fn not(self) -> StateFlags
Returns the complement of this set of flags.
impl Extend<StateFlags> for StateFlags
impl Extend<StateFlags> for StateFlags
fn 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 StateFlags
fn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlags
fn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlags
Creates a value from an iterator. Read more
impl StaticType for StateFlags
[src]
impl StaticType for StateFlags
fn static_type() -> Type
[src]
fn static_type() -> Type
Returns the type identifier of Self
.
impl<'a> FromValueOptional<'a> for StateFlags
[src]
impl<'a> FromValueOptional<'a> for StateFlags
unsafe 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 StateFlags
unsafe fn from_value(value: &Value) -> Self
[src]
unsafe fn from_value(value: &Value) -> Self
impl SetValue for StateFlags
[src]
impl SetValue for StateFlags
Auto Trait Implementations
impl Send for StateFlags
impl Send for StateFlags
impl Sync for StateFlags
impl Sync for StateFlags