pub struct Layout<'a> {
pub text: Ref<'a, Text>,
pub document_layout: Ref<'a, DocumentLayout>,
pub session_layout: Ref<'a, SessionLayout>,
}
Fields§
§text: Ref<'a, Text>
§document_layout: Ref<'a, DocumentLayout>
§session_layout: Ref<'a, SessionLayout>
Implementations§
Source§impl<'a> Layout<'a>
impl<'a> Layout<'a>
pub fn as_text(&self) -> &Text
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn find_first_line_ending_after_y(&self, y: f64) -> usize
pub fn find_first_line_starting_after_y(&self, y: f64) -> usize
pub fn logical_to_normalized_position( &self, position: Position, affinity: Affinity, ) -> (f64, f64)
pub fn line(&self, index: usize) -> Line<'_>
pub fn lines(&self, start: usize, end: usize) -> Lines<'_> ⓘ
pub fn block_elements( &self, line_start: usize, line_end: usize, ) -> BlockElements<'_> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Layout<'a>
impl<'a> !RefUnwindSafe for Layout<'a>
impl<'a> !Send for Layout<'a>
impl<'a> !Sync for Layout<'a>
impl<'a> Unpin for Layout<'a>
impl<'a> !UnwindSafe for Layout<'a>
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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