pub struct LayoutBox {
pub component: Arc<dyn Component>,
pub rect: LayoutRect,
pub clip: LayoutRect,
pub children: Vec<LayoutBox>,
pub parent_index: Option<usize>,
pub lines: Option<Vec<String>>,
pub line_offset: usize,
pub layer: usize,
pub scroll_view: Option<Arc<ScrollView>>,
pub scroll_content_lines: Option<Vec<String>>,
}Expand description
A box in the layout tree.
Fields§
§component: Arc<dyn Component>The component this box represents.
rect: LayoutRectThe allocated rectangle.
clip: LayoutRectThe clipping rectangle (intersection of all ancestor clips).
children: Vec<LayoutBox>Child boxes.
parent_index: Option<usize>Parent box index.
lines: Option<Vec<String>>Rendered lines (cached).
line_offset: usizeLine offset for cursor visibility.
layer: usizeLayer for hit testing.
scroll_view: Option<Arc<ScrollView>>ScrollView reference if this is a scroll view.
scroll_content_lines: Option<Vec<String>>Scroll content lines (pre-rendered).
Implementations§
Source§impl LayoutBox
impl LayoutBox
pub fn new( component: Arc<dyn Component>, rect: LayoutRect, clip: LayoutRect, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LayoutBox
impl !UnwindSafe for LayoutBox
impl Freeze for LayoutBox
impl Send for LayoutBox
impl Sync for LayoutBox
impl Unpin for LayoutBox
impl UnsafeUnpin for LayoutBox
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