gui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardView

type CardView struct {
	*tview.Flex
	// contains filtered or unexported fields
}

CardView is a gui component in charge of displaying an open card and the list it belongs to

func NewCardView

func NewCardView(state store.CardState, handler cardInputHandler) *CardView

NewCardView returns an new instance of CardView

func (*CardView) Draw

func (c *CardView) Draw(screen tcell.Screen)

Draw re-implements the `tview.Primitive` interface Draw function

func (*CardView) FocusedItem

func (c *CardView) FocusedItem() tview.Primitive

FocusedItem returns the gui component currently in focus

type Config

type Config struct {
	Dev bool // Enable developer features (recover on run panics)
}

Config is the gui configuration

type Gui

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

Gui is a graphical user interface for trello-tui

func NewGui

func NewGui(cfg *Config) *Gui

NewGui creates a new instance of `Gui` from the provide configuration

func (*Gui) Close

func (g *Gui) Close()

Close handles cleanup of the gui if required

func (*Gui) Init

func (g *Gui) Init(store *store.Store) error

Init initializes the gui

func (*Gui) ReDraw added in v0.1.2

func (g *Gui) ReDraw()

ReDraw updates the gui with the latest state

func (*Gui) Run

func (g *Gui) Run() error

Run executes the gui and event loop

func (*Gui) SetFocus

func (g *Gui) SetFocus(p tview.Primitive)

SetFocus implements the focuser interface, allowing to set focus on the provided gui component

type Header struct {
	*tview.Box
	// contains filtered or unexported fields
}

Header is a gui component displaying the title and description of the current board

func NewHeader

func NewHeader(state store.HeaderState) *Header

NewHeader returns a new instance of Header

func (*Header) Draw

func (h *Header) Draw(screen tcell.Screen)

Draw re-implements the `tview.Primitive` interface Draw function

type ListContainer

type ListContainer struct {
	*tview.Flex
	// contains filtered or unexported fields
}

ListContainer is a gui component in charge of displaying the board's lists

func NewListContainer

func NewListContainer(maxVLists int, state store.ListsState, f focuser, s switcher) *ListContainer

NewListContainer returns a new instance of ListContainer

func (*ListContainer) Draw

func (l *ListContainer) Draw(screen tcell.Screen)

Draw re-implements the `tview.Primitive` interface Draw function

func (*ListContainer) FocusedItem

func (l *ListContainer) FocusedItem() tview.Primitive

FocusedItem returns the currently focused list

type ListView

type ListView struct {
	*tview.List
	// contains filtered or unexported fields
}

ListView is a gui component in charge of displaying a single board list

func NewListView

func NewListView(parent listInputHandler, state store.SingleListState) *ListView

NewListView returns a new instance of ListView

func (*ListView) Draw

func (l *ListView) Draw(screen tcell.Screen)

Draw re-implements the `tview.Primitive` interface Draw function

type View

type View struct {
	*tview.Flex
	// contains filtered or unexported fields
}

View is the root gui component

func NewView

func NewView(s store.State, f focuser) *View

NewView returns a new instance of View

func (*View) FocusedItem

func (v *View) FocusedItem() tview.Primitive

FocusedItem returns the gui component currently in focus TODO: this is mainly necessary to ensure the focus is on the correct item at startup, this is not nice.

Jump to

Keyboard shortcuts

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