Struct script::dom::textcontrol::TextControlSelection
source · pub struct TextControlSelection<'a, E: TextControlElement> {
element: &'a E,
textinput: &'a DomRefCell<TextInput<ScriptToConstellationChan>>,
}
Fields§
§element: &'a E
§textinput: &'a DomRefCell<TextInput<ScriptToConstellationChan>>
Implementations§
source§impl<'a, E: TextControlElement> TextControlSelection<'a, E>
impl<'a, E: TextControlElement> TextControlSelection<'a, E>
pub fn new( element: &'a E, textinput: &'a DomRefCell<TextInput<ScriptToConstellationChan>>, ) -> Self
pub fn dom_select(&self)
pub fn dom_start(&self) -> Option<u32>
pub fn set_dom_start(&self, start: Option<u32>) -> Result<(), Error>
pub fn dom_end(&self) -> Option<u32>
pub fn set_dom_end(&self, end: Option<u32>) -> Result<(), Error>
pub fn dom_direction(&self) -> Option<DOMString>
pub fn set_dom_direction( &self, direction: Option<DOMString>, ) -> Result<(), Error>
pub fn set_dom_range( &self, start: u32, end: u32, direction: Option<DOMString>, ) -> Result<(), Error>
pub fn set_dom_range_text( &self, replacement: DOMString, start: Option<u32>, end: Option<u32>, selection_mode: SelectionMode, ) -> Result<(), Error>
fn start(&self) -> u32
fn end(&self) -> u32
fn direction(&self) -> SelectionDirection
fn set_range( &self, start: Option<u32>, end: Option<u32>, direction: Option<SelectionDirection>, original_selection_state: Option<SelectionState>, )
Auto Trait Implementations§
impl<'a, E> Freeze for TextControlSelection<'a, E>
impl<'a, E> !RefUnwindSafe for TextControlSelection<'a, E>
impl<'a, E> !Send for TextControlSelection<'a, E>
impl<'a, E> !Sync for TextControlSelection<'a, E>
impl<'a, E> Unpin for TextControlSelection<'a, E>
impl<'a, E> !UnwindSafe for TextControlSelection<'a, E>
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
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert