preferences

package
v0.0.0-...-1cf95b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowPreferencesWindow

func ShowPreferencesWindow(owner walk.Form, tm *tunnel.Manager, cm *config.ConfigManager, trayIcon *walk.NotifyIcon, initialTabIndex int) error

ShowPreferencesWindow shows the preferences window (creates if needed, or brings to front). It accepts a tunnel manager to enable OLM status polling, a config manager for settings, and a tray icon for notifications. initialTabIndex selects the tab to show (0-based, following the order in NewPreferencesWindow).

Types

type AboutTab

type AboutTab struct {
	// contains filtered or unexported fields
}

AboutTab handles the About tab

func NewAboutTab

func NewAboutTab() *AboutTab

NewAboutTab creates a new About tab

func (*AboutTab) AfterAdd

func (at *AboutTab) AfterAdd()

AfterAdd is called after the tab page is added to the tab widget

func (*AboutTab) Cleanup

func (at *AboutTab) Cleanup()

Cleanup cleans up resources when the tab is closed

func (*AboutTab) Create

func (at *AboutTab) Create(parent *walk.TabWidget) (*walk.TabPage, error)

Create creates the About tab UI

type DisplayMode

type DisplayMode int

DisplayMode represents the display mode for OLM status

const (
	DisplayModeFormatted DisplayMode = iota
	DisplayModeJSON
)

type LogLine

type LogLine struct {
	Stamp time.Time
	Level string
	Line  string
}

LogLine represents a single log line

type LogsTab

type LogsTab struct {
	// contains filtered or unexported fields
}

LogsTab handles the logs viewing tab

func NewLogsTab

func NewLogsTab() *LogsTab

NewLogsTab creates a new logs tab

func (*LogsTab) AfterAdd

func (lt *LogsTab) AfterAdd()

AfterAdd is called after the tab page is added to the tab widget

func (*LogsTab) Cleanup

func (lt *LogsTab) Cleanup()

Cleanup cleans up resources when the tab is closed

func (*LogsTab) Create

func (lt *LogsTab) Create(parent *walk.TabWidget) (*walk.TabPage, error)

Create creates the logs tab UI

func (*LogsTab) SetWindow

func (lt *LogsTab) SetWindow(window *PreferencesWindow)

SetWindow sets the parent window reference (called after window creation)

type OLMStatusTab

type OLMStatusTab struct {
	// contains filtered or unexported fields
}

OLMStatusTab handles the OLM status viewing tab

func NewOLMStatusTab

func NewOLMStatusTab(tm *tunnel.Manager) *OLMStatusTab

NewOLMStatusTab creates a new OLM status tab

func (*OLMStatusTab) AfterAdd

func (ost *OLMStatusTab) AfterAdd()

AfterAdd is called after the tab page is added to the tab widget

func (*OLMStatusTab) Cleanup

func (ost *OLMStatusTab) Cleanup()

Cleanup cleans up resources when the tab is closed

func (*OLMStatusTab) Create

func (ost *OLMStatusTab) Create(parent *walk.TabWidget) (*walk.TabPage, error)

Create creates the OLM status tab UI

type PreferencesTab

type PreferencesTab struct {
	// contains filtered or unexported fields
}

PreferencesTab handles the preferences/settings tab

func NewPreferencesTab

func NewPreferencesTab(cm *config.ConfigManager) *PreferencesTab

NewPreferencesTab creates a new preferences tab

func (*PreferencesTab) AfterAdd

func (pt *PreferencesTab) AfterAdd()

AfterAdd is called after the tab page is added to the tab widget

func (*PreferencesTab) Cleanup

func (pt *PreferencesTab) Cleanup()

Cleanup cleans up resources when the tab is closed

func (*PreferencesTab) Create

func (pt *PreferencesTab) Create(parent *walk.TabWidget) (*walk.TabPage, error)

Create creates the preferences tab UI

func (*PreferencesTab) SetWindow

func (pt *PreferencesTab) SetWindow(window *PreferencesWindow)

SetWindow sets the parent window reference (called after window creation)

type PreferencesWindow

type PreferencesWindow struct {
	*walk.Dialog
	// contains filtered or unexported fields
}

PreferencesWindow manages the preferences window with multiple tabs

func NewPreferencesWindow

func NewPreferencesWindow(owner walk.Form, tm *tunnel.Manager, cm *config.ConfigManager, trayIcon *walk.NotifyIcon) (*PreferencesWindow, error)

NewPreferencesWindow creates a new preferences window with tabs

type Tab

type Tab interface {
	// Create creates the tab UI and returns the tab page
	Create(parent *walk.TabWidget) (*walk.TabPage, error)
	// AfterAdd is called after the tab page is added to the tab widget
	// This allows tabs to perform any initialization that requires the tab to be in the widget tree
	AfterAdd()
	// Cleanup is called when the window is closing to clean up resources
	Cleanup()
}

Tab represents a tab in the preferences window

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL