#[non_exhaustive]
#[repr(u64)]
pub enum State {
Show 44 variants Invalid, Active, Armed, Busy, Checked, Collapsed, Defunct, Editable, Enabled, Expandable, Expanded, Focusable, Focused, HasTooltip, Horizontal, Iconified, Modal, MultiLine, Multiselectable, Opaque, Pressed, Resizable, Selectable, Selected, Sensitive, Showing, SingleLine, Stale, Transient, Vertical, Visible, ManagesDescendants, Indeterminate, Required, Truncated, Animated, InvalidEntry, SupportsAutocompletion, SelectableText, IsDefault, Visited, Checkable, HasPopup, ReadOnly,
}
Expand description

Used by various interfaces indicating every possible state of an accessibility object.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Invalid

Indicates an invalid state - probably an error condition.

§

Active

Indicates a window is currently the active window, or an object is the active subelement within a container or table.

Active should not be used for objects which have State::Focusable or State::Selectable: Those objects should use State::Focused and State::Selected respectively.

Active is a means to indicate that an object which is not focusable and not selectable is the currently-active item within its parent container.

§

Armed

Indicates that the object is armed.

§

Busy

Indicates the current object is busy, i.e. onscreen representation is in the process of changing, or the object is temporarily unavailable for interaction due to activity already in progress.

§

Checked

Indicates this object is currently checked.

§

Collapsed

Indicates this object is collapsed.

§

Defunct

Indicates that this object no longer has a valid backing widget (for instance, if its peer object has been destroyed).

§

Editable

Indicates the user can change the contents of this object.

§

Enabled

Indicates that this object is enabled, i.e. that it currently reflects some application state. Objects that are “greyed out” may lack this state, and may lack the State::Sensitive if direct user interaction cannot cause them to acquire Enabled.

See State::Sensitive.

§

Expandable

Indicates this object allows progressive disclosure of its children.

§

Expanded

Indicates this object is expanded.

§

Focusable

Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus.

§

Focused

Indicates this object currently has the keyboard focus.

§

HasTooltip

Indicates that the object has an associated tooltip.

§

Horizontal

Indicates the orientation of this object is horizontal.

§

Iconified

Indicates this object is minimized and is represented only by an icon.

§

Modal

Indicates something must be done with this object before the user can interact with an object in a different window.

§

MultiLine

Indicates this (text) object can contain multiple lines of text.

§

Multiselectable

Indicates this object allows more than one of its children to be selected at the same time, or in the case of text objects, that the object supports non-contiguous text selections.

§

Opaque

Indicates this object paints every pixel within its rectangular region. It also indicates an alpha value of unity, if it supports alpha blending.

§

Pressed

Indicates this object is currently pressed.

§

Resizable

Indicates the size of this object’s size is not fixed.

§

Selectable

Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that can be selected.

§

Selected

Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected.

§

Sensitive

Indicates this object is sensitive, e.g. to user interaction. Sensitive usually accompanies. State::Enabled for user-actionable controls, but may be found in the absence of State::Enabled if the current visible state of the control is “disconnected” from the application state. In such cases, direct user interaction can often result in the object gaining Sensitive, for instance if a user makes an explicit selection using an object whose current state is ambiguous or undefined.

See State::Enabled, State::Indeterminate.

§

Showing

Indicates this object, the object’s parent, the object’s parent’s parent, and so on, are all ‘shown’ to the end-user, i.e. subject to “exposure” if blocking or obscuring objects do not interpose between this object and the top of the window stack.

§

SingleLine

Indicates this (text) object can contain only a single line of text.

§

Stale

Indicates that the information returned for this object may no longer be synchronized with the application state. This can occur if the object has State::Transient, and can also occur towards the end of the object peer’s lifecycle.

§

Transient

Indicates this object is transient.

§

Vertical

Indicates the orientation of this object is vertical; for example this state may appear on such objects as scrollbars, text objects (with vertical text flow), separators, etc.

§

Visible

Indicates this object is visible, e.g. has been explicitly marked for exposure to the user. Visible is no guarantee that the object is actually unobscured on the screen, only that it is ‘potentially’ visible, barring obstruction, being scrolled or clipped out of the field of view, or having an ancestor container that has not yet made visible. A widget is potentially onscreen if it has both Visible and State::Showing. The absence of Visible and State::Showing is semantically equivalent to saying that an object is ‘hidden’.

§

ManagesDescendants

Indicates that “active-descendant-changed” event is sent when children become ‘active’ (i.e. are selected or navigated to onscreen). Used to prevent need to enumerate all children in very large containers, like tables. The presence of ManagesDescendants is an indication to the client that the children should not, and need not, be enumerated by the client. Objects implementing this state are expected to provide relevant state
notifications to listening clients, for instance notifications of visibility changes and activation of their contained child objects, without the client having previously requested references to those children.

§

Indeterminate

Indicates that a check box or other boolean indicator is in a state other than checked or not checked.

This usually means that the boolean value reflected or controlled by the object does not apply consistently to the entire current context.
For example, a checkbox for the “Bold” attribute of text may have Indeterminate if the currently selected text contains a mixture of weight attributes. In many cases interacting with a Indeterminate object will cause the context’s corresponding boolean attribute to be homogenized, whereupon the object will lose Indeterminate and a corresponding state-changed event will be fired.

§

Required

Indicates that user interaction with this object is ‘required’ from the user, for instance before completing the processing of a form.

§

Truncated

Indicates that an object’s onscreen content is truncated, e.g. a text value in a spreadsheet cell.

§

Animated

Indicates this object’s visual representation is dynamic, not static. This state may be applied to an object during an animated ‘effect’ and be removed from the object once its visual representation becomes static. Some applications, notably content viewers, may not be able to detect all kinds of animated content. Therefore the absence of this state should not be taken as definitive evidence that the object’s visual representation is
static; this state is advisory.

§

InvalidEntry

This object has indicated an error condition due to failure of input validation. For instance, a form control may acquire this state in response to invalid or malformed user input.

§

SupportsAutocompletion

This state indicates that the object in question implements some form of typeahead or
pre-selection behavior whereby entering the first character of one or more sub-elements causes those elements to scroll into view or become selected. Subsequent character input may narrow the selection further as long as one or more sub-elements match the string. This state is normally only useful and encountered on objects that implement crate::interface::Interface::Selection. In some cases the typeahead behavior may result in full or partial completion of the data in the input field, in which case these input events may trigger text-changed events from the source.

§

SelectableText

Indicates that the object in question supports text selection. It should only be exposed on objects which implement the crate::interface::Interface::Text interface, in order to distinguish this state from State::Selectable, which infers that the object in question is a selectable child of an object which implements crate::interface::Interface::Selection. While similar, text selection and subelement selection are distinct operations.

§

IsDefault

Indicates that the object in question is the ‘default’ interaction object in a dialog, i.e. the one that gets activated if the user presses “Enter” when the dialog is initially posted.

§

Visited

Indicates that the object (typically a hyperlink) has already been activated or invoked, with the result that some backing data has been downloaded or rendered.

§

Checkable

Indicates this object has the potential to be checked, such as a checkbox or toggle-able table cell.

§

HasPopup

Indicates that the object has a popup context menu or sub-level menu which may or may not be showing. This means that activation renders conditional content. Note that ordinary tooltips are not considered popups in this context.

§

ReadOnly

Indicates that an object which is State::Enabled and State::Sensitive has a value which can be read, but not modified, by the user.

Trait Implementations§

source§

impl BitAnd<State> for State

§

type Output = BitFlags<State, <State as RawBitFlags>::Numeric>

The resulting type after applying the & operator.
source§

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

Performs the & operation. Read more
source§

impl BitFlag for State

source§

fn empty() -> BitFlags<Self, Self::Numeric>

Create a BitFlags with no flags set (in other words, with a value of 0). Read more
source§

fn all() -> BitFlags<Self, Self::Numeric>

Create a BitFlags with all flags set. Read more
source§

impl BitOr<State> for State

§

type Output = BitFlags<State, <State as RawBitFlags>::Numeric>

The resulting type after applying the | operator.
source§

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

Performs the | operation. Read more
source§

impl BitXor<State> for State

§

type Output = BitFlags<State, <State as RawBitFlags>::Numeric>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl Clone for State

source§

fn clone(&self) -> State

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for State

source§

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

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

impl Default for State

source§

fn default() -> State

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for State

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&str> for State

source§

fn from(string: &str) -> State

Converts to this type from the input type.
source§

impl From<State> for StateSet

source§

fn from(value: State) -> Self

Converts to this type from the input type.
source§

impl From<State> for String

source§

fn from(state: State) -> String

Converts to this type from the input type.
source§

impl From<String> for State

source§

fn from(string: String) -> State

Converts to this type from the input type.
source§

impl Hash for State

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Not for State

§

type Output = BitFlags<State, <State as RawBitFlags>::Numeric>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl PartialEq<State> for State

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl RawBitFlags for State

§

type Numeric = u64

The underlying integer type.
source§

const EMPTY: Self::Numeric = {transmute(0x0000000000000000): <state::State as enumflags2::_internal::RawBitFlags>::Numeric}

A value with no bits set.
source§

const DEFAULT: Self::Numeric = {transmute(0x0000000000000000): <state::State as enumflags2::_internal::RawBitFlags>::Numeric}

The value used by the Default implementation. Equivalent to EMPTY, unless customized.
source§

const ALL_BITS: Self::Numeric = {transmute(0x00000fffffffffff): <state::State as enumflags2::_internal::RawBitFlags>::Numeric}

A value with all flag bits set.
source§

const BITFLAGS_TYPE_NAME: &'static str = _

The name of the type for debug formatting purposes. Read more
source§

fn bits(self) -> Self::Numeric

Return the bits as a number type.
source§

impl Serialize for State

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for State

source§

impl Eq for State

source§

impl StructuralEq for State

source§

impl StructuralPartialEq for State

Auto Trait Implementations§

§

impl RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl UnwindSafe for State

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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> NoneValue for Twhere T: Default,

§

type NoneType = T

source§

fn null_value() -> T

The none-equivalent value.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,