wizard

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowRulesEditor added in v0.43.0

func ShowRulesEditor(
	plan setup.SetupPlan,
	callback func(context.Context, setup.SetupPlan, *RulesEditor),
)

ShowRulesEditor launches the notification rule editor window.

func ShowWizard

func ShowWizard(
	initialPlan *setup.SetupPlan,
	callback func(context.Context, setup.SetupPlan, *WizardController),
)

ShowWizard launches the setup wizard.

Types

type RulesEditor added in v0.43.0

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

RulesEditor is the post-setup notification rule editor: targets + per-category prefs in one window, mutating a working copy that Cancel discards and Apply hands to the callback. Shares targetSection with the wizard's step 3 but sets onDelete to a confirm dialog (the wizard keeps immediate-delete).

func NewRulesEditor added in v0.43.0

func NewRulesEditor(
	plan setup.SetupPlan,
	callback func(context.Context, setup.SetupPlan, *RulesEditor),
) *RulesEditor

NewRulesEditor builds the rule-editor window for the given plan. The callback is invoked on Apply with the mutated plan; it is responsible for persistence/restart (see App.onRulesApply).

func (*RulesEditor) Close added in v0.43.0

func (e *RulesEditor) Close()

Close cancels the editor context and closes the window. Marks applying=false first so onRulesApply's success path can call Close even when the window is still showing the warning dialog.

func (*RulesEditor) EnableButtons added in v0.43.0

func (e *RulesEditor) EnableButtons()

EnableButtons re-enables every input frozen by onApply, restoring the Cancel button + native window-close affordance.

func (*RulesEditor) Window added in v0.43.0

func (e *RulesEditor) Window() fyne.Window

Window returns the editor's top-level window so external callers can parent dialogs on the surface that initiated the work.

type Step

type Step interface {
	// Title returns the title of the step shown in the header.
	Title() string
	// Description returns a short helpful text for the step.
	Description() string
	// Content returns the UI components for the step.
	Content() fyne.CanvasObject
	// Validate checks if the current step's input is valid.
	Validate() error
	// Apply updates the shared SetupPlan with the step's data.
	Apply(plan *setup.SetupPlan)
}

Step defines the interface that each wizard step must implement.

type Wizard

type Wizard = WizardController

Wizard is an alias for WizardController for backward compatibility

type WizardController

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

WizardController manages the state and navigation of the setup wizard.

func NewWizard

func NewWizard(
	initialPlan *setup.SetupPlan,
	callback func(context.Context, setup.SetupPlan, *WizardController),
) *WizardController

NewWizard creates a new wizard controller.

func (*WizardController) Close

func (w *WizardController) Close()

Close closes the wizard window and cancels the internal context.

func (*WizardController) EnableButtons

func (w *WizardController) EnableButtons()

EnableButtons re-enables navigation buttons if a background task fails.

func (*WizardController) Window added in v0.43.0

func (w *WizardController) Window() fyne.Window

Window returns the wizard's top-level window so external callers can parent dialogs on the surface that initiated the work.

Jump to

Keyboard shortcuts

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