use std::{convert::Infallible, ops::Range};
use super::*;
#[derive(Clone, Default)]
pub(super) struct StyledState;
impl StyledState {
pub(super) fn is_bound(&self) -> bool {
false
}
pub(super) fn copy_runtime_state_from(&mut self, _old: &Self) {}
}
pub(super) enum SpansBeforeEdit {}
pub(super) type SnapshotSpans = Infallible;
pub(super) type SnapshotParagraphs = Infallible;
pub(super) type SnapshotObjects = Infallible;
pub(super) struct InsertedText<'a>(std::marker::PhantomData<&'a ()>, Infallible);
impl TextInputState {
#[inline]
pub(super) fn sync_external_spans(&self) {}
#[inline]
pub(super) fn current_spans(&self) -> Option<SnapshotSpans> {
None
}
#[inline]
pub(super) fn styled_before_edit(&self) -> Option<SpansBeforeEdit> {
None
}
#[inline]
pub(super) fn styled_after_edit(&self, _edit: Option<SpansBeforeEdit>, _range: Range<usize>, _inserted: usize) {}
#[inline]
pub(super) fn styled_after_insert(
&self,
_edit: Option<SpansBeforeEdit>,
_range: Range<usize>,
inserted: &InsertedText<'_>,
) {
match inserted.1 {}
}
#[inline]
pub(super) fn restore_spans(&self, spans: SnapshotSpans) {
match spans {}
}
#[inline]
pub(super) fn current_paragraphs(&self) -> Option<SnapshotParagraphs> {
None
}
#[inline]
pub(super) fn restore_paragraphs(&self, kinds: SnapshotParagraphs) {
match kinds {}
}
#[inline]
pub(super) fn current_objects(&self) -> Option<SnapshotObjects> {
None
}
#[inline]
pub(super) fn restore_objects(&self, objects: SnapshotObjects) {
match objects {}
}
#[inline]
pub(super) fn object_ranges(&self) -> Vec<Range<usize>> {
Vec::new()
}
#[inline]
pub(super) fn object_at_point(&self, _x: f32, _y: f32) -> Option<Range<usize>> {
None
}
#[inline]
pub(super) fn begin_object_resize(&self, _x: f32, _y: f32) -> bool {
false
}
#[inline]
pub(super) fn drag_object_resize(&self, _x: f32) -> bool {
false
}
#[inline]
pub(crate) fn end_object_resize(&self) {}
#[inline]
pub(super) fn hover_object_handle(&self, _point: Option<(f32, f32)>) {}
#[inline]
pub(crate) fn object_handle_hovered(&self) -> bool {
false
}
pub(crate) fn clipboard_selection(&self) -> Option<String> {
if self.is_masked() {
return None;
}
self.selected_text()
}
pub(crate) fn click_link_at_point(&self, _x: f32, _y: f32) -> bool {
false
}
}