Documentation
¶
Index ¶
- type EditTextPresenter
- type FrameTextPresenter
- type HorizontalSeparatorTextPresenter
- type LabelTextPresenter
- type LineNumberTextPresenter
- type ListTextPresenter
- func (lp *ListTextPresenter) AddItem(item string)
- func (lp *ListTextPresenter) Clear()
- func (lp *ListTextPresenter) GetSelectedIndex() int
- func (lp *ListTextPresenter) GetSelectedItem() string
- func (lp *ListTextPresenter) Handle(view View, ev tcell.Event)
- func (lp *ListTextPresenter) IsFocusable() bool
- func (lp *ListTextPresenter) Present(view View)
- func (lp *ListTextPresenter) RemoveItem(index int)
- func (lp *ListTextPresenter) SetSelectedIndex(index int)
- func (lp *ListTextPresenter) ShowCursor() bool
- type ScrollBarTextPresenter
- type Segment
- type TreeNode
- type TreeTextPresenter
- func (t *TreeTextPresenter) GetSelectedPath() string
- func (t *TreeTextPresenter) Handle(view View, ev tcell.Event)
- func (t *TreeTextPresenter) IsFocusable() bool
- func (t *TreeTextPresenter) Present(view View)
- func (t *TreeTextPresenter) Reload()
- func (t *TreeTextPresenter) ReloadPath(path string)
- func (t *TreeTextPresenter) ReloadSelected()
- func (t *TreeTextPresenter) Reset(rootDirectory string)
- func (t *TreeTextPresenter) ShowCursor() bool
- type VerticalSeparatorTextPresenter
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditTextPresenter ¶
type EditTextPresenter struct {
OnModified func()
ReadOnly bool
Selection bool
// contains filtered or unexported fields
}
func (*EditTextPresenter) IsFocusable ¶
func (edit *EditTextPresenter) IsFocusable() bool
func (*EditTextPresenter) Present ¶
func (edit *EditTextPresenter) Present(view View)
func (*EditTextPresenter) ShowCursor ¶
func (edit *EditTextPresenter) ShowCursor() bool
type FrameTextPresenter ¶
type FrameTextPresenter struct {
}
func (*FrameTextPresenter) IsFocusable ¶
func (f *FrameTextPresenter) IsFocusable() bool
func (*FrameTextPresenter) Present ¶
func (f *FrameTextPresenter) Present(view View)
func (*FrameTextPresenter) ShowCursor ¶
func (f *FrameTextPresenter) ShowCursor() bool
type HorizontalSeparatorTextPresenter ¶
type HorizontalSeparatorTextPresenter struct {
}
func (*HorizontalSeparatorTextPresenter) Handle ¶
func (h *HorizontalSeparatorTextPresenter) Handle(view View, ev tcell.Event)
func (*HorizontalSeparatorTextPresenter) IsFocusable ¶
func (h *HorizontalSeparatorTextPresenter) IsFocusable() bool
func (*HorizontalSeparatorTextPresenter) Present ¶
func (h *HorizontalSeparatorTextPresenter) Present(view View)
func (*HorizontalSeparatorTextPresenter) ShowCursor ¶
func (h *HorizontalSeparatorTextPresenter) ShowCursor() bool
type LabelTextPresenter ¶
func (*LabelTextPresenter) Handle ¶
func (label *LabelTextPresenter) Handle(view View, ev tcell.Event)
func (*LabelTextPresenter) IsFocusable ¶
func (label *LabelTextPresenter) IsFocusable() bool
func (*LabelTextPresenter) Present ¶
func (label *LabelTextPresenter) Present(view View)
func (*LabelTextPresenter) ShowCursor ¶
func (label *LabelTextPresenter) ShowCursor() bool
type LineNumberTextPresenter ¶
type LineNumberTextPresenter struct {
TargetView View
}
func (*LineNumberTextPresenter) Handle ¶
func (ln *LineNumberTextPresenter) Handle(view View, ev tcell.Event)
func (*LineNumberTextPresenter) IsFocusable ¶
func (ln *LineNumberTextPresenter) IsFocusable() bool
func (*LineNumberTextPresenter) Present ¶
func (ln *LineNumberTextPresenter) Present(view View)
func (*LineNumberTextPresenter) ShowCursor ¶
func (ln *LineNumberTextPresenter) ShowCursor() bool
type ListTextPresenter ¶
func (*ListTextPresenter) AddItem ¶
func (lp *ListTextPresenter) AddItem(item string)
AddItem is adds a new item to the list
func (*ListTextPresenter) Clear ¶
func (lp *ListTextPresenter) Clear()
Clear is removes all items from the list
func (*ListTextPresenter) GetSelectedIndex ¶
func (lp *ListTextPresenter) GetSelectedIndex() int
GetSelectedIndex returns the currently selected index
func (*ListTextPresenter) GetSelectedItem ¶
func (lp *ListTextPresenter) GetSelectedItem() string
GetSelectedItem returns the currently selected item
func (*ListTextPresenter) IsFocusable ¶
func (lp *ListTextPresenter) IsFocusable() bool
func (*ListTextPresenter) Present ¶
func (lp *ListTextPresenter) Present(view View)
func (*ListTextPresenter) RemoveItem ¶
func (lp *ListTextPresenter) RemoveItem(index int)
RemoveItem is removes an item at the specified index
func (*ListTextPresenter) SetSelectedIndex ¶
func (lp *ListTextPresenter) SetSelectedIndex(index int)
SetSelectedIndex is sets the selected index
func (*ListTextPresenter) ShowCursor ¶
func (lp *ListTextPresenter) ShowCursor() bool
type ScrollBarTextPresenter ¶
type ScrollBarTextPresenter struct {
TargetView View
}
func (*ScrollBarTextPresenter) Handle ¶
func (sb *ScrollBarTextPresenter) Handle(view View, ev tcell.Event)
func (*ScrollBarTextPresenter) IsFocusable ¶
func (sb *ScrollBarTextPresenter) IsFocusable() bool
func (*ScrollBarTextPresenter) Present ¶
func (sb *ScrollBarTextPresenter) Present(view View)
func (*ScrollBarTextPresenter) ShowCursor ¶
func (sb *ScrollBarTextPresenter) ShowCursor() bool
type TreeTextPresenter ¶
type TreeTextPresenter struct {
RootDirectory string
OnFileOpen func(filePath string)
// contains filtered or unexported fields
}
func (*TreeTextPresenter) GetSelectedPath ¶
func (t *TreeTextPresenter) GetSelectedPath() string
func (*TreeTextPresenter) IsFocusable ¶
func (t *TreeTextPresenter) IsFocusable() bool
func (*TreeTextPresenter) Present ¶
func (t *TreeTextPresenter) Present(view View)
func (*TreeTextPresenter) Reload ¶
func (t *TreeTextPresenter) Reload()
Reload reloads the children of all expanded nodes in the tree
func (*TreeTextPresenter) ReloadPath ¶
func (t *TreeTextPresenter) ReloadPath(path string)
ReloadPath reloads the children of the node at the specified path if it exists and is expanded
func (*TreeTextPresenter) ReloadSelected ¶
func (t *TreeTextPresenter) ReloadSelected()
ReloadSelected reloads the children of the currently selected node if it's a directory
func (*TreeTextPresenter) Reset ¶
func (t *TreeTextPresenter) Reset(rootDirectory string)
func (*TreeTextPresenter) ShowCursor ¶
func (t *TreeTextPresenter) ShowCursor() bool
type VerticalSeparatorTextPresenter ¶
type VerticalSeparatorTextPresenter struct {
}
func (*VerticalSeparatorTextPresenter) Handle ¶
func (v *VerticalSeparatorTextPresenter) Handle(view View, ev tcell.Event)
func (*VerticalSeparatorTextPresenter) IsFocusable ¶
func (v *VerticalSeparatorTextPresenter) IsFocusable() bool
func (*VerticalSeparatorTextPresenter) Present ¶
func (v *VerticalSeparatorTextPresenter) Present(view View)
func (*VerticalSeparatorTextPresenter) ShowCursor ¶
func (v *VerticalSeparatorTextPresenter) ShowCursor() bool
type View ¶
type View interface {
TextFrame()
TextVertical()
TextHorizontal()
TextClear()
CursorUpdate()
InsertString(s string)
RemoveChar()
RemoveSelection()
Submit() bool
SelectionStart()
SelectionEnd()
MoveLeft()
MoveRight()
MoveUp()
MoveDown()
MoveLineStart()
MoveLineEnd()
MoveReset()
BreakIter() iter.Seq[Segment]
GetDocument() model.Document
GetWidth() int
GetHeight() int
GetScrollX() int
GetScrollY() int
GetViewHeight() int
GetViewPosition() int
}
Click to show internal directories.
Click to hide internal directories.