Core and the app · crate

kinogaki-sdk-ui

Core

The plugin SDK's UI layer over lib-ui: the SDK's Ui and Painter, its sheets and the host's services, implemented over lib-ui.

Repository
Core and the app (kinogaki/studio-core)
Folder
studio/core/sdk-ui
Source
14 files, 3,263 lines
Tests
10 files, 3,481 lines
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

The plugin SDK's UI layer over lib-ui: the SDK's Ui and Painter, its sheets and the host's services, implemented over lib-ui.

Plugins draw through kinogaki-studio-ui-api and never see lib-ui. This crate is where the two meet, and its rule is pixel identity: each SDK call makes exactly the lib-ui call a Studio panel makes for the same thing, so a panel ported to the SDK adds the same shapes and draws the same pixels (tests/equivalence.rs checks every call against lib-ui drawn directly). Only Studio's host uses it; packages and plugins never depend on it. It never names the editor.

ModuleWhat
convertgeometry, colors, strokes, fonts, ids, senses and responses, bit for bit
themetheme_snapshot: lib-ui's tokens at the element size in effect
inputinput_snapshot: the frame's pointer, keys and events
painterLibPainter and the frame's reserved slots
uiLibUi: widgets and layout
menusthe menu entries SDK panels drew, recorded when asked
paramsthe SDK's parameters, values and units as lib-ui's property schemas, and back
sheetsheets to lib-ui's property schemas and back; code languages
compositessheets, cards, popovers and value fields by lib-ui's components
gizmothe gizmo service: projections from cameras, paint and hit by lib-viewport
unitsthe units service: numbers typed and shown in the project's units

Each frame the host builds one Frame (the input and theme snapshots and its Host hooks) and lends it to every LibUi it makes:

Depends on

CrateRepositoryAsWhat it is
kinogaki-mathlib-mathnormalKinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.
kinogaki-propertieslib-uinormalProperty schemas: what an inspector shows, as data.
kinogaki-studio-apiSDKnormalKinogaki Studio's headless plugin API.
kinogaki-studio-ui-apiSDKnormalKinogaki Studio's UI layer for plugins.
kinogaki-uilib-uinormalKinogaki UI: the immediate-mode UI framework Kinogaki applications are built on.
kinogaki-viewport-corelib-viewportnormalKinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit.
kinogaki-viewport-uilib-viewportnormalKinogaki viewport widgets for Kinogaki UI (lib-ui): one/four-view layout, camera navigation, the six-axis view cube, transform gizmo handles and point number labels.

Third-party

None.

Used by

CrateRepositoryAsWhat it is
kinogaki-editorCore and the appnormalKinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.

Modules

Public types and traits

At the crate root

Traits FileDialogsReferences

Structs FrameGizmoHostLibPainterLibUiUnits

By module: 13 public types and traits in 8 modules

composites HeldRowMenu

frame FileDialogsFrameHostReferences

gizmo Gizmo

menus Entry

painter LibPainterPainted

sheet CodeForLib

ui LibUi

units Units

Besides these, 51 public functions at module level.