Struct FOCUS_STATE_PROPERTY
pub struct FOCUS_STATE_PROPERTY { /* private fields */ }Expand description
Reports the focus state of a node:
- No focus (0) indicates that the node is not focused. For a focus scope node indicates that none of the nodes in the scope have focus.
- Logical focus (1) indicates that the node is the logical focus node of an overlay-type focus scope. For a focus scope node indicates that one of the nodes in that scope is the logical focus node.
- Key focus (2) indicates that the node is the key focus node of the application and receives key input. For a focus scope node indicates that one of the nodes in that scope is the key focus node.
Use this property in state managers and bindings to implement focus states in the UI nodes.
To observe whether a node is the key focus node, you can use the boolean Focus > Focused property.
Methods from Deref<Target = PropertyType<FocusState>>§
pub fn as_ptr(&self) -> *mut PropertyTypeWrapper
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
Gets a pointer to the backing C++ instance.
pub fn compare(&self, rhs: &PropertyType<T>) -> Result<bool, Error>
pub fn compare(&self, rhs: &PropertyType<T>) -> Result<bool, Error>
Compares two property types.
pub fn is_inherited(&self) -> Result<bool, Error>
pub fn get_change_flags(&self) -> Result<ChangeFlags, Error>
pub fn get_data_type(&self) -> Result<PropertyDataType, Error>
pub fn get_name(&self) -> Result<KanziString, Error>
pub fn get_name(&self) -> Result<KanziString, Error>
Gets name of the property type.
pub fn get_editor_info(&self) -> Result<Option<EditorInfo>, Error>
pub fn get_editor_info(&self) -> Result<Option<EditorInfo>, Error>
Gets editor info for the property type.
pub fn as_abstract(&self) -> &PropertyType<()>
pub fn as_abstract(&self) -> &PropertyType<()>
Casts a PropertyType reference to its abstract representation.
pub fn get_default_value(
&self,
) -> Result<<T as VariantConstraint>::RetArg, Error>
pub fn get_default_value( &self, ) -> Result<<T as VariantConstraint>::RetArg, Error>
Gets the default value of a property type. When no other value is available, property functions return the default value.
Trait Implementations§
§impl Deref for FOCUS_STATE_PROPERTY
impl Deref for FOCUS_STATE_PROPERTY
§type Target = PropertyType<FocusState>
type Target = PropertyType<FocusState>
The resulting type after dereferencing.
§fn deref(&self) -> &PropertyType<FocusState>
fn deref(&self) -> &PropertyType<FocusState>
Dereferences the value.
impl LazyStatic for FOCUS_STATE_PROPERTY
Auto Trait Implementations§
impl Freeze for FOCUS_STATE_PROPERTY
impl RefUnwindSafe for FOCUS_STATE_PROPERTY
impl Send for FOCUS_STATE_PROPERTY
impl Sync for FOCUS_STATE_PROPERTY
impl Unpin for FOCUS_STATE_PROPERTY
impl UnwindSafe for FOCUS_STATE_PROPERTY
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more