logo
#[repr(C)]
pub enum ELEMENT_STATE_BITS {
Show 32 variants STATE_NONE, STATE_LINK, STATE_HOVER, STATE_ACTIVE, STATE_FOCUS, STATE_VISITED, STATE_CURRENT, STATE_CHECKED, STATE_DISABLED, STATE_READONLY, STATE_EXPANDED, STATE_COLLAPSED, STATE_INCOMPLETE, STATE_ANIMATING, STATE_FOCUSABLE, STATE_ANCHOR, STATE_SYNTHETIC, STATE_OWNS_POPUP, STATE_TABFOCUS, STATE_EMPTY, STATE_BUSY, STATE_DRAG_OVER, STATE_DROP_TARGET, STATE_MOVING, STATE_COPYING, STATE_DRAG_SOURCE, STATE_DROP_MARKER, STATE_PRESSED, STATE_POPUP, STATE_IS_LTR, STATE_IS_RTL, STATE_READY,
}
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

Zero state.

Element is a link.

E.g. <a href.

STATE_HOVER

Mouse over the element at the moment.

STATE_ACTIVE

Element is pressed.

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

STATE_FOCUS

Element is focused.

STATE_VISITED

Element was visited.

For example, a link that was clicked.

STATE_CURRENT

Current (hot) item.

STATE_CHECKED

Element is checked (or selected).

STATE_DISABLED

Element is disabled.

STATE_READONLY

Readonly input element.

STATE_EXPANDED

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

Mutually exclusive with STATE_COLLAPSED.

STATE_COLLAPSED

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

Mutually exclusive with STATE_EXPANDED.

STATE_INCOMPLETE

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

STATE_ANIMATING

Is animating currently.

STATE_FOCUSABLE

Will accept focus.

STATE_ANCHOR

Anchor in selection (used with current in selects).

STATE_SYNTHETIC

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

STATE_OWNS_POPUP

A popup element is shown for this particular element.

STATE_TABFOCUS

Focus gained by tab traversal.

STATE_EMPTY

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

Busy or loading.

STATE_DRAG_OVER

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

Active drop target.

STATE_MOVING

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

STATE_COPYING

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

STATE_DRAG_SOURCE

Element that is a drag source.

STATE_DROP_MARKER

Element is drop marker.

STATE_PRESSED

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

This element is out of flow.

STATE_IS_LTR

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

STATE_IS_RTL

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

STATE_READY

Element is ready (behavior has finished initialization).

Trait Implementations

Flags can be AND’ed.

The resulting type after applying the & operator.

Performs the & operation. Read more

Flags can be OR’ed.

The resulting type after applying the | operator.

Performs the | operation. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.