pages

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AboutPage

type AboutPage struct {
	tview.Primitive
}

AboutPage is a Slide showing information about the application.

func NewAboutPage

func NewAboutPage() *AboutPage

NewAboutPage is factory for AboutPage.

func (*AboutPage) Categories added in v1.0.4

func (a *AboutPage) Categories(categories *model.Categories)

Categories sets the model.Categories used on the Slide.

func (*AboutPage) GetName

func (a *AboutPage) GetName() string

GetName returns the name of this Slide.

func (*AboutPage) SetCategoryReceiver

func (a *AboutPage) SetCategoryReceiver(receiver CategoryReceiver)

SetCategoryReceiver inform the Slide where to notify with changes of the model.Categories.

type BrowserPage

type BrowserPage struct {
	tview.Primitive
	// contains filtered or unexported fields
}

BrowserPage is the Slide implementation for browsing model.Categories.

func NewBrowserPage

func NewBrowserPage() *BrowserPage

NewBrowserPage is a factory for BrowserPage.

func (*BrowserPage) Categories added in v1.0.4

func (bp *BrowserPage) Categories(categories *model.Categories)

Categories sets the model.Categories used on the Slide.

func (*BrowserPage) GetName

func (bp *BrowserPage) GetName() string

GetName returns the name of this Slide.

func (*BrowserPage) SetCategoryReceiver

func (bp *BrowserPage) SetCategoryReceiver(receiver CategoryReceiver)

SetCategoryReceiver inform the Slide where to notify with changes of the model.Categories.

type CategoryReceiver

type CategoryReceiver func(categories *model.Categories)

CategoryReceiver accepts model.Categories

type PreferencesPage

type PreferencesPage struct {
	tview.Primitive
	// contains filtered or unexported fields
}

PreferencesPage is the Slide to manage model.Preferences.

func NewPreferencesPage

func NewPreferencesPage() *PreferencesPage

NewPreferencesPage is a factory for PreferencesPage Slide.

func (PreferencesPage) Categories added in v1.0.4

func (p PreferencesPage) Categories(categories *model.Categories)

Categories sets the model.Categories used on the Slide.

func (PreferencesPage) GetName

func (p PreferencesPage) GetName() string

GetName returns the name of this Slide.

func (PreferencesPage) SetCategoryReceiver

func (p PreferencesPage) SetCategoryReceiver(receiver CategoryReceiver)

SetCategoryReceiver inform the Slide where to notify with changes of the model.Categories.

type Slide

type Slide interface {
	tview.Primitive                                // the visual element
	model.SetCategories                            // can have its model.Categories updated
	GetName() string                               // Has a name
	SetCategoryReceiver(receiver CategoryReceiver) // a function to notify if the model.Categories are changed
}

Slide represents a slide/page in the ui.UI.

type SnippetPage

type SnippetPage struct {
	tview.Primitive
	// contains filtered or unexported fields
}

SnippetPage is a Slide to add new model.Snippet to the model.Categories.

func NewSnippetPage

func NewSnippetPage() *SnippetPage

NewSnippetPage is a factory for SnippetPage.

func (*SnippetPage) Categories added in v1.0.4

func (s *SnippetPage) Categories(categories *model.Categories)

Categories sets the model.Categories used on the Slide.

func (*SnippetPage) GetName

func (s *SnippetPage) GetName() string

GetName returns the name of this Slide.

func (*SnippetPage) SetCategoryReceiver

func (s *SnippetPage) SetCategoryReceiver(receiver CategoryReceiver)

SetCategoryReceiver inform the Slide where to notify with changes of the model.Categories.

Jump to

Keyboard shortcuts

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