ELEMENT_STATE_BITS

Enum ELEMENT_STATE_BITS 

Source
#[repr(C)]
pub enum ELEMENT_STATE_BITS {
Show 32 variants STATE_NONE = 0, STATE_LINK = 1, STATE_HOVER = 2, STATE_ACTIVE = 4, STATE_FOCUS = 8, STATE_VISITED = 16, STATE_CURRENT = 32, STATE_CHECKED = 64, STATE_DISABLED = 128, STATE_READONLY = 256, STATE_EXPANDED = 512, STATE_COLLAPSED = 1_024, STATE_INCOMPLETE = 2_048, STATE_ANIMATING = 4_096, STATE_FOCUSABLE = 8_192, STATE_ANCHOR = 16_384, STATE_SYNTHETIC = 32_768, STATE_OWNS_POPUP = 65_536, STATE_TABFOCUS = 131_072, STATE_EMPTY = 262_144, STATE_BUSY = 524_288, STATE_DRAG_OVER = 1_048_576, STATE_DROP_TARGET = 2_097_152, STATE_MOVING = 4_194_304, STATE_COPYING = 8_388_608, STATE_DRAG_SOURCE = 16_777_216, STATE_DROP_MARKER = 33_554_432, STATE_PRESSED = 67_108_864, STATE_POPUP = 134_217_728, STATE_IS_LTR = 268_435_456, STATE_IS_RTL = 536_870_912, STATE_READY = 1_073_741_824,
}
Expand description

Collection of states (runtime flags) of a DOM element.

They reflect CSS pseudo-classes that are used in selectors, e.g. STATE_HOVER is :hover, STATE_ACTIVE is :active, and so on.

Implements | and & bitwise operators.

Variants§

§

STATE_NONE = 0

Zero state.

Element is a link.

E.g. <a href.

§

STATE_HOVER = 2

Mouse over the element at the moment.

§

STATE_ACTIVE = 4

Element is pressed.

Commonly used by <button> or <a> elements.

§

STATE_FOCUS = 8

Element is focused.

§

STATE_VISITED = 16

Element was visited.

For example, a link that was clicked.

§

STATE_CURRENT = 32

Current (hot) item.

§

STATE_CHECKED = 64

Element is checked (or selected).

§

STATE_DISABLED = 128

Element is disabled.

§

STATE_READONLY = 256

Readonly input element.

§

STATE_EXPANDED = 512

Expanded state - e.g. nodes in tree view.

Mutually exclusive with STATE_COLLAPSED.

§

STATE_COLLAPSED = 1_024

Collapsed state - e.g. nodes in tree view.

Mutually exclusive with STATE_EXPANDED.

§

STATE_INCOMPLETE = 2_048

One of fore/back images was requested but is not delivered.

§

STATE_ANIMATING = 4_096

Is animating currently.

§

STATE_FOCUSABLE = 8_192

Will accept focus.

§

STATE_ANCHOR = 16_384

Anchor in selection (used with current in selects).

§

STATE_SYNTHETIC = 32_768

This is a synthetic element - i.e. don’t emit it’s head/tail.

§

STATE_OWNS_POPUP = 65_536

A popup element is shown for this particular element.

§

STATE_TABFOCUS = 131_072

Focus gained by tab traversal.

§

STATE_EMPTY = 262_144

Element is empty.

i.e. the element has no text content nor children nodes.

If element has a behavior attached then the behavior is responsible for the value of this flag.

§

STATE_BUSY = 524_288

Busy or loading.

§

STATE_DRAG_OVER = 1_048_576

Drag over the block that can accept it (so is a current drop target).

Flag is set for the drop target block.

§

STATE_DROP_TARGET = 2_097_152

Active drop target.

§

STATE_MOVING = 4_194_304

Dragging/moving - the flag is set for the moving block.

§

STATE_COPYING = 8_388_608

Dragging/copying - the flag is set for the copying block.

§

STATE_DRAG_SOURCE = 16_777_216

Element that is a drag source.

§

STATE_DROP_MARKER = 33_554_432

Element is drop marker.

§

STATE_PRESSED = 67_108_864

Close to STATE_ACTIVE but has wider life span.

E.g. in MOUSE_UP it is still on; so behavior can check it in MOUSE_UP to discover the CLICK condition.

§

STATE_POPUP = 134_217_728

This element is out of flow.

§

STATE_IS_LTR = 268_435_456

The element or one of its containers has dir=ltr declared.

§

STATE_IS_RTL = 536_870_912

The element or one of its containers has dir=rtl declared.

§

STATE_READY = 1_073_741_824

Element is ready (behavior has finished initialization).

Trait Implementations§

Source§

impl BitAnd for ELEMENT_STATE_BITS

Flags can be AND’ed.

Source§

type Output = ELEMENT_STATE_BITS

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self::Output) -> Self::Output

Performs the & operation. Read more
Source§

impl BitOr for ELEMENT_STATE_BITS

Flags can be OR’ed.

Source§

type Output = ELEMENT_STATE_BITS

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self::Output) -> Self::Output

Performs the | operation. Read more
Source§

impl Debug for ELEMENT_STATE_BITS

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ELEMENT_STATE_BITS

Source§

fn eq(&self, other: &ELEMENT_STATE_BITS) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ELEMENT_STATE_BITS

Source§

fn partial_cmp(&self, other: &ELEMENT_STATE_BITS) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for ELEMENT_STATE_BITS

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.