pub struct TooltipRoot { /* private fields */ }Expand description
A Radix-shaped Tooltip root configuration surface (open state only).
Radix Tooltip supports a controlled/uncontrolled open state (open + defaultOpen). In
Fret, this root helper standardizes how recipes derive the open model before applying hover
intent or provider delay-group policy.
Implementations§
Source§impl TooltipRoot
impl TooltipRoot
pub fn new() -> Self
Sourcepub fn open(self, open: Option<Model<bool>>) -> Self
pub fn open(self, open: Option<Model<bool>>) -> Self
Sets the controlled open model (Some) or selects uncontrolled mode (None).
Sourcepub fn default_open(self, default_open: bool) -> Self
pub fn default_open(self, default_open: bool) -> Self
Sets the uncontrolled initial open value (Radix defaultOpen).
Sourcepub fn use_open_model<H: UiHost>(
&self,
cx: &mut ElementContext<'_, H>,
) -> ControllableModel<bool>
pub fn use_open_model<H: UiHost>( &self, cx: &mut ElementContext<'_, H>, ) -> ControllableModel<bool>
Returns a Model<bool> that behaves like Radix useControllableState for open.
pub fn open_model<H: UiHost>( &self, cx: &mut ElementContext<'_, H>, ) -> Model<bool>
Sourcepub fn is_open<H: UiHost>(&self, cx: &mut ElementContext<'_, H>) -> bool
pub fn is_open<H: UiHost>(&self, cx: &mut ElementContext<'_, H>) -> bool
Reads the current open value from the derived open model.
pub fn request<H: UiHost, I, T>(
&self,
cx: &mut ElementContext<'_, H>,
id: GlobalElementId,
presence: OverlayPresence,
children: I,
) -> OverlayRequestwhere
I: IntoIterator<Item = T>,
T: IntoUiElement<H>,
Trait Implementations§
Source§impl Clone for TooltipRoot
impl Clone for TooltipRoot
Source§fn clone(&self) -> TooltipRoot
fn clone(&self) -> TooltipRoot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TooltipRoot
impl Debug for TooltipRoot
Source§impl Default for TooltipRoot
impl Default for TooltipRoot
Source§fn default() -> TooltipRoot
fn default() -> TooltipRoot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TooltipRoot
impl !RefUnwindSafe for TooltipRoot
impl !Send for TooltipRoot
impl !Sync for TooltipRoot
impl Unpin for TooltipRoot
impl UnsafeUnpin for TooltipRoot
impl !UnwindSafe for TooltipRoot
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