sampler: Index | Files

package layout

import ""


Package Files


type Layout Uses

type Layout struct {
    Components []*component.Component

    ChangeModeEvents chan Mode
    // contains filtered or unexported fields

Layout represents component arrangement on the screen

func NewLayout Uses

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

func (*Layout) AddComponent Uses

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

func (*Layout) ChangeDimensions Uses

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

func (*Layout) Draw Uses

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

func (*Layout) HandleKeyboardEvent Uses

func (l *Layout) HandleKeyboardEvent(e string)

func (*Layout) HandleMouseClick Uses

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

func (*Layout) StartWithIntro Uses

func (l *Layout) StartWithIntro()

func (*Layout) WerePositionsChanged Uses

func (l *Layout) WerePositionsChanged() bool

type Mode Uses

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

Package layout imports 10 packages (graph) and is imported by 2 packages. Updated 2020-01-03. Refresh now. Tools for package owners.