use freya_engine::prelude::Paragraph;
use std::ops::Div;
use torin::geometry::{Area, Size2D};
#[derive(Clone, Debug, Default, PartialEq)]
pub struct NodeReferenceLayout {
pub area: Area,
pub inner: Size2D,
}
impl NodeReferenceLayout {
pub fn div(&mut self, rhs: f32) {
self.area = self.area.div(rhs);
self.inner = self.inner.div(rhs);
}
}
#[derive(Debug)]
pub enum CursorLayoutResponse {
CursorPosition { position: usize, id: usize },
TextSelection { from: usize, to: usize, id: usize },
}
pub struct CachedParagraph(pub Paragraph);
unsafe impl Send for CachedParagraph {}
unsafe impl Sync for CachedParagraph {}