Skip to main content

DesktopTextSelectionToolbarLayoutDelegate

Struct DesktopTextSelectionToolbarLayoutDelegate 

Source
pub struct DesktopTextSelectionToolbarLayoutDelegate {
    pub anchor: Offset,
}
Expand description

Positions the toolbar at anchor if it fits, otherwise moves it so that it just fits fully on-screen.

See also:

  • desktopTextSelectionControls, which uses this to position itself.
  • cupertinoDesktopTextSelectionControls, which uses this to position itself.
  • crate::TextSelectionToolbarLayoutDelegate, which does a similar layout for the mobile text selection toolbars.

Fields§

§anchor: Offset

The point at which to render the menu, if possible.

Should be provided in local coordinates.

Implementations§

Trait Implementations§

Source§

impl Debug for DesktopTextSelectionToolbarLayoutDelegate

Source§

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

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

impl Display for DesktopTextSelectionToolbarLayoutDelegate

Source§

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

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

impl SingleChildLayoutDelegate for DesktopTextSelectionToolbarLayoutDelegate

Source§

fn get_constraints_for_child( &self, constraints: BoxConstraints, ) -> BoxConstraints

The constraints for the child given the incoming constraints. Read more
Source§

fn get_position_for_child(&self, size: Size, child_size: Size) -> Offset

The position where the child should be placed. Read more
Source§

fn should_relayout(&self, old_delegate: &dyn SingleChildLayoutDelegate) -> bool

Called whenever a new instance of the custom layout delegate class is provided to the RenderCustomSingleChildLayoutBox object, or any time that a new CustomSingleChildLayout object is created with a new instance of the custom layout delegate class (which amounts to the same thing, because the latter is implemented in terms of the former). Read more
Source§

fn as_any(&self) -> &dyn Any

The concrete delegate, for Dart’s runtimeType comparison and its covariant narrowing of should_relayout’s argument.
Source§

fn relayout(&self) -> Option<&Rc<dyn Listenable>>

The Listenable the layout will update on, Dart’s relayout constructor argument. Read more
Source§

fn get_size(&self, constraints: BoxConstraints) -> Size

The size of this object given the incoming constraints. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,