Skip to main content

plan_in_place_text_updates

Function plan_in_place_text_updates 

Source
pub fn plan_in_place_text_updates<M>(
    structural_dirty: bool,
    style_updates_empty: bool,
    text_updates: &[PendingTextUpdate],
    slots: &[TextElementSlot],
    measure_text: M,
) -> Option<Vec<(usize, String, i32)>>
where M: FnMut(usize, &str) -> i32,
Expand description

単一行・固定幅箱のインプレーステキスト更新を適用できるか判定する(純粋ロジック)。

全条件を満たす場合のみ Some(Vec<(elem_array_idx, new_text, new_width)>) を返し、 複数行への折り返し変化や隣接インライン要素の押し出しが生じる恐れがある場合は None を返して通常の parse_and_layout へ安全にフォールバックする。