widget

package
v0.0.0-...-caf0cee Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT, Unlicense Imports: 2 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 = l.Context

type Clickable

type Clickable = widget.Clickable

type D

type D = l.Dimensions

type List

type List = widget.List
type NavSlugs struct {
	Cache []l.Widget

	widget.List
	// contains filtered or unexported fields
}

NavSlugs maintains state for navigation slugs. Each slug gets a clickable and it's flex child it accumulated and cached.

func (s *NavSlugs) Clickable(ii int) *widget.Clickable

Clickable returns the clickable for the slug at the given index, if any.

If the clickable does not exist, an empty widget.Clickable is returned to avoid nil panics.

func (s *NavSlugs) Flexed() []l.Widget

Flexed returns all the accumulated flex children.

func (s *NavSlugs) NextClickable() *widget.Clickable

NextClickable returns the next clickable to use, allocating if necessary.

func (s *NavSlugs) Push(w l.Widget)

Push the widget, wrap it in a flex and cache it.

func (s *NavSlugs) Reset()

Reset the state ready for the next frame.

type SidePanel

type SidePanel struct {
	// Active is the name of the active page.
	// Because this widget is static we can manually respond to the name
	// during layout.
	Active          string
	PopHistoryBtn   widget.Clickable
	NavHomeBtn      widget.Clickable
	NavGalleryBtn   widget.Clickable
	NavChatBtn      widget.Clickable
	CreateWindowBtn widget.Clickable
}

SidePanel maintains state for a side panel of navigation items. Implemented statically.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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