discloser

package
v0.0.0-...-9d4922b Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	TreeNode
	widget.List
	*pages.Router
	CustomDiscloserState component.DiscloserState
}

Page holds the state for a page demonstrating the features of the AppBar component.

func New

func New(router *pages.Router) *Page

New constructs a Page with the provided router.

func (*Page) Actions

func (p *Page) Actions() []component.AppBarAction

func (*Page) Layout

func (p *Page) Layout(gtx layout.Context, th *material.Theme) layout.Dimensions

func (*Page) LayoutCustomDiscloser

func (p *Page) LayoutCustomDiscloser(gtx layout.Context, th *material.Theme) layout.Dimensions

LayoutCustomDiscloser demonstrates how to create a custom control for a discloser.

func (*Page) LayoutTreeNode

func (p *Page) LayoutTreeNode(gtx layout.Context, th *material.Theme, tn *TreeNode) layout.Dimensions

LayoutTreeNode recursively lays out a tree of widgets described by TreeNodes.

func (*Page) NavItem

func (p *Page) NavItem() component.NavItem

func (*Page) Overflow

func (p *Page) Overflow() []component.OverflowAction

type TreeNode

type TreeNode struct {
	Text     string
	Children []TreeNode
	component.DiscloserState
}

TreeNode is a simple tree implementation that holds both display data and the state for Discloser widgets. In practice, you'll often want to separate the state from the data being presented.

Jump to

Keyboard shortcuts

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