statesmachines

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATE_COMPOSE_WRITE_MAIL  lib.StateType = "WRITE_MAIL"
	STATE_COMPOSE_REVIEW_MAIL lib.StateType = "REVIEW_MAIL"
	STATE_COMPOSE_ERR         lib.StateType = "COMPOSE_ERR"

	TR_COMPOSE_REVIEW  lib.TransitionType = "COMPOSE_REVIEW"
	TR_COMPOSE_WRITE   lib.TransitionType = "COMPOSE_WRITE"
	TR_COMPOSE_SET_ERR lib.TransitionType = "COMPOSE_SET_ERR"
	TR_COMPOSE_SEND    lib.TransitionType = "COMPOSE_SEND"
)
View Source
const (
	STATE_LOAD_MAIL       lib.StateType      = "LOAD_MAIL"
	STATE_SHOW_MAIL       lib.StateType      = "SHOW_MAIL"
	STATE_SHOW_MAIL_PARTS lib.StateType      = "SHOW_MAIL_PARTS"
	TR_SCROLL_UP_MAIL     lib.TransitionType = "SCROLL_UP_MAIL"
	TR_SCROLL_DOWN_MAIL   lib.TransitionType = "SCROLL_DOWN_MAIL"
	TR_SET_FILEPATH       lib.TransitionType = "SET_FILEPATH"
	TR_SHOW_MAIL_PARTS    lib.TransitionType = "SHOW_MAIL_PARTS"
	TR_SHOW_MAIL_PART     lib.TransitionType = "SHOW_MAIL_PART"
	TR_SET_MAIL           lib.TransitionType = "TR_SET_MAIL"
)
View Source
const (
	STATE_LOAD_MBOX  lib.StateType      = "LOAD_MBOX"
	STATE_SHOW_MBOX  lib.StateType      = "SHOW_MBOX"
	TR_SET_THREADS   lib.TransitionType = "SET_THREADS"
	TR_REFRESH_MBOX  lib.TransitionType = "REFRESH_MBOX"
	TR_UP_THREAD     lib.TransitionType = "UP_THREAD"
	TR_DOWN_THREAD   lib.TransitionType = "DOWN_THREAD"
	TR_SELECT_THREAD lib.TransitionType = "SELECT_THREAD"
)
View Source
const (
	STATE_LOAD_MBOXES lib.StateType      = "LOAD_MBOXES"
	STATE_SHOW_MBOXES lib.StateType      = "SHOW_MBOXES"
	TR_UP_MBOX        lib.TransitionType = "UP_MBOX"
	TR_DOWN_MBOX      lib.TransitionType = "DOWN_MBOX"
	TR_SET_MBOXES     lib.TransitionType = "SET_MBOXES"
	TR_SELECT_MBOX    lib.TransitionType = "SELECT_MBOX"
)
View Source
const (
	STATE_MAIL_PARTS     lib.StateType      = "SHOW_MAIL"
	TR_MAIL_PARTS_UP     lib.TransitionType = "MAIL_PARTS_UP"
	TR_MAIL_PARTS_DOWN   lib.TransitionType = "MAIL_PARTS_DOWN"
	TR_SET_SELECTED_PART lib.TransitionType = "SET_SELECTED_PART"
	TR_SELECT_PART       lib.TransitionType = "SELECT_PART"
)
View Source
const (
	STATE_STATUS_SHOW_MESSAGE lib.StateType      = "SHOW_MESSAGE"
	STATE_STATUS_WRITE_CMD    lib.StateType      = "WRITE_CMD"
	TR_STATUS_START_WRITING   lib.TransitionType = "START_WRITING"
	TR_STATUS_CANCEL          lib.TransitionType = "CANCEL"
	TR_STATUS_VALIDATE        lib.TransitionType = "VALIDATE"
	TR_STATUS_WRITE_CHAR      lib.TransitionType = "WRITE_CHAR"
	TR_STATUS_MOVE_CURSOR     lib.TransitionType = "MOVE_CURSOR"
	TR_STATUS_RM_CHAR         lib.TransitionType = "REMOVE_CHAR"
	TR_STATUS_RM_WORD         lib.TransitionType = "REMOVE_WORD"
	TR_STATUS_BROWSE_HISTORY  lib.TransitionType = "TR_STATUS_BROWSE_HISTORY"
)
View Source
const (
	STATE_SHOW_THREAD lib.StateType      = "SHOW_THREAD"
	TR_UP_MAIL        lib.TransitionType = "UP_MAIL"
	TR_DOWN_MAIL      lib.TransitionType = "DOWN_MAIL"
	TR_SET_MAILS      lib.TransitionType = "SET_MAILS"
	TR_SELECT_MAIL    lib.TransitionType = "SELECT_MAIL"
)
View Source
const (
	STATE_SHOW_TAB  lib.StateType      = "SHOW_TAB"
	TR_OPEN_TAB     lib.TransitionType = "OPEN_TAB"
	TR_CLOSE_TAB    lib.TransitionType = "CLOSE_TAB"
	TR_NEXT_TAB     lib.TransitionType = "NEXT_TAB"
	TR_PREV_TAB     lib.TransitionType = "PREV_TAB"
	TR_CLOSE_APP    lib.TransitionType = "CLOSE_APP"
	TR_COMPOSE_MAIL lib.TransitionType = "COMPOSE_MAIL"

	STATE_WRITE_CMD  lib.StateType      = "WRITE_CMD"
	TR_START_WRITING lib.TransitionType = "START_WRITING"
	TR_END_CMD       lib.TransitionType = "END_CMD"
)

Variables

This section is empty.

Functions

func NewComposeMachine

func NewComposeMachine(mailfile *os.File) *lib.Machine

func NewMailMachine

func NewMailMachine() *lib.Machine

func NewMailPartsMachine

func NewMailPartsMachine(parts []*models.BodyPart) *lib.Machine

func NewMailboxMachine

func NewMailboxMachine() *lib.Machine

func NewMailboxesMachine

func NewMailboxesMachine() *lib.Machine

func NewStatusMachine

func NewStatusMachine() *lib.Machine

func NewThreadMachine

func NewThreadMachine() *lib.Machine

func NewWindowMachine

func NewWindowMachine() *lib.Machine

Types

type ComposeMachineCtx

type ComposeMachineCtx struct {
	MailFile *os.File
	Body     string
}

type MailMachineCtx

type MailMachineCtx struct {
	Mail         *models.Mail
	Filepath     string
	SelectedPart *models.BodyPart
}

type MailPartsMachineCtx

type MailPartsMachineCtx struct {
	Parts    []*models.BodyPart
	Selected int
}

type MailboxMachineCtx

type MailboxMachineCtx struct {
	Threads  []*models.Thread
	Selected int
}

type MailboxesMachineCtx

type MailboxesMachineCtx struct {
	Mboxes   []*models.Mailbox
	Selected int
}

type StatusMachineCtx

type StatusMachineCtx struct {
	CursorPos    int
	WriteContent []rune
	History      []string
	HistoryIdx   int
}

type Tab

type Tab interface {
	widgets.Widget
	TabTitle() string
}

type ThreadMachineCtx

type ThreadMachineCtx struct {
	Mails    []*models.Mail
	Selected int
}

type WindowMachineCtx

type WindowMachineCtx struct {
	Tabs        []Tab
	SelectedTab int
}

Jump to

Keyboard shortcuts

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