discloser

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type Page

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

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

func New

func New(router *page.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 C, th *material.Theme) D

func (*Page) LayoutCustomDiscloser

func (p *Page) LayoutCustomDiscloser(gtx C, th *material.Theme) D

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

func (*Page) LayoutTreeNode

func (p *Page) LayoutTreeNode(gtx C, th *material.Theme, tn *TreeNode) D

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