Documentation
¶
Overview ¶
Package component provides UI components for the browser.
Package component provides UI components for the browser.
Package component provides reusable GTK UI components.
Package component provides UI components for the browser.
Package component provides UI components for the browser.
Package component provides UI components for the browser.
Package component provides reusable GTK UI components.
Package component provides UI components for the browser.
Package component provides UI components for the browser.
Index ¶
- Constants
- Variables
- func CalculateModalDimensions(parent layout.OverlayWidget, cfg ModalSizeConfig) (width, marginTop int)
- func CalculateOverlayDimensions(parent layout.OverlayWidget, widthPct, heightPct float64, ...) (width, height int)
- func EffectiveMaxRows(parentHeight, rowHeight int, sizeCfg ModalSizeConfig, ...) int
- func GetLogoTexture() *gdk.Texture
- func MeasureWidgetHeight(widget *gtk.Widget, forWidth int) int
- func ScaleValue(base int, uiScale float64) int
- func SetScrolledWindowHeight(sw *gtk.ScrolledWindow, height int)
- func SetSkeletonVersion(v string)
- type AccentPicker
- type BangSuggestion
- type Favorite
- type FindBar
- type FindBarConfig
- type FloatingPane
- func (fp *FloatingPane) CurrentURL() string
- func (fp *FloatingPane) Dimensions() (width, height int)
- func (fp *FloatingPane) Hide(_ context.Context)
- func (fp *FloatingPane) IsOmniboxVisible() bool
- func (fp *FloatingPane) IsVisible() bool
- func (fp *FloatingPane) Navigate(ctx context.Context, url string) error
- func (fp *FloatingPane) RecordLoadedURL(url string)
- func (fp *FloatingPane) Resize()
- func (fp *FloatingPane) SessionStarted() bool
- func (fp *FloatingPane) SetOmniboxVisible(visible bool)
- func (fp *FloatingPane) SetParentOverlay(parent layout.OverlayWidget)
- func (fp *FloatingPane) Show()
- func (fp *FloatingPane) ShowToggle(ctx context.Context) error
- func (fp *FloatingPane) ShowURL(ctx context.Context, url string) error
- type FloatingPaneOptions
- type LinkStatusOverlay
- type ListDisplayDefaults
- type LoadingSkeleton
- type ModalSizeConfig
- type Omnibox
- func (o *Omnibox) Destroy()
- func (o *Omnibox) Hide(ctx context.Context)
- func (o *Omnibox) IsVisible() bool
- func (o *Omnibox) SetOnClose(fn func())
- func (o *Omnibox) SetOnNavigate(fn func(url string))
- func (o *Omnibox) SetParentOverlay(overlay layout.OverlayWidget)
- func (o *Omnibox) Show(ctx context.Context, query string)
- func (o *Omnibox) Toggle(ctx context.Context)
- func (o *Omnibox) UpdateZoomIndicator(factor float64)
- func (o *Omnibox) Widget() *gtk.Widget
- func (o *Omnibox) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
- type OmniboxConfig
- type PaneView
- func (pv *PaneView) AddCssClass(class string)
- func (pv *PaneView) AddOverlayWidget(widget layout.Widget)
- func (pv *PaneView) AttachHoverHandler(ctx context.Context)
- func (pv *PaneView) CancelPendingHover()
- func (pv *PaneView) Cleanup()
- func (pv *PaneView) GetContentDimensions() (width, height int)
- func (pv *PaneView) GrabFocus() bool
- func (pv *PaneView) HasFocus() bool
- func (pv *PaneView) Hide()
- func (pv *PaneView) HideLinkStatus()
- func (pv *PaneView) HideLoadingSkeleton()
- func (pv *PaneView) IsActive() bool
- func (pv *PaneView) IsVisible() bool
- func (pv *PaneView) Overlay() layout.OverlayWidget
- func (pv *PaneView) PaneID() entity.PaneID
- func (pv *PaneView) RemoveCssClass(class string)
- func (pv *PaneView) RemoveOverlayWidget(widget layout.Widget)
- func (pv *PaneView) SetActive(active bool)
- func (pv *PaneView) SetLoadProgress(progress float64)
- func (pv *PaneView) SetLoading(loading bool)
- func (pv *PaneView) SetOnFocusIn(fn func(paneID entity.PaneID))
- func (pv *PaneView) SetOnFocusOut(fn func(paneID entity.PaneID))
- func (pv *PaneView) SetOnHover(fn func(paneID entity.PaneID))
- func (pv *PaneView) SetOnMouseMotion(fn func())
- func (pv *PaneView) SetVisible(visible bool)
- func (pv *PaneView) SetWebViewWidget(widget layout.Widget)
- func (pv *PaneView) Show()
- func (pv *PaneView) ShowLinkStatus(uri string)
- func (pv *PaneView) ShowToast(ctx context.Context, message string, level ToastLevel)
- func (pv *PaneView) ShowZoomToast(ctx context.Context, zoomPercent int)
- func (pv *PaneView) WebViewWidget() layout.Widget
- func (pv *PaneView) Widget() layout.Widget
- type PermissionPopup
- type ProgressBar
- type RowHeightDefaults
- type SessionManager
- func (sm *SessionManager) Destroy()
- func (sm *SessionManager) Hide(ctx context.Context)
- func (sm *SessionManager) IsVisible() bool
- func (sm *SessionManager) SetParentOverlay(overlay layout.OverlayWidget)
- func (sm *SessionManager) Show(ctx context.Context)
- func (sm *SessionManager) Toggle(ctx context.Context)
- func (sm *SessionManager) Widget() *gtk.Widget
- func (sm *SessionManager) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
- type SessionManagerConfig
- type StackedPaneManager
- func (spm *StackedPaneManager) AddPaneToStack(ctx context.Context, wsView *WorkspaceView, activePaneID entity.PaneID, ...) error
- func (spm *StackedPaneManager) GetStackedView(wsView *WorkspaceView, paneID entity.PaneID) *layout.StackedView
- func (spm *StackedPaneManager) IsStacked(wsView *WorkspaceView, paneID entity.PaneID) bool
- func (spm *StackedPaneManager) NavigateStack(ctx context.Context, wsView *WorkspaceView, currentPaneID entity.PaneID, ...) (entity.PaneID, error)
- func (spm *StackedPaneManager) SetStackActiveCallback(wsView *WorkspaceView, paneID entity.PaneID, callback func(index int))
- type Suggestion
- type TabBar
- func (tb *TabBar) ActiveTabID() entity.TabID
- func (tb *TabBar) AddTab(tab *entity.Tab)
- func (tb *TabBar) Box() *gtk.Box
- func (tb *TabBar) Count() int
- func (tb *TabBar) Destroy()
- func (tb *TabBar) RemoveTab(tabID entity.TabID)
- func (tb *TabBar) SetActive(tabID entity.TabID)
- func (tb *TabBar) SetOnClose(fn func(tabID entity.TabID))
- func (tb *TabBar) SetOnCreate(fn func())
- func (tb *TabBar) SetOnSwitch(fn func(tabID entity.TabID))
- func (tb *TabBar) SetVisible(visible bool)
- func (tb *TabBar) UpdateTitle(tabID entity.TabID, title string)
- func (tb *TabBar) Widget() *gtk.Widget
- type TabButton
- func (tb *TabButton) Button() *gtk.Button
- func (tb *TabButton) Destroy()
- func (tb *TabButton) IsActive() bool
- func (tb *TabButton) SetActive(active bool)
- func (tb *TabButton) SetOnClick(fn func(tabID entity.TabID))
- func (tb *TabButton) SetTitle(title string)
- func (tb *TabButton) TabID() entity.TabID
- func (tb *TabButton) Widget() *gtk.Widget
- type TabPicker
- func (tp *TabPicker) Hide(ctx context.Context)
- func (tp *TabPicker) IsVisible() bool
- func (tp *TabPicker) SetParentOverlay(overlay layout.OverlayWidget)
- func (tp *TabPicker) Show(ctx context.Context, items []TabPickerItem)
- func (tp *TabPicker) Toggle(ctx context.Context, items []TabPickerItem)
- func (tp *TabPicker) Widget() *gtk.Widget
- func (tp *TabPicker) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
- type TabPickerConfig
- type TabPickerItem
- type ToastLevel
- type ToastOption
- type ToastOptions
- type ToastPosition
- type Toaster
- type ViewMode
- type WebRTCPermissionIndicator
- func (w *WebRTCPermissionIndicator) MarkAllowed(permTypes []entity.PermissionType)
- func (w *WebRTCPermissionIndicator) MarkBlocked(permTypes []entity.PermissionType)
- func (w *WebRTCPermissionIndicator) MarkRequesting(permTypes []entity.PermissionType)
- func (w *WebRTCPermissionIndicator) Origin() string
- func (w *WebRTCPermissionIndicator) Reset()
- func (w *WebRTCPermissionIndicator) SetOnToggleLock(...)
- func (w *WebRTCPermissionIndicator) SetOrigin(origin string)
- func (w *WebRTCPermissionIndicator) SetStoredDecision(permType entity.PermissionType, decision entity.PermissionDecision, ...)
- func (w *WebRTCPermissionIndicator) Widget() *gtk.Widget
- type WorkspaceView
- func (wv *WorkspaceView) AddWorkspaceOverlayWidget(widget layout.Widget)
- func (wv *WorkspaceView) CancelAllPendingHovers()
- func (wv *WorkspaceView) ClearRootWidgetRef()
- func (wv *WorkspaceView) Container() layout.BoxWidget
- func (wv *WorkspaceView) ContainerWidget() layout.Widget
- func (wv *WorkspaceView) DeactivatePane(paneID entity.PaneID)
- func (wv *WorkspaceView) Factory() layout.WidgetFactory
- func (wv *WorkspaceView) FindNext()
- func (wv *WorkspaceView) FindPrevious()
- func (wv *WorkspaceView) FocusPane(paneID entity.PaneID) bool
- func (wv *WorkspaceView) GetActivePaneID() entity.PaneID
- func (wv *WorkspaceView) GetActivePaneView() *PaneView
- func (wv *WorkspaceView) GetOmnibox() *Omnibox
- func (wv *WorkspaceView) GetPaneIDs() []entity.PaneID
- func (wv *WorkspaceView) GetPaneView(paneID entity.PaneID) *PaneView
- func (wv *WorkspaceView) GetPaneWidget(paneID entity.PaneID) layout.Widget
- func (wv *WorkspaceView) GetRootWidget() layout.Widget
- func (wv *WorkspaceView) GetStackContainerWidget(paneID entity.PaneID) layout.Widget
- func (wv *WorkspaceView) HideFindBar()
- func (wv *WorkspaceView) HideOmnibox()
- func (wv *WorkspaceView) IsFindBarVisible() bool
- func (wv *WorkspaceView) IsHoverFocusLocked() bool
- func (wv *WorkspaceView) IsHoverSuppressed() bool
- func (wv *WorkspaceView) IsOmniboxVisible() bool
- func (wv *WorkspaceView) NotifyNewPaneCreated(ctx context.Context)
- func (wv *WorkspaceView) PaneCount() int
- func (wv *WorkspaceView) Rebuild(ctx context.Context) error
- func (wv *WorkspaceView) RegisterPaneView(paneID entity.PaneID, pv *PaneView)
- func (wv *WorkspaceView) RemoveWorkspaceOverlayWidget(widget layout.Widget)
- func (wv *WorkspaceView) SetActivePaneID(paneID entity.PaneID) error
- func (wv *WorkspaceView) SetAutoOpenOnNewPane(enabled bool)
- func (wv *WorkspaceView) SetFindBarConfig(cfg FindBarConfig)
- func (wv *WorkspaceView) SetHoverFocusLocked(locked bool)
- func (wv *WorkspaceView) SetModeBorderOverlay(widget layout.Widget)
- func (wv *WorkspaceView) SetOmniboxConfig(cfg OmniboxConfig)
- func (wv *WorkspaceView) SetOnPaneFocused(fn func(paneID entity.PaneID))
- func (wv *WorkspaceView) SetOnSplitRatioDragged(fn func(nodeID string, ratio float64))
- func (wv *WorkspaceView) SetRootWidgetDirect(widget layout.Widget)
- func (wv *WorkspaceView) SetWebViewWidget(paneID entity.PaneID, widget layout.Widget) error
- func (wv *WorkspaceView) SetWorkspace(ctx context.Context, ws *entity.Workspace) error
- func (wv *WorkspaceView) ShowFindBar(ctx context.Context)
- func (wv *WorkspaceView) ShowOmnibox(ctx context.Context, query string)
- func (wv *WorkspaceView) SuppressHover(duration time.Duration)
- func (wv *WorkspaceView) TreeRenderer() *layout.TreeRenderer
- func (wv *WorkspaceView) UnregisterPaneView(paneID entity.PaneID)
- func (wv *WorkspaceView) Widget() layout.Widget
- func (wv *WorkspaceView) Workspace() *entity.Workspace
- func (wv *WorkspaceView) WorkspaceOverlayWidget() layout.OverlayWidget
Constants ¶
const KeyboardFocusSuppressDuration = 300 * time.Millisecond
KeyboardFocusSuppressDuration is the time to suppress hover focus after keyboard navigation.
const (
// ToastBriefDurationMs is the duration for brief notifications (e.g., clipboard copy).
ToastBriefDurationMs = 800
)
Variables ¶
var DefaultRowHeights = RowHeightDefaults{
Standard: 50,
Compact: 28,
Divider: 30,
}
Package-level defaults for row heights.
var ErrNilWorkspace = errors.New("workspace is nil")
ErrNilWorkspace is returned when attempting to set a nil workspace.
var ErrPaneNotFound = errors.New("pane not found")
ErrPaneNotFound is returned when a pane ID cannot be found.
var ErrStackNotFound = errors.New("stacked view not found for pane")
ErrStackNotFound is returned when a StackedView cannot be found for a pane.
var OmniboxListDefaults = ListDisplayDefaults{
MaxVisibleRows: 10,
MaxResults: 10,
SmallMaxVisibleRows: 5,
}
OmniboxListDefaults provides display limits for omnibox modal.
var OmniboxSizeDefaults = ModalSizeConfig{
WidthPct: 0.8,
MaxWidth: 800,
TopMarginPct: 0.2,
FallbackWidth: 800,
FallbackHeight: 600,
}
OmniboxSizeDefaults provides default sizing for omnibox modal.
var PermissionPopupSizeDefaults = ModalSizeConfig{
WidthPct: 0.4,
MaxWidth: 400,
TopMarginPct: 0.3,
FallbackWidth: 400,
FallbackHeight: 300,
}
PermissionPopupSizeDefaults provides default sizing for permission popup modal.
var SessionManagerListDefaults = ListDisplayDefaults{
MaxVisibleRows: 6,
MaxResults: 50,
}
SessionManagerListDefaults provides display limits for session manager modal.
var SessionManagerSizeDefaults = ModalSizeConfig{
WidthPct: 0.6,
MaxWidth: 600,
TopMarginPct: 0.15,
FallbackWidth: 600,
FallbackHeight: 600,
}
SessionManagerSizeDefaults provides default sizing for session manager modal.
var TabPickerListDefaults = ListDisplayDefaults{
MaxVisibleRows: 8,
MaxResults: 20,
}
TabPickerListDefaults provides display limits for tab picker modal.
var TabPickerSizeDefaults = ModalSizeConfig{
WidthPct: 0.6,
MaxWidth: 600,
TopMarginPct: 0.15,
FallbackWidth: 600,
FallbackHeight: 600,
}
TabPickerSizeDefaults provides default sizing for tab picker modal.
Functions ¶
func CalculateModalDimensions ¶ added in v0.21.0
func CalculateModalDimensions(parent layout.OverlayWidget, cfg ModalSizeConfig) (width, marginTop int)
CalculateModalDimensions computes width and top margin based on parent overlay. Returns calculated width and top margin in pixels.
func CalculateOverlayDimensions ¶ added in v0.27.0
func CalculateOverlayDimensions( parent layout.OverlayWidget, widthPct, heightPct float64, fallbackWidth, fallbackHeight int, ) (width, height int)
CalculateOverlayDimensions computes width and height from overlay allocation percentages.
func EffectiveMaxRows ¶ added in v0.27.0
func EffectiveMaxRows(parentHeight, rowHeight int, sizeCfg ModalSizeConfig, defaults ListDisplayDefaults) int
EffectiveMaxRows returns the maximum number of visible rows that fit in the available space. It computes available height by subtracting the top margin (TopMarginPct of parentHeight) and chrome height (header tabs + search entry, estimated as 2× rowHeight to scale with the UI). If MaxVisibleRows worth of rows don't fit, it falls back to SmallMaxVisibleRows.
func GetLogoTexture ¶ added in v0.22.0
GetLogoTexture returns a cached GDK texture of the dumber logo. Safe to call from any goroutine; lazily initializes on first call. Returns nil if the logo cannot be loaded.
func MeasureWidgetHeight ¶ added in v0.21.0
MeasureWidgetHeight returns the natural height of a widget for a given width. Returns 0 if widget is nil or measurement fails.
func ScaleValue ¶ added in v0.21.0
ScaleValue scales a base pixel value by UI scale factor. Returns the base value if scale is <= 0.
func SetScrolledWindowHeight ¶ added in v0.21.0
func SetScrolledWindowHeight(sw *gtk.ScrolledWindow, height int)
SetScrolledWindowHeight safely sets min/max content height on a ScrolledWindow. Resets min to -1 first to avoid GTK assertion (min <= max) when shrinking.
func SetSkeletonVersion ¶ added in v0.27.0
func SetSkeletonVersion(v string)
SetSkeletonVersion sets the version string shown on loading skeletons.
Types ¶
type AccentPicker ¶ added in v0.23.0
type AccentPicker struct {
// contains filtered or unexported fields
}
AccentPicker displays an overlay with accent character options. The user can select an accent using: - Left/Right arrow keys to navigate - Number keys 1-9 to select directly - Enter to confirm selection - Escape to cancel
func NewAccentPicker ¶ added in v0.23.0
func NewAccentPicker(factory layout.WidgetFactory) *AccentPicker
NewAccentPicker creates a new accent picker component.
func (*AccentPicker) Hide ¶ added in v0.23.0
func (ap *AccentPicker) Hide()
Hide hides the accent picker.
func (*AccentPicker) IsVisible ¶ added in v0.23.0
func (ap *AccentPicker) IsVisible() bool
IsVisible returns true if the accent picker is currently visible.
func (*AccentPicker) Show ¶ added in v0.23.0
func (ap *AccentPicker) Show(accents []rune, selectedCb func(rune), cancelCb func())
Show displays the accent picker with the given accent options.
func (*AccentPicker) Widget ¶ added in v0.23.0
func (ap *AccentPicker) Widget() layout.Widget
Widget returns the accent picker's container widget.
type BangSuggestion ¶ added in v0.22.0
BangSuggestion represents a configured bang shortcut. A bang is invoked by typing "!<key>".
type FindBar ¶
type FindBar struct {
// contains filtered or unexported fields
}
FindBar is a compact find-in-page UI overlay.
func NewFindBar ¶
func NewFindBar(ctx context.Context, cfg FindBarConfig) *FindBar
NewFindBar creates a new FindBar component.
func (*FindBar) FindPrevious ¶
func (fb *FindBar) FindPrevious()
FindPrevious moves to the previous match.
func (*FindBar) SetFindController ¶
func (fb *FindBar) SetFindController(controller port.FindController)
SetFindController attaches the FindController to the use case.
func (*FindBar) WidgetAsLayout ¶
func (fb *FindBar) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
WidgetAsLayout returns the find bar's outer widget as a layout.Widget.
type FindBarConfig ¶
type FindBarConfig struct {
OnClose func()
GetFindController func(paneID entity.PaneID) port.FindController
OnFocusIn func(entry *gtk.SearchEntry) // Callback when entry gains focus (for accent picker)
OnFocusOut func() // Callback when entry loses focus
}
FindBarConfig holds configuration for creating a FindBar.
type FloatingPane ¶ added in v0.27.0
type FloatingPane struct {
// contains filtered or unexported fields
}
FloatingPane tracks persistent floating workspace pane state.
func NewFloatingPane ¶ added in v0.27.0
func NewFloatingPane(parent layout.OverlayWidget, opts FloatingPaneOptions) *FloatingPane
NewFloatingPane creates a floating pane state container.
func (*FloatingPane) CurrentURL ¶ added in v0.27.0
func (fp *FloatingPane) CurrentURL() string
CurrentURL returns the current URL loaded in the floating session.
func (*FloatingPane) Dimensions ¶ added in v0.27.0
func (fp *FloatingPane) Dimensions() (width, height int)
Dimensions returns the last calculated pane dimensions.
func (*FloatingPane) Hide ¶ added in v0.27.0
func (fp *FloatingPane) Hide(_ context.Context)
Hide hides the pane while preserving web session state.
func (*FloatingPane) IsOmniboxVisible ¶ added in v0.27.0
func (fp *FloatingPane) IsOmniboxVisible() bool
IsOmniboxVisible reports whether the floating pane omnibox is visible.
func (*FloatingPane) IsVisible ¶ added in v0.27.0
func (fp *FloatingPane) IsVisible() bool
IsVisible reports whether the floating pane is currently visible.
func (*FloatingPane) Navigate ¶ added in v0.27.0
func (fp *FloatingPane) Navigate(ctx context.Context, url string) error
Navigate loads a URL into the floating pane's persistent session.
func (*FloatingPane) RecordLoadedURL ¶ added in v0.27.0
func (fp *FloatingPane) RecordLoadedURL(url string)
RecordLoadedURL updates floating pane URL state from external navigation events.
func (*FloatingPane) Resize ¶ added in v0.27.0
func (fp *FloatingPane) Resize()
Resize recalculates pane dimensions from parent overlay allocation.
func (*FloatingPane) SessionStarted ¶ added in v0.27.0
func (fp *FloatingPane) SessionStarted() bool
SessionStarted reports whether the floating pane has navigated at least once.
func (*FloatingPane) SetOmniboxVisible ¶ added in v0.27.0
func (fp *FloatingPane) SetOmniboxVisible(visible bool)
SetOmniboxVisible updates omnibox visibility state for the floating pane.
func (*FloatingPane) SetParentOverlay ¶ added in v0.27.0
func (fp *FloatingPane) SetParentOverlay(parent layout.OverlayWidget)
SetParentOverlay updates the workspace overlay used for sizing calculations.
func (*FloatingPane) Show ¶ added in v0.27.0
func (fp *FloatingPane) Show()
Show makes the pane visible without navigation. Use for profile sessions that already have a loaded URL.
func (*FloatingPane) ShowToggle ¶ added in v0.27.0
func (fp *FloatingPane) ShowToggle(ctx context.Context) error
ShowToggle toggles pane visibility; first open initializes a blank session.
type FloatingPaneOptions ¶ added in v0.27.0
type FloatingPaneOptions struct {
WidthPct float64
HeightPct float64
FallbackWidth int
FallbackHeight int
}
FloatingPaneOptions controls floating pane behavior.
type LinkStatusOverlay ¶ added in v0.21.0
type LinkStatusOverlay struct {
// contains filtered or unexported fields
}
LinkStatusOverlay displays the destination URL when hovering over links. It appears in the bottom-left corner with a fade-in/fade-out transition.
func NewLinkStatusOverlay ¶ added in v0.21.0
func NewLinkStatusOverlay(factory layout.WidgetFactory) *LinkStatusOverlay
NewLinkStatusOverlay creates a new link status overlay component. The overlay is positioned at bottom-left with fade transitions via CSS.
func (*LinkStatusOverlay) Cleanup ¶ added in v0.21.0
func (l *LinkStatusOverlay) Cleanup()
Cleanup cancels any pending timers and clears state. Must be called before removing the overlay from the UI.
func (*LinkStatusOverlay) Hide ¶ added in v0.21.0
func (l *LinkStatusOverlay) Hide()
Hide manually hides the link status overlay.
func (*LinkStatusOverlay) IsVisible ¶ added in v0.21.0
func (l *LinkStatusOverlay) IsVisible() bool
IsVisible returns whether the overlay is currently visible.
func (*LinkStatusOverlay) Show ¶ added in v0.21.0
func (l *LinkStatusOverlay) Show(uri string)
Show displays the link status overlay with the given URI. If uri is empty, hides the overlay instead. Uses a small delay to avoid flicker during rapid mouse movement.
func (*LinkStatusOverlay) Widget ¶ added in v0.21.0
func (l *LinkStatusOverlay) Widget() layout.Widget
Widget returns the underlying widget for embedding in overlays.
type ListDisplayDefaults ¶ added in v0.21.0
type ListDisplayDefaults struct {
MaxVisibleRows int // Maximum rows visible before scrolling
MaxResults int // Maximum results to fetch/display
SmallMaxVisibleRows int // Reduced row count when rows don't fit (0 = no adaptation)
}
ListDisplayDefaults holds display limits for list-based modals.
type LoadingSkeleton ¶ added in v0.22.0
type LoadingSkeleton struct {
// contains filtered or unexported fields
}
LoadingSkeleton displays a themed loading placeholder. It is intended to be embedded as an overlay while primary content is loading. Shows a faded app logo, a discrete spinner, and the version below.
func NewLoadingSkeleton ¶ added in v0.22.0
func NewLoadingSkeleton(factory layout.WidgetFactory) *LoadingSkeleton
func (*LoadingSkeleton) SetVisible ¶ added in v0.22.0
func (ls *LoadingSkeleton) SetVisible(visible bool)
func (*LoadingSkeleton) Widget ¶ added in v0.22.0
func (ls *LoadingSkeleton) Widget() layout.Widget
type ModalSizeConfig ¶ added in v0.21.0
type ModalSizeConfig struct {
WidthPct float64 // Percentage of parent width (e.g., 0.6)
MaxWidth int // Maximum width in pixels
TopMarginPct float64 // Top margin as percentage of parent height
FallbackWidth int // Fallback when parent not allocated
FallbackHeight int // Fallback height
}
ModalSizeConfig holds configuration for modal sizing calculations.
type Omnibox ¶
type Omnibox struct {
// contains filtered or unexported fields
}
Omnibox is the native GTK4 address bar / command palette.
func NewOmnibox ¶
func NewOmnibox(ctx context.Context, cfg OmniboxConfig) *Omnibox
NewOmnibox creates a new native GTK4 omnibox widget. Call SetParentOverlay() before Show() to set the parent for sizing.
func (*Omnibox) SetOnClose ¶
func (o *Omnibox) SetOnClose(fn func())
SetOnClose sets the callback for omnibox close events.
func (*Omnibox) SetOnNavigate ¶
SetOnNavigate sets the callback for URL navigation.
func (*Omnibox) SetParentOverlay ¶
func (o *Omnibox) SetParentOverlay(overlay layout.OverlayWidget)
SetParentOverlay sets the overlay widget used for sizing calculations. Must be called before Show().
func (*Omnibox) UpdateZoomIndicator ¶
UpdateZoomIndicator updates the zoom percentage display. Shows the indicator when zoom != 100%, hides it when at 100%.
func (*Omnibox) WidgetAsLayout ¶
func (o *Omnibox) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
WidgetAsLayout returns the omnibox's outer widget as a layout.Widget. This is useful for adding the omnibox to a PaneView overlay.
type OmniboxConfig ¶
type OmniboxConfig struct {
HistoryUC *usecase.SearchHistoryUseCase
FavoritesUC *usecase.ManageFavoritesUseCase
FaviconAdapter *adapter.FaviconAdapter
CopyURLUC *usecase.CopyURLUseCase
ShortcutsUC *usecase.SearchShortcutsUseCase
AutocompleteUC *usecase.AutocompleteUseCase
DefaultSearch string
InitialBehavior string
UIScale float64 // UI scale for favicon sizing
OnToast func(ctx context.Context, message string, level ToastLevel) // Callback to show toast notification
OnFocusIn func(entry *gtk.SearchEntry) // Callback when entry gains focus (for accent picker)
OnFocusOut func() // Callback when entry loses focus
}
OmniboxConfig holds configuration for creating an Omnibox.
type PaneView ¶
type PaneView struct {
// contains filtered or unexported fields
}
PaneView is a container for a single WebView with active state indication. It uses an overlay to display a border around the active pane.
func NewPaneView ¶
func NewPaneView(factory layout.WidgetFactory, paneID entity.PaneID, webViewWidget layout.Widget) *PaneView
NewPaneView creates a new pane view container for a WebView widget.
func (*PaneView) AddCssClass ¶
AddCssClass adds a CSS class to the overlay.
func (*PaneView) AddOverlayWidget ¶
AddOverlayWidget adds a widget as an overlay on this pane. The widget will appear above the WebView and border.
func (*PaneView) AttachHoverHandler ¶
AttachHoverHandler creates and attaches a hover handler for focus-follows-mouse behavior.
func (*PaneView) CancelPendingHover ¶ added in v0.24.0
func (pv *PaneView) CancelPendingHover()
CancelPendingHover cancels any pending hover focus timer. Called when keyboard navigation occurs to prevent hover from overriding keyboard focus.
func (*PaneView) Cleanup ¶ added in v0.20.1
func (pv *PaneView) Cleanup()
Cleanup removes the WebView widget from the overlay and clears references. This must be called before destroying the WebView to ensure proper GTK cleanup. After calling Cleanup, the PaneView should not be reused.
func (*PaneView) GetContentDimensions ¶
GetContentDimensions returns the pane's allocated width and height.
func (*PaneView) GrabFocus ¶
GrabFocus attempts to focus the WebView. Returns true if focus was successfully grabbed.
func (*PaneView) HideLinkStatus ¶ added in v0.21.0
func (pv *PaneView) HideLinkStatus()
HideLinkStatus hides the link status overlay.
func (*PaneView) HideLoadingSkeleton ¶ added in v0.22.0
func (pv *PaneView) HideLoadingSkeleton()
HideLoadingSkeleton hides the loading skeleton overlay (if present).
func (*PaneView) Overlay ¶
func (pv *PaneView) Overlay() layout.OverlayWidget
Overlay returns the underlying overlay widget for direct access.
func (*PaneView) RemoveCssClass ¶
RemoveCssClass removes a CSS class from the overlay.
func (*PaneView) RemoveOverlayWidget ¶
RemoveOverlayWidget removes an overlay widget from this pane.
func (*PaneView) SetActive ¶
SetActive updates the active state of the pane. Active panes display a visual border indicator.
func (*PaneView) SetLoadProgress ¶
SetLoadProgress updates the progress bar with the current load progress. progress should be between 0.0 and 1.0.
func (*PaneView) SetLoading ¶
SetLoading shows or hides the progress bar.
func (*PaneView) SetOnFocusIn ¶
SetOnFocusIn sets the callback for when the pane gains focus.
func (*PaneView) SetOnFocusOut ¶
SetOnFocusOut sets the callback for when the pane loses focus.
func (*PaneView) SetOnHover ¶
SetOnHover sets the callback for when the pane is hovered.
func (*PaneView) SetOnMouseMotion ¶ added in v0.27.0
func (pv *PaneView) SetOnMouseMotion(fn func())
SetOnMouseMotion sets a callback fired on intentional mouse movement within the pane. Used to detect real user interaction vs synthetic GTK enter events from widget rearrangement.
func (*PaneView) SetVisible ¶
SetVisible sets the visibility of the pane.
func (*PaneView) SetWebViewWidget ¶
SetWebViewWidget replaces the WebView widget.
func (*PaneView) ShowLinkStatus ¶ added in v0.21.0
ShowLinkStatus displays the link status overlay with the given URI. If uri is empty, hides the overlay instead.
func (*PaneView) ShowToast ¶
func (pv *PaneView) ShowToast(ctx context.Context, message string, level ToastLevel)
ShowToast displays a toast notification with the given message and level. If a toast is already visible, updates the text and resets the dismiss timer.
func (*PaneView) ShowZoomToast ¶
ShowZoomToast displays a zoom level toast notification. Formats the zoom percentage with a % suffix.
func (*PaneView) WebViewWidget ¶
WebViewWidget returns the underlying WebView widget.
type PermissionPopup ¶ added in v0.27.0
type PermissionPopup struct {
// contains filtered or unexported fields
}
PermissionPopup is a custom overlay component for permission prompts. It replaces the Adwaita AlertDialog to sidestep the purego ConnectResponse bug and match the app's custom UI style.
func NewPermissionPopup ¶ added in v0.27.0
func NewPermissionPopup(parentOverlay layout.OverlayWidget, uiScale float64) *PermissionPopup
NewPermissionPopup creates a new permission popup component.
func (*PermissionPopup) Hide ¶ added in v0.27.0
func (pp *PermissionPopup) Hide()
Hide hides the popup without invoking the callback.
func (*PermissionPopup) IsVisible ¶ added in v0.27.0
func (pp *PermissionPopup) IsVisible() bool
IsVisible returns whether the popup is currently displayed.
func (*PermissionPopup) Show ¶ added in v0.27.0
func (pp *PermissionPopup) Show(ctx context.Context, heading, body string, callback func(allowed, persistent bool))
Show displays the permission popup with the given heading and body text. The callback receives (allowed, persistent) when the user makes a choice.
func (*PermissionPopup) Widget ¶ added in v0.27.0
func (pp *PermissionPopup) Widget() *gtk.Widget
Widget returns the outer GTK widget for overlay registration.
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar displays a slim loading progress indicator at the bottom of a pane. Uses native GtkProgressBar with "osd" styling for overlay appearance. Implements smooth animation by incrementing towards the target value. Includes a 30-second timeout to auto-hide if the page load stalls.
func NewProgressBar ¶
func NewProgressBar(factory layout.WidgetFactory) *ProgressBar
NewProgressBar creates a new progress bar component using the widget factory.
func (*ProgressBar) Hide ¶
func (pb *ProgressBar) Hide()
Hide makes the progress bar invisible and resets state.
func (*ProgressBar) IsVisible ¶
func (pb *ProgressBar) IsVisible() bool
IsVisible returns whether the progress bar is currently visible.
func (*ProgressBar) SetProgress ¶
func (pb *ProgressBar) SetProgress(progress float64)
SetProgress sets the target progress value and starts smooth animation. progress should be between 0.0 and 1.0.
func (*ProgressBar) Show ¶
func (pb *ProgressBar) Show()
Show makes the progress bar visible and starts the auto-hide timeout.
func (*ProgressBar) Widget ¶
func (pb *ProgressBar) Widget() layout.Widget
Widget returns the underlying widget for embedding in overlays.
type RowHeightDefaults ¶ added in v0.21.0
type RowHeightDefaults struct {
Standard int // Standard list row (e.g., session row, history row)
Compact int // Compact row (e.g., tree row, sub-item)
Divider int // Divider/separator row
}
RowHeightDefaults holds default (unscaled) row heights for list-based modals. These are base pixel values that should be multiplied by UI scale.
type SessionManager ¶ added in v0.21.0
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager is a modal overlay for managing sessions.
func NewSessionManager ¶ added in v0.21.0
func NewSessionManager(ctx context.Context, cfg SessionManagerConfig) *SessionManager
NewSessionManager creates a new SessionManager component.
func (*SessionManager) Destroy ¶ added in v0.21.0
func (sm *SessionManager) Destroy()
Destroy cleans up session manager resources.
func (*SessionManager) Hide ¶ added in v0.21.0
func (sm *SessionManager) Hide(ctx context.Context)
Hide hides the session manager.
func (*SessionManager) IsVisible ¶ added in v0.21.0
func (sm *SessionManager) IsVisible() bool
IsVisible returns whether the session manager is visible.
func (*SessionManager) SetParentOverlay ¶ added in v0.21.0
func (sm *SessionManager) SetParentOverlay(overlay layout.OverlayWidget)
SetParentOverlay sets the overlay widget used for sizing calculations. Must be called before Show().
func (*SessionManager) Show ¶ added in v0.21.0
func (sm *SessionManager) Show(ctx context.Context)
Show displays the session manager and loads sessions.
func (*SessionManager) Toggle ¶ added in v0.21.0
func (sm *SessionManager) Toggle(ctx context.Context)
Toggle shows if hidden, hides if visible.
func (*SessionManager) Widget ¶ added in v0.21.0
func (sm *SessionManager) Widget() *gtk.Widget
Widget returns the session manager widget for embedding in an overlay.
func (*SessionManager) WidgetAsLayout ¶ added in v0.21.0
func (sm *SessionManager) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
WidgetAsLayout returns the session manager's outer widget as a layout.Widget.
type SessionManagerConfig ¶ added in v0.21.0
type SessionManagerConfig struct {
ListSessionsUC *usecase.ListSessionsUseCase
DeleteSessionUC *usecase.DeleteSessionUseCase
Spawner port.SessionSpawner
CurrentSession entity.SessionID
UIScale float64
OnClose func()
OnOpen func(sessionID entity.SessionID)
OnToast func(ctx context.Context, message string, level ToastLevel)
}
SessionManagerConfig holds configuration for creating a SessionManager.
type StackedPaneManager ¶
type StackedPaneManager struct {
// contains filtered or unexported fields
}
StackedPaneManager handles stacked pane operations. With the new architecture, every pane is wrapped in a StackedView from the start, making stacking operations trivial - we just add panes to the existing StackedView.
func NewStackedPaneManager ¶
func NewStackedPaneManager(factory layout.WidgetFactory) *StackedPaneManager
NewStackedPaneManager creates a new stacked pane manager.
func (*StackedPaneManager) AddPaneToStack ¶
func (spm *StackedPaneManager) AddPaneToStack( ctx context.Context, wsView *WorkspaceView, activePaneID entity.PaneID, newPaneView *PaneView, title string, ) error
AddPaneToStack adds a new pane to the stack containing the active pane. The StackedView is looked up from the TreeRenderer.
func (*StackedPaneManager) GetStackedView ¶
func (spm *StackedPaneManager) GetStackedView(wsView *WorkspaceView, paneID entity.PaneID) *layout.StackedView
GetStackedView returns the StackedView for a pane.
func (*StackedPaneManager) IsStacked ¶
func (spm *StackedPaneManager) IsStacked(wsView *WorkspaceView, paneID entity.PaneID) bool
IsStacked returns true if the pane is in a stack with multiple panes.
func (*StackedPaneManager) NavigateStack ¶
func (spm *StackedPaneManager) NavigateStack( ctx context.Context, wsView *WorkspaceView, currentPaneID entity.PaneID, direction string, ) (entity.PaneID, error)
NavigateStack moves to the next or previous pane in a stack. Returns the pane ID that became active.
func (*StackedPaneManager) SetStackActiveCallback ¶
func (spm *StackedPaneManager) SetStackActiveCallback( wsView *WorkspaceView, paneID entity.PaneID, callback func(index int), )
SetStackActiveCallback sets up the callback for when a stack pane is clicked.
type Suggestion ¶
type Suggestion struct {
URL string
Title string
FaviconURL string
IsFavorite bool // Indicates if this URL is also bookmarked as a favorite
}
Suggestion represents a search result from history.
type TabBar ¶
type TabBar struct {
// contains filtered or unexported fields
}
TabBar represents the horizontal tab bar widget.
func (*TabBar) ActiveTabID ¶
ActiveTabID returns the currently active tab ID.
func (*TabBar) SetOnClose ¶
SetOnClose sets the callback for tab close events.
func (*TabBar) SetOnCreate ¶
func (tb *TabBar) SetOnCreate(fn func())
SetOnCreate sets the callback for new tab creation.
func (*TabBar) SetOnSwitch ¶
SetOnSwitch sets the callback for tab switch events.
func (*TabBar) SetVisible ¶
SetVisible shows or hides the tab bar.
func (*TabBar) UpdateTitle ¶
UpdateTitle updates the title of a specific tab button.
type TabButton ¶
type TabButton struct {
// contains filtered or unexported fields
}
TabButton represents a single tab button in the tab bar.
func NewTabButton ¶
NewTabButton creates a new tab button for the given tab.
func (*TabButton) SetOnClick ¶
SetOnClick sets the callback for click events.
type TabPicker ¶ added in v0.22.0
type TabPicker struct {
// contains filtered or unexported fields
}
TabPicker is a modal overlay for selecting a tab destination.
It is intentionally similar to SessionManager/Omnibox patterns.
func NewTabPicker ¶ added in v0.22.0
func NewTabPicker(ctx context.Context, cfg TabPickerConfig) *TabPicker
func (*TabPicker) SetParentOverlay ¶ added in v0.22.0
func (tp *TabPicker) SetParentOverlay(overlay layout.OverlayWidget)
func (*TabPicker) Show ¶ added in v0.22.0
func (tp *TabPicker) Show(ctx context.Context, items []TabPickerItem)
func (*TabPicker) Toggle ¶ added in v0.22.0
func (tp *TabPicker) Toggle(ctx context.Context, items []TabPickerItem)
func (*TabPicker) WidgetAsLayout ¶ added in v0.22.0
func (tp *TabPicker) WidgetAsLayout(factory layout.WidgetFactory) layout.Widget
type TabPickerConfig ¶ added in v0.22.0
type TabPickerConfig struct {
UIScale float64
OnClose func()
OnSelect func(item TabPickerItem)
}
type TabPickerItem ¶ added in v0.22.0
type ToastLevel ¶
type ToastLevel int
ToastLevel indicates the visual style of a toast notification.
const ( // ToastInfo is for informational messages (accent color). ToastInfo ToastLevel = iota // ToastSuccess is for success confirmations (green). ToastSuccess // ToastWarning is for warning messages (yellow). ToastWarning // ToastError is for error messages (red). ToastError )
type ToastOption ¶ added in v0.22.0
type ToastOption func(*ToastOptions)
ToastOption is a functional option for configuring toast display.
func WithBackgroundColor ¶ added in v0.22.0
func WithBackgroundColor(color string) ToastOption
WithBackgroundColor sets a custom background color (CSS color value).
func WithDuration ¶ added in v0.22.0
func WithDuration(ms int) ToastOption
WithDuration sets the auto-dismiss duration in milliseconds. Use 0 for persistent toasts that require manual dismissal.
func WithModeClass ¶ added in v0.22.0
func WithModeClass(class string) ToastOption
WithModeClass sets a mode-specific CSS class for styling. This is applied atomically within Show() to avoid visual flicker.
func WithPosition ¶ added in v0.22.0
func WithPosition(pos ToastPosition) ToastOption
WithPosition sets the toast position on screen.
func WithTextColor ¶ added in v0.22.0
func WithTextColor(color string) ToastOption
WithTextColor sets a custom text color (CSS color value).
type ToastOptions ¶ added in v0.22.0
type ToastOptions struct {
// Duration in milliseconds. 0 = persistent (no auto-dismiss), >0 = auto-dismiss after duration.
Duration int
// BackgroundColor overrides the default background color (CSS color value).
// Empty string uses the level's default color.
BackgroundColor string
// TextColor overrides the default text color (CSS color value).
// Empty string uses the default (auto-contrast with background).
TextColor string
// Position determines where the toast appears on screen.
Position ToastPosition
// ModeClass is a CSS class for mode-specific styling (e.g., "toast-pane-mode").
// When set, this class is applied atomically with Show() to avoid visual flicker.
ModeClass string
}
ToastOptions configures toast appearance and behavior.
type ToastPosition ¶ added in v0.22.0
type ToastPosition int
ToastPosition defines where the toast appears on screen.
const ( // ToastPositionTopLeft positions toast in top-left corner. ToastPositionTopLeft ToastPosition = iota // ToastPositionTopCenter positions toast at top center. ToastPositionTopCenter // ToastPositionTopRight positions toast in top-right corner. ToastPositionTopRight // ToastPositionBottomLeft positions toast in bottom-left corner. ToastPositionBottomLeft // ToastPositionBottomCenter positions toast at bottom center. ToastPositionBottomCenter // ToastPositionBottomRight positions toast in bottom-right corner. ToastPositionBottomRight )
type Toaster ¶
type Toaster struct {
// contains filtered or unexported fields
}
Toaster displays toast notifications in an overlay. It supports different notification levels and auto-dismissal. When a new toast is shown while one is already visible, the text is updated in-place and the dismiss timer is reset (spam protection).
func NewToaster ¶
func NewToaster(factory layout.WidgetFactory) *Toaster
NewToaster creates a new toaster component for overlay display. The toaster is positioned in the top-left corner with margin by default.
func (*Toaster) Show ¶
func (t *Toaster) Show(ctx context.Context, message string, level ToastLevel, opts ...ToastOption)
Show displays a toast notification with the given message and level. If a toast is already visible, updates the text and resets the dismiss timer. Optional ToastOption arguments can customize duration, colors, and position.
type WebRTCPermissionIndicator ¶ added in v0.27.0
type WebRTCPermissionIndicator struct {
// contains filtered or unexported fields
}
WebRTCPermissionIndicator is a discrete top-right overlay that shows permission activity for microphone, camera, and display capture.
Collapsed: a small colored dot. Hovered: expands left and downward to show per-device states. Uses GtkRevealer for smooth slide-down animation of the details panel.
func NewWebRTCPermissionIndicator ¶ added in v0.27.0
func NewWebRTCPermissionIndicator() *WebRTCPermissionIndicator
NewWebRTCPermissionIndicator creates a top-right WebRTC activity indicator.
func (*WebRTCPermissionIndicator) MarkAllowed ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) MarkAllowed(permTypes []entity.PermissionType)
MarkAllowed marks tracked permissions as allowed.
func (*WebRTCPermissionIndicator) MarkBlocked ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) MarkBlocked(permTypes []entity.PermissionType)
MarkBlocked marks tracked permissions as blocked.
func (*WebRTCPermissionIndicator) MarkRequesting ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) MarkRequesting(permTypes []entity.PermissionType)
MarkRequesting marks tracked permissions as currently requesting access.
func (*WebRTCPermissionIndicator) Origin ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) Origin() string
Origin returns the current origin tracked by the indicator.
func (*WebRTCPermissionIndicator) Reset ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) Reset()
Reset clears all permission states and stored decisions, hiding the indicator. Call this when the active page navigates to a different origin.
func (*WebRTCPermissionIndicator) SetOnToggleLock ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) SetOnToggleLock( callback func(origin string, permType entity.PermissionType, state string, hasStored bool), )
SetOnToggleLock sets callback invoked when a row lock/unlock action is clicked.
func (*WebRTCPermissionIndicator) SetOrigin ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) SetOrigin(origin string)
SetOrigin sets the active origin for lock/unlock actions shown in details.
func (*WebRTCPermissionIndicator) SetStoredDecision ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) SetStoredDecision( permType entity.PermissionType, decision entity.PermissionDecision, hasStored bool, )
SetStoredDecision updates whether a permission type has an explicit stored decision.
func (*WebRTCPermissionIndicator) Widget ¶ added in v0.27.0
func (w *WebRTCPermissionIndicator) Widget() *gtk.Widget
Widget returns the GTK widget for adding to the main overlay.
type WorkspaceView ¶
type WorkspaceView struct {
// contains filtered or unexported fields
}
WorkspaceView is the top-level container that renders a workspace's pane tree. It manages the widget tree and handles active pane state.
func NewWorkspaceView ¶
func NewWorkspaceView(ctx context.Context, factory layout.WidgetFactory) *WorkspaceView
NewWorkspaceView creates a new workspace view.
func (*WorkspaceView) AddWorkspaceOverlayWidget ¶ added in v0.27.0
func (wv *WorkspaceView) AddWorkspaceOverlayWidget(widget layout.Widget)
AddWorkspaceOverlayWidget adds a widget to the workspace-level overlay safely.
func (*WorkspaceView) CancelAllPendingHovers ¶ added in v0.24.0
func (wv *WorkspaceView) CancelAllPendingHovers()
CancelAllPendingHovers cancels any pending hover timers on all pane views. Called when keyboard navigation occurs to ensure hover doesn't override keyboard focus.
func (*WorkspaceView) ClearRootWidgetRef ¶
func (wv *WorkspaceView) ClearRootWidgetRef()
ClearRootWidgetRef clears the stored root widget reference without removing it. Use this before SetRootWidgetDirect when the old root has already been removed through other means (e.g., GTK paned operations).
func (*WorkspaceView) Container ¶
func (wv *WorkspaceView) Container() layout.BoxWidget
Container returns the underlying BoxWidget for direct access.
func (*WorkspaceView) ContainerWidget ¶
func (wv *WorkspaceView) ContainerWidget() layout.Widget
ContainerWidget returns the container widget for relative positioning. Implements focus.PaneGeometryProvider.
func (*WorkspaceView) DeactivatePane ¶ added in v0.24.0
func (wv *WorkspaceView) DeactivatePane(paneID entity.PaneID)
DeactivatePane removes the active visual indicator from a pane. This is used when keyboard navigation overrides mouse hover focus.
func (*WorkspaceView) Factory ¶
func (wv *WorkspaceView) Factory() layout.WidgetFactory
Factory returns the widget factory used by this workspace view.
func (*WorkspaceView) FindNext ¶
func (wv *WorkspaceView) FindNext()
FindNext triggers the next match in the find bar if available.
func (*WorkspaceView) FindPrevious ¶
func (wv *WorkspaceView) FindPrevious()
FindPrevious triggers the previous match in the find bar if available.
func (*WorkspaceView) FocusPane ¶
func (wv *WorkspaceView) FocusPane(paneID entity.PaneID) bool
FocusPane attempts to give focus to a specific pane. Returns true if focus was successfully grabbed.
func (*WorkspaceView) GetActivePaneID ¶
func (wv *WorkspaceView) GetActivePaneID() entity.PaneID
GetActivePaneID returns the ID of the currently active pane. Reads from the domain model as the single source of truth.
func (*WorkspaceView) GetActivePaneView ¶
func (wv *WorkspaceView) GetActivePaneView() *PaneView
GetActivePaneView returns the PaneView for the current active pane.
func (*WorkspaceView) GetOmnibox ¶
func (wv *WorkspaceView) GetOmnibox() *Omnibox
GetOmnibox returns the current omnibox if visible.
func (*WorkspaceView) GetPaneIDs ¶
func (wv *WorkspaceView) GetPaneIDs() []entity.PaneID
GetPaneIDs returns all pane IDs in this workspace view.
func (*WorkspaceView) GetPaneView ¶
func (wv *WorkspaceView) GetPaneView(paneID entity.PaneID) *PaneView
GetPaneView returns the PaneView for a given pane ID. Returns nil if not found.
func (*WorkspaceView) GetPaneWidget ¶
func (wv *WorkspaceView) GetPaneWidget(paneID entity.PaneID) layout.Widget
GetPaneWidget returns the widget for a pane ID. Implements focus.PaneGeometryProvider.
func (*WorkspaceView) GetRootWidget ¶
func (wv *WorkspaceView) GetRootWidget() layout.Widget
GetRootWidget returns the current root widget of the workspace. This is useful for incremental operations that need to modify the tree.
func (*WorkspaceView) GetStackContainerWidget ¶
func (wv *WorkspaceView) GetStackContainerWidget(paneID entity.PaneID) layout.Widget
GetStackContainerWidget returns the stack container widget for a stacked pane. Returns nil if the pane is not in a stack. Implements focus.PaneGeometryProvider.
func (*WorkspaceView) HideFindBar ¶
func (wv *WorkspaceView) HideFindBar()
HideFindBar hides and destroys the current find bar.
func (*WorkspaceView) HideOmnibox ¶
func (wv *WorkspaceView) HideOmnibox()
HideOmnibox hides and destroys the current omnibox.
func (*WorkspaceView) IsFindBarVisible ¶
func (wv *WorkspaceView) IsFindBarVisible() bool
IsFindBarVisible returns whether the find bar is currently visible.
func (*WorkspaceView) IsHoverFocusLocked ¶ added in v0.27.0
func (wv *WorkspaceView) IsHoverFocusLocked() bool
IsHoverFocusLocked returns whether hover-to-focus is currently locked.
func (*WorkspaceView) IsHoverSuppressed ¶ added in v0.24.0
func (wv *WorkspaceView) IsHoverSuppressed() bool
IsHoverSuppressed returns true if hover focus is temporarily suppressed.
func (*WorkspaceView) IsOmniboxVisible ¶
func (wv *WorkspaceView) IsOmniboxVisible() bool
IsOmniboxVisible returns whether the omnibox is currently visible.
func (*WorkspaceView) NotifyNewPaneCreated ¶ added in v0.26.2
func (wv *WorkspaceView) NotifyNewPaneCreated(ctx context.Context)
NotifyNewPaneCreated handles new pane creation events. Suppresses hover focus to keep focus on the new pane, and optionally shows omnibox.
func (*WorkspaceView) PaneCount ¶
func (wv *WorkspaceView) PaneCount() int
PaneCount returns the number of panes in the workspace view.
func (*WorkspaceView) Rebuild ¶
func (wv *WorkspaceView) Rebuild(ctx context.Context) error
Rebuild rebuilds the widget tree from the current workspace. Use this after structural changes like splits or closes.
func (*WorkspaceView) RegisterPaneView ¶
func (wv *WorkspaceView) RegisterPaneView(paneID entity.PaneID, pv *PaneView)
RegisterPaneView adds a PaneView to the tracking map without rebuilding. Use this for incremental operations like stacked panes.
func (*WorkspaceView) RemoveWorkspaceOverlayWidget ¶ added in v0.27.0
func (wv *WorkspaceView) RemoveWorkspaceOverlayWidget(widget layout.Widget)
RemoveWorkspaceOverlayWidget removes a widget from the workspace-level overlay safely.
func (*WorkspaceView) SetActivePaneID ¶
func (wv *WorkspaceView) SetActivePaneID(paneID entity.PaneID) error
SetActivePaneID updates which pane is visually marked as active.
func (*WorkspaceView) SetAutoOpenOnNewPane ¶ added in v0.26.2
func (wv *WorkspaceView) SetAutoOpenOnNewPane(enabled bool)
SetAutoOpenOnNewPane configures whether to show omnibox when a new pane is created.
func (*WorkspaceView) SetFindBarConfig ¶
func (wv *WorkspaceView) SetFindBarConfig(cfg FindBarConfig)
SetFindBarConfig stores the find bar configuration for later use.
func (*WorkspaceView) SetHoverFocusLocked ¶ added in v0.27.0
func (wv *WorkspaceView) SetHoverFocusLocked(locked bool)
SetHoverFocusLocked enables or disables hover-to-focus behavior.
func (*WorkspaceView) SetModeBorderOverlay ¶
func (wv *WorkspaceView) SetModeBorderOverlay(widget layout.Widget)
SetModeBorderOverlay attaches a mode border overlay widget. The widget will be displayed on top of the pane container when modes are active.
func (*WorkspaceView) SetOmniboxConfig ¶
func (wv *WorkspaceView) SetOmniboxConfig(cfg OmniboxConfig)
SetOmniboxConfig stores the omnibox configuration for later use.
func (*WorkspaceView) SetOnPaneFocused ¶
func (wv *WorkspaceView) SetOnPaneFocused(fn func(paneID entity.PaneID))
SetOnPaneFocused sets the callback for when a pane receives focus.
func (*WorkspaceView) SetOnSplitRatioDragged ¶ added in v0.21.0
func (wv *WorkspaceView) SetOnSplitRatioDragged(fn func(nodeID string, ratio float64))
func (*WorkspaceView) SetRootWidgetDirect ¶
func (wv *WorkspaceView) SetRootWidgetDirect(widget layout.Widget)
SetRootWidgetDirect replaces the root widget without rebuilding the entire tree. Use this for incremental operations when converting to/from stacked panes.
func (*WorkspaceView) SetWebViewWidget ¶
SetWebViewWidget attaches a WebView widget to a specific pane.
func (*WorkspaceView) SetWorkspace ¶
SetWorkspace sets the workspace to render and builds the widget tree.
func (*WorkspaceView) ShowFindBar ¶
func (wv *WorkspaceView) ShowFindBar(ctx context.Context)
ShowFindBar creates and shows the find bar in the active pane.
func (*WorkspaceView) ShowOmnibox ¶
func (wv *WorkspaceView) ShowOmnibox(ctx context.Context, query string)
ShowOmnibox creates and shows the omnibox in the active pane.
func (*WorkspaceView) SuppressHover ¶ added in v0.24.0
func (wv *WorkspaceView) SuppressHover(duration time.Duration)
SuppressHover temporarily blocks hover focus changes after keyboard navigation. This prevents the race condition where a pending hover timer overrides an explicit keyboard focus change (Issue #89).
func (*WorkspaceView) TreeRenderer ¶
func (wv *WorkspaceView) TreeRenderer() *layout.TreeRenderer
TreeRenderer returns the underlying tree renderer.
func (*WorkspaceView) UnregisterPaneView ¶
func (wv *WorkspaceView) UnregisterPaneView(paneID entity.PaneID)
UnregisterPaneView removes a PaneView from the tracking map and cleans it up. This must be called when closing a pane to properly release GTK resources before destroying the WebView.
func (*WorkspaceView) Widget ¶
func (wv *WorkspaceView) Widget() layout.Widget
Widget returns the overlay widget for embedding in the UI. The overlay wraps the pane container and allows mode borders to be displayed.
func (*WorkspaceView) Workspace ¶
func (wv *WorkspaceView) Workspace() *entity.Workspace
Workspace returns the current workspace.
func (*WorkspaceView) WorkspaceOverlayWidget ¶ added in v0.27.0
func (wv *WorkspaceView) WorkspaceOverlayWidget() layout.OverlayWidget
WorkspaceOverlayWidget returns the workspace-level overlay.
Source Files
¶
- accent_picker.go
- find_bar.go
- floating_pane.go
- link_status.go
- loading_skeleton.go
- logo.go
- modal_sizing.go
- omnibox.go
- pane_view.go
- permission_popup.go
- progress_bar.go
- session_manager.go
- stacked_pane_manager.go
- tab_bar.go
- tab_button.go
- tab_picker.go
- toaster.go
- webrtc_permission_indicator.go
- webrtc_permission_indicator_state.go
- workspace_view.go