bauiv1lib.docui.prep package¶
Functionality related to prepping a doc-ui page for display.
Consumes native (v2 / language-agnostic) doc-ui documents: text rides
as bacommon.langstr.LangStrSpec (handed to widgets as native
handles that re-evaluate on language changes) and assets as typed refs.
Warning
This is an internal api and subject to change at any time. Do not use it in mod code.
- class bauiv1lib.docui.prep.ButtonPrep(buttoncall: Callable[..., bauiv1.Widget], buttoneditcall: Callable | None, decorations: list[DecorationPrep], textures: dict[str, str], widgetid: str, action: bacommon.docui.v2.Action | None)[source]¶
Bases:
objectPrep for a button in a doc-ui.
- action: bacommon.docui.v2.Action | None¶
- buttoncall: Callable[..., bauiv1.Widget]¶
- decorations: list[DecorationPrep]¶
- class bauiv1lib.docui.prep.DecorationPrep(call: Callable[..., bauiv1.Widget], textures: dict[str, str], meshes: dict[str, str], highlight: bool)[source]¶
Bases:
objectPrep for a decoration in a doc-ui.
- call: Callable[..., bauiv1.Widget]¶
- class bauiv1lib.docui.prep.PagePrep(rootcall: Callable[..., bauiv1.Widget] | None, rows: list[RowPrep], width: float, height: float, simple_culling_v: float, center_vertically: bool, title: bauiv1.LangStr, root_post_calls: list[Callable[[bauiv1.Widget], None]])[source]¶
Bases:
objectPrep for a page in a doc-ui.
- root_post_calls: list[Callable[[bauiv1.Widget], None]]¶
- rootcall: Callable[..., bauiv1.Widget] | None¶
- title: bauiv1.LangStr¶
Native language-string title handle.
- class bauiv1lib.docui.prep.RowPrep(width: float, height: float, titlecalls: list[Callable[..., bauiv1.Widget]], hscrollcall: Callable[..., bauiv1.Widget] | None, hscrolleditcall: Callable | None, hsubcall: Callable[..., bauiv1.Widget] | None, buttons: list[ButtonPrep], simple_culling_h: float, decorations: list[DecorationPrep])[source]¶
Bases:
objectPrep for a row in a doc-ui.
- buttons: list[ButtonPrep]¶
- decorations: list[DecorationPrep]¶
- hscrollcall: Callable[..., bauiv1.Widget] | None¶
- hsubcall: Callable[..., bauiv1.Widget] | None¶
- titlecalls: list[Callable[..., bauiv1.Widget]]¶
- bauiv1lib.docui.prep.instantiate_page_prep(pageprep: PagePrep, *, rootwidget: bui.Widget, scrollwidget: bui.Widget, backbutton: bui.Widget, windowbackbutton: bui.Widget | None, window: DocUIWindow) bui.Widget[source]¶
Create a UI using prepped data.
- bauiv1lib.docui.prep.prep_button_debug(bsize: tuple[float, float], bcenter: tuple[float, float], tdelay: float | None, out_decoration_preps: list[DecorationPrep]) None[source]¶
Prep debug decorations for a button.
- bauiv1lib.docui.prep.prep_decorations(decorations: list[Decoration], center_x: float, center_y: float, scale: float, tdelay: float | None, *, packages: list[str], highlight: bool, out_decoration_preps: list[DecorationPrep]) None[source]¶
Prep appropriate decoration types for a list of decorations.
- bauiv1lib.docui.prep.prep_display_item(display_item: DisplayItem, parent_center: tuple[float, float], parent_scale: float, tdelay: float | None, out_decoration_preps: list[DecorationPrep], *, highlight: bool) None[source]¶
Prep decorations for a display-item.
- bauiv1lib.docui.prep.prep_image(image: Image, bcenter: tuple[float, float], bscale: float, tdelay: float | None, out_decoration_preps: list[DecorationPrep], *, highlight: bool) None[source]¶
Prep decorations for an image.
- bauiv1lib.docui.prep.prep_page(page: Page, *, packages: list[str], uiscale: UIScale, scroll_width: float, scroll_height: float, idprefix: str, immediate: bool = False) PagePrep[source]¶
Prep a page.
- bauiv1lib.docui.prep.prep_row_debug(size: tuple[float, float], pos: tuple[float, float], tdelay: float | None, out_decoration_preps: list[DecorationPrep]) None[source]¶
Prep debug decorations for a row.