pub struct DesktopTextSelectionToolbar {
pub key: Option<KeyRef>,
pub anchor: Offset,
pub children: Vec<WidgetRef>,
}Expand description
A Material-style desktop text selection toolbar.
Typically displays buttons for text manipulation, e.g. copying and pasting text.
Tries to position its top left corner as closely as possible to anchor
while remaining fully inside the viewport.
See also:
AdaptiveTextSelectionToolbar, which builds the toolbar for the current platform.TextSelectionToolbar, which is similar, but builds an Android-style toolbar.
Fields§
§key: Option<KeyRef>§anchor: OffsetThe point where the toolbar will attempt to position itself as closely as possible.
children: Vec<WidgetRef>The children that will be displayed in the text selection toolbar.
Typically these are buttons.
Must not be empty.
See also:
DesktopTextSelectionToolbarButton, which builds a default Material-style desktop text selection toolbar text button.
Implementations§
Source§impl DesktopTextSelectionToolbar
impl DesktopTextSelectionToolbar
Sourcepub fn new(
anchor: Offset,
children: impl IntoIterator<Item = WidgetRef>,
) -> DesktopTextSelectionToolbar
pub fn new( anchor: Offset, children: impl IntoIterator<Item = WidgetRef>, ) -> DesktopTextSelectionToolbar
Creates a const instance of DesktopTextSelectionToolbar.
Sourcepub fn key(self, key: KeyRef) -> DesktopTextSelectionToolbar
pub fn key(self, key: KeyRef) -> DesktopTextSelectionToolbar
Dart DesktopTextSelectionToolbar(key:).
Trait Implementations§
Source§impl Debug for DesktopTextSelectionToolbar
impl Debug for DesktopTextSelectionToolbar
Source§impl StatelessWidget for DesktopTextSelectionToolbar
impl StatelessWidget for DesktopTextSelectionToolbar
Source§fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Dart’s
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for DesktopTextSelectionToolbar
impl !Send for DesktopTextSelectionToolbar
impl !Sync for DesktopTextSelectionToolbar
impl !UnwindSafe for DesktopTextSelectionToolbar
impl Forget for DesktopTextSelectionToolbar
impl Freeze for DesktopTextSelectionToolbar
impl Move for DesktopTextSelectionToolbar
impl Unpin for DesktopTextSelectionToolbar
impl UnsafeUnpin for DesktopTextSelectionToolbarwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Rc<dyn Widget>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.