ui

package
v0.0.0-...-9ae858a Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopWalk = errors.New("stop walk")

Functions

func InitApp

func InitApp(l *lib.Logger, cfg *config.Config) error

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}
var App *Application

func (*Application) Close

func (app *Application) Close()

func (*Application) PostDbMessage

func (app *Application) PostDbMessage(msg workers.Message, accountname string, f PostCallback)

func (*Application) PostImapMessage

func (app *Application) PostImapMessage(msg workers.Message, accountname string, f PostCallback)

func (*Application) PostMessage

func (app *Application) PostMessage(m workers.ClonableMessage, accountname string, f PostCallback)

func (*Application) Run

func (app *Application) Run()

func (*Application) SetWindow

func (app *Application) SetWindow(w *Window)

func (*Application) Stop

func (app *Application) Stop()

type ComposeView

type ComposeView struct {
	*widgets.BaseWidget
	// contains filtered or unexported fields
}

func NewComposeView

func NewComposeView(acc *config.Account, bindings config.Mapping) *ComposeView

func (*ComposeView) Draw

func (c *ComposeView) Draw()

func (*ComposeView) HandleEvent

func (c *ComposeView) HandleEvent(ks []*lib.KeyStroke) bool

func (*ComposeView) HandleTransitions

func (c *ComposeView) HandleTransitions(ev *lib.Event) bool

func (*ComposeView) IsActiveTerm

func (c *ComposeView) IsActiveTerm() bool

func (*ComposeView) SetTermView

func (c *ComposeView) SetTermView(view *views.ViewPort, screen tcell.Screen)

func (*ComposeView) TabTitle

func (c *ComposeView) TabTitle() string

Tab interface

type MailPartsView

type MailPartsView struct {
	*widgets.TreeWidget
	// contains filtered or unexported fields
}

func NewMailPartsView

func NewMailPartsView(bindings config.Mapping, parts []*models.BodyPart, onSelect func(part *models.BodyPart)) *MailPartsView

func (*MailPartsView) HandleEvent

func (mp *MailPartsView) HandleEvent(ks []*lib.KeyStroke) bool

type MailView

type MailView struct {
	*widgets.BaseWidget
	// contains filtered or unexported fields
}

func NewMailView

func NewMailView(bindings config.Mapping, partsBindings config.Mapping, filters config.Filters) *MailView

func (*MailView) Draw

func (mv *MailView) Draw()

func (*MailView) HandleEvent

func (mv *MailView) HandleEvent(ks []*lib.KeyStroke) bool

func (*MailView) MarkAsRead

func (mv *MailView) MarkAsRead()

func (*MailView) OnRead

func (mv *MailView) OnRead(f func())

func (*MailView) SaveIndDb

func (mv *MailView) SaveIndDb(mailbox, acc string)

func (*MailView) SetFilepath

func (mv *MailView) SetFilepath(filepath string)

func (*MailView) SetMail

func (mv *MailView) SetMail(m *models.Mail, mailbox, acc string)

func (*MailView) TabTitle

func (mv *MailView) TabTitle() string

Tab interface

type MailboxView

type MailboxView struct {
	*widgets.ListWidget
	// contains filtered or unexported fields
}

func NewMailboxView

func NewMailboxView(accountName string, mbox *models.Mailbox, bindings config.Mapping, onSelect func(accname, mailbox string, t *models.Thread)) *MailboxView

func (*MailboxView) Draw

func (mv *MailboxView) Draw()

func (*MailboxView) Error

func (mv *MailboxView) Error(err error)

func (*MailboxView) FetchNewMessages

func (mv *MailboxView) FetchNewMessages(lastuid uint32)

func (*MailboxView) FetchUpdateMessages

func (mv *MailboxView) FetchUpdateMessages(lastuid uint32)

func (*MailboxView) HandleEvent

func (mv *MailboxView) HandleEvent(ks []*lib.KeyStroke) bool

func (*MailboxView) HandleTransitions

func (mv *MailboxView) HandleTransitions(ev *lib.Event) bool

func (*MailboxView) Refresh

func (mv *MailboxView) Refresh(lastuid uint32)

func (*MailboxView) SetThreads

func (mv *MailboxView) SetThreads(threads []*models.Thread)

func (*MailboxView) TabTitle

func (mv *MailboxView) TabTitle() string

Tab interface

type MailboxesView

type MailboxesView struct {
	*widgets.TreeWidget
	// contains filtered or unexported fields
}

func NewMailboxesView

func NewMailboxesView(accountName string, bindings config.Mapping, onSelect func(accname string, m *models.Mailbox)) *MailboxesView

func (*MailboxesView) Draw

func (mv *MailboxesView) Draw()

func (*MailboxesView) HandleEvent

func (mv *MailboxesView) HandleEvent(ks []*lib.KeyStroke) bool

func (*MailboxesView) SetMailboxes

func (mv *MailboxesView) SetMailboxes(mboxes []*models.Mailbox)

func (*MailboxesView) TabTitle

func (mv *MailboxesView) TabTitle() string

Tab interface

type PostCallback

type PostCallback func(res workers.Message) error

type Status

type Status struct {
	*widgets.Text
	// contains filtered or unexported fields
}

func NewStatus

func NewStatus(msg string, onEndCmd func(string)) *Status

func (*Status) Draw

func (s *Status) Draw()

func (*Status) HandleEvent

func (s *Status) HandleEvent(ks []*lib.KeyStroke) bool

func (*Status) ShowError

func (s *Status) ShowError(msg string)

func (*Status) ShowMessage

func (s *Status) ShowMessage(msg string)

type ThreadView

type ThreadView struct {
	*widgets.TreeWidget
	// contains filtered or unexported fields
}

func NewThreadView

func NewThreadView(accname, mailbox string, thread *models.Thread, bindings config.Mapping, onSelect func(accname, mailbox string, m *models.Mail, t *models.Thread)) *ThreadView

func (*ThreadView) HandleEvent

func (tv *ThreadView) HandleEvent(ks []*lib.KeyStroke) bool

func (*ThreadView) SetMails

func (tv *ThreadView) SetMails(mails []*models.Mail)

func (*ThreadView) TabTitle

func (tv *ThreadView) TabTitle() string

Tab interface

type Window

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

func NewWindow

func NewWindow(cfg *config.Config) *Window

func (*Window) AskRedraw

func (w *Window) AskRedraw()

func (*Window) Draw

func (w *Window) Draw()

func (*Window) Errorf

func (w *Window) Errorf(msg string, args ...interface{})

func (*Window) HandleEvent

func (w *Window) HandleEvent(ev tcell.Event) bool

func (*Window) HandleTransitions

func (w *Window) HandleTransitions(ev *lib.Event) bool

func (*Window) OnExCmd

func (w *Window) OnExCmd(cmd string)

func (*Window) Redraw

func (w *Window) Redraw()

func (*Window) ResetRedraw

func (w *Window) ResetRedraw()

func (*Window) SetScreen

func (w *Window) SetScreen(s tcell.Screen)

func (*Window) ShouldRedraw

func (w *Window) ShouldRedraw() bool

func (*Window) ShowMessage

func (w *Window) ShowMessage(msg string)

func (*Window) ShowMessagef

func (w *Window) ShowMessagef(msg string, args ...interface{})

func (*Window) Size

func (w *Window) Size() (int, int)

Jump to

Keyboard shortcuts

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