lib-ui · crate

kinogaki-ui

Libraryenvironment

Kinogaki UI: the immediate-mode UI framework Kinogaki applications are built on.

Repository
lib-ui (kinogaki/lib-ui)
Folder
libs/lib-ui/crates/ui
Source
307 files, 83,825 lines
Tests
57 files, 12,940 lines
Depends on This crate Used by Property schemas: what an inspector shows, as data.kinogaki-properties Kinogaki SVG reads SVG documents the way resvg (and so, closely, a browser) does, converts them into a render tree with every property resolved, and draws them with an exact-coverage anti-aliased rasterizer.kinogaki-svg Unicode text segmentation and character properties for Kinogaki's text editing and layout, from the Unicode Character Database (version [`UNICODE_VERSION`]):kinogaki-unicode Kinogaki's own `smallvec`, published under the crates.io name so the frozen wgpu, wgpu-core, wgpu-hal and harfrust resolve to it through `[patch.crates-io]`, and used by kinogaki-ui.smallvec kinogaki-ui Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.kinogaki-editor Studio's test harness: the real editor, its event routing and its background work, driven offscreen with only the packages a test names.kinogaki-harness The plugin SDK's UI layer over lib-ui: the SDK's [`Ui`](studio_ui_api::Ui) and [`Painter`](studio_ui_api::Painter), its sheets and the host's services, implemented over lib-ui.kinogaki-sdk-ui Kinogaki Studio: the editor in a window, after the plugins load.kinogaki-studio Kinogaki UI's native shell: opens the windows, runs the [`winit`] event loop, turns window events into [`kinogaki_ui`] input, paints each frame with `kinogaki-ui-wgpu` and drives an [`App`].kinogaki-ui-shell kinogaki-ui drawn with [wgpu](https://crates.io/crates/wgpu).kinogaki-ui-wgpu 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.kinogaki-viewport-ui
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

Kinogaki UI: the immediate-mode UI framework Kinogaki applications are built on.

One crate holds everything that needs no window or GPU: geometry (math), colors (color), shapes, tessellation and text (paint), input, layout, containers and widgets, and Kinogaki's own theme, icons, docking and editor widgets. The renderer (kinogaki-ui-wgpu) and the windowed run loop (kinogaki-ui-shell) build on it.

The framework started as egui 0.36.2 (MIT OR Apache-2.0, see THIRD_PARTY_NOTICES.md); docs/HISTORY.md lists what changed.

A Context runs a pass over the UI each frame and returns its shapes; a Ui lays widgets out inside a region.

Depends on

CrateRepositoryAsWhat it is
kinogaki-propertieslib-uinormalProperty schemas: what an inspector shows, as data.
kinogaki-svglib-svgnormalKinogaki SVG reads SVG documents the way resvg (and so, closely, a browser) does, converts them into a render tree with every property resolved, and draws them with an exact-coverage anti-aliased rasterizer.
kinogaki-unicodelib-misc-utilsnormalUnicode text segmentation and character properties for Kinogaki's text editing and layout, from the Unicode Character Database (version UNICODE_VERSION):
smallveclib-misc-utilsnormalKinogaki's own smallvec, published under the crates.io name so the frozen wgpu, wgpu-core, wgpu-hal and harfrust resolve to it through [patch.crates-io], and used by kinogaki-ui.

Third-party

CrateVersionLicenceFrozen inAsAlso used by
bitflags2.13.2MIT OR Apache-2.0lib-ui/vendornormalnone
bytemuck1.25.2Zlib OR Apache-2.0 OR MITlib-ui/vendornormalkinogaki-composit-wgpu, kinogaki-geometry, kinogaki-geometry-view, kinogaki-image-pipeline, kinogaki-math, kinogaki-pixel, kinogaki-ui-wgpu, kinogaki-viewport-api and 2 more
font-types0.12.6MIT OR Apache-2.0lib-ui/vendornormalnone
harfrust0.12.0MITlib-ui/vendornormalnone
log0.4.34MIT OR Apache-2.0lib-ui/vendornormalkinogaki-editor, kinogaki-image-pipeline, kinogaki-scene, kinogaki-shared, kinogaki-ui-shell, kinogaki-ui-wgpu
skrifa0.44.0MIT OR Apache-2.0lib-ui/vendornormalnone

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.
kinogaki-harnessCore and the appnormalStudio's test harness: the real editor, its event routing and its background work, driven offscreen with only the packages a test names.
kinogaki-sdk-uiCore and the appnormalThe 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.
kinogaki-studioCore and the appnormalKinogaki Studio: the editor in a window, after the plugins load.
kinogaki-ui-shelllib-uinormalKinogaki UI's native shell: opens the windows, runs the winit event loop, turns window events into kinogaki_ui input, paints each frame with kinogaki-ui-wgpu and drives an App.
kinogaki-ui-wgpulib-uinormalkinogaki-ui drawn with wgpu.
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.

Modules

Public types and traits

At the crate root

Traits AsIdAsIdSaltNumExtPluginWidgetWidgetWithState

Structs Align2ClippedPrimitiveColor32ColorImageContextCornerRadiusCustomCursorImageDockLayoutDockResponseDockStyleDragAndDropFontDataFontDefinitionsFontIdFontTweakFullOutputGalleyIconButtonIconDataIdIdSaltImmediateViewportInnerResponseInputOptionsInputStateInteractOptionsLayerIdLayoutLogicOutputMarginMemoryMenuBarMenuItemMeshMultiTouchInfoOpenUrlOptionsPaintCallbackPaintCallbackInfoPainterPanelIdPanelSpecPlatformOutputPointerStatePos2RangefRectRectAlignRepaintCauseRequestRepaintInfoResponseRgbaRichTextSenseShadowSpacingStrokeStyleTextFormatTextureHandleTextureOptionsTexturesDeltaThemeUiUiBuilderUiStackUiStackInfoUiStackIteratorUiTagsVec2Vec2bViewportIdViewportIdPairViewportOutputVisualsWidgetInfoWidgetRectWidgetRectsWindowMenu

Enums AlignAxisCursorIconDirectionDockNodeDockPositionEditEndFocusDirectionFontFamilyFontSelectionIconErrorIdSourceImageDataKeyOrderOutputCommandShapeSizeHintStrokeKindSurrenderFocusOnTextStyleTextureFilterTextureIdTextureWrapModeTextWrapModeUiKindUserAttentionTypeViewportClassWidgetTextWidgetType

Type aliases BoxedWidgetDeferredViewportUiCallbackIdMapIdSetImmediateViewportRendererCallbackOrderedViewportIdMapViewportIdMapViewportIdSet

Macros include_image

By module: 452 public types and traits in 174 modules

cache::cache_storage CacheStorage

cache::cache_trait CacheTrait

cache::frame_cache ComputerMutFrameCache

cache::frame_publisher FramePublisher

color::color32 Color32

color::hex_color_runtime HexColorParseHexColorError

color::hsva Hsva

color::hsva_gamma HsvaGamma

color::rgba Rgba

containers::area AreaAreaState

containers::close_tag ClosableTag

containers::collapsing_header CollapsingHeaderCollapsingResponseCollapsingStateHeaderResponseIconPainter

containers::combo_box ComboBoxIconPainter

containers::frame FramePrepared

containers::menu MenuBarMenuButtonMenuConfigMenuStateSubMenuSubMenuButton

containers::modal ModalModalResponse

containers::panel CentralPanelPanelPanelState

containers::popup PopupPopupAnchorPopupCloseBehaviorPopupKindSetOpenCommand

containers::resize Resize

containers::scroll_area ScrollAreaScrollAreaOutputState

containers::scroll_area::options DragScrollScrollBarVisibilityScrollSource

containers::window Window

containers::window::drag WindowDrag

context ContextRequestRepaintInfo

context::repaint RepaintCause

data::key Key

data::output CursorIconCustomCursorImageFullOutputLogicOutputOpenUrlOutputCommandPlatformOutputUserAttentionTypeWidgetInfo

debug_text DebugTextPlugin

desktop DesktopDesktopMemory

desktop::frame WindowFrame

dock AxisDockLayoutDockNodeDockPositionDockResponseDockStylePanelIdPanelSpecWindowMenu

drag_and_drop DragAndDrop

icons IconButtonIconError

id AsIdIdIdMapIdSet

id_salt AsIdSaltIdSalt

input_state InputOptionsInputStateSurrenderFocusOn

input_state::pointer PointerState

input_state::touch_state MultiTouchInfo

layers GraphicLayersLayerIdOrderPaintListShapeIdx

layout Layout

load BytesBytesLoaderBytesLoadResultBytesPollImageLoaderImageLoadResultImagePollLoadErrorLoadersResultSizedTextureSizeHintTextureLoaderTextureLoadResultTexturePoll

load::bytes_loader DefaultBytesLoader

load::texture_loader DefaultTextureLoader

math NumExtOneReal

math::align AlignAlign2

math::gui_rounding GuiRounding

math::history History

math::numeric Numeric

math::ordered_float FloatOrderedFloat

math::pos2 Pos2

math::range Rangef

math::rect Rect

math::rect_align RectAlign

math::rect_transform RectTransform

math::rot2 Rot2

math::ts_transform TSTransform

math::vec2 Vec2

math::vec2b Vec2b

memory FocusDirectionMemoryOptions

os OperatingSystem

paint ClippedPrimitiveClippedShapePrimitiveTextureId

paint::brush Brush

paint::color ColorMode

paint::corner_radius CornerRadius

paint::corner_radius_f32 CornerRadiusF32

paint::direction Direction

paint::image ColorImageFontColorTransferFunctionImageDataImageDelta

paint::margin Margin

paint::margin_f32 MarginF32

paint::mesh MeshVertex

paint::mutex MutexRwLock

paint::shadow Shadow

paint::shapes::circle_shape CircleShape

paint::shapes::paint_callback PaintCallbackPaintCallbackInfo

paint::shapes::path_shape PathShape

paint::shapes::rect_shape RectShape

paint::shapes::shape Shape

paint::shapes::text_shape TextShape

paint::stats AllocInfoPaintStats

paint::stroke PathStrokeStrokeStrokeKind

paint::tessellator PathPathTypeTessellationOptionsTessellator

paint::text TextOptions

paint::text::cursor CCursorLayoutCursor

paint::text::fonts FontsFontsImplFontsView

paint::text::fonts::definitions FontDataFontDefinitionsFontFamilyFontIdFontInsertFontPriorityFontTweakFontVariationAxisHintingTargetInsertFontFamilySmoothHinting

paint::text::index ByteIndexByteRangeByteRangeExtCharIndexCharRangeCharRangeExt

paint::text::mask MaskFaceTextMask

paint::text::text_layout_types LayoutJobLayoutSection

paint::text::text_layout_types::format TextFormatTextWrapModeTextWrapping

paint::text::text_layout_types::galley Galley

paint::texture_atlas TextureAtlas

paint::texture_handle TextureHandle

paint::textures TextureFilterTextureManagerTextureMetaTextureOptionsTexturesDeltaTextureWrapMode

paint::viewport ViewportInPixels

painter Painter

pixel Pattern

plugin ContextCallbackPluginTypedPluginGuardTypedPluginHandle

response EditEndFlagsInnerResponseResponse

sense Sense

style DebugOptionsInteractionSpacingStyleStyleModifier

style::scroll ScrollFadeStyleScrollStyle

style::text FontSelectionNumberFormatterTextStyle

style::visuals ImeCompositionNumericColorSpaceSelectionTextCursorStyleVisualsWidgetsWidgetVisuals

text_selection::cursor_range CCursorRange

text_selection::text_cursor_state TextCursorState

text_selection::visuals RowVertexIndices

theme Theme

ui Ui

ui_builder IdSourceUiBuilder

ui_stack UiKindUiStackUiStackInfoUiStackIteratorUiTags

util::hash BuildHasherBuildNoHashHasherHasherHashMapHashSetIntMapIntSetIsEnabledNoHashHasher

util::id_type_map IdTypeMapRawKey

util::undoer SettingsUndoer

viewport DeferredViewportUiCallbackIconDataImmediateViewportImmediateViewportRendererCallbackOrderedViewportIdMapViewportClassViewportIdViewportIdMapViewportIdPairViewportIdSetViewportOutput

viewport::builder ViewportBuilder

viewport::command CursorGrabIMEPurposeResizeDirectionSystemThemeViewportCommandWindowLevelX11WindowType

widget_rect InteractOptionsWidgetRectWidgetRects

widget_style ButtonStyleCheckboxStyleClassesClassNameHasClassesLabelStyleSeparatorStyleTextVisualsWidgetStateWidgetStyle

widget_text WidgetText

widget_text::rich_text RichText

widgets BoxedWidgetMenuItemWidgetWidgetWithState

widgets::bindings BindingBindingsChordKeyContext

widgets::breadcrumb Crumbs

widgets::browser BrowserBrowserItemBrowserResponseBrowserState

widgets::browser::query Query

widgets::button Button

widgets::card CardCardResponse

widgets::checkbox Checkbox

widgets::chrome Severity

widgets::code_editor CodeEditorCodeResponse

widgets::color_picker Alpha

widgets::console ConsoleEventConsoleResponseConsoleStateControlEntryLevelRow

widgets::curve CurveContextCurveEditorCurveEventCurveResponseCurveState

widgets::drag_value DragValue

widgets::graph::canvas AcceptsDropTargetGraphCanvasGraphEventGraphResponseGraphStateRename

widgets::graph::detail Detail

widgets::graph::model FlagSideFlagSpecGraphNodeGraphWireNodeBodyNodeFramePortPortValueProblemShadeTileIconWireKey

widgets::graph::picks MovingNewPicks

widgets::graph::rename RenameEnd

widgets::graph::view CanvasView

widgets::graph::wire Wire

widgets::grouped_menu GroupedGroupedMenuResponse

widgets::image ImageImageOptions

widgets::image::size ImageFitImageSize

widgets::image::source ImageSource

widgets::label Label

widgets::lanes ClipContextTargetLaneLaneEventLanesLanesResponseLanesStateLaneToggle

widgets::list_editor Step

widgets::loop_band LoopBandLoopEventLoopResponseLoopState

widgets::marking MarkingMarkingResponse

widgets::menu_bar MenuBarMenuBarResponseSegment

widgets::note_grid GridNoteNoteContextNoteGridNoteGridEventNoteGridResponseNoteGridState

widgets::palette PaletteEditorPaletteResponse

widgets::progress_bar ProgressBar

widgets::properties MetricsRecordedRowRowMenuRowsSheet

widgets::properties::color ColorDisplay

widgets::properties::draw RowSource

widgets::properties::tree_path DraggedPath

widgets::radial ChoiceLayoutRadialRadialResponseSlot

widgets::ramp RampEditorRampResponse

widgets::separator Separator

widgets::settings SettingsBodySettingsResponseSettingsStateSettingsWindow

widgets::shelf ShelfShelfEditShelfResponseTile

widgets::table ColumnSortTableResponseTableState

widgets::text_edit::builder TextEdit

widgets::text_edit::output TextEditOutput

widgets::text_edit::state TextEditState

widgets::text_edit::text_buffer TextBuffer

widgets::timeline ControlMarkMarkKindPaceStepTimelineTimelineEventTimelineResponseTimelineState

widgets::timeline::playback Playback

widgets::timeline::units TickUnits

widgets::tone_curve ChannelToneCurveEditorToneCurveResponse

widgets::tree DropInkTreeColumnTreeEventTreeRenameTreeResponseTreeRowTreeStateTreeView

widgets::value_fields TypingValueFieldValueFields

Besides these, 124 public functions at module level.