setting

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeUnset = iota
	TypeNoop
	TypeRadio
	TypeToggle
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Width    int
	Height   int
	Selected Paner
	// contains filtered or unexported fields
}

func New

func New(state *commit.State) Model

func ToModel

func ToModel(m tea.Model, c tea.Cmd) (Model, tea.Cmd)

func (*Model) ActivePane

func (m *Model) ActivePane() Paner

func (*Model) AddPaneSet

func (m *Model) AddPaneSet(name string, ps []Paner)

func (Model) GetPaneSets

func (m Model) GetPaneSets() map[string][]Paner

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) RenderPanes

func (m Model) RenderPanes() string

func (*Model) SelectPane

func (m *Model) SelectPane(title string)

func (*Model) SwapPaneSet

func (m *Model) SwapPaneSet(name string)

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Noop

type Noop struct{}

func (*Noop) Blur

func (n *Noop) Blur()

func (*Noop) Focus

func (n *Noop) Focus()

func (*Noop) Render

func (n *Noop) Render(styles Styles) string

func (*Noop) Type

func (n *Noop) Type() Type

type Paner

type Paner interface {
	Type() Type
	Focus()
	Blur()
	Render(Styles) string
}

type Radio

type Radio struct {
	Title  string
	Values []string
	Index  int
	// contains filtered or unexported fields
}

func ToRadio

func ToRadio(p Paner) *Radio

func (*Radio) Blur

func (r *Radio) Blur()

func (*Radio) Focus

func (r *Radio) Focus()

func (*Radio) Next

func (r *Radio) Next()

func (*Radio) Previous

func (r *Radio) Previous()

func (*Radio) Render

func (r *Radio) Render(styles Styles) string

func (*Radio) Select

func (r *Radio) Select(i int)

func (*Radio) Type

func (r *Radio) Type() Type

func (*Radio) Value

func (r *Radio) Value() string

type Styles

type Styles struct {
	// contains filtered or unexported fields
}

type Toggle

type Toggle struct {
	Title  string
	Enable bool
	// contains filtered or unexported fields
}

func ToToggle

func ToToggle(p Paner) *Toggle

func (*Toggle) Blur

func (t *Toggle) Blur()

func (*Toggle) Focus

func (t *Toggle) Focus()

func (*Toggle) Render

func (t *Toggle) Render(styles Styles) string

func (*Toggle) Toggle

func (t *Toggle) Toggle()

func (*Toggle) Type

func (t *Toggle) Type() Type

func (*Toggle) Value

func (t *Toggle) Value() bool

type Type

type Type int

Jump to

Keyboard shortcuts

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