modal

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package modal contains modal views that are drawn on top of existing layout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Help

type Help struct {
	*cview.TextView
	// contains filtered or unexported fields
}

func NewHelp

func NewHelp(doneCb func()) *Help

func (*Help) Blur

func (h *Help) Blur()

func (*Help) Focus

func (h *Help) Focus(delegate func(p cview.Primitive))

func (*Help) GetFocusable

func (h *Help) GetFocusable() cview.Focusable

func (*Help) InputHandler

func (h *Help) InputHandler() func(event *tcell.EventKey, setFocus func(p cview.Primitive))

func (*Help) SetDoneFunc

func (h *Help) SetDoneFunc(doneFunc func())

func (*Help) SetStats

func (h *Help) SetStats(stats models.Stats)

func (*Help) SetVisible

func (h *Help) SetVisible(visible bool)

func (*Help) View

func (h *Help) View() cview.Primitive

type Message added in v0.4.0

type Message struct {
	*cview.TextView
	// contains filtered or unexported fields
}

func NewMessage added in v0.4.0

func NewMessage() *Message

func (*Message) Blur added in v0.4.0

func (m *Message) Blur()

func (*Message) Focus added in v0.4.0

func (m *Message) Focus(delegate func(p cview.Primitive))

func (*Message) InputHandler added in v0.4.0

func (m *Message) InputHandler() func(event *tcell.EventKey, setFocus func(p cview.Primitive))

func (*Message) SetDoneFunc added in v0.4.0

func (m *Message) SetDoneFunc(doneFunc func())

func (*Message) SetVisible added in v0.4.0

func (m *Message) SetVisible(visible bool)

func (*Message) View added in v0.4.0

func (m *Message) View() cview.Primitive
type Modal interface {
	SetDoneFunc(doneFunc func())
	cview.Primitive
	View() cview.Primitive
	SetVisible(visible bool)
}

Modal creates a modal that overlaps other views and get's destroyed when it's ready

Jump to

Keyboard shortcuts

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