fwk

package
v0.0.0-...-40caaf7 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle func(path *url.URL) View

func (Handle) Handle

func (ch Handle) Handle(path *url.URL) View

type Manager

type Manager interface {
	Snackbar() View
	Window() *app.Window
	WindowDimensions() WindowDimensions
	Modal() Modal
	Nav() *Nav
}
type Modal interface {
	Show(option ModalOption)
	DismissWithAnim()
	DismissWithoutAnim()
}

type ModalOption

type ModalOption struct {
	OnBackdropClick func()
	AfterDismiss    func()
	component.VisibilityAnimation
	Widget layout.Widget
}
type Nav struct {
	// contains filtered or unexported fields
}

func NewNav

func NewNav() *Nav
func (n *Nav) Layout(gtx layout.Context) layout.Dimensions
func (n *Nav) NavigateTo(path string) bool
func (n *Nav) Register(pattern string, handler Router) bool

type PathView

type PathView interface {
	Name() string
	View
}

type Router

type Router interface {
	Handle(path *url.URL) View
}

type Snackbar

type Snackbar interface {
	Show(option SnackbarOption)
}

type SnackbarOption

type SnackbarOption struct {
	View
	Duration time.Duration
}

type View

type View interface {
	Layout(gtx layout.Context) layout.Dimensions
}

View is anything that can be displayed on the screen

type Widget

type Widget layout.Widget

func (Widget) Layout

func (w Widget) Layout(gtx layout.Context) layout.Dimensions

type WindowDimensions

type WindowDimensions struct {
	WidthDp  unit.Dp
	WidthPx  int
	HeightDp unit.Dp
	HeightPx int
}

Jump to

Keyboard shortcuts

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