pub struct FocusTrap<'a> {
pub _tab: Table<'a>,
}Fields§
§_tab: Table<'a>Implementations§
Source§impl<'a> FocusTrap<'a>
impl<'a> FocusTrap<'a>
pub const VT_NODE_ID: VOffsetT = 4
pub const VT_CONTAINER_NODE_ID: VOffsetT = 6
pub const VT_INITIAL_FOCUS_NODE_ID: VOffsetT = 8
pub const VT_ESCAPE_BEHAVIOR: VOffsetT = 10
pub const VT_ESCAPE_STATE_MACHINE: VOffsetT = 12
pub const VT_ESCAPE_EVENT: VOffsetT = 14
pub const VT_RESTORE_FOCUS: VOffsetT = 16
pub unsafe fn init_from_table(table: Table<'a>) -> Self
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: Allocator + 'bldr>( _fbb: &'mut_bldr mut FlatBufferBuilder<'bldr, A>, args: &'args FocusTrapArgs<'args>, ) -> WIPOffset<FocusTrap<'bldr>>
pub fn node_id(&self) -> &'a str
Sourcepub fn container_node_id(&self) -> &'a str
pub fn container_node_id(&self) -> &'a str
The container node whose subtree receives trapped focus.
Sourcepub fn initial_focus_node_id(&self) -> Option<&'a str>
pub fn initial_focus_node_id(&self) -> Option<&'a str>
Node to focus when the trap activates. If not set, focuses the first focusable element in the container.
Sourcepub fn escape_behavior(&self) -> FocusTrapEscape
pub fn escape_behavior(&self) -> FocusTrapEscape
What happens when Escape is pressed.
Sourcepub fn escape_state_machine(&self) -> Option<&'a str>
pub fn escape_state_machine(&self) -> Option<&'a str>
For FireEvent escape: which state machine and event to fire.
pub fn escape_event(&self) -> Option<&'a str>
Sourcepub fn restore_focus(&self) -> bool
pub fn restore_focus(&self) -> bool
Whether to restore focus to the previously focused element when the trap deactivates.
Trait Implementations§
Source§impl Verifiable for FocusTrap<'_>
impl Verifiable for FocusTrap<'_>
Source§fn run_verifier(
v: &mut Verifier<'_, '_>,
pos: usize,
) -> Result<(), InvalidFlatbuffer>
fn run_verifier( v: &mut Verifier<'_, '_>, pos: usize, ) -> Result<(), InvalidFlatbuffer>
Runs the verifier for this type, assuming its at position
pos in the verifier’s buffer.
Should not need to be called directly.impl<'a> Copy for FocusTrap<'a>
impl<'a> StructuralPartialEq for FocusTrap<'a>
Auto Trait Implementations§
impl<'a> Freeze for FocusTrap<'a>
impl<'a> RefUnwindSafe for FocusTrap<'a>
impl<'a> Send for FocusTrap<'a>
impl<'a> Sync for FocusTrap<'a>
impl<'a> Unpin for FocusTrap<'a>
impl<'a> UnsafeUnpin for FocusTrap<'a>
impl<'a> UnwindSafe for FocusTrap<'a>
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