tabview

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 TabItem

type TabItem struct {
	// Title of the tab.
	Title func(gtx C, th *theme.Theme) D
	// Main part of the tab content.
	Widget func(gtx C, th *theme.Theme) D
	// Title padding of the tab item.
	Inset layout.Inset
	// contains filtered or unexported fields
}

func NewTabItem

func NewTabItem(inset layout.Inset, title, wgt func(gtx C, th *theme.Theme) D) *TabItem

func SimpleTabItem added in v0.3.0

func SimpleTabItem(inset layout.Inset, title string, wgt func(gtx C, th *theme.Theme) D) *TabItem

func (*TabItem) LayoutTab

func (item *TabItem) LayoutTab(gtx C, th *theme.Theme) D

func (*TabItem) LayoutWidget

func (item *TabItem) LayoutWidget(gtx C, th *theme.Theme) D

func (*TabItem) Update

func (item *TabItem) Update(gtx layout.Context) bool

type TabView

type TabView struct {
	Axis layout.Axis
	// contains filtered or unexported fields
}

func NewTabView

func NewTabView(axis layout.Axis, item ...*TabItem) *TabView

func (*TabView) CurrentTab added in v0.6.0

func (tv *TabView) CurrentTab() int

func (*TabView) Layout

func (tv *TabView) Layout(gtx C, th *theme.Theme) D

func (*TabView) SetCurrentTab added in v0.9.1

func (tv *TabView) SetCurrentTab(idx int)

SetCurrentTab switch the index of the active tab.

func (*TabView) Update

func (tv *TabView) Update(gtx C)

Jump to

Keyboard shortcuts

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