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: OffsetThe point at which to render the menu, if possible.
Should be provided in local coordinates.
Implementations§
Source§impl DesktopTextSelectionToolbarLayoutDelegate
impl DesktopTextSelectionToolbarLayoutDelegate
Sourcepub fn new(anchor: Offset) -> DesktopTextSelectionToolbarLayoutDelegate
pub fn new(anchor: Offset) -> DesktopTextSelectionToolbarLayoutDelegate
Creates an instance of DesktopTextSelectionToolbarLayoutDelegate.
Trait Implementations§
Source§impl SingleChildLayoutDelegate for DesktopTextSelectionToolbarLayoutDelegate
impl SingleChildLayoutDelegate for DesktopTextSelectionToolbarLayoutDelegate
Source§fn get_constraints_for_child(
&self,
constraints: BoxConstraints,
) -> BoxConstraints
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
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
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 moreSource§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
The concrete delegate, for Dart’s
runtimeType comparison and its covariant
narrowing of should_relayout’s argument.Auto Trait Implementations§
impl Forget for DesktopTextSelectionToolbarLayoutDelegate
impl Freeze for DesktopTextSelectionToolbarLayoutDelegate
impl Move for DesktopTextSelectionToolbarLayoutDelegate
impl RefUnwindSafe for DesktopTextSelectionToolbarLayoutDelegate
impl Send for DesktopTextSelectionToolbarLayoutDelegate
impl Sync for DesktopTextSelectionToolbarLayoutDelegate
impl Unpin for DesktopTextSelectionToolbarLayoutDelegate
impl UnsafeUnpin for DesktopTextSelectionToolbarLayoutDelegate
impl UnwindSafe for DesktopTextSelectionToolbarLayoutDelegate
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