view

package
v0.0.0-...-a851fb6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputManager

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

func (*InputManager) GetInputString

func (im *InputManager) GetInputString() string

func (*InputManager) GetItemIndex

func (im *InputManager) GetItemIndex() int

func (*InputManager) GetSelectionMode

func (im *InputManager) GetSelectionMode() InputType

func (*InputManager) SetLastSeenNumItems

func (im *InputManager) SetLastSeenNumItems(i int)

func (*InputManager) Start

func (im *InputManager) Start(sharedChanNewFeedRequest chan string, v ViewInterface)

type InputType

type InputType uint8

InputType determines how the user is interacting with the system.

const (
	// RssEntryMode means the user is inputting the URL of an RSS feed.
	RssEntryMode InputType = iota
	// RssSelectionMode means the user is picking an RSS entry.
	RssSelectionMode
)

type StatusMsgStruct

type StatusMsgStruct struct {
	Message string
	Type    StatusType
}

type StatusType

type StatusType uint8

StatusType modifies the statusMsg color.

const (
	// StatusError indicates an error.
	StatusError StatusType = iota
	// StatusSuccess indicates a success.
	StatusSuccess
	// StatusInfo indicates info.
	StatusInfo
)

type ViewInterface

type ViewInterface interface {
	// Initialization.
	Start(newItemPipe chan *storage.RssEntry, newFeedRequest chan string, deathWg *sync.WaitGroup)

	// Methods relating to drawing.
	SetStatus(status StatusMsgStruct)
	Redraw()

	// Method which pairs additional information with a single channel.
	AddChannelInfo(title string)

	// Methods operating on items.
	DeleteItem(index int)
	ChangeColor(index int)
	CollapseItem(index int)
	ExpandItem(index int)

	// Plumbs the exit channel.
	GetChanExitRequest() chan bool
}

func GetView

func GetView() ViewInterface

Returns a particular implementation of this interface.

Jump to

Keyboard shortcuts

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