Skip to main content

Module editor_ui

Module editor_ui 

Source
Expand description

Editor UI types re-exported from khora_core.

Includes everything from khora_core::ui::editor::* plus the shared UiTheme and font types that live one level up in khora_core::ui (because the hub uses them too).

Modules§

camera
Editor camera with orbit / pan / zoom controls.
command
Undo/redo command history for editor operations.
dock
Dock model — the tree of splits and tab groups behind the editor workbench.
gizmo
Editor gizmo geometry generation.
gizmo_interact
Gizmo manipulation — grabbing a handle and turning cursor motion into a transform delta.
icons
Editor icon set — names and Unicode codepoints from the Lucide font.
log_capture
A dual-output logger that captures log entries for the editor console while also printing to stderr for development.
panel
Abstract editor panel and dock location types.
shell
Abstract editor shell — generic host for dock-based panel layouts.
state
Editor state shared between the application logic and UI panels.
ui_builder
Abstract widget builder for editor panels.
viewport_texture
Abstract viewport texture handle for displaying engine-rendered images in editor panels.

Structs§

AssetEntry
A lightweight description of an asset for the asset browser panel.
CommandHistory
Fixed-capacity undo/redo stack.
ComponentJson
Snapshot of one component on an inspected entity, captured generically as JSON via the macro-generated to_json on ComponentRegistration.
DockLayout
Everything the shell needs to paint one frame of the dock.
DockTree
A tree of splits and tab groups covering one workbench area.
EditorCamera
An orbit camera controller for the editor viewport.
EditorCommand
A reversible editor operation.
EditorLogCapture
A log::Log implementation that stores entries in a shared buffer and also writes to stderr.
EditorState
Shared editor state populated by Application::update() each frame.
FontPack
A collection of fonts grouped by family.
GizmoDrag
A manipulation in progress: one grabbed handle, tracked across frames.
GizmoLineInstance
A single line segment for GPU rendering.
GizmoTransform
The transform an entity had when a drag began.
InspectedEntity
Snapshot of an inspected entity.
Interaction
Result of an UiBuilder::interact_rect call.
LogEntry
A captured log entry for the console panel.
NamedFont
A named font face inside a pack. The name is used by the backend to register the font in its registry and (where applicable) to make it addressable by user code.
SceneNode
A lightweight description of an entity in the scene tree.
SelectionGizmo
One selected entity’s gizmo request.
SplitId
Stable handle for a split, so a resize drag can name the divider it grabbed without depending on the tree’s shape surviving the gesture.
SplitterLayout
One draggable divider placed on screen.
StatusBarData
Status bar data displayed at the bottom of the editor.
TabGroupLayout
One tab group placed on screen.
UiTheme
Color palette and sizing tokens for any Khora UI surface.
ViewportTextureHandle
An opaque handle referencing a texture that the UI backend knows how to display.

Enums§

DockNode
A node of the dock tree.
DropZone
Where a dragged panel would land relative to the group under the pointer.
EditorMode
The active editing workspace, switched via the left “spine” mode bar.
EntityIcon
Icon hint for the scene tree.
FontFamilyHint
Font family hint passed to UiBuilder::paint_text_styled. Backends map each variant to whichever face was registered for that family.
FontHandle
A bundled font, either as a static slice or owned bytes loaded at runtime.
GizmoAxis
One of the three manipulator handles.
GizmoDelta
What a drag has done so far, in world space, relative to the drag’s start.
GizmoKind
The kind of gizmo to draw for an entity.
GizmoMode
The active gizmo tool in the viewport toolbar.
Icon
A semantic icon identifier mapped to a Lucide codepoint.
InlineEditEvent
Outcome of an UiBuilder::inline_text_field this frame.
LogLevel
Log severity matching log::Level.
PanelLocation
Where a panel is placed in the editor dock layout.
PlayMode
The play-mode state of the editor.
PropertyEdit
A property edit to apply back to the ECS world.
SplitAxis
Which way a split divides its area.
TextAlign
Horizontal alignment for UiBuilder::paint_text_styled.

Traits§

EditorPanel
A single editor panel that can render itself into a UiBuilder.
EditorShell
The top-level editor shell — a generic host for docked panels.
UiBuilder
A backend-agnostic, immediate-mode widget builder.

Functions§

generate_selection_gizmos
Generates all gizmo lines for a set of selected entities.
gizmo_basis
The frame the handles are drawn and dragged in for mode.
gizmo_world_size
World size a manipulator at origin needs to occupy a constant fraction of the viewport, whatever its distance from the camera.
pick_handle
The nearest handle whose geometry the ray passes within tolerance of, or None when the cursor is not over the manipulator.
ratio_from_pointer
Turns a pointer position on a splitter into the ratio it implies.
zone_at
Classifies a pointer position inside rect into a drop zone.

Type Aliases§

DockRect
A rectangle as [x, y, width, height], matching the convention used by UiBuilder throughout the UI layer.
GizmoBasis
World-space directions of the three handles, indexed by GizmoAxis::index.