Core and the app · crate
kinogaki-sdk-ui
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
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.
| Module | What |
|---|---|
convert | geometry, colors, strokes, fonts, ids, senses and responses, bit for bit |
theme | theme_snapshot: lib-ui's tokens at the element size in effect |
input | input_snapshot: the frame's pointer, keys and events |
painter | LibPainter and the frame's reserved slots |
ui | LibUi: widgets and layout |
menus | the menu entries SDK panels drew, recorded when asked |
params | the SDK's parameters, values and units as lib-ui's property schemas, and back |
sheet | sheets to lib-ui's property schemas and back; code languages |
composites | sheets, cards, popovers and value fields by lib-ui's components |
gizmo | the gizmo service: projections from cameras, paint and hit by lib-viewport |
units | the 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
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-math | lib-math | normal | Kinogaki's vectors, points, matrices, quaternions and deterministic elementary functions. |
kinogaki-properties | lib-ui | normal | Property schemas: what an inspector shows, as data. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
kinogaki-studio-ui-api | SDK | normal | Kinogaki Studio's UI layer for plugins. |
kinogaki-ui | lib-ui | normal | Kinogaki UI: the immediate-mode UI framework Kinogaki applications are built on. |
kinogaki-viewport-core | lib-viewport | normal | Kinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit. |
kinogaki-viewport-ui | lib-viewport | normal | Kinogaki 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
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
Modules
compositesThe host's composites, drawn by lib-ui's real components: property sheets by itsSheet, cards by itsCard, popovers in anAreaframed with the host's popup style, value fields by itsValueFields.405 linesconvertThe SDK's plain UI values to and from lib-ui's: geometry, colors, strokes, fonts, ids, senses and responses.184 linesframe(private)What everyLibUiof one frame shares: the input and theme snapshots, the host's hooks, the lib-ui responses behind the SDK responses handed out, and where the host's own controls drew.192 linesgizmoThe transform gizmo as a host service: the SDK'sProjectionfilled from a view's camera, and painting and hit testing by lib-viewport's own gizmo (kinogaki_viewport_ui::gizmo).141 linesinputThis frame's input as the SDK's plainUserInput, built once a frame from lib-ui's input state.157 linesmenusThe menu entries SDK panels drew (Ui::menu_item), recorded once asked withrecord_menus, as lib-ui records a sheet's rows: a test finds an entry by its text and clicks its rectangle.50 linespainterLibPainter: the SDK'sPainterover a lib-ui painter, and the frame's table of reservedSlots.485 linespainter::slots(private)The frame's reserved places: which layer, shape and clip eachSlotstands for.56 linesparamslib-ui's property values and units ↔ the SDK's parameters'.262 linessheetThe SDK's property sheets (sheet::Sheet) as lib-ui's property schemas (their values moved back after an edit), and its code languages as lib-ui's.753 linesthemeThe SDK'sThemefilled from lib-ui's tokens at the element size in effect.82 linesuiLibUi: the SDK'sUiover a lib-uiUi.337 linesunitsThe units service: numbers typed and shown in the user's units, by lib-ui's numeric entry (kinogaki_properties::numeric), as a sheet's number fields read and show them.49 lineswidgets(private)The SDK's immediate widgets as the lib-ui widgets Studio's panels use.123 lines
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.
