Files
luma/Luma/Instruments/InstrumentUI.swift
Ole André Vadla Ravnås 5ed87e6018 Make sidebar hooks collapsible like module groups
Give instruments that have hooks a disclosure chevron and persist
the per-instrument collapsed state in the session UI state. Toggle
the module and thread groups on a full header-row click. Pad the
module view so its tabs clear the top-left edge.
2026-06-27 15:30:30 +02:00

55 lines
1.3 KiB
Swift

import SwiftUI
import LumaCore
protocol InstrumentUI {
func makeConfigEditor(
configJSON: Binding<Data>,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> AnyView
func renderEvent(
_ event: RuntimeEvent,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> AnyView
func makeEventContextMenuItems(
_ event: RuntimeEvent,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> [InstrumentEventMenuItem]
func sidebarChildren(
sessionID: UUID,
instance: LumaCore.InstrumentInstance,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> AnyView
func hasSidebarChildren(instance: LumaCore.InstrumentInstance) -> Bool
}
extension InstrumentUI {
func makeEventContextMenuItems(
_ event: RuntimeEvent,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> [InstrumentEventMenuItem] {
[]
}
func sidebarChildren(
sessionID: UUID,
instance: LumaCore.InstrumentInstance,
engine: Engine,
selection: Binding<SidebarItemID?>
) -> AnyView {
AnyView(EmptyView())
}
func hasSidebarChildren(instance: LumaCore.InstrumentInstance) -> Bool {
false
}
}