#[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.
STATE_LINK = 1
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.
impl BitAnd for ELEMENT_STATE_BITS
Flags can be AND’ed.
Source§impl BitOr for ELEMENT_STATE_BITS
Flags can be OR’ed.
impl BitOr for ELEMENT_STATE_BITS
Flags can be OR’ed.