Skip to main content

VertBox

Enum VertBox 

Source
pub enum VertBox {
    Line {
        height: Length,
        depth: Length,
        leading: Length,
        contents: Vec<(Length, PureHorzBox)>,
    },
    Skip(Length),
    ParagTop(Length),
    FramePad(Length),
    ClearPage,
    HookPageBreak(HookId),
    FrameStart(DecoId),
    FrameEnd(DecoId),
    ListMark(ListMarkKind),
}
Expand description

A milestone-1 subset of vert_box: a typeset line or vertical space.

See crate::hbox::PureHorzBox for what the #[subast] list means and what checks it.

Variants§

§

Line

One typeset line: boxes with their x offsets from the line start.

Fields

§height: Length
§depth: Length
§leading: Length

Baseline-to-baseline distance to the next line: the leading a context was set to when this line was assembled. page-break takes no context, so the property rides the line itself, set by break_into_lines from ctx.leading.

§contents: Vec<(Length, PureHorzBox)>
§

Skip(Length)

Fixed vertical space (block-skip, frame padding, a paragraph’s bottom margin) — NOT padded by min_first_line_ascender.

§

ParagTop(Length)

A paragraph’s TOP margin (prim_line_break prepends this from ctx.paragraph_top). Distinguished from Skip because SATySFi pads only the paragraph margin_top up to min_first_line_ascender (lineBreak.ml:857) — block-skips and frame pads get no such pad. Accumulates into pending_skip exactly like Skip; the difference is only that its presence enables the ascender pad on the following line.

§

FramePad(Length)

A block-frame-breakable frame’s internal top/bottom padding. Unlike Skip (a margin, which max-COLLAPSES with adjacent margins), frame padding is ADDITIVE — SATySFi adds it to the running height inside the frame (pageBreak.ml:323 hgttotal +% pads.paddingT, :380 +% pads.paddingB), so it stacks ON TOP of the surrounding paragraph margin rather than being absorbed by it.

§

ClearPage

clear-page’s marker (primitives.cppo.ml’s VertClearPage, horzBox.ml:346) — forces the current page to end right here: chop_page closes the page as soon as at least one real Line has been placed, leaving everything from this marker onward for the next page. Contributes zero height (measure_block), mirroring pageBreak.ml’s PBClearPage (solidify’s ImVertFixedEmpty(Fixed, Length.zero)).

§

HookPageBreak(HookId)

hook-page-break-block’s marker (vminst.ml:632 BackendHookPageBreakBlock / horzBox.ml:347’s VertHookPageBreak) — the block-level analog of PureHorzBox::HookPageBreak: an opaque index into a lang-side hook table, fired by fire_hooks with the page’s pbinfo and the point where it sits in the flow. Contributes zero height, same as ClearPage.

§

FrameStart(DecoId)

block-frame-breakable’s frame-extent markers: the frame’s indented contents sit between a FrameStart(id)/FrameEnd(id) pair; chop_page/place_block_at place each as a zero-height marker PlacedLine (the HookPageBreak pattern) and fire_hooks derives each page fragment’s rect from the real lines between them. The frame’s pads/width/deco-set live lang-side (DecoEntry::Block).

§

FrameEnd(DecoId)

§

ListMark(ListMarkKind)

an INERT reflow marker for list (itemize/enumerate) structure, emitted by the list-mark primitive from lib-rustyfi/dist-v01/packages/itemize.satyh’s listing/listing-item/listing-item-breakable/enumerate/ enumerate-item. Zero height/depth, contributes nothing to any measurement (measure_block) or placement (chop_page/ place_block_at) — it never reaches a PlacedLine, so PDF and faithful HTML are byte-identical whether or not a document’s stdlib emits these. Read only by the reflow HTML walker (the html-support branch’s rustyfi-html/src/reflow/block.rs’s walk_vboxes), which uses the Start/End nesting to rebuild real <ul>/<ol>/<li> structure.

Implementations§

Source§

impl VertBox

Source

pub fn visit<__T>(&self, visitor: impl IntoVisitor<__T>) -> &Self

Visit self with any Visit, returning self to chain.

Source§

impl VertBox

Source

pub fn visit_mut<__T>(&mut self, visitor: impl IntoVisitorMut<__T>) -> &mut Self

Visit self with any VisitMut, returning self to chain.

Trait Implementations§

Source§

impl Ast for VertBox

Source§

impl Clone for VertBox

Source§

fn clone(&self) -> VertBox

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VertBox

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<__F: FnMut(&VertBox)> IntoHook<VertBox> for __F

Source§

fn into_hook(self) -> impl Hook

Source§

impl<__F: FnMut(&mut VertBox)> IntoHookMut<VertBox> for __F

Source§

impl<__F: FnMut(&VertBox)> IntoVisitor<VertBox> for __F

Source§

fn into_visitor(self) -> impl Visit

Source§

impl<__F: FnMut(&mut VertBox)> IntoVisitorMut<VertBox> for __F

Source§

impl PartialEq for VertBox

Source§

fn eq(&self, other: &VertBox) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Repeater<0> for VertBox

Source§

type Type = Length

The leaked type, valid in the referrer’s context via <T as Repeater<INDEX>>::Type.
Source§

impl Repeater<1> for VertBox

Source§

type Type = ListMarkKind

The leaked type, valid in the referrer’s context via <T as Repeater<INDEX>>::Type.
Source§

impl Repeater<2> for VertBox

Source§

type Type = Vec<(Length, PureHorzBox)>

The leaked type, valid in the referrer’s context via <T as Repeater<INDEX>>::Type.
Source§

impl Repeater<3> for VertBox

Source§

type Type = HookId

The leaked type, valid in the referrer’s context via <T as Repeater<INDEX>>::Type.
Source§

impl Repeater<4> for VertBox

Source§

type Type = DecoId

The leaked type, valid in the referrer’s context via <T as Repeater<INDEX>>::Type.
Source§

impl StructuralPartialEq for VertBox

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Clone for T
where T: Clone,

Source§

fn clone(&self) -> T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Debug for T
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.