Host
The NSHostingView-backed leaf that mounts one SwiftUI component tree inside QuickGUI.
#Import
Import ui from github.com/egoist/quickgui/go/ui.
import (
"github.com/egoist/quickgui/go/ui"
)#Usage
func SwiftUiHostExample() *native.Node {
return ui.SwiftUI.Host(
ui.SwiftUIHostProps{MatchContents: true},
func() *native.Node {
return ui.SwiftUI.Button(ui.SwiftUIButtonProps{Label: "Continue"})
},
)
}#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
SwiftUI.Host
View sourceui.SwiftUI.Host(props SwiftUIHostProps, children ...any) *native.NodeHost is a native NSHostingView laid out as one QuickGUI leaf.
Reffunc(*native.Node)—
Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.
func(*native.Node)View sourceStyleany—
Reusable layout, typography, color, and interaction-state styles. Build with ui.Style() and compose with Merge.
anyView sourceChildrenPartChildren—
Content mounted inside the component. Compound child callbacks run after the parent context exists.
PartChildrenView sourceDisabledany—
Prevents activation and exposes the disabled state to accessibility. Compound parts inherit a disabled root.
anyView sourceRolestring—
FocusOnPointerany—
Groupany—
AriaLabelany—
Accessible name, especially for icon-only controls or controls without a visible label.
anyView sourceTabIndex*float64—
Controls sequential keyboard focus order. Omit to retain the component’s default focus behavior.
*float64View sourceOnClickfunc(*native.Event)—
Called after QuickGUI resolves an activation, including supported keyboard activation.
func(*native.Event)View sourceOnDoubleClickfunc(*native.Event)—
Callback for double click. The signature below lists the event payload.
func(*native.Event)View sourceOnContextMenufunc(*native.Event)—
Callback for context menu. The signature below lists the event payload.
func(*native.Event)View sourceOnPointerfunc(*native.Event)—
OnMouseEnterfunc(*native.Event)—
Callback for mouse enter. The signature below lists the event payload.
func(*native.Event)View sourceOnMouseLeavefunc(*native.Event)—
Callback for mouse leave. The signature below lists the event payload.
func(*native.Event)View source