From c6a443ac1bee17151fa10b4675cb66b5a05aef29 Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 13 Nov 2026 18:02:26 +0000 Subject: [PATCH] docs: contract-api and components-index regenerated --- docs/contract-api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/contract-api.md b/docs/contract-api.md index a071aae4d..9a57b42d3 100644 --- a/docs/contract-api.md +++ b/docs/contract-api.md @@ -2133,6 +2133,7 @@ The component traits, context types, `PaintUi`, `Looks`, the pipeline and its st - `pub fn cell_width(&self, column: &craft_behavior::ColumnKey, width: f32)`. Reports, from the `Ideal` measure of a collection's item, the width its content in `column` takes unclipped, - `pub fn layout(&self, run: &TextRun<'_>) -> TextLayout`. Lays `run` out in the content's room, as `Draw::text` will paint it. - `pub fn layout_at(&self, run: &TextRun<'_>, width: f32) -> TextLayout`. Lays `run` out `width` wide, for a text that paints in a band narrower than the room. + - `pub fn least_width(&self, run: &TextRun<'_>) -> f32`. The width of `run`, a run that elides, at its readable least ([`TextRun::READABLE_CHARACTERS`]): the least - `pub fn field_text(&self, run: &TextRun<'_>) -> Vec2`. The room an editable text in a control sized by its text needs for `run`: the laid-out text and the caret the - `pub fn layout_doc(&self, text: &crate::primitives::DocText<'_>) -> TextLayout`. Lays document `text` out `text.wrap` wide, as `ContentPainterCx::layout` will paint it: the galley a content - `pub fn child(&self, key: impl Hash + Debug, child: &mut D, proposal: Proposal) -> Vec2`. Measures a child under the composite's resolved `enabled` and `size`, as `PaintUi::child` will show it. @@ -2789,6 +2790,7 @@ Painters, `Draw`, the sensing core, the text adapter and `ImeSurface`. - `craft_ui::primitives::TextOutcome`: `pub struct TextOutcome { pub rect: Rect, pub draft: Option, pub value: Option, pub layout: Option, pub caret_visible: bool, pub invalid: bool, pub committed_tag: Option, pub composing: bool, pub completions: Vec }`. A text part's result this pass. - `pub const fn new(rect: Rect) -> Self`. An outcome over `rect` with no draft or value. - `craft_ui::primitives::TextRun`: `pub struct TextRun<'a> { pub spans: Vec>, pub role: TypeRole, pub color: Option, pub wrap: Wrap, pub ltr: bool, pub align: HAlign, pub rotation: f32 }`. The one description of UI text. + - `pub const READABLE_CHARACTERS: usize`. The characters a run that elides keeps before its ellipsis at its least, its readable least: a row narrows - `pub fn new(text: impl Into>) -> Self`. A one-span run in the label role. - `pub fn spans(spans: Vec>) -> Self`. A run of `spans`. - `pub fn mnemonic(text: &'a str, at: Option) -> Self`. `text` with its character `at` underlined, as a mnemonic shows while it is in use; all of `text` plain when