pages

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewErrorPopup added in v1.31.1

func NewErrorPopup(r *Router, err error, onClose func(), isPanic bool) *errorPopup

func Register

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

Types

type C added in v1.31.1

type C = layout.Context

type ConnectPopup added in v1.31.1

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

func (*ConnectPopup) Handler added in v1.31.1

func (u *ConnectPopup) Handler(data any) messages.Response

func (*ConnectPopup) ID added in v1.31.1

func (p *ConnectPopup) ID() string

func (*ConnectPopup) Layout added in v1.31.1

func (p *ConnectPopup) Layout(gtx C, th *material.Theme) D

type D added in v1.31.1

type D = layout.Dimensions

type HandlerFunc

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

type Page

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

	// handle events from program
	Handler(data any) messages.Response
}
type Popup interface {
	ID() string
	Layout(gtx layout.Context, th *material.Theme) layout.Dimensions
	Handler(data any) messages.Response
}

func NewConnect added in v1.31.1

func NewConnect(router *Router) Popup

type Router

type Router struct {
	UI ui.UI

	Wg         sync.WaitGroup
	MSAuth     *guiAuth
	Invalidate func()
	LogWidget  func(C, *material.Theme) D

	Theme *material.Theme

	ModalNavDrawer *component.ModalNavDrawer
	NavAnim        component.VisibilityAnimation
	AppBar         *component.AppBar
	ModalLayer     *component.ModalLayer
	NonModalDrawer bool
	BottomBar      bool
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(ctx context.Context, invalidate func(), th *material.Theme) *Router

func (*Router) Execute added in v1.30.0

func (r *Router) Execute(cmd commands.Command)

func (*Router) Handler

func (r *Router) Handler(data interface{}) messages.Response

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 Popup)

func (*Router) Register

func (r *Router) Register(p func(*Router) 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