tui

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocChangedFmt  = "%+v.docChanged"
	ListChangedFmt = "%+v.listChanged"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*tview.Application
}

func NewTui

func NewTui() *App

type Box

type Box struct {
	*tview.Box
}

func NewBox

func NewBox() *Box

type Button

type Button struct {
	*tview.Button
}

func NewButton

func NewButton(label string) *Button

type Checkbox

type Checkbox struct {
	*tview.Checkbox
}

func NewCheckbox

func NewCheckbox() *Checkbox

type Controller

type Controller struct {
	*comps.MsgReaction
	// contains filtered or unexported fields
}

func NewController

func NewController(name schema.Name,
	proxy IProxy,
	msgType schema.MsgType,
	onMsg comps.OnMsgFunc) *Controller

func (*Controller) GetProxy

func (c *Controller) GetProxy() IProxy

func (*Controller) IAmController

func (c *Controller) IAmController()

func (*Controller) Register

func (c *Controller) Register(topic string, action interface{}, transactional bool)
type DropDown struct {
	*tview.DropDown
}

func NewDropDown

func NewDropDown() *DropDown

type Flex

type Flex struct {
	*tview.Flex
}

func NewFlex

func NewFlex() *Flex

type Form

type Form struct {
	*tview.Form
}

func NewForm

func NewForm() *Form

type Frame

type Frame struct {
	*tview.Frame
}

func NewFrame

func NewFrame(primitive tview.Primitive) *Frame

type GenModelFtor

type GenModelFtor[TDoc schema.ISchema, TList schema.ISchema] func() IGenModel[TDoc, TList]

type Grid

type Grid struct {
	*tview.Grid
}

func NewGrid

func NewGrid() *Grid

type IBox

type IBox interface {
	IView
	SetBorderPadding(top, bottom, left, right int) *tview.Box
	GetRect() (int, int, int, int)
	GetInnerRect() (int, int, int, int)
	SetRect(x, y, width, height int)
	SetDrawFunc(handler func(screen tcell.Screen, x, y, width, height int) (int, int, int, int)) *tview.Box
	GetDrawFunc() func(screen tcell.Screen, x, y, width, height int) (int, int, int, int)
	WrapInputHandler(inputHandler func(*tcell.EventKey, func(p tview.Primitive))) func(*tcell.EventKey, func(p tview.Primitive))
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
	GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
	WrapMouseHandler(mouseHandler func(tview.MouseAction, *tcell.EventMouse, func(p tview.Primitive)) (bool, tview.Primitive)) func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	SetMouseCapture(capture func(action tview.MouseAction, event *tcell.EventMouse) (tview.MouseAction, *tcell.EventMouse)) *tview.Box
	InRect(x, y int) bool
	GetMouseCapture() func(action tview.MouseAction, event *tcell.EventMouse) (tview.MouseAction, *tcell.EventMouse)
	SetBackgroundColor(color tcell.Color) *tview.Box
	SetBorder(show bool) *tview.Box
	SetBorderColor(color tcell.Color) *tview.Box
	SetBorderAttributes(attr tcell.AttrMask) *tview.Box
	GetBorderAttributes() tcell.AttrMask
	GetBorderColor() tcell.Color
	GetBackgroundColor() tcell.Color
	SetTitle(title string) *tview.Box
	GetTitle() string
	SetTitleColor(color tcell.Color) *tview.Box
	SetTitleAlign(align int) *tview.Box
	Draw(screen tcell.Screen)
	DrawForSubclass(screen tcell.Screen, p tview.Primitive)
	SetFocusFunc(callback func()) *tview.Box
	SetBlurFunc(callback func()) *tview.Box
	Focus(delegate func(p tview.Primitive))
	Blur()
	HasFocus() bool
}

type IButton

type IButton interface {
	IBox
	SetLabel(label string) *tview.Button
	GetLabel() string
	SetLabelColor(color tcell.Color) *tview.Button
	SetLabelColorActivated(color tcell.Color) *tview.Button
	SetBackgroundColorActivated(color tcell.Color) *tview.Button
	SetSelectedFunc(handler func()) *tview.Button
	SetExitFunc(handler func(key tcell.Key)) *tview.Button
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type ICheckbox

type ICheckbox interface {
	IBox
	SetChecked(checked bool) *tview.Checkbox
	IsChecked() bool
	SetLabel(label string) *tview.Checkbox
	GetLabel() string
	SetLabelWidth(width int) *tview.Checkbox
	SetLabelColor(color tcell.Color) *tview.Checkbox
	SetFieldBackgroundColor(color tcell.Color) *tview.Checkbox
	SetFieldTextColor(color tcell.Color) *tview.Checkbox
	SetCheckedString(checked string) *tview.Checkbox
	SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
	GetFieldWidth() int
	SetChangedFunc(handler func(checked bool)) *tview.Checkbox
	SetDoneFunc(handler func(key tcell.Key)) *tview.Checkbox
	SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IController

type IController interface {
	comps.IMediatorReaction
	Register(topic string, action interface{}, transactional bool)
	IAmController()
	GetProxy() IProxy
}

type IDropDown

type IDropDown interface {
	IBox
	SetCurrentOption(index int) *tview.DropDown
	GetCurrentOption() (int, string)
	SetTextOptions(prefix, suffix, currentPrefix, currentSuffix, noSelection string) *tview.DropDown
	SetLabel(label string) *tview.DropDown
	GetLabel() string
	SetLabelWidth(width int) *tview.DropDown
	SetLabelColor(color tcell.Color) *tview.DropDown
	SetFieldBackgroundColor(color tcell.Color) *tview.DropDown
	SetFieldTextColor(color tcell.Color) *tview.DropDown
	SetPrefixTextColor(color tcell.Color) *tview.DropDown
	SetListStyles(unselected, selected tcell.Style) *tview.DropDown
	SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
	SetFieldWidth(width int) *tview.DropDown
	GetFieldWidth() int
	AddOption(text string, selected func()) *tview.DropDown
	SetOptions(texts []string, selected func(text string, index int)) *tview.DropDown
	GetOptionCount() int
	RemoveOption(index int) *tview.DropDown
	SetSelectedFunc(handler func(text string, index int)) *tview.DropDown
	SetDoneFunc(handler func(key tcell.Key)) *tview.DropDown
	SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IFlex

type IFlex interface {
	IBox
	SetDirection(direction int) *tview.Flex
	SetFullScreen(fullScreen bool) *tview.Flex
	AddItem(item tview.Primitive, fixedSize, proportion int, focus bool) *tview.Flex
	RemoveItem(p tview.Primitive) *tview.Flex
	GetItemCount() int
	GetItem(index int) tview.Primitive
	Clear() *tview.Flex
	ResizeItem(p tview.Primitive, fixedSize, proportion int) *tview.Flex
	Draw(screen tcell.Screen)
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
}

type IForm

type IForm interface {
	IBox
	SetItemPadding(padding int) *tview.Form
	SetHorizontal(horizontal bool) *tview.Form
	SetLabelColor(color tcell.Color) *tview.Form
	SetFieldBackgroundColor(color tcell.Color) *tview.Form
	SetFieldTextColor(color tcell.Color) *tview.Form
	SetButtonsAlign(align int) *tview.Form
	SetButtonBackgroundColor(color tcell.Color) *tview.Form
	SetButtonTextColor(color tcell.Color) *tview.Form
	SetFocus(index int) *tview.Form
	AddInputField(label, value string, fieldWidth int, accept func(textToCheck string, lastChar rune) bool, changed func(text string)) *tview.Form
	AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) *tview.Form
	AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *tview.Form
	AddCheckbox(label string, checked bool, changed func(checked bool)) *tview.Form
	AddButton(label string, selected func()) *tview.Form
	GetButton(index int) *tview.Button
	RemoveButton(index int) *tview.Form
	GetButtonCount() int
	GetButtonIndex(label string) int
	Clear(includeButtons bool) *tview.Form
	ClearButtons() *tview.Form
	AddFormItem(item tview.FormItem) *tview.Form
	GetFormItemCount() int
	GetFormItem(index int) tview.FormItem
	RemoveFormItem(index int) *tview.Form
	GetFormItemByLabel(label string) tview.FormItem
	GetFormItemIndex(label string) int
	GetFocusedItemIndex() (formItem, button int)
	SetCancelFunc(callback func()) *tview.Form
	Draw(screen tcell.Screen)
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
}

type IFrame

type IFrame interface {
	IBox
	AddText(text string, header bool, align int, color tcell.Color) *tview.Frame
	Clear() *tview.Frame
	SetBorders(top, bottom, header, footer, left, right int) *tview.Frame
	Draw(screen tcell.Screen)
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
}

type IGenModel

type IGenModel[TDoc schema.ISchema, TList schema.ISchema] interface {
	IModel
	GetDocChangedTopic() string
	GetListChangedTopic() string
	GetDoc() *TDoc
	GetList() *TList
	SetDoc(doc *TDoc)
	SetList(list *TList)
}

func NewModel

func NewModel[TDoc schema.ISchema, TList schema.ISchema](
	name schema.Name,
	docFtor schema.DocFtor[TDoc],
	listFtor schema.DocFtor[TList],
) IGenModel[TDoc, TList]

type IGrid

type IGrid interface {
	IBox
	SetColumns(columns ...int) *tview.Grid
	SetRows(rows ...int) *tview.Grid
	SetSize(numRows, numColumns, rowSize, columnSize int) *tview.Grid
	SetMinSize(row, column int) *tview.Grid
	SetGap(row, column int) *tview.Grid
	SetBorders(borders bool) *tview.Grid
	SetBordersColor(color tcell.Color) *tview.Grid
	AddItem(p tview.Primitive, row, column, rowSpan, colSpan, minGridHeight, minGridWidth int, focus bool) *tview.Grid
	RemoveItem(p tview.Primitive) *tview.Grid
	Clear() *tview.Grid
	SetOffset(rows, columns int) *tview.Grid
	GetOffset() (rows, columns int)
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	Draw(screen tcell.Screen)
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IInputField

type IInputField interface {
	IBox
	SetText(text string) *tview.InputField
	GetText() string
	SetLabel(label string) *tview.InputField
	GetLabel() string
	SetLabelWidth(width int) *tview.InputField
	SetPlaceholder(text string) *tview.InputField
	SetLabelColor(color tcell.Color) *tview.InputField
	SetLabelStyle(style tcell.Style) *tview.InputField
	GetLabelStyle() tcell.Style
	SetFieldBackgroundColor(color tcell.Color) *tview.InputField
	SetFieldTextColor(color tcell.Color) *tview.InputField
	SetFieldStyle(style tcell.Style) *tview.InputField
	GetFieldStyle() tcell.Style
	SetPlaceholderTextColor(color tcell.Color) *tview.InputField
	SetPlaceholderStyle(style tcell.Style) *tview.InputField
	GetPlaceholderStyle() tcell.Style
	SetAutocompleteStyles(background tcell.Color, main, selected tcell.Style) *tview.InputField
	SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
	SetFieldWidth(width int) *tview.InputField
	GetFieldWidth() int
	SetMaskCharacter(mask rune) *tview.InputField
	SetAutocompleteFunc(callback func(currentText string) (entries []string)) *tview.InputField
	Autocomplete() *tview.InputField
	SetAcceptanceFunc(handler func(textToCheck string, lastChar rune) bool) *tview.InputField
	SetChangedFunc(handler func(text string)) *tview.InputField
	SetDoneFunc(handler func(key tcell.Key)) *tview.InputField
	SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IList

type IList interface {
	IBox
	SetCurrentItem(index int) *tview.List
	GetCurrentItem() int
	SetOffset(items, horizontal int) *tview.List
	GetOffset() (int, int)
	RemoveItem(index int) *tview.List
	SetMainTextColor(color tcell.Color) *tview.List
	SetMainTextStyle(style tcell.Style) *tview.List
	SetSecondaryTextColor(color tcell.Color) *tview.List
	SetSecondaryTextStyle(style tcell.Style) *tview.List
	SetShortcutColor(color tcell.Color) *tview.List
	SetShortcutStyle(style tcell.Style) *tview.List
	SetSelectedTextColor(color tcell.Color) *tview.List
	SetSelectedBackgroundColor(color tcell.Color) *tview.List
	SetSelectedStyle(style tcell.Style) *tview.List
	SetSelectedFocusOnly(focusOnly bool) *tview.List
	SetHighlightFullLine(highlight bool) *tview.List
	ShowSecondaryText(show bool) *tview.List
	SetWrapAround(wrapAround bool) *tview.List
	SetChangedFunc(handler func(index int, mainText string, secondaryText string, shortcut rune)) *tview.List
	SetSelectedFunc(handler func(int, string, string, rune)) *tview.List
	SetDoneFunc(handler func()) *tview.List
	AddItem(mainText, secondaryText string, shortcut rune, selected func()) *tview.List
	InsertItem(index int, mainText, secondaryText string, shortcut rune, selected func()) *tview.List
	GetItemCount() int
	GetItemText(index int) (main, secondary string)
	SetItemText(index int, main, secondary string) *tview.List
	FindItems(mainSearch, secondarySearch string, mustContainBoth, ignoreCase bool) (indices []int)
	Clear() *tview.List
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IMicroApp

type IMicroApp interface {
	spokes.ISpoke
}

type IModal

type IModal interface {
	IBox
	SetTextColor(color tcell.Color) *tview.Modal
	SetButtonBackgroundColor(color tcell.Color) *tview.Modal
	SetButtonTextColor(color tcell.Color) *tview.Modal
	SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *tview.Modal
	SetText(text string) *tview.Modal
	AddButtons(labels []string) *tview.Modal
	ClearButtons() *tview.Modal
	SetFocus(index int) *tview.Modal
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	Draw(screen tcell.Screen)
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type IModel

type IModel interface {
	comps.IComponent
	IAmModel()
}

type IPages

type IPages interface {
	IBox
	SetChangedFunc(handler func()) *tview.Pages
	GetPageCount() int
	AddPage(name string, item tview.Primitive, resize, visible bool) *tview.Pages
	AddAndSwitchToPage(name string, item tview.Primitive, resize bool) *tview.Pages
	RemovePage(name string) *tview.Pages
	HasPage(name string) bool
	ShowPage(name string) *tview.Pages
	HidePage(name string) *tview.Pages
	SwitchToPage(name string) *tview.Pages
	SendToFront(name string) *tview.Pages
	SendToBack(name string) *tview.Pages
	GetFrontPage() (name string, item tview.Primitive)
	HasFocus() bool
	Focus(delegate func(p tview.Primitive))
	Draw(screen tcell.Screen)
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
}

type IProxy

type IProxy interface {
	comps.IMsgReaction
	IAmProxy()
	Inject(requesters ...comps.IRequester)
	RefreshList(ctx context.Context, key string) error
	RefreshDoc(ctx context.Context, key string) error
	Request(ctx context.Context, hopeType contract.HopeType, hope contract.IHope, timeout time.Duration) contract.IFbk
}

type IScreen

type IScreen interface {
	tcell.Screen
}

type ISimulationScreen

type ISimulationScreen interface {
	tcell.SimulationScreen
}

type ITable

type ITable interface {
	IBox
	SetContent(content tview.TableContent) *tview.Table
	Clear() *tview.Table
	SetBorders(show bool) *tview.Table
	SetBordersColor(color tcell.Color) *tview.Table
	SetSelectedStyle(style tcell.Style) *tview.Table
	SetSeparator(separator rune) *tview.Table
	SetFixed(rows, columns int) *tview.Table
	SetSelectable(rows, columns bool) *tview.Table
	GetSelectable() (rows, columns bool)
	GetSelection() (row, column int)
	Select(row, column int) *tview.Table
	SetOffset(row, column int) *tview.Table
	GetOffset() (row, column int)
	SetEvaluateAllRows(all bool) *tview.Table
	SetSelectedFunc(handler func(row, column int)) *tview.Table
	SetSelectionChangedFunc(handler func(row, column int)) *tview.Table
	SetDoneFunc(handler func(key tcell.Key)) *tview.Table
	SetCell(row, column int, cell *tview.TableCell) *tview.Table
	SetCellSimple(row, column int, text string) *tview.Table
	GetCell(row, column int) *tview.TableCell
	RemoveRow(row int) *tview.Table
	RemoveColumn(column int) *tview.Table
	InsertRow(row int) *tview.Table
	InsertColumn(column int) *tview.Table
	GetRowCount() int
	GetColumnCount() int
	ScrollToBeginning() *tview.Table
	ScrollToEnd() *tview.Table
	SetWrapSelection(vertical, horizontal bool) *tview.Table
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type ITableCell

type ITableCell interface {
	SetText(text string) *tview.TableCell
	SetAlign(align int) *tview.TableCell
	SetMaxWidth(maxWidth int) *tview.TableCell
	SetExpansion(expansion int) *tview.TableCell
	SetTextColor(color tcell.Color) *tview.TableCell
	SetBackgroundColor(color tcell.Color) *tview.TableCell
	SetTransparency(transparent bool) *tview.TableCell
	SetAttributes(attr tcell.AttrMask) *tview.TableCell
	SetStyle(style tcell.Style) *tview.TableCell
	SetSelectable(selectable bool) *tview.TableCell
	SetReference(reference interface{}) *tview.TableCell
	GetReference() interface{}
	GetLastPosition() (x, y, width int)
	SetClickedFunc(clicked func() bool) *tview.TableCell
}

type ITableContentReadOnly

type ITableContentReadOnly interface {
	SetCell(row, column int, cell *tview.TableCell)
	RemoveRow(row int)
	RemoveColumn(column int)
	InsertRow(row int)
	InsertColumn(column int)
	Clear()
}

type ITextView

type ITextView interface {
	IBox
	SetScrollable(scrollable bool) *tview.TextView
	SetWrap(wrap bool) *tview.TextView
	SetWordWrap(wrapOnWords bool) *tview.TextView
	SetMaxLines(maxLines int) *tview.TextView
	SetTextAlign(align int) *tview.TextView
	SetTextColor(color tcell.Color) *tview.TextView
	SetText(text string) *tview.TextView
	GetText(stripAllTags bool) string
	GetOriginalLineCount() int
	SetDynamicColors(dynamic bool) *tview.TextView
	SetRegions(regions bool) *tview.TextView
	SetChangedFunc(handler func()) *tview.TextView
	SetDoneFunc(handler func(key tcell.Key)) *tview.TextView
	SetHighlightedFunc(handler func(added, removed, remaining []string)) *tview.TextView
	ScrollTo(row, column int) *tview.TextView
	ScrollToBeginning() *tview.TextView
	ScrollToEnd() *tview.TextView
	GetScrollOffset() (row, column int)
	Clear() *tview.TextView
	Highlight(regionIDs ...string) *tview.TextView
	GetHighlights() (regionIDs []string)
	SetToggleHighlights(toggle bool) *tview.TextView
	ScrollToHighlight() *tview.TextView
	GetRegionText(regionID string) string
	Focus(delegate func(p tview.Primitive))
	HasFocus() bool
	Write(p []byte) (n int, err error)
	BatchWriter() tview.TextViewWriter
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type ITextViewWriter

type ITextViewWriter interface {
	Close() error
	Clear()
	Write(p []byte) (n int, err error)
	HasFocus() bool
}

type ITheme

type ITheme interface{}

type ITreeNode

type ITreeNode interface {
	Walk(callback func(node, parent *tview.TreeNode) bool) *tview.TreeNode
	SetReference(reference interface{}) *tview.TreeNode
	GetReference() interface{}
	SetChildren(childNodes []*tview.TreeNode) *tview.TreeNode
	GetText() string
	GetChildren() []*tview.TreeNode
	ClearChildren() *tview.TreeNode
	AddChild(node *tview.TreeNode) *tview.TreeNode
	RemoveChild(node *tview.TreeNode) *tview.TreeNode
	SetSelectable(selectable bool) *tview.TreeNode
	SetSelectedFunc(handler func()) *tview.TreeNode
	SetExpanded(expanded bool) *tview.TreeNode
	Expand() *tview.TreeNode
	Collapse() *tview.TreeNode
	ExpandAll() *tview.TreeNode
	CollapseAll() *tview.TreeNode
	IsExpanded() bool
	SetText(text string) *tview.TreeNode
	GetColor() tcell.Color
	SetColor(color tcell.Color) *tview.TreeNode
	SetIndent(indent int) *tview.TreeNode
	GetLevel() int
}

type ITreeView

type ITreeView interface {
	IBox
	SetRoot(root *tview.TreeNode) *tview.TreeView
	GetRoot() *tview.TreeNode
	SetCurrentNode(node *tview.TreeNode) *tview.TreeView
	GetCurrentNode() *tview.TreeNode
	SetTopLevel(topLevel int) *tview.TreeView
	SetPrefixes(prefixes []string) *tview.TreeView
	SetAlign(align bool) *tview.TreeView
	SetGraphics(showGraphics bool) *tview.TreeView
	SetGraphicsColor(color tcell.Color) *tview.TreeView
	SetChangedFunc(handler func(node *tview.TreeNode)) *tview.TreeView
	SetSelectedFunc(handler func(node *tview.TreeNode)) *tview.TreeView
	SetDoneFunc(handler func(key tcell.Key)) *tview.TreeView
	GetScrollOffset() int
	GetRowCount() int
	Draw(screen tcell.Screen)
	InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
	MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
}

type ITuiApp

type ITuiApp interface {
	SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Application
	GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
	SetMouseCapture(capture func(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)) *tview.Application
	GetMouseCapture() func(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)
	SetScreen(screen tcell.Screen) *tview.Application
	EnableMouse(enable bool) *tview.Application
	Run() error
	Stop()
	Suspend(f func()) bool
	Draw() *tview.Application
	ForceDraw() *tview.Application
	Sync() *tview.Application
	SetBeforeDrawFunc(handler func(screen tcell.Screen) bool) *tview.Application
	GetBeforeDrawFunc() func(screen tcell.Screen) bool
	SetAfterDrawFunc(handler func(screen tcell.Screen)) *tview.Application
	GetAfterDrawFunc() func(screen tcell.Screen)
	SetRoot(root tview.Primitive, fullscreen bool) *tview.Application
	ResizeToFullScreen(p tview.Primitive) *tview.Application
	SetFocus(p tview.Primitive) *tview.Application
	GetFocus() tview.Primitive
	QueueUpdate(f func()) *tview.Application
	QueueUpdateDraw(f func()) *tview.Application
	QueueEvent(event tcell.Event) *tview.Application
}

func SingleTui

func SingleTui() ITuiApp

type IView

type IView interface {
}

type InputField

type InputField struct {
	*tview.InputField
}

func NewInputField

func NewInputField() *InputField

type List

type List struct {
	*tview.List
}

func NewList

func NewList() *List

type MicroApp

type MicroApp struct {
}
type Modal struct {
	*tview.Modal
}

func NewModal

func NewModal() *Modal

type ModelFtor

type ModelFtor func() IModel

type Pages

type Pages struct {
	*tview.Pages
}

func NewPages

func NewPages() *Pages

type Proxy

type Proxy[TDoc schema.ISchema, TList schema.ISchema] struct {
	*comps.MsgReaction
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy[TDoc schema.ISchema, TList schema.ISchema](
	name schema.Name,
	onAppInitialized comps.OnMsgFunc,
	newDocStore behavior.StoreFtor[TDoc],
	newListStore behavior.StoreFtor[TList],
	newModel GenModelFtor[TDoc, TList],
) *Proxy[TDoc, TList]

func (*Proxy[TDoc, TList]) IAmProxy

func (p *Proxy[TDoc, TList]) IAmProxy()

func (*Proxy[TDoc, TList]) Inject

func (p *Proxy[TDoc, TList]) Inject(requesters ...comps.IRequester)

func (*Proxy[TDoc, TList]) RefreshDoc

func (p *Proxy[TDoc, TList]) RefreshDoc(ctx context.Context, key string) error

func (*Proxy[TDoc, TList]) RefreshList

func (p *Proxy[TDoc, TList]) RefreshList(ctx context.Context, key string) error

RefreshList calls the listStore and

func (*Proxy[TDoc, TList]) Request

func (p *Proxy[TDoc, TList]) Request(ctx context.Context, hopeType contract.HopeType, hope contract.IHope, timeout time.Duration) contract.IFbk

type Slide

type Slide func(nextSlide func()) (title string, content tview.Primitive)

Slide is a function which returns the slide's main primitive and its title. It receives a "nextSlide" function which can be called to advance the presentation to the next slide.

type Table

type Table struct {
	*tview.Table
}

func NewTable

func NewTable() *Table

type TableCell

type TableCell struct {
	*tview.TableCell
}

func NewTableCell

func NewTableCell(text string) *TableCell

type TextView

type TextView struct {
	*tview.TextView
}

func NewTextView

func NewTextView() *TextView

type TreeNode

type TreeNode struct {
	*tview.TreeNode
}

func NewTreeNode

func NewTreeNode(text string) *TreeNode

type TreeView

type TreeView struct {
	*tview.TreeView
}

func NewTreeView

func NewTreeView() *TreeView

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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