Documentation ¶
Index ¶
- func DataFS(fn *filetree.Node) *datafs.Data
- func IsTableFile(fname string) bool
- func NewDiffBrowserDirs(pathA, pathB string)
- func NewTab[T any](br *Browser, label string, mkfun func(tab *core.Frame) T) T
- type Browser
- func (br *Browser) Init()
- func (br *Browser) MakeToolbar(p *tree.Plan)
- func (br *Browser) NewTabEditor(label, content string) *texteditor.Editor
- func (br *Browser) NewTabEditorFile(label, filename string) *texteditor.Editor
- func (br *Browser) NewTabPlot(label string, dt *table.Table) *plotcore.PlotEditor
- func (br *Browser) NewTabSliceTable(label string, slc any) *core.Table
- func (br *Browser) NewTabTensorEditor(label string, tsr tensor.Tensor) *tensorcore.TensorEditor
- func (br *Browser) NewTabTensorGrid(label string, tsr tensor.Tensor) *tensorcore.TensorGrid
- func (br *Browser) NewTabTensorTable(label string, dt *table.Table) *tensorcore.Table
- func (t *Browser) SetDataRoot(v string) *Browser
- func (t *Browser) SetFS(v fs.FS) *Browser
- func (br *Browser) UpdateFiles()
- type FileNode
- func (fn *FileNode) ContextMenu(m *core.Scene)
- func (fn *FileNode) DiffDirs()
- func (fn *FileNode) EditFile()
- func (fn *FileNode) EditFiles()
- func (fn *FileNode) GetFileInfo() error
- func (fn *FileNode) Init()
- func (fn *FileNode) OpenFile() error
- func (fn *FileNode) PlotFile()
- func (fn *FileNode) PlotFiles()
- func (fn *FileNode) WidgetTooltip(pos image.Point) (string, image.Point)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataFS ¶
DataFS returns the datafs representation of this item. returns nil if not a dataFS item.
func IsTableFile ¶
func NewDiffBrowserDirs ¶
func NewDiffBrowserDirs(pathA, pathB string)
NewDiffBrowserDirs returns a new diff browser for files that differ within the two given directories. Excludes Job and .tsv data files.
Types ¶
type Browser ¶
type Browser struct { core.Frame // FS is the filesystem, if browsing an FS FS fs.FS // DataRoot is the path to the root of the data to browse DataRoot string // contains filtered or unexported fields }
Browser is a data browser, for browsing data either on an os filesystem or as a datafs virtual data filesystem.
func NewBrowser ¶
NewBrowser returns a new Browser with the given optional parent: Browser is a data browser, for browsing data either on an os filesystem or as a datafs virtual data filesystem.
func NewBrowserWindow ¶
NewBrowserWindow opens a new data Browser for given file system (nil for os files) and data directory.
func ParentBrowser ¶
ParentBrowser returns the Browser parent of given node
func (*Browser) Init ¶
func (br *Browser) Init()
Init initializes with the data and script directories
func (*Browser) MakeToolbar ¶
func (*Browser) NewTabEditor ¶
func (br *Browser) NewTabEditor(label, content string) *texteditor.Editor
NewTabEditor opens a texteditor.Editor tab, displaying given string.
func (*Browser) NewTabEditorFile ¶
func (br *Browser) NewTabEditorFile(label, filename string) *texteditor.Editor
NewTabEditorFile opens an editor tab for given file
func (*Browser) NewTabPlot ¶
NewTabPlot creates a tab with a Plot of given table.Table.
func (*Browser) NewTabSliceTable ¶
NewTabSliceTable creates a tab with a core.Table widget to view the given slice of structs.
func (*Browser) NewTabTensorEditor ¶
func (br *Browser) NewTabTensorEditor(label string, tsr tensor.Tensor) *tensorcore.TensorEditor
NewTabTensorEditor creates a tab with a tensorcore.TensorEditor widget to view given Tensor.
func (*Browser) NewTabTensorGrid ¶
func (br *Browser) NewTabTensorGrid(label string, tsr tensor.Tensor) *tensorcore.TensorGrid
NewTabTensorGrid creates a tab with a tensorcore.TensorGrid widget to view given Tensor.
func (*Browser) NewTabTensorTable ¶
NewTabTensorTable creates a tab with a tensorcore.Table widget to view given table.Table, using its own table.IndexView as tv.Table. Use tv.Table.Table to get the underlying *table.Table Use tv.Table.Sequential to update the IndexView to view all of the rows when done updating the Table, and then call br.Update()
func (*Browser) SetDataRoot ¶
SetDataRoot sets the [Browser.DataRoot]: DataRoot is the path to the root of the data to browse
type FileNode ¶
FileNode is databrowser version of FileNode for FileTree
func NewFileNode ¶
NewFileNode returns a new FileNode with the given optional parent: FileNode is databrowser version of FileNode for FileTree
func (*FileNode) ContextMenu ¶
func (*FileNode) DiffDirs ¶
func (fn *FileNode) DiffDirs()
DiffDirs displays a browser with differences between two selected directories
func (*FileNode) EditFile ¶
func (fn *FileNode) EditFile()
EditFile pulls up this file in a texteditor
func (*FileNode) EditFiles ¶
func (fn *FileNode) EditFiles()
EditFiles calls EditFile on selected files
func (*FileNode) GetFileInfo ¶
func (*FileNode) PlotFile ¶
func (fn *FileNode) PlotFile()
PlotFile pulls up this file in a texteditor.