view

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Center

func Center(p tview.Primitive, rowProportion, colProportion int) *tview.Flex

func NewActionModal

func NewActionModal(text string, actions []ModalActionPair) *tview.Modal

func NewErrorModal

func NewErrorModal(ctrl ModalControl) *tview.Modal

func NewWaitModal added in v0.0.4

func NewWaitModal() *tview.Modal

func Space

func Space(direction int, ps ...tview.Primitive) *tview.Flex

Types

type Commander

type Commander struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewCommander

func NewCommander(ctrl CommanderController) *Commander

func (*Commander) AddTopic

func (c *Commander) AddTopic(t string)

func (*Commander) Focus

func (c *Commander) Focus(delegate func(p tview.Primitive))

func (*Commander) Refresh

func (c *Commander) Refresh()

func (*Commander) SetConnectionStatus

func (c *Commander) SetConnectionStatus(s network.ConnectionStatus)

func (*Commander) SetDocumentStore

func (c *Commander) SetDocumentStore(documents *model.DocumentStore)

type CommanderController

type CommanderController interface {
	OnTopicSelected(t string)
	OnChangeFocus(p tview.Primitive)
	OnNextDocument()
	OnPrevDocument()
	OnConnect()
	OnSubscribe()
	OnPublish()
	OnSetFollow(enabled bool)
	OnCopy()
}

type Connector

type Connector struct {
	*tview.Flex
}

func NewConnector

func NewConnector(ctrl ConnectorController) *Connector

type ConnectorController

type ConnectorController interface {
	OnChangeFocus(p tview.Primitive)
	OnConnect(server string, port int, username, password string)
	Cancel()
}

type Document

type Document struct {
	*tview.TextView
	// contains filtered or unexported fields
}

func NewDocumentView

func NewDocumentView() *Document

func (*Document) Refresh

func (v *Document) Refresh()

func (*Document) SetDocument

func (v *Document) SetDocument(d *data.Document)

func (*Document) SetRenderer

func (v *Document) SetRenderer(r model.Renderer)

type Filters

type Filters struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewFilters

func NewFilters(ctrl FiltersController) *Filters

func (*Filters) SetSubscriptionFilters

func (f *Filters) SetSubscriptionFilters(filters *model.SubscriptionFilters)

type FiltersController

type FiltersController interface {
	OnSubscribe(topic string, qos network.Qos)
	OnUnsubscribe(topic string)
	OnChangeFocus(p tview.Primitive)
	Cancel()
}

type FocusChain

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

func NewFocusChain

func NewFocusChain(items ...tview.Primitive) *FocusChain

func (*FocusChain) Add

func (c *FocusChain) Add(items ...tview.Primitive)

func (*FocusChain) Next

func (c *FocusChain) Next() tview.Primitive

func (*FocusChain) Prev

func (c *FocusChain) Prev() tview.Primitive

func (*FocusChain) Reset

func (c *FocusChain) Reset() tview.Primitive

func (*FocusChain) SetFocus

func (c *FocusChain) SetFocus(index int) tview.Primitive

type ModalActionPair

type ModalActionPair struct {
	Name string
	Func func()
}

type ModalControl added in v0.0.4

type ModalControl interface {
	Cancel()
}

type ModalPage

type ModalPage struct {
	*tview.Flex
}

func NewModalPage

func NewModalPage() *ModalPage

func (*ModalPage) SetModal

func (p *ModalPage) SetModal(m *tview.Modal)

type OpenFile

type OpenFile struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewOpenFile

func NewOpenFile(ctrl OpenFileController) *OpenFile

func (*OpenFile) SetDir

func (v *OpenFile) SetDir(dir string) *OpenFile

func (*OpenFile) SetOnError

func (v *OpenFile) SetOnError(handle func(err error)) *OpenFile

func (*OpenFile) SetOnFileSelected

func (v *OpenFile) SetOnFileSelected(handle func(filename string)) *OpenFile

type OpenFileController

type OpenFileController interface {
	OnChangeFocus(p tview.Primitive)
	OnFileSelected(filename string)
	Cancel()
}

type Publish

type Publish struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewPublish

func NewPublish(ctrl PublishControl) *Publish

func (*Publish) SetData

func (p *Publish) SetData(data []byte)

type PublishControl

type PublishControl interface {
	OnChangeFocus(p tview.Primitive)
	OnLaunchEditor()
	OnOpenFile()
	OnOpenHistory()
	OnPaste()
	OnPublish(topic string, qos network.Qos, retained bool, message []byte)
	Cancel()
}

type PublishHistory

type PublishHistory struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewPublishHistory

func NewPublishHistory(ctrl PublishHistoryController, documents *model.DocumentStore) *PublishHistory

func (*PublishHistory) Refresh

func (h *PublishHistory) Refresh()

type PublishHistoryController

type PublishHistoryController interface {
	OnTopicSelected(t string)
	OnDocumentSelected(topic string, doc *data.Document)
	OnChangeFocus(p tview.Primitive)
	OnNextDocument()
	OnPrevDocument()

	Cancel()
}

type RendererSelector

type RendererSelector struct {
	*widget.RadioButtons
	// contains filtered or unexported fields
}

func NewDocumentRenderer

func NewDocumentRenderer() *RendererSelector

func (*RendererSelector) SetRenderers

func (s *RendererSelector) SetRenderers(renderers []model.Renderer) *RendererSelector

func (*RendererSelector) SetSelectedFunc

func (s *RendererSelector) SetSelectedFunc(handler func(renderer model.Renderer)) *RendererSelector

Jump to

Keyboard shortcuts

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