pages

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pages = map[string]func(*Router) Page{}

Functions

func AppBarSwitch added in v1.34.3

func AppBarSwitch(toggle *widget.Bool, label string, th **material.Theme) component.AppBarAction

func Register

func Register(name string, fun func(*Router) Page)

Types

type Page

type Page interface {
	ID() string
	Actions(th *material.Theme) []component.AppBarAction
	Overflow() []component.OverflowAction
	Layout(gtx layout.Context, th *material.Theme) layout.Dimensions
	NavItem() component.NavItem
	messages.EventHandler
}

type Router

type Router struct {
	LogWidget func(layout.Context, *material.Theme) layout.Dimensions

	ModalNavDrawer *component.ModalNavDrawer
	NavAnim        component.VisibilityAnimation
	AppBar         *component.AppBar
	ModalLayer     *component.ModalLayer
	NonModalDrawer bool

	ShuttingDown bool
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(g guim.Guim, ctx context.Context) *Router

func (*Router) CloseLogs added in v1.45.1

func (r *Router) CloseLogs()

func (*Router) Execute added in v1.30.0

func (r *Router) Execute(cmd commands.Command, settings any)

func (*Router) ExitSubcommand added in v1.45.1

func (r *Router) ExitSubcommand()

func (*Router) GetPopup added in v1.33.0

func (r *Router) GetPopup(id string) (p popups.Popup)

func (*Router) HandleEvent added in v1.45.1

func (r *Router) HandleEvent(event any) error

func (*Router) Layout

func (r *Router) Layout(gtx layout.Context, th *material.Theme) layout.Dimensions

func (*Router) PushPopup added in v1.31.1

func (r *Router) PushPopup(p popups.Popup) bool

func (*Router) Register

func (r *Router) Register(p func(g guim.Guim) Page, id string)

func (*Router) RemovePopup added in v1.31.1

func (r *Router) RemovePopup(id string)

func (*Router) SwitchTo

func (r *Router) SwitchTo(tag string)

func (*Router) Tick added in v1.45.1

func (r *Router) Tick(now time.Time)

func (*Router) Toast added in v1.45.1

func (r *Router) Toast(t string)

func (*Router) Wait added in v1.45.1

func (r *Router) Wait()

type Toast added in v1.45.1

type Toast struct {
	Message   string
	Visible   bool
	StartTime time.Time
	Duration  time.Duration
}

func (*Toast) Layout added in v1.45.1

func (t *Toast) Layout(gtx layout.Context, th *material.Theme) layout.Dimensions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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