demo

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package demo provides helper for the example packages in "examples".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Demo

type Demo struct {
	Titled

	Next lines.Componenter
	// contains filtered or unexported fields
}

Demo implements features all demonstrations, i.e. menu, context, tool-tip and stacked, have in common.

func (*Demo) Height

func (d *Demo) Height() int

func (*Demo) Init

func (d *Demo) Init(dg dimGapper, e *lines.Env, title []rune)

Init sets up the embedding component's title and its default size.

func (*Demo) OnFocus

func (d *Demo) OnFocus(e *lines.Env)

OnFocus switches to double-framing.

func (*Demo) OnFocusLost

func (d *Demo) OnFocusLost(e *lines.Env)

OnFocusLost reverts to single-framing.

func (*Demo) OnKey

func (d *Demo) OnKey(e *lines.Env, k lines.Key, mm lines.ModifierMask)

func (*Demo) WriteTip

func (d *Demo) WriteTip(s string)

type Gapper added in v0.10.0

type Gapper interface{ Gaps(int) *lines.GapsWriter }

type Titled

type Titled struct {
	Title []rune
	Gapper
}

func (*Titled) Default

func (f *Titled) Default(g Gapper, e *lines.Env)

func (*Titled) Double added in v0.10.0

func (tt *Titled) Double(e *lines.Env) *Titled

func (*Titled) Focused

func (f *Titled) Focused(g Gapper, e *lines.Env)

func (*Titled) Single added in v0.10.0

func (tt *Titled) Single(e *lines.Env) *Titled

func (*Titled) Styled added in v0.10.0

func (tt *Titled) Styled(e *lines.Env, sty lines.Style) *Titled

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳