pub struct SearchController { /* private fields */ }Expand description
A controller to manage a search view created by SearchAnchor.
A SearchController is used to control a menu after it has been created, with methods
such as open_view and close_view. It can also
be used to read the text the user has typed, and to set that text, as any other
TextEditingControllerLeaf.
Implementations§
Source§impl SearchController
impl SearchController
Sourcepub fn new(app: &mut App) -> Ref<SearchController>
pub fn new(app: &mut App) -> Ref<SearchController>
Creates a controller for a SearchAnchor.
Sourcepub fn is_attached(self: Handle<Self>, app: &App) -> bool
pub fn is_attached(self: Handle<Self>, app: &App) -> bool
Whether this controller has been attached to a SearchAnchor.
Sourcepub fn is_open(self: Handle<Self>, app: &App) -> bool
pub fn is_open(self: Handle<Self>, app: &App) -> bool
Whether this controller’s search view is open.
The controller must be attached to a SearchAnchor.
Sourcepub fn open_view(self: Handle<Self>, app: &mut App)
pub fn open_view(self: Handle<Self>, app: &mut App)
Opens the search view.
The controller must be attached to a SearchAnchor.
Trait Implementations§
Source§impl ChangeNotifier for SearchController
impl ChangeNotifier for SearchController
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
Runs before the listener is stored. Dart overrides of
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
Runs after the listener is removed. Dart overrides of
removeListener that
work after super.removeListener go here.Source§impl Debug for SearchController
impl Debug for SearchController
Source§impl TextEditingControllerLeaf for SearchController
impl TextEditingControllerLeaf for SearchController
Source§fn text_editing_controller_data(
self: Handle<Self>,
app: &App,
) -> &TextEditingControllerData
fn text_editing_controller_data( self: Handle<Self>, app: &App, ) -> &TextEditingControllerData
Dart’s
TextEditingController fields, held under the field text_editing_controller
(text_editing_controller_accessors!).Source§fn text_editing_controller_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut TextEditingControllerData
fn text_editing_controller_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut TextEditingControllerData
Source§fn build_text_span(
self: Handle<Self>,
app: &App,
context: AnyElement,
style: Option<TextStyle>,
with_composing: bool,
) -> TextSpan
fn build_text_span( self: Handle<Self>, app: &App, context: AnyElement, style: Option<TextStyle>, with_composing: bool, ) -> TextSpan
Source§fn set_selection(
self: Handle<Self>,
app: &mut App,
new_selection: TextSelection,
)
fn set_selection( self: Handle<Self>, app: &mut App, new_selection: TextSelection, )
Source§fn clear_composing(self: Handle<Self>, app: &mut App)
fn clear_composing(self: Handle<Self>, app: &mut App)
Source§fn as_controller(self: Handle<Self>) -> AnyTextEditingController
fn as_controller(self: Handle<Self>) -> AnyTextEditingController
This controller as the erased
AnyTextEditingController: what to pass where a Dart
API takes a TextEditingController.Auto Trait Implementations§
impl !RefUnwindSafe for SearchController
impl !Send for SearchController
impl !Sync for SearchController
impl !UnwindSafe for SearchController
impl Forget for SearchController
impl Freeze for SearchControllerwhere
*const u8 is !null: Freeze,
PhantomData<Option<Listener>>: Freeze,
*const RcInner<Cell<usize>> is !null: Freeze,
PhantomData<RcInner<Cell<usize>>>: Freeze,
PhantomData<u8>: Freeze,
NonZero<u32>: Freeze,
PhantomData<fn() -> SearchAnchorState>: Freeze,
impl Move for SearchController
impl Unpin for SearchController
impl UnsafeUnpin for SearchControllerwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Listener>>: UnsafeUnpin,
*const RcInner<Cell<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<usize>>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> SearchAnchorState>: 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