Terminal
Embeds the retained Ghostty terminal surface and reports process lifecycle events.
#Import
go get github.com/egoist/quickgui/extensions/terminalimport (
"github.com/egoist/quickgui/go/native"
"github.com/egoist/quickgui/extensions/terminal"
"github.com/egoist/quickgui/go/ui"
)#Usage
func TerminalExample(directory string) *native.Node {
return terminal.View(terminal.Props{
Program: "/bin/zsh",
Args: []string{"-l"},
WorkingDirectory: directory,
Props: ui.Props{Style: ui.Style().Width("100%").Height(320)},
})
}#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
terminal.View
View sourceterminal.View(props Props, children ...any) *native.NodeStyleStyleBuilder—
Reusable layout, typography, color, and interaction-state styles. Build with ui.Style() and compose with Merge.
StyleBuilderView sourceChildrenany—
Content mounted inside the component. Compound child callbacks run after the parent context exists.
anyView sourceOnClickfunc(*native.Event)—
Called after QuickGUI resolves an activation, including supported keyboard activation.
func(*native.Event)View sourceOnMouseEnterfunc(*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 sourceOnInputfunc(*native.Event)—
Receives edits from the text control. Write the new text into the controlled value.
func(*native.Event)View sourceOnSubmitfunc(*native.Event)—
OnDismissfunc(*native.Event)—
OnPointerfunc(*native.Event)—
OnPresentationChangefunc(*native.Event)—
Callback for presentation change. The signature below lists the event payload.
func(*native.Event)View sourceOnSelectfunc(*native.Event)—
OnKeyDownfunc(*native.Event)—
OnKeyUpfunc(*native.Event)—
OnMouseDownfunc(*native.Event)—
OnMouseUpfunc(*native.Event)—
OnMouseMovefunc(*native.Event)—
OnDoubleClickfunc(*native.Event)—
Callback for double click. The signature below lists the event payload.
func(*native.Event)View sourceOnWheelfunc(*native.Event)—
OnContextMenufunc(*native.Event)—
Callback for context menu. The signature below lists the event payload.
func(*native.Event)View sourceOnPinchfunc(*native.Event)—
OnRotatefunc(*native.Event)—
OnSmartMagnifyfunc(*native.Event)—
Callback for smart magnify. The signature below lists the event payload.
func(*native.Event)View sourceOnPressurefunc(*native.Event)—
OnFocusfunc(*native.Event)—
OnBlurfunc(*native.Event)—
OnActionfunc(*native.Event)—
OnDragStartfunc(*native.Event)—
OnDragEndfunc(*native.Event)—
OnDropfunc(*native.Event)—
OnFilesDroppedfunc(*native.Event)—
Callback for files dropped. The signature below lists the event payload.
func(*native.Event)View sourceOnComponentChangefunc(*native.Event)—
Receives the component change payload, including values for coordinated controls.
func(*native.Event)View sourceOnCommitfunc(*native.Event)—
Disabledany—
Prevents activation and exposes the disabled state to accessibility. Compound parts inherit a disabled root.
anyView sourceValueany—
The current controlled value. Update application state from the change callback to accept a new value.
anyView sourcePlaceholderstring—
Multilinebool—
AriaLabelany—
Accessible name, especially for icon-only controls or controls without a visible label.
anyView sourceSelectedany—
Groupany—
FocusOnPointerany—
FocusableWhenDisabledany—
Allows a disabled button to remain keyboard focusable while activation stays disabled.
anyView sourceHitSlopany—
HitSlopTopany—
HitSlopRightany—
HitSlopBottomany—
HitSlopLeftany—
Reffunc(*native.Node)—
Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.
func(*native.Node)View sourcePasswordany—
EstimatedItemHeightany—
Overscanany—
OverscanPixelsany—
ItemHeightsany—
ListAlignmentstring—
FollowModestring—
ObjectFitstring—
ShaderParametersany—
Invalidany—
Roleany—
TabIndexany—
Controls sequential keyboard focus order. Omit to retain the component’s default focus behavior.
anyView source