Documentation ¶
Index ¶
- func NewNode(parentPath string, file fs.FileInfo) *tview.TreeNode
- func NewRootNode(path string) *tview.TreeNode
- type ContentView
- func (ft *ContentView) Blur()
- func (ft *ContentView) Draw(screen tcell.Screen)
- func (ft *ContentView) Focus(delegate func(p tview.Primitive))
- func (ft *ContentView) GetRect() (int, int, int, int)
- func (ft *ContentView) HasFocus() bool
- func (ft *ContentView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (ft *ContentView) MouseHandler() ...
- func (v *ContentView) SetPreview(fsnode *FSNode)
- func (ft *ContentView) SetRect(x, y, width, height int)
- type FSNode
- type FileTree
- func (ft *FileTree) Blur()
- func (ft *FileTree) Draw(screen tcell.Screen)
- func (ft *FileTree) Focus(delegate func(p tview.Primitive))
- func (ft *FileTree) GetParent(fsnode *FSNode) *FSNode
- func (ft *FileTree) GetRect() (int, int, int, int)
- func (ft *FileTree) HasFocus() bool
- func (ft *FileTree) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (ft *FileTree) IsRoot(fsnode *FSNode) bool
- func (ft *FileTree) Load(dir string)
- func (ft *FileTree) MouseHandler() ...
- func (ft *FileTree) OnChanged(fn func(node *FSNode))
- func (ft *FileTree) OnOpen(fn func(node *FSNode))
- func (ft *FileTree) OnSelect(fn func(node *FSNode))
- func (ft *FileTree) SetCurrent(fsnode *FSNode)
- func (ft *FileTree) SetRect(x, y, width, height int)
- func (ft *FileTree) SetRoot(fsnode *FSNode)
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootNode ¶
Types ¶
type ContentView ¶
type ContentView struct {
// contains filtered or unexported fields
}
func NewContentView ¶
func NewContentView(theme *Theme) *ContentView
func (*ContentView) Blur ¶
func (ft *ContentView) Blur()
func (*ContentView) Draw ¶
func (ft *ContentView) Draw(screen tcell.Screen)
func (*ContentView) Focus ¶
func (ft *ContentView) Focus(delegate func(p tview.Primitive))
func (*ContentView) HasFocus ¶
func (ft *ContentView) HasFocus() bool
func (*ContentView) InputHandler ¶
func (ft *ContentView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
func (*ContentView) MouseHandler ¶
func (ft *ContentView) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
func (*ContentView) SetPreview ¶
func (v *ContentView) SetPreview(fsnode *FSNode)
func (*ContentView) SetRect ¶
func (ft *ContentView) SetRect(x, y, width, height int)
type FSNode ¶
type FSNode struct { Name string Path string IsDir bool Size int64 Node *tview.TreeNode Mode fs.FileMode ModTime time.Time MimeType string }
func (*FSNode) CreateParent ¶
func (*FSNode) IsExpanded ¶
func (*FSNode) ReadChildren ¶
func (n *FSNode) ReadChildren()
type FileTree ¶
type FileTree struct { AfterDraw []func() // contains filtered or unexported fields }
func NewFileTree ¶
func (*FileTree) InputHandler ¶
func (*FileTree) MouseHandler ¶
func (*FileTree) SetCurrent ¶
Click to show internal directories.
Click to hide internal directories.