ui

package
v0.0.0-...-65dd48a Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DarkTheme = &Theme{
	bg: tcell.ColorBlack,

	lineFG:       tcell.ColorWhite,
	lineNormalFG: tcell.ColorWhite,
	lineDimFG:    darkForegroundDim,

	titleFG:       tcell.ColorAqua,
	titleNormalFG: tcell.ColorAqua,
	titleDimFG:    darkForegroundDim,

	feedNode:       tcell.ColorWhite,
	feedNodeNormal: tcell.ColorWhite,
	feedNodeDim:    darkForegroundDim,

	feedNodeUnread:       tcell.ColorWhite,
	feedNodeUnreadNormal: tcell.ColorWhite,
	feedNodeUnreadDim:    darkForegroundDim,

	feedGroupNode:       tcell.ColorGrey,
	feedGroupNodeNormal: tcell.ColorGrey,
	feedGroupNodeDim:    darkForegroundDim,

	statusBarFG:       tcell.ColorGray,
	statusBarNormalFG: tcell.ColorGray,
	statusBarDimFG:    darkForegroundDim,

	eventInfoFG:       tcell.ColorYellowGreen,
	eventInfoNormalFG: tcell.ColorYellowGreen,
	eventInfoDimFG:    darkForegroundDim,

	eventWarnFG:       tcell.ColorDarkGoldenrod,
	eventWarnNormalFG: tcell.ColorDarkGoldenrod,
	eventWarnDimFG:    darkForegroundDim,

	eventErrFG:       tcell.ColorTomato,
	eventErrNormalFG: tcell.ColorTomato,
	eventErrDimFG:    darkForegroundDim,

	popupBorderFG: tcell.ColorGray,
	popupTitleFG:  tcell.ColorAqua,

	wideViewMinWidth: 150,
}

Functions

This section is empty.

Types

type Display

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

func NewDisplay

func NewDisplay(screen tcell.Screen, theme string) (*Display, error)

func (*Display) Draw

func (d *Display) Draw()

func (*Display) SetHandlers

func (d *Display) SetHandlers(
	globalKeyHandler KeyHandler,
	feedsPaneKeyHandler KeyHandler,
)

func (*Display) Start

func (d *Display) Start() error

func (*Display) Stop

func (d *Display) Stop()

type DisplayOperator

type DisplayOperator struct{}

func NewDisplayOperator

func NewDisplayOperator() *DisplayOperator

func (*DisplayOperator) ClearStatusBar

func (do *DisplayOperator) ClearStatusBar(d *Display)

func (*DisplayOperator) FocusEntriesPane

func (do *DisplayOperator) FocusEntriesPane(d *Display)

func (*DisplayOperator) FocusFeedsPane

func (do *DisplayOperator) FocusFeedsPane(d *Display)

func (*DisplayOperator) FocusNextPane

func (do *DisplayOperator) FocusNextPane(d *Display)

func (*DisplayOperator) FocusPreviousPane

func (do *DisplayOperator) FocusPreviousPane(d *Display)

func (*DisplayOperator) FocusReadingPane

func (do *DisplayOperator) FocusReadingPane(d *Display)

func (*DisplayOperator) GetCurrentFeed

func (do *DisplayOperator) GetCurrentFeed(d *Display) *entity.Feed

func (*DisplayOperator) PopulateFeedsPane

func (do *DisplayOperator) PopulateFeedsPane(d *Display, f func() ([]*entity.Feed, error))

func (*DisplayOperator) RefreshFeeds

func (do *DisplayOperator) RefreshFeeds(
	d *Display,
	f func() (<-chan entity.PullResult, error),
	hint *entity.Feed,
)

func (*DisplayOperator) RefreshStats

func (do *DisplayOperator) RefreshStats(d *Display, f func() (*entity.Stats, error))

func (*DisplayOperator) ShowIntroPopup

func (do *DisplayOperator) ShowIntroPopup(d *Display)

func (*DisplayOperator) ToggleAboutPopup

func (do *DisplayOperator) ToggleAboutPopup(d *Display, backend string)

func (*DisplayOperator) ToggleAllFeedsFold

func (do *DisplayOperator) ToggleAllFeedsFold(d *Display)

func (*DisplayOperator) ToggleCurrentFeedFold

func (do *DisplayOperator) ToggleCurrentFeedFold(d *Display)

func (*DisplayOperator) ToggleHelpPopup

func (do *DisplayOperator) ToggleHelpPopup(d *Display)

func (*DisplayOperator) ToggleStatsPopup

func (do *DisplayOperator) ToggleStatsPopup(d *Display, f func() (*entity.Stats, error))

func (*DisplayOperator) ToggleStatusBar

func (do *DisplayOperator) ToggleStatusBar(d *Display)

func (*DisplayOperator) UnfocusFront

func (do *DisplayOperator) UnfocusFront(d *Display)

type KeyHandler

type KeyHandler = func(*tcell.EventKey) *tcell.EventKey

type Lang

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

type Operator

type Operator interface {
	ClearStatusBar(*Display)
	FocusFeedsPane(*Display)
	FocusEntriesPane(*Display)
	FocusNextPane(*Display)
	FocusPreviousPane(*Display)
	FocusReadingPane(*Display)
	GetCurrentFeed(*Display) *entity.Feed
	PopulateFeedsPane(*Display, func() ([]*entity.Feed, error))
	RefreshFeeds(*Display, func() (<-chan entity.PullResult, error), *entity.Feed)
	RefreshStats(*Display, func() (*entity.Stats, error))
	ShowIntroPopup(*Display)
	ToggleAboutPopup(*Display, string)
	ToggleAllFeedsFold(*Display)
	ToggleCurrentFeedFold(*Display)
	ToggleHelpPopup(*Display)
	ToggleStatsPopup(*Display, func() (*entity.Stats, error))
	ToggleStatusBar(*Display)
	UnfocusFront(*Display)
}

Operator describes high-level UI operations.

type Theme

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳