filetree

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 37 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ExternalFilesName is the name of the node that represents external files
	ExternalFilesName = "[external files]"
)

Variables

View Source
var NodeHiStyle = histyle.StyleDefault

NodeHiStyle is the default style for syntax highlighting to use for file node buffers

View Source
var NodeType = types.AddType(&types.Type{Name: "cogentcore.org/core/filetree.Node", IDName: "node", Doc: "Node represents a file in the file system, as a TreeView node.\nThe name of the node is the name of the file.\nFolders have children containing further nodes.", Directives: []types.Directive{{Tool: "core", Directive: "embedder"}}, Methods: []types.Method{{Name: "OpenFilesDefault", Doc: "OpenFilesDefault opens selected files with default app for that file type (os defined).\nruns open on Mac, xdg-open on Linux, and start on Windows", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "DuplicateFiles", Doc: "DuplicateFiles makes a copy of selected files", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "DeleteFiles", Doc: "deletes any selected files or directories. If any directory is selected,\nall files and subdirectories in that directory are also deleted.", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "RenameFiles", Doc: "renames any selected files", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "RenameFile", Doc: "RenameFile renames file to new name", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"newpath"}, Returns: []string{"error"}}, {Name: "NewFiles", Doc: "NewFiles makes a new file in selected directory", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"filename", "addToVCS"}}, {Name: "NewFile", Doc: "NewFile makes a new file in this directory node", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"filename", "addToVCS"}}, {Name: "NewFolders", Doc: "makes a new folder in the given selected directory", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"foldername"}}, {Name: "NewFolder", Doc: "NewFolder makes a new folder (directory) in this directory node", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"foldername"}}, {Name: "ShowFileInfo", Doc: "Shows file information about selected file(s)", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "SortBys", Doc: "SortBys determines how to sort the selected files in the directory.\nDefault is alpha by name, optionally can be sorted by modification time.", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"modTime"}}, {Name: "OpenAll", Doc: "OpenAll opens all directories under this one", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "CloseAll", Doc: "CloseAll closes all directories under this one, this included", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "RemoveFromExterns", Doc: "RemoveFromExterns removes file from list of external files", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "AddToVCSSel", Doc: "AddToVCSSel adds selected files to version control system", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "DeleteFromVCSSel", Doc: "DeleteFromVCSSel removes selected files from version control system", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "CommitToVCSSel", Doc: "CommitToVCSSel commits to version control system based on last selected file", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "RevertVCSSel", Doc: "RevertVCSSel removes selected files from version control system", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "DiffVCSSel", Doc: "DiffVCSSel shows the diffs between two versions of selected files, given by the\nrevision specifiers -- if empty, defaults to A = current HEAD, B = current WC file.\n-1, -2 etc also work as universal ways of specifying prior revisions.\nDiffs are shown in a DiffViewDialog.", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"rev_a", "rev_b"}}, {Name: "LogVCSSel", Doc: "LogVCSSel shows the VCS log of commits for selected files, optionally with a\nsince date qualifier: If since is non-empty, it should be\na date-like expression that the VCS will understand, such as\n1/1/2020, yesterday, last year, etc.  SVN only understands a\nnumber as a maximum number of items to return.\nIf allFiles is true, then the log will show revisions for all files, not just\nthis one.\nReturns the Log and also shows it in a VCSLogView which supports further actions.", Directives: []types.Directive{{Tool: "types", Directive: "add"}}, Args: []string{"allFiles", "since"}}, {Name: "BlameVCSSel", Doc: "BlameVCSSel shows the VCS blame report for this file, reporting for each line\nthe revision and author of the last change.", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}}, Embeds: []types.Field{{Name: "TreeView"}}, Fields: []types.Field{{Name: "FPath", Doc: "full path to this file"}, {Name: "Info", Doc: "full standard file info about this file"}, {Name: "Buffer", Doc: "file buffer for editing this file"}, {Name: "FRoot", Doc: "root of the tree -- has global state"}, {Name: "DirRepo", Doc: "version control system repository for this directory,\nonly non-nil if this is the highest-level directory in the tree under vcs control"}, {Name: "RepoFiles", Doc: "version control system repository file status -- only valid during ReadDir"}}, Instance: &Node{}})

NodeType is the types.Type for Node

View Source
var TreeType = types.AddType(&types.Type{Name: "cogentcore.org/core/filetree.Tree", IDName: "tree", Doc: "Tree is the root of a tree representing files in a given directory\n(and subdirectories thereof), and has some overall management state for how to\nview things.  The Tree can be viewed by a TreeView to provide a GUI\ninterface into it.", Embeds: []types.Field{{Name: "Node"}}, Fields: []types.Field{{Name: "ExtFiles", Doc: "external files outside the root path of the tree -- abs paths are stored -- these are shown in the first sub-node if present -- use AddExtFile to add and update"}, {Name: "Dirs", Doc: "records state of directories within the tree (encoded using paths relative to root),\ne.g., open (have been opened by the user) -- can persist this to restore prior view of a tree"}, {Name: "DirsOnTop", Doc: "if true, then all directories are placed at the top of the tree view\notherwise everything is mixed"}, {Name: "FileNodeType", Doc: "type of node to create -- defaults to filetree.Node but can use custom node types"}, {Name: "DoubleClickFun", Doc: "DoubleClickFun is a function to call when a node receives a DoubleClick event.\nif not set, defaults to OpenEmptyDir() (for folders)"}, {Name: "InOpenAll", Doc: "if true, we are in midst of an OpenAll call -- nodes should open all dirs"}, {Name: "Watcher", Doc: "change notify for all dirs"}, {Name: "DoneWatcher", Doc: "channel to close watcher watcher"}, {Name: "WatchedPaths", Doc: "map of paths that have been added to watcher -- only active if bool = true"}, {Name: "LastWatchUpdate", Doc: "last path updated by watcher"}, {Name: "LastWatchTime", Doc: "timestamp of last update"}, {Name: "UpdateMu", Doc: "Update mutex"}}, Instance: &Tree{}})

TreeType is the types.Type for Tree

View Source
var VCSLogViewType = types.AddType(&types.Type{Name: "cogentcore.org/core/filetree.VCSLogView", IDName: "vcs-log-view", Doc: "VCSLogView is a view of the VCS log data", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "Log", Doc: "current log"}, {Name: "File", Doc: "file that this is a log of -- if blank then it is entire repository"}, {Name: "Since", Doc: "date expression for how long ago to include log entries from"}, {Name: "Repo", Doc: "version control system repository"}, {Name: "RevA", Doc: "revision A -- defaults to HEAD"}, {Name: "RevB", Doc: "revision B -- blank means current working copy"}, {Name: "SetA", Doc: "double-click will set the A revision -- else B"}}, Instance: &VCSLogView{}})

VCSLogViewType is the types.Type for VCSLogView

View Source
var VersionControlSystems = []string{"git", "svn", "bzr", "hg"}

VersionControlSystems is a list of supported Version Control Systems. These must match the VCS Types from vcs which in turn is based on masterminds/vcs

Functions

func BlameDialog

func BlameDialog(ctx core.Widget, fname string, blame, fbytes []byte) *texteditor.TwinEditors

BlameDialog opens a dialog for displaying VCS blame data using textview.TwinViews. blame is the annotated blame code, while fbytes is the original file contents.

func FileAtRevDialog

func FileAtRevDialog(ctx core.Widget, repo vcs.Repo, file, rev string) *core.Body

FileAtRevDialog Shows a file at a given revision in a new dialog window

func IsVersionControlSystem added in v0.0.8

func IsVersionControlSystem(str string) bool

IsVersionControlSystem returns true if the given string matches one of the standard VersionControlSystems -- uses lowercase version of str.

func NodeNameCountSort

func NodeNameCountSort(ecs []NodeNameCount)

func OSOpenCommand

func OSOpenCommand() string

OSOpenCommand returns the generic file 'open' command to open file with default app open on Mac, xdg-open on Linux, and start on Windows

func VCSLabelFunc

func VCSLabelFunc(fn *Node, label string) string

VCSLabelFunc gets the appropriate label for removing from version control

func VCSLogViewDialog

func VCSLogViewDialog(ctx core.Widget, repo vcs.Repo, lg vcs.Log, file, since string) *core.Body

VCSLogViewDialog returns a VCS Log View for given repo, log and file (file could be empty)

Types

type DirFlagMap

type DirFlagMap struct {

	// map of paths and associated flags
	Map map[string]DirFlags

	// mutex for accessing map
	Mu sync.Mutex `view:"-" json:"-" xml:"-"`
}

DirFlagMap is a map for encoding directories that are open in the file tree. The strings are typically relative paths. The bool value is used to mark active paths and inactive (unmarked) ones can be removed. Map access is protected by Mutex.

func (*DirFlagMap) ClearMarks

func (dm *DirFlagMap) ClearMarks()

ClearMarks clears all the marks -- do this prior to traversing full set of active paths -- can then call DeleteStale to get rid of unused paths.

func (*DirFlagMap) DeleteStale

func (dm *DirFlagMap) DeleteStale()

DeleteStale removes all entries with a bool = false value indicating that they have not been accessed since ClearFlags was called.

func (*DirFlagMap) Init

func (dm *DirFlagMap) Init()

Init initializes the map, and sets the Mutex lock -- must unlock manually

func (*DirFlagMap) IsOpen

func (dm *DirFlagMap) IsOpen(path string) bool

IsOpen returns true if path has IsOpen bit flag set

func (*DirFlagMap) SetMark

func (dm *DirFlagMap) SetMark(path string)

SetMark sets the mark flag indicating we visited file

func (*DirFlagMap) SetOpen

func (dm *DirFlagMap) SetOpen(path string, open bool)

SetOpenState sets the given directory's open flag

func (*DirFlagMap) SetSortBy

func (dm *DirFlagMap) SetSortBy(path string, modTime bool)

SetSortBy sets the given directory's sort by option

func (*DirFlagMap) SortByModTime

func (dm *DirFlagMap) SortByModTime(path string) bool

SortByModTime returns true if path is sorted by mod time

func (*DirFlagMap) SortByName

func (dm *DirFlagMap) SortByName(path string) bool

SortByName returns true if path is sorted by name (default if not in map)

type DirFlags

type DirFlags int64 //enums:bitflag -trim-prefix Dir

DirFlags are flags on directories: Open, SortBy etc These flags are stored in the DirFlagMap for persistence.

const (
	// DirMark means directory is marked -- unmarked entries are deleted post-update
	DirMark DirFlags = iota

	// DirIsOpen means directory is open -- else closed
	DirIsOpen

	// DirSortByName means sort the directory entries by name.
	// this is mutex with other sorts -- keeping option open for non-binary sort choices.
	DirSortByName

	// DirSortByModTime means sort the directory entries by modification time
	DirSortByModTime
)
const DirFlagsN DirFlags = 4

DirFlagsN is the highest valid value for type DirFlags, plus one.

func DirFlagsValues

func DirFlagsValues() []DirFlags

DirFlagsValues returns all possible values for the type DirFlags.

func (DirFlags) BitIndexString

func (i DirFlags) BitIndexString() string

BitIndexString returns the string representation of this DirFlags value if it is a bit index value (typically an enum constant), and not an actual bit flag value.

func (DirFlags) Desc

func (i DirFlags) Desc() string

Desc returns the description of the DirFlags value.

func (DirFlags) HasFlag

func (i DirFlags) HasFlag(f enums.BitFlag) bool

HasFlag returns whether these bit flags have the given bit flag set.

func (DirFlags) Int64

func (i DirFlags) Int64() int64

Int64 returns the DirFlags value as an int64.

func (DirFlags) MarshalText

func (i DirFlags) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*DirFlags) SetFlag

func (i *DirFlags) SetFlag(on bool, f ...enums.BitFlag)

SetFlag sets the value of the given flags in these flags to the given value.

func (*DirFlags) SetInt64

func (i *DirFlags) SetInt64(in int64)

SetInt64 sets the DirFlags value from an int64.

func (*DirFlags) SetString

func (i *DirFlags) SetString(s string) error

SetString sets the DirFlags value from its string representation, and returns an error if the string is invalid.

func (*DirFlags) SetStringOr

func (i *DirFlags) SetStringOr(s string) error

SetStringOr sets the DirFlags value from its string representation while preserving any bit flags already set, and returns an error if the string is invalid.

func (DirFlags) String

func (i DirFlags) String() string

String returns the string representation of this DirFlags value.

func (*DirFlags) UnmarshalText

func (i *DirFlags) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (DirFlags) Values

func (i DirFlags) Values() []enums.Enum

Values returns all possible values for the type DirFlags.

type Filer

type Filer interface {
	// OpenFilesDefault opens selected files with default app for that file type (os defined).
	// runs open on Mac, xdg-open on Linux, and start on Windows
	OpenFilesDefault()

	// OpenFileDefault opens file with default app for that file type (os defined)
	// runs open on Mac, xdg-open on Linux, and start on Windows
	OpenFileDefault() error

	// OpenFilesWith opens selected files with user-specified command.
	OpenFilesWith()

	// OpenFileWith opens file with given command.
	// does not wait for command to finish in this routine (separate routine Waits)
	OpenFileWith(command string) error

	// DuplicateFiles makes a copy of selected files
	DuplicateFiles()

	// DuplicateFile creates a copy of given file -- only works for regular files, not
	// directories
	DuplicateFile() error

	// DeleteFiles deletes any selected files or directories. If any directory is selected,
	// all files and subdirectories in that directory are also deleted.
	DeleteFiles()

	// DeleteFilesImpl does the actual deletion, no prompts
	DeleteFilesImpl()

	// DeleteFile deletes this file
	DeleteFile() error

	// RenameFiles renames any selected files
	RenameFiles()

	// RenameFile renames file to new name
	RenameFile(newpath string) error

	// NewFiles makes a new file in selected directory
	NewFiles(filename string, addToVCS bool)

	// NewFile makes a new file in this directory node
	NewFile(filename string, addToVCS bool)

	// NewFolders makes a new folder in the given selected directory
	NewFolders(foldername string)

	// NewFolder makes a new folder (directory) in this directory node
	NewFolder(foldername string)

	// CopyFileToDir copies given file path into node that is a directory.
	// This does NOT check for overwriting -- that must be done at higher level!
	CopyFileToDir(filename string, perm os.FileMode)

	// Shows file information about selected file(s)
	ShowFileInfo()
}

Filer is an interface for Filetree File actions

type Node

type Node struct {
	views.TreeView

	// full path to this file
	FPath core.Filename `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`

	// full standard file info about this file
	Info fileinfo.FileInfo `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`

	// file buffer for editing this file
	Buffer *texteditor.Buffer `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`

	// root of the tree -- has global state
	FRoot *Tree `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`

	// version control system repository for this directory,
	// only non-nil if this is the highest-level directory in the tree under vcs control
	DirRepo vcs.Repo `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`

	// version control system repository file status -- only valid during ReadDir
	RepoFiles vcs.Files `edit:"-" set:"-" json:"-" xml:"-" copier:"-"`
}

Node represents a file in the file system, as a TreeView node. The name of the node is the name of the file. Folders have children containing further nodes.

func AsNode

func AsNode(k tree.Node) *Node

AsNode returns the given value as a value of type Node if the type of the given value embeds Node, or nil otherwise

func NewNode

func NewNode(parent tree.Node, name ...string) *Node

NewNode adds a new Node with the given name to the given parent: Node represents a file in the file system, as a TreeView node. The name of the node is the name of the file. Folders have children containing further nodes.

func (*Node) AddToVCS

func (fn *Node) AddToVCS()

AddToVCS adds file to version control

func (*Node) AddToVCSSel

func (fn *Node) AddToVCSSel()

AddToVCSSel adds selected files to version control system

func (*Node) AsNode

func (t *Node) AsNode() *Node

AsNode satisfies the NodeEmbedder interface

func (*Node) BaseType

func (fn *Node) BaseType() *types.Type

func (*Node) BlameVCS

func (fn *Node) BlameVCS() ([]byte, error)

BlameVCS shows the VCS blame report for this file, reporting for each line the revision and author of the last change.

func (*Node) BlameVCSSel

func (fn *Node) BlameVCSSel()

BlameVCSSel shows the VCS blame report for this file, reporting for each line the revision and author of the last change.

func (*Node) CanOpen

func (fn *Node) CanOpen() bool

func (*Node) CloseAll

func (fn *Node) CloseAll()

CloseAll closes all directories under this one, this included

func (*Node) CloseBuf

func (fn *Node) CloseBuf() bool

CloseBuf closes the file in its buffer if it is open. returns true if closed.

func (*Node) CloseDir

func (fn *Node) CloseDir()

CloseDir closes given directory node -- updates memory state

func (*Node) CommitToVCS

func (fn *Node) CommitToVCS(message string) (err error)

CommitToVCS commits file changes to version control system

func (*Node) CommitToVCSSel

func (fn *Node) CommitToVCSSel()

CommitToVCSSel commits to version control system based on last selected file

func (*Node) ConfigOfFiles

func (fn *Node) ConfigOfFiles(path string) tree.Config

ConfigOfFiles returns a type-and-name list for configuring nodes based on files immediately within given path

func (*Node) ContextMenu

func (fn *Node) ContextMenu(m *core.Scene)

func (*Node) CopyFileToDir

func (fn *Node) CopyFileToDir(filename string, perm os.FileMode)

CopyFileToDir copies given file path into node that is a directory. This does NOT check for overwriting -- that must be done at higher level!

func (*Node) Cut

func (fn *Node) Cut()

Cut copies to system.Clipboard and deletes selected items

func (*Node) DeleteFile

func (fn *Node) DeleteFile() error

DeleteFile deletes this file

func (*Node) DeleteFiles

func (fn *Node) DeleteFiles()

deletes any selected files or directories. If any directory is selected, all files and subdirectories in that directory are also deleted.

func (*Node) DeleteFilesImpl

func (fn *Node) DeleteFilesImpl()

DeleteFilesImpl does the actual deletion, no prompts

func (*Node) DeleteFromVCS

func (fn *Node) DeleteFromVCS()

DeleteFromVCS removes file from version control

func (*Node) DeleteFromVCSSel

func (fn *Node) DeleteFromVCSSel()

DeleteFromVCSSel removes selected files from version control system

func (*Node) DetectVCSRepo

func (fn *Node) DetectVCSRepo(updateFiles bool) bool

DetectVCSRepo detects and configures DirRepo if this directory is root of a VCS repository. if updateFiles is true, gets the files in the dir. returns true if a repository was newly found here.

func (*Node) DiffVCS

func (fn *Node) DiffVCS(rev_a, rev_b string) error

DiffVCS shows the diffs between two versions of this file, given by the revision specifiers -- if empty, defaults to A = current HEAD, B = current WC file. -1, -2 etc also work as universal ways of specifying prior revisions. Diffs are shown in a DiffViewDialog.

func (*Node) DiffVCSSel

func (fn *Node) DiffVCSSel(rev_a string, rev_b string)

DiffVCSSel shows the diffs between two versions of selected files, given by the revision specifiers -- if empty, defaults to A = current HEAD, B = current WC file. -1, -2 etc also work as universal ways of specifying prior revisions. Diffs are shown in a DiffViewDialog.

func (*Node) DirsTo

func (fn *Node) DirsTo(path string) (*Node, error)

DirsTo opens all the directories above the given filename, and returns the node for element at given path (can be a file or directory itself -- not opened -- just returned)

func (*Node) DragDrop

func (fn *Node) DragDrop(e events.Event)

func (*Node) DropDeleteSource

func (fn *Node) DropDeleteSource(e events.Event)

Dragged is called after target accepts the drop -- we just remove elements that were moved satisfies core.DragNDropper interface and can be overridden by subtypes

func (*Node) DuplicateFile

func (fn *Node) DuplicateFile() error

DuplicateFile creates a copy of given file -- only works for regular files, not directories

func (*Node) DuplicateFiles

func (fn *Node) DuplicateFiles()

DuplicateFiles makes a copy of selected files

func (*Node) FileExtCounts

func (fn *Node) FileExtCounts(cat fileinfo.Categories) []NodeNameCount

FileExtCounts returns a count of all the different file extensions, sorted from highest to lowest. If cat is != fileinfo.Unknown then it only uses files of that type (e.g., fileinfo.Code to find any code files)

func (*Node) FilesMatching

func (fn *Node) FilesMatching(match string, ignoreCase bool) []*Node

FilesMatching returns list of all nodes whose file name contains given string (no regexp). ignoreCase transforms everything into lowercase

func (*Node) FindDirNode

func (fn *Node) FindDirNode(path string) (*Node, error)

FindDirNode finds directory node by given path. Must be a relative path already rooted at tree, or absolute path within tree.

func (*Node) FindFile

func (fn *Node) FindFile(fnm string) (*Node, bool)

FindFile finds first node representing given file (false if not found) -- looks for full path names that have the given string as their suffix, so you can include as much of the path (including whole thing) as is relevant to disambiguate. See FilesMatching for a list of files that match a given string.

func (*Node) FirstVCS

func (fn *Node) FirstVCS() (vcs.Repo, *Node)

FirstVCS returns the first VCS repository starting from this node and going down. also returns the node having that repository

func (*Node) FlagType

func (fn *Node) FlagType() enums.BitFlagSetter

func (*Node) HandleEvents

func (fn *Node) HandleEvents()

func (*Node) HasClosedParent

func (fn *Node) HasClosedParent() bool

HasClosedParent returns true if node has a parent node with !IsOpen flag set

func (*Node) InitFileInfo

func (fn *Node) InitFileInfo() error

InitFileInfo initializes file info

func (*Node) IsAutoSave

func (fn *Node) IsAutoSave() bool

IsAutoSave returns true if file is an auto-save file (starts and ends with #)

func (*Node) IsChanged

func (fn *Node) IsChanged() bool

IsChanged returns true if the file is open and has been changed (edited) since last EditDone

func (*Node) IsDir

func (fn *Node) IsDir() bool

IsDir returns true if file is a directory (folder)

func (*Node) IsExec

func (fn *Node) IsExec() bool

IsExec returns true if file is an executable file

func (*Node) IsExternal

func (fn *Node) IsExternal() bool

IsExternal returns true if file is external to main file tree

func (*Node) IsIrregular

func (fn *Node) IsIrregular() bool

IsIrregular returns true if file is a special "Irregular" node

func (*Node) IsNotSaved

func (fn *Node) IsNotSaved() bool

IsNotSaved returns true if the file is open and has been changed (edited) since last Save

func (*Node) IsOpen

func (fn *Node) IsOpen() bool

IsOpen returns true if file is flagged as open

func (fn *Node) IsSymLink() bool

IsSymLink returns true if file is a symlink

func (*Node) KeyInput

func (fn *Node) KeyInput(kt events.Event)

func (*Node) LatestFileMod

func (fn *Node) LatestFileMod(cat fileinfo.Categories) time.Time

LatestFileMod returns the most recent mod time of files in the tree. If cat is != fileinfo.Unknown then it only uses files of that type (e.g., fileinfo.Code to find any code files)

func (*Node) LogVCS

func (fn *Node) LogVCS(allFiles bool, since string) (vcs.Log, error)

LogVCS shows the VCS log of commits for this file, optionally with a since date qualifier: If since is non-empty, it should be a date-like expression that the VCS will understand, such as 1/1/2020, yesterday, last year, etc. SVN only understands a number as a maximum number of items to return. If allFiles is true, then the log will show revisions for all files, not just this one. Returns the Log and also shows it in a VCSLogView which supports further actions.

func (*Node) LogVCSSel

func (fn *Node) LogVCSSel(allFiles bool, since string)

LogVCSSel shows the VCS log of commits for selected files, optionally with a since date qualifier: If since is non-empty, it should be a date-like expression that the VCS will understand, such as 1/1/2020, yesterday, last year, etc. SVN only understands a number as a maximum number of items to return. If allFiles is true, then the log will show revisions for all files, not just this one. Returns the Log and also shows it in a VCSLogView which supports further actions.

func (*Node) MimeData

func (fn *Node) MimeData(md *mimedata.Mimes)

MimeData adds mimedata for this node: a text/plain of the Path, text/plain of filename, and text/

func (*Node) MyRelPath

func (fn *Node) MyRelPath() string

MyRelPath returns the relative path from root for this node

func (*Node) New

func (t *Node) New() tree.Node

New returns a new *Node value

func (*Node) NewFile

func (fn *Node) NewFile(filename string, addToVCS bool)

NewFile makes a new file in this directory node

func (*Node) NewFiles

func (fn *Node) NewFiles(filename string, addToVCS bool)

NewFiles makes a new file in selected directory

func (*Node) NewFolder

func (fn *Node) NewFolder(foldername string)

NewFolder makes a new folder (directory) in this directory node

func (*Node) NewFolders

func (fn *Node) NewFolders(foldername string)

makes a new folder in the given selected directory

func (*Node) NodeType added in v0.0.10

func (t *Node) NodeType() *types.Type

NodeType returns the *types.Type of Node

func (*Node) OnClose

func (fn *Node) OnClose()

func (*Node) OnInit

func (fn *Node) OnInit()

func (*Node) OnOpen

func (fn *Node) OnOpen()

func (*Node) OpenAll

func (fn *Node) OpenAll()

OpenAll opens all directories under this one

func (*Node) OpenBuf

func (fn *Node) OpenBuf() (bool, error)

OpenBuf opens the file in its buffer if it is not already open. returns true if file is newly opened

func (*Node) OpenDir

func (fn *Node) OpenDir()

OpenDir opens given directory node

func (*Node) OpenDirs

func (fn *Node) OpenDirs()

OpenDirs opens directories for selected views

func (*Node) OpenEmptyDir

func (fn *Node) OpenEmptyDir() bool

OpenEmptyDir will attempt to open a directory that has no children which presumably was not processed originally

func (*Node) OpenFileDefault

func (fn *Node) OpenFileDefault() error

OpenFileDefault opens file with default app for that file type (os defined) runs open on Mac, xdg-open on Linux, and start on Windows

func (*Node) OpenFileWith

func (fn *Node) OpenFileWith(command string) error

OpenFileWith opens file with given command. does not wait for command to finish in this routine (separate routine Waits)

func (*Node) OpenFilesDefault

func (fn *Node) OpenFilesDefault()

OpenFilesDefault opens selected files with default app for that file type (os defined). runs open on Mac, xdg-open on Linux, and start on Windows

func (*Node) OpenFilesWith

func (fn *Node) OpenFilesWith()

OpenFilesWith opens selected files with user-specified command.

func (*Node) Paste

func (fn *Node) Paste()

func (*Node) PasteCheckExisting

func (fn *Node) PasteCheckExisting(tfn *Node, md mimedata.Mimes, externalDrop bool) ([]string, *Node)

PasteCheckExisting checks for existing files in target node directory if that is non-nil (otherwise just uses absolute path), and returns list of existing and node for last one if exists.

func (*Node) PasteCopyFiles

func (fn *Node) PasteCopyFiles(tdir *Node, md mimedata.Mimes, externalDrop bool)

PasteCopyFiles copies files in given data into given target directory

func (*Node) PasteCopyFilesCheck

func (fn *Node) PasteCopyFilesCheck(tdir *Node, md mimedata.Mimes, externalDrop bool, dropFinal func())

PasteCopyFilesCheck copies files into given directory node, first checking if any already exist -- if they exist, prompts.

func (*Node) PasteFiles

func (fn *Node) PasteFiles(md mimedata.Mimes, externalDrop bool, dropFinal func())

PasteFiles applies a paste / drop of mime data onto this node. always does a copy of files into / onto target. externalDrop is true if this is an externally-generated Drop event (from OS)

func (*Node) ReadDir

func (fn *Node) ReadDir(path string) error

ReadDir reads all the files at given directory into this directory node -- uses config children to preserve extra info already stored about files. The root node represents the directory at the given path. Returns os.Stat error if path cannot be accessed.

func (*Node) RelPath

func (fn *Node) RelPath(fpath core.Filename) string

RelPath returns the relative path from node for given full path

func (*Node) RemoveFromExterns

func (fn *Node) RemoveFromExterns()

RemoveFromExterns removes file from list of external files

func (*Node) RenameFile

func (fn *Node) RenameFile(newpath string) error

RenameFile renames file to new name

func (*Node) RenameFiles

func (fn *Node) RenameFiles()

renames any selected files

func (*Node) Repo

func (fn *Node) Repo() (vcs.Repo, *Node)

Repo returns the version control repository associated with this file, and the node for the directory where the repo is based. Goes up the tree until a repository is found.

func (*Node) RevertVCS

func (fn *Node) RevertVCS() (err error)

RevertVCS reverts file changes since last commit

func (*Node) RevertVCSSel

func (fn *Node) RevertVCSSel()

RevertVCSSel removes selected files from version control system

func (*Node) SetFileIcon

func (fn *Node) SetFileIcon()

func (*Node) SetIcon

func (t *Node) SetIcon(v icons.Icon) *Node

SetIcon sets the [Node.Icon]

func (*Node) SetIconClosed added in v0.0.5

func (t *Node) SetIconClosed(v icons.Icon) *Node

SetIconClosed sets the [Node.IconClosed]

func (*Node) SetIconLeaf added in v0.0.5

func (t *Node) SetIconLeaf(v icons.Icon) *Node

SetIconLeaf sets the [Node.IconLeaf]

func (*Node) SetIconOpen added in v0.0.5

func (t *Node) SetIconOpen(v icons.Icon) *Node

SetIconOpen sets the [Node.IconOpen]

func (*Node) SetIndent

func (t *Node) SetIndent(v units.Value) *Node

SetIndent sets the [Node.Indent]

func (*Node) SetNodePath

func (fn *Node) SetNodePath(path string) error

SetNodePath sets the path for given node and updates it based on associated file

func (*Node) SetOpenDepth

func (t *Node) SetOpenDepth(v int) *Node

SetOpenDepth sets the [Node.OpenDepth]

func (*Node) SetRootView

func (t *Node) SetRootView(v *views.TreeView) *Node

SetRootView sets the [Node.RootView]

func (*Node) SetSelectedNodes

func (t *Node) SetSelectedNodes(v ...views.TreeViewer) *Node

SetSelectedNodes sets the [Node.SelectedNodes]

func (*Node) SetStyles

func (fn *Node) SetStyles()

func (*Node) SetText

func (t *Node) SetText(v string) *Node

SetText sets the [Node.Text]

func (*Node) SetTooltip

func (t *Node) SetTooltip(v string) *Node

SetTooltip sets the [Node.Tooltip]

func (*Node) SetViewIndex added in v0.0.10

func (t *Node) SetViewIndex(v int) *Node

SetViewIndex sets the [Node.ViewIndex]

func (*Node) SetWidgetSize

func (t *Node) SetWidgetSize(v math32.Vector2) *Node

SetWidgetSize sets the [Node.WidgetSize]

func (*Node) ShowFileInfo

func (fn *Node) ShowFileInfo()

Shows file information about selected file(s)

func (*Node) SortBy

func (fn *Node) SortBy(modTime bool)

SortBy determines how to sort the files in the directory -- default is alpha by name, optionally can be sorted by modification time.

func (*Node) SortBys

func (fn *Node) SortBys(modTime bool)

SortBys determines how to sort the selected files in the directory. Default is alpha by name, optionally can be sorted by modification time.

func (*Node) SortConfigByModTime

func (fn *Node) SortConfigByModTime(confg tree.Config)

SortConfigByModTime sorts given config list by mod time

func (*Node) UpdateAllVCS

func (fn *Node) UpdateAllVCS()

UpdateAllVCS does an update on any repositories below this one in file tree

func (*Node) UpdateDir

func (fn *Node) UpdateDir()

UpdateDir updates the directory and all the nodes under it

func (*Node) UpdateNode

func (fn *Node) UpdateNode() error

UpdateNode updates information in node based on its associated file in FPath. This is intended to be called ad-hoc for individual nodes that might need updating -- use ReadDir for mass updates as it is more efficient.

func (*Node) UpdateRepoFiles

func (fn *Node) UpdateRepoFiles()

func (*Node) VCSContextMenu

func (fn *Node) VCSContextMenu(m *core.Scene)

type NodeEmbedder

type NodeEmbedder interface {
	AsNode() *Node
}

NodeEmbedder is an interface that all types that embed Node satisfy

type NodeFlags

type NodeFlags views.TreeViewFlags //enums:bitflag -trim-prefix Node

NodeFlags define bitflags for Node state -- these extend TreeViewFlags and storage is an int64

const (
	// NodeOpen means file is open. For directories, this means that
	// sub-files should be / have been loaded. For files, means that they
	// have been opened e.g., for editing.
	NodeOpen NodeFlags = NodeFlags(views.TreeViewFlagsN) + iota

	// NodeSymLink indicates that file is a symbolic link.
	// File info is all for the target of the symlink.
	NodeSymLink
)
const NodeFlagsN NodeFlags = 7

NodeFlagsN is the highest valid value for type NodeFlags, plus one.

func NodeFlagsValues

func NodeFlagsValues() []NodeFlags

NodeFlagsValues returns all possible values for the type NodeFlags.

func (NodeFlags) BitIndexString

func (i NodeFlags) BitIndexString() string

BitIndexString returns the string representation of this NodeFlags value if it is a bit index value (typically an enum constant), and not an actual bit flag value.

func (NodeFlags) Desc

func (i NodeFlags) Desc() string

Desc returns the description of the NodeFlags value.

func (NodeFlags) HasFlag

func (i NodeFlags) HasFlag(f enums.BitFlag) bool

HasFlag returns whether these bit flags have the given bit flag set.

func (NodeFlags) Int64

func (i NodeFlags) Int64() int64

Int64 returns the NodeFlags value as an int64.

func (NodeFlags) MarshalText

func (i NodeFlags) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*NodeFlags) SetFlag

func (i *NodeFlags) SetFlag(on bool, f ...enums.BitFlag)

SetFlag sets the value of the given flags in these flags to the given value.

func (*NodeFlags) SetInt64

func (i *NodeFlags) SetInt64(in int64)

SetInt64 sets the NodeFlags value from an int64.

func (*NodeFlags) SetString

func (i *NodeFlags) SetString(s string) error

SetString sets the NodeFlags value from its string representation, and returns an error if the string is invalid.

func (*NodeFlags) SetStringOr

func (i *NodeFlags) SetStringOr(s string) error

SetStringOr sets the NodeFlags value from its string representation while preserving any bit flags already set, and returns an error if the string is invalid.

func (NodeFlags) String

func (i NodeFlags) String() string

String returns the string representation of this NodeFlags value.

func (*NodeFlags) UnmarshalText

func (i *NodeFlags) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (NodeFlags) Values

func (i NodeFlags) Values() []enums.Enum

Values returns all possible values for the type NodeFlags.

type NodeNameCount

type NodeNameCount struct {
	Name  string
	Count int
}

NodeNameCount is used to report counts of different string-based things in the file tree

type Tree

type Tree struct {
	Node

	// external files outside the root path of the tree -- abs paths are stored -- these are shown in the first sub-node if present -- use AddExtFile to add and update
	ExtFiles []string `set:"-"`

	// records state of directories within the tree (encoded using paths relative to root),
	// e.g., open (have been opened by the user) -- can persist this to restore prior view of a tree
	Dirs DirFlagMap `set:"-"`

	// if true, then all directories are placed at the top of the tree view
	// otherwise everything is mixed
	DirsOnTop bool

	// type of node to create -- defaults to filetree.Node but can use custom node types
	FileNodeType *types.Type `view:"-" json:"-" xml:"-"`

	// DoubleClickFun is a function to call when a node receives a DoubleClick event.
	// if not set, defaults to OpenEmptyDir() (for folders)
	DoubleClickFun func(e events.Event) `copier:"-" view:"-" json:"-" xml:"-"`

	// if true, we are in midst of an OpenAll call -- nodes should open all dirs
	InOpenAll bool `copier:"-" set:"-"`

	// change notify for all dirs
	Watcher *fsnotify.Watcher `copier:"-" set:"-" view:"-"`

	// channel to close watcher watcher
	DoneWatcher chan bool `copier:"-" set:"-" view:"-"`

	// map of paths that have been added to watcher -- only active if bool = true
	WatchedPaths map[string]bool `copier:"-" set:"-" view:"-"`

	// last path updated by watcher
	LastWatchUpdate string `copier:"-" set:"-" view:"-"`

	// timestamp of last update
	LastWatchTime time.Time `copier:"-" set:"-" view:"-"`

	// Update mutex
	UpdateMu sync.Mutex `copier:"-" set:"-" view:"-"`
}

Tree is the root of a tree representing files in a given directory (and subdirectories thereof), and has some overall management state for how to view things. The Tree can be viewed by a TreeView to provide a GUI interface into it.

func NewTree

func NewTree(parent tree.Node, name ...string) *Tree

NewTree adds a new Tree with the given name to the given parent: Tree is the root of a tree representing files in a given directory (and subdirectories thereof), and has some overall management state for how to view things. The Tree can be viewed by a TreeView to provide a GUI interface into it.

func (*Tree) AddExtFile

func (ft *Tree) AddExtFile(fpath string) (*Node, error)

AddExtFile adds an external file outside of root of file tree and triggers an update, returning the Node for it, or error if filepath.Abs fails.

func (*Tree) ConfigWatcher

func (ft *Tree) ConfigWatcher() error

ConfigWatcher configures a new watcher for tree

func (*Tree) Destroy

func (fv *Tree) Destroy()

func (*Tree) DirSortByModTime

func (ft *Tree) DirSortByModTime(fpath core.Filename) bool

DirSortByModTime returns true if dir is sorted by mod time

func (*Tree) DirSortByName

func (ft *Tree) DirSortByName(fpath core.Filename) bool

DirSortByName returns true if dir is sorted by name

func (*Tree) ExtNodeByPath

func (ft *Tree) ExtNodeByPath(fpath string) (*Node, error)

ExtNodeByPath returns Node for given file path, and true, if it exists in the external files list. Otherwise returns nil, false.

func (*Tree) HasExtFile

func (ft *Tree) HasExtFile(fpath string) (bool, int)

HasExtFile returns true and index if given abs path exists on ExtFiles list. false and -1 if not.

func (*Tree) IsDirOpen

func (ft *Tree) IsDirOpen(fpath core.Filename) bool

IsDirOpen returns true if given directory path is open (i.e., has been opened in the view)

func (*Tree) New

func (t *Tree) New() tree.Node

New returns a new *Tree value

func (*Tree) NodeType

func (t *Tree) NodeType() *types.Type

NodeType returns the *types.Type of Tree

func (*Tree) OnInit

func (ft *Tree) OnInit()

func (*Tree) OpenPath

func (ft *Tree) OpenPath(path string)

OpenPath opens a filetree at given directory path -- reads all the files at given path into this tree -- uses config children to preserve extra info already stored about files. Only paths listed in Dirs will be opened.

func (*Tree) RemoveExtFile

func (ft *Tree) RemoveExtFile(fpath string) bool

RemoveExtFile removes external file from maintained list, returns true if removed

func (*Tree) SetDirClosed

func (ft *Tree) SetDirClosed(fpath core.Filename)

SetDirClosed sets the given directory path to be closed

func (*Tree) SetDirOpen

func (ft *Tree) SetDirOpen(fpath core.Filename)

SetDirOpen sets the given directory path to be open

func (*Tree) SetDirSortBy

func (ft *Tree) SetDirSortBy(fpath core.Filename, modTime bool)

SetDirSortBy sets the given directory path sort by option

func (*Tree) SetDirsOnTop

func (t *Tree) SetDirsOnTop(v bool) *Tree

SetDirsOnTop sets the [Tree.DirsOnTop]: if true, then all directories are placed at the top of the tree view otherwise everything is mixed

func (*Tree) SetDoubleClickFun

func (t *Tree) SetDoubleClickFun(v func(e events.Event)) *Tree

SetDoubleClickFun sets the [Tree.DoubleClickFun]: DoubleClickFun is a function to call when a node receives a DoubleClick event. if not set, defaults to OpenEmptyDir() (for folders)

func (*Tree) SetFileNodeType added in v0.0.10

func (t *Tree) SetFileNodeType(v *types.Type) *Tree

SetFileNodeType sets the [Tree.FileNodeType]: type of node to create -- defaults to filetree.Node but can use custom node types

func (*Tree) SetIcon

func (t *Tree) SetIcon(v icons.Icon) *Tree

SetIcon sets the [Tree.Icon]

func (*Tree) SetIconClosed added in v0.0.5

func (t *Tree) SetIconClosed(v icons.Icon) *Tree

SetIconClosed sets the [Tree.IconClosed]

func (*Tree) SetIconLeaf added in v0.0.5

func (t *Tree) SetIconLeaf(v icons.Icon) *Tree

SetIconLeaf sets the [Tree.IconLeaf]

func (*Tree) SetIconOpen added in v0.0.5

func (t *Tree) SetIconOpen(v icons.Icon) *Tree

SetIconOpen sets the [Tree.IconOpen]

func (*Tree) SetIndent

func (t *Tree) SetIndent(v units.Value) *Tree

SetIndent sets the [Tree.Indent]

func (*Tree) SetOpenDepth

func (t *Tree) SetOpenDepth(v int) *Tree

SetOpenDepth sets the [Tree.OpenDepth]

func (*Tree) SetRootView

func (t *Tree) SetRootView(v *views.TreeView) *Tree

SetRootView sets the [Tree.RootView]

func (*Tree) SetSelectedNodes

func (t *Tree) SetSelectedNodes(v ...views.TreeViewer) *Tree

SetSelectedNodes sets the [Tree.SelectedNodes]

func (*Tree) SetText

func (t *Tree) SetText(v string) *Tree

SetText sets the [Tree.Text]

func (*Tree) SetTooltip

func (t *Tree) SetTooltip(v string) *Tree

SetTooltip sets the [Tree.Tooltip]

func (*Tree) SetViewIndex added in v0.0.10

func (t *Tree) SetViewIndex(v int) *Tree

SetViewIndex sets the [Tree.ViewIndex]

func (*Tree) SetWidgetSize

func (t *Tree) SetWidgetSize(v math32.Vector2) *Tree

SetWidgetSize sets the [Tree.WidgetSize]

func (*Tree) UnWatchPath

func (ft *Tree) UnWatchPath(path core.Filename)

UnWatchPath removes given path from those watched

func (*Tree) UpdateAll

func (ft *Tree) UpdateAll()

UpdateAll does a full update of the tree -- calls ReadDir on current path

func (*Tree) UpdateExtFiles

func (ft *Tree) UpdateExtFiles(efn *Node)

UpdateExtFiles returns a type-and-name list for configuring nodes for ExtFiles

func (*Tree) UpdatePath

func (ft *Tree) UpdatePath(path string)

UpdatePath updates the tree at the directory level for given path and everything below it. It flags that it needs render update, but if a deletion or insertion happened, then NeedsLayout should also be called.

func (*Tree) WatchPath

func (ft *Tree) WatchPath(path core.Filename) error

WatchPath adds given path to those watched

func (*Tree) WatchUpdate added in v0.0.10

func (ft *Tree) WatchUpdate(path string)

WatchUpdate does the update for given path

func (*Tree) WatchWatcher

func (ft *Tree) WatchWatcher()

WatchWatcher monitors the watcher channel for update events. It must be called once some paths have been added to watcher -- safe to call multiple times.

type VCSLogView

type VCSLogView struct {
	core.Layout

	// current log
	Log vcs.Log

	// file that this is a log of -- if blank then it is entire repository
	File string

	// date expression for how long ago to include log entries from
	Since string

	// version control system repository
	Repo vcs.Repo `json:"-" xml:"-" copier:"-"`

	// revision A -- defaults to HEAD
	RevA string `set:"-"`

	// revision B -- blank means current working copy
	RevB string `set:"-"`

	// double-click will set the A revision -- else B
	SetA bool
}

VCSLogView is a view of the VCS log data

func NewVCSLogView

func NewVCSLogView(parent tree.Node, name ...string) *VCSLogView

NewVCSLogView adds a new VCSLogView with the given name to the given parent: VCSLogView is a view of the VCS log data

func (*VCSLogView) ConfigRepo

func (lv *VCSLogView) ConfigRepo(repo vcs.Repo, lg vcs.Log, file, since string)

ConfigRepo configures to given repo, log and file (file could be empty)

func (*VCSLogView) ConfigToolbar

func (lv *VCSLogView) ConfigToolbar()

ConfigToolbar

func (*VCSLogView) New

func (t *VCSLogView) New() tree.Node

New returns a new *VCSLogView value

func (*VCSLogView) NodeType added in v0.0.10

func (t *VCSLogView) NodeType() *types.Type

NodeType returns the *types.Type of VCSLogView

func (*VCSLogView) OnInit

func (lv *VCSLogView) OnInit()

func (*VCSLogView) SetFile

func (t *VCSLogView) SetFile(v string) *VCSLogView

SetFile sets the [VCSLogView.File]: file that this is a log of -- if blank then it is entire repository

func (*VCSLogView) SetLog

func (t *VCSLogView) SetLog(v vcs.Log) *VCSLogView

SetLog sets the [VCSLogView.Log]: current log

func (*VCSLogView) SetRepo

func (t *VCSLogView) SetRepo(v vcs.Repo) *VCSLogView

SetRepo sets the [VCSLogView.Repo]: version control system repository

func (*VCSLogView) SetRevA

func (lv *VCSLogView) SetRevA(rev string)

SetRevA sets the revision to use for buffer A

func (*VCSLogView) SetRevB

func (lv *VCSLogView) SetRevB(rev string)

SetRevB sets the revision to use for buffer B

func (*VCSLogView) SetSetA

func (t *VCSLogView) SetSetA(v bool) *VCSLogView

SetSetA sets the [VCSLogView.SetA]: double-click will set the A revision -- else B

func (*VCSLogView) SetSince

func (t *VCSLogView) SetSince(v string) *VCSLogView

SetSince sets the [VCSLogView.Since]: date expression for how long ago to include log entries from

func (*VCSLogView) SetTooltip

func (t *VCSLogView) SetTooltip(v string) *VCSLogView

SetTooltip sets the [VCSLogView.Tooltip]

func (*VCSLogView) TableView

func (lv *VCSLogView) TableView() *views.TableView

TableView returns the tableview

func (*VCSLogView) ToggleRev

func (lv *VCSLogView) ToggleRev()

ToggleRev switches the active revision to set

func (*VCSLogView) Toolbar

func (lv *VCSLogView) Toolbar() *core.Toolbar

Toolbar returns the toolbar

type VersionControlName added in v0.0.8

type VersionControlName string

VersionControlName is the name of a version control system

func VersionControlNameProper added in v0.0.8

func VersionControlNameProper(vc string) VersionControlName

func (VersionControlName) Value added in v0.0.8

func (kn VersionControlName) Value() views.Value

Value registers VersionControlValue as the views.Value for VersionControlName

type VersionControlValue added in v0.0.8

type VersionControlValue struct {
	views.ValueBase[*core.Button]
}

VersionControlValue represents a VersionControlName with a button.

func (*VersionControlValue) Config added in v0.0.8

func (v *VersionControlValue) Config()

func (*VersionControlValue) OpenDialog added in v0.0.8

func (v *VersionControlValue) OpenDialog(ctx core.Widget, fun func())

func (*VersionControlValue) Update added in v0.0.8

func (v *VersionControlValue) Update()

Jump to

Keyboard shortcuts

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