gui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//HeaderText -- Generic header used for all screens
	HeaderText = "go-rss-reader"
	//QuitText -- Instructions on quiting the application
	QuitText = "Quit: Ctrl-C"
	//BackText -- Instructions on travelling to a previous screen
	BackText = "Back: Ctrl-B"
	//SelectText -- Instructions on selecting
	SelectText = "Select: Enter"
	//RefreshAllText -- Instructions on Refreshing all feeds
	RefreshAllText = "Refresh All: Ctrl-A"
	//RefreshOneText -- Instrcutions on Refreshing one feed
	RefreshOneText = "Refresh One: Ctrl-R"
)

Variables

View Source
var (
	//FeedsFooterText -- Text used for the Feeds footer
	FeedsFooterText = strings.Join([]string{QuitText, SelectText, RefreshAllText, RefreshOneText}, ", ")
	//EpisodesFooterText -- Text used for Episodes footer
	EpisodesFooterText = strings.Join([]string{QuitText, BackText, SelectText}, ", ")
	//PagerFooterText -- Text used for the Pager Footer
	PagerFooterText = strings.Join([]string{QuitText, BackText}, ", ")
)

Functions

func CursorDown

func CursorDown(g *gocui.Gui, v *gocui.View) error

CursorDown -- Callback used to scroll down on the feeds

func CursorUp

func CursorUp(g *gocui.Gui, v *gocui.View) error

CursorUp -- Callback used to scroll up the Feeds

func PagerDown

func PagerDown(g *gocui.Gui, v *gocui.View) error

PagerDown -- Callback used to scroll down on the Pager

func PagerUp

func PagerUp(g *gocui.Gui, v *gocui.View) error

PagerUp -- Callback used to scroll up on the Pager

func Quit

func Quit(g *gocui.Gui, v *gocui.View) error

Quit -- Callback used to quit application

Types

type Episode

type Episode struct {
	Date  string
	Title string
	Seen  bool
}

Episode -- Data structure used to hold the needed episode data

type Episodes

type Episodes struct {
	Name     string
	Episodes []Episode
}

Episodes -- Gui component for the Episodes

func NewEpisodes

func NewEpisodes(name string, episodes []Episode) *Episodes

NewEpisodes -- Creates a new Episode gui component

func (*Episodes) Layout

func (e *Episodes) Layout(g *gocui.Gui) error

Layout -- Tells gocui.Gui how to display this component

type Feed

type Feed struct {
	Episodes string
	Title    string
}

Feed -- Data structure used to hold the needed feed data

type Feeds

type Feeds struct {
	Name  string
	Feeds []Feed
}

Feeds -- Gui component for the feeds

func NewFeeds

func NewFeeds(name string, feeds []Feed) *Feeds

NewFeeds -- Creates a new Feed gui component

func (*Feeds) Layout

func (f *Feeds) Layout(g *gocui.Gui) error

Layout -- Tells gocui.Gui how to display this component

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

Footer -- Gui Component used for the title bar and info bar

func NewFooter

func NewFooter(name, content string) *Footer

NewFooter -- Creates a new Bar gui component

func (*Footer) Layout

func (f *Footer) Layout(g *gocui.Gui) error

Layout -- Tells gocui.Gui how to display this component

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

Header -- Gui Component used for the title bar and info bar

func NewHeader

func NewHeader(name, content string) *Header

NewHeader -- Creates a new Bar gui component

func (*Header) Layout

func (header *Header) Layout(g *gocui.Gui) error

Layout -- Tells gocui.Gui how to display this component

type Pager

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

Pager -- Gui component used for viewing the content of a feed episode

func NewPager

func NewPager(name, content string) *Pager

NewPager -- Creates a new gui Pager component

func (*Pager) Layout

func (p *Pager) Layout(g *gocui.Gui) error

Layout -- Tells gocui.Gui how to display this component

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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