layout

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

type Layout struct {
	ui.Block
	Components []*component.Component

	ChangeModeEvents chan Mode
	// contains filtered or unexported fields
}

Layout represents component arrangement on the screen

func NewLayout

func NewLayout(statusline *component.StatusBar, menu *component.Menu) *Layout

func (*Layout) AddComponent

func (l *Layout) AddComponent(cpt *component.Component)

func (*Layout) ChangeDimensions

func (l *Layout) ChangeDimensions(width, height int)

func (*Layout) Draw

func (l *Layout) Draw(buffer *ui.Buffer)

func (*Layout) HandleKeyboardEvent

func (l *Layout) HandleKeyboardEvent(e string)

func (*Layout) HandleMouseClick

func (l *Layout) HandleMouseClick(x int, y int)

func (*Layout) StartWithIntro

func (l *Layout) StartWithIntro()

func (*Layout) WerePositionsChanged

func (l *Layout) WerePositionsChanged() bool

type Mode

type Mode rune
const (
	ModeDefault          Mode = 0
	ModeIntro            Mode = 1
	ModePause            Mode = 2
	ModeComponentSelect  Mode = 3
	ModeMenuOptionSelect Mode = 4
	ModeComponentMove    Mode = 5
	ModeComponentResize  Mode = 6
	ModeChartPinpoint    Mode = 7
)

Jump to

Keyboard shortcuts

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