pages

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 23 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 HandlerFunc

type HandlerFunc = func(data interface{}) messages.Message

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.Handler
}

type Router

type Router struct {
	Wg         sync.WaitGroup
	Invalidate func()
	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(ui ui.UI, ctx context.Context) *Router

func (*Router) Execute added in v1.30.0

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

func (*Router) ExitCommand added in v1.33.1

func (r *Router) ExitCommand()

func (*Router) GetPopup added in v1.33.0

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

func (*Router) HandleMessage added in v1.33.1

func (r *Router) HandleMessage(msg *messages.Message) *messages.Message

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(invalidate func()) 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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