gide

package
v2.0.0-dev0.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: BSD-3-Clause Imports: 54 Imported by: 0

Documentation

Overview

Package gide provides all the gide infrastructure and supporting gui for filetree, commands, console, and 2-sequence key functions, preferences, splitviews, etc.

GideView is in a separate gidev directory so that other packages can tap into the gide infrastructure, and be callable directly from the GideView editor, without creating circular import problems.

Index

Constants

View Source
const (
	CmdWait      = true
	CmdNoWait    = false
	CmdFocus     = true
	CmdNoFocus   = false
	CmdConfirm   = true
	CmdNoConfirm = false
)

Use these for more obvious command options

View Source
const (
	// Version is the version of this package being used
	Version = "v2.0.0-dev0.0.14"
	// GitCommit is the commit just before the latest version commit
	GitCommit = "dcd6cab"
	// VersionDate is the date-time of the latest version commit in UTC (in the format 'YYYY-MM-DD HH:MM', which is the Go format '2006-01-02 15:04')
	VersionDate = "2023-12-26 23:38"
)

Variables

View Source
var (
	// SavedPaths is a slice of strings that are file paths
	SavedPaths gi.FilePaths

	// SavedPathsFileName is the name of the saved file paths file in GoGi prefs directory
	SavedPathsFileName = "gide_saved_paths.json"

	// GideViewResetRecents defines a string that is added as an item to the recents menu
	GideViewResetRecents = "<i>Reset Recents</i>"

	// GideViewEditRecents defines a string that is added as an item to the recents menu
	GideViewEditRecents = "<i>Edit Recents...</i>"

	// SavedPathsExtras are the reset and edit items we add to the recents menu
	SavedPathsExtras = []string{gi.MenuTextSeparator, GideViewResetRecents, GideViewEditRecents}
)
View Source
var ArgVars = map[string]ArgVarInfo{

	"{FilePath}":       {"Current file name with full path.", ArgVarFile},
	"{FileName}":       {"Current file name only, without path.", ArgVarFile},
	"{FileExt}":        {"Extension of current file name.", ArgVarExt},
	"{FileExtLC}":      {"Extension of current file name, lowercase.", ArgVarExt},
	"{FileNameNoExt}":  {"Current file name without path and extension.", ArgVarFile},
	"{FileDir}":        {"Name only of current file's directory.", ArgVarDir},
	"{FileDirPath}":    {"Full path to current file's directory.", ArgVarDir},
	"{FileDirProjRel}": {"Path to current file's directory relative to project root.", ArgVarDir},

	"{ProjDir}":  {"Current project directory name, without full path.", ArgVarDir},
	"{ProjPath}": {"Full path to current project directory.", ArgVarDir},

	"{BuildDir}":    {"Full path to BuildDir specified in project prefs -- the default Build.", ArgVarDir},
	"{BuildDirRel}": {"Path to BuildDir relative to project root.", ArgVarDir},

	"{BuildTarg}":           {"Build target specified in prefs BuildTarg, just filename by itself, without path.", ArgVarFile},
	"{BuildTargPath}":       {"Full path to build target specified in prefs BuildTarg.", ArgVarFile},
	"{BuildTargDirPath}":    {"Full path to build target directory, without filename.", ArgVarDir},
	"{BuildTargDirPathRel}": {"Project-relative path to build target directory, without filename.", ArgVarDir},

	"{RunExec}":           {"Run-time executable file RunExec specified in project prefs -- just the raw name of the file, without path.", ArgVarFile},
	"{RunExecPath}":       {"Full path to the run-time executable file RunExec specified in project prefs.", ArgVarFile},
	"{RunExecDirPath}":    {"Full path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir},
	"{RunExecDirPathRel}": {"Project-root relative path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir},

	"{CurLine}":      {"Cursor current line number (starts at 1).", ArgVarPos},
	"{CurCol}":       {"Cursor current column number (starts at 0).", ArgVarPos},
	"{SelStartLine}": {"Selection starting line (same as CurLine if no selection).", ArgVarPos},
	"{SelStartCol}":  {"Selection starting column (same as CurCol if no selection).", ArgVarPos},
	"{SelEndLine}":   {"Selection ending line (same as CurLine if no selection).", ArgVarPos},
	"{SelEndCol}":    {"Selection ending column (same as CurCol if no selection).", ArgVarPos},

	"{CurSel}":      {"Currently selected text.", ArgVarText},
	"{CurLineText}": {"Current line text under cursor.", ArgVarText},
	"{CurWord}":     {"Current word under cursor.", ArgVarText},

	"{PromptFilePath}":       {"Prompt user for a file, and this is the full path to that file.", ArgVarPrompt},
	"{PromptFileName}":       {"Prompt user for a file, and this is the filename (only) of that file.", ArgVarPrompt},
	"{PromptFileDir}":        {"Prompt user for a file, and this is the directory name (only) of that file.", ArgVarPrompt},
	"{PromptFileDirPath}":    {"Prompt user for a file, and this is the full path to that directory.", ArgVarPrompt},
	"{PromptFileDirProjRel}": {"Prompt user for a file, and this is the path of that directory relative to the project root.", ArgVarPrompt},
	"{PromptString1}":        {"Prompt user for a string -- this is it.", ArgVarPrompt},
	"{PromptString2}":        {"Prompt user for another string -- this is it.", ArgVarPrompt},
	"{PromptBranch}":         {"Prompt user for a VCS branch.", ArgVarPrompt},
}

ArgVars are variables that can be used for arguments to commands in CmdAndArgs

View Source
var AvailKeyMapsChanged = false

AvailKeyMapsChanged is used to update giv.KeyMapsView toolbars via following menu, toolbar props update methods -- not accurate if editing any other map but works for now..

View Source
var AvailLangsChanged = false

AvailLangsChanged is used to update giv.LangsView toolbars via following menu, toolbar props update methods -- not accurate if editing any other map but works for now..

View Source
var AvailRegisterNames []string

AvailRegisterNames are the names of the current AvailRegisters -- used for some choosers

View Source
var AvailRegistersChanged = false

AvailRegistersChanged is used to update toolbars via following menu, toolbar props update methods -- not accurate if editing any other map but works for now..

View Source
var AvailSplitNames []string

AvailSplitNames are the names of the current AvailSplits -- used for some choosers

View Source
var AvailSplitsChanged = false

AvailSplitsChanged is used to update toolbars via following menu, toolbar props update methods -- not accurate if editing any other map but works for now..

View Source
var BreakViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.BreakView",
	ShortName:  "gide.BreakView",
	IDName:     "break-view",
	Doc:        "BreakView is a view of the breakpoints",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &BreakView{},
})

BreakViewType is the gti.Type for BreakView

View Source
var CmdNoUserPrompt bool

CmdNoUserPrompt can be set to true to prevent user from being prompted for strings this is useful when a custom outer-loop has already set the string values. this will be reset automatically after command is run.

View Source
var CmdOutStatusLen = 80

CmdOutStatusLen is amount of command output to include in the status update

View Source
var CmdPrompt1Vals = map[string]string{}

CmdPrompt1Vals holds last values for PromptString1 per command, so that each such command has its own appropriate history

View Source
var CmdPrompt2Vals = map[string]string{}

CmdPrompt2Vals holds last values for PromptString2 per command, so that each such command has its own appropriate history

View Source
var CmdWaitOverride bool

CmdWaitOverride will cause the next commands that are run to be in wait mode (sequentially, waiting for completion after each), instead of running each in a separate process as is typical. Don't forget to reset it after commands. This is important when running multiple of the same command, to prevent collisions in the output buffer.

View Source
var CustomCmds = Commands{}

CustomCmds is user-specific list of commands saved in preferences available for all Gide projects. These will override StdCmds with the same names.

View Source
var CustomCmdsChanged = false

CustomCmdsChanged is used to update giv.CmdsView toolbars via following menu, toolbar props update methods.

View Source
var DebugBreakColors = [DebugBreakStatusN]string{"pink", "red", "orange", "lightblue"}

DebugBreakColors are the colors indicating different breakpoint statuses

View Source
var DebugStatusColors = map[gidebug.Status]string{
	gidebug.NotInit:    "grey",
	gidebug.Error:      "#FF8080",
	gidebug.Building:   "yellow",
	gidebug.Ready:      "#80FF80",
	gidebug.Running:    "#FF80FF",
	gidebug.Stopped:    "#8080FF",
	gidebug.Breakpoint: "#8080FF",
	gidebug.Finished:   "tan",
}
View Source
var DebugViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.DebugView",
	ShortName:  "gide.DebugView",
	IDName:     "debug-view",
	Doc:        "DebugView is the debugger",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Sup", &gti.Field{Name: "Sup", Type: "goki.dev/fi.Known", LocalType: "fi.Known", Doc: "supported file type to determine debugger", Directives: gti.Directives{}, Tag: ""}},
		{"ExePath", &gti.Field{Name: "ExePath", Type: "string", LocalType: "string", Doc: "path to executable / dir to debug", Directives: gti.Directives{}, Tag: ""}},
		{"DbgTime", &gti.Field{Name: "DbgTime", Type: "time.Time", LocalType: "time.Time", Doc: "time when dbg was last restarted", Directives: gti.Directives{}, Tag: ""}},
		{"Dbg", &gti.Field{Name: "Dbg", Type: "goki.dev/gide/v2/gidebug.GiDebug", LocalType: "gidebug.GiDebug", Doc: "the debugger", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"State", &gti.Field{Name: "State", Type: "goki.dev/gide/v2/gidebug.AllState", LocalType: "gidebug.AllState", Doc: "all relevant debug state info", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"CurFileLoc", &gti.Field{Name: "CurFileLoc", Type: "goki.dev/gide/v2/gidebug.Location", LocalType: "gidebug.Location", Doc: "current ShowFile location -- cleared before next one or run", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"BBreaks", &gti.Field{Name: "BBreaks", Type: "[]*goki.dev/gide/v2/gidebug.Break", LocalType: "[]*gidebug.Break", Doc: "backup breakpoints list -- to track deletes", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"OutBuf", &gti.Field{Name: "OutBuf", Type: "*goki.dev/gi/v2/texteditor.Buf", LocalType: "*texteditor.Buf", Doc: "output from the debugger", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"Gide", &gti.Field{Name: "Gide", Type: "goki.dev/gide/v2/gide.Gide", LocalType: "Gide", Doc: "parent gide project", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &DebugView{},
})

DebugViewType is the gti.Type for DebugView

View Source
var Debuggers = map[fi.Known]func(path, rootPath string, outbuf *texteditor.Buf, pars *gidebug.Params) (gidebug.GiDebug, error){
	fi.Go: func(path, rootPath string, outbuf *texteditor.Buf, pars *gidebug.Params) (gidebug.GiDebug, error) {
		return gidelve.NewGiDelve(path, rootPath, outbuf, pars)
	},
}

Debuggers is the list of supported debuggers

View Source
var DefaultKeyMap = KeyMapName("MacEmacs")

DefaultKeyMap is the overall default keymap -- reinitialized in gimain init() depending on platform

View Source
var FileNodeType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.FileNode",
	ShortName:  "gide.FileNode",
	IDName:     "file-node",
	Doc:        "FileNode is Gide version of FileNode for FileTree view",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Node", &gti.Field{Name: "Node", Type: "goki.dev/gi/v2/filetree.Node", LocalType: "filetree.Node", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods: ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{
		{"ExecCmdFile", &gti.Method{Name: "ExecCmdFile", Doc: "ExecCmdFile pops up a menu to select a command appropriate for the given node,\nand shows output in MainTab with name of command", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"EditFiles", &gti.Method{Name: "EditFiles", Doc: "EditFiles calls EditFile on selected files", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"SetRunExecs", &gti.Method{Name: "SetRunExecs", Doc: "SetRunExecs sets executable as the RunExec executable that will be run with Run / Debug buttons", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
	}),
	Instance: &FileNode{},
})

FileNodeType is the gti.Type for FileNode

View Source
var FindViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.FindView",
	ShortName:  "gide.FindView",
	IDName:     "find-view",
	Doc:        "FindView is a find / replace widget that displays results in a TextEditor\nand has a toolbar for controlling find / replace process.",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Gide", &gti.Field{Name: "Gide", Type: "goki.dev/gide/v2/gide.Gide", LocalType: "Gide", Doc: "parent gide project", Directives: gti.Directives{}, Tag: "json:\"-\" xml:\"-\""}},
		{"LangVV", &gti.Field{Name: "LangVV", Type: "goki.dev/gi/v2/giv.Value", LocalType: "giv.Value", Doc: "langs value view", Directives: gti.Directives{}, Tag: ""}},
		{"Time", &gti.Field{Name: "Time", Type: "time.Time", LocalType: "time.Time", Doc: "time of last find", Directives: gti.Directives{}, Tag: ""}},
		{"Re", &gti.Field{Name: "Re", Type: "*regexp.Regexp", LocalType: "*regexp.Regexp", Doc: "compiled regexp", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &FindView{},
})

FindViewType is the gti.Type for FindView

View Source
var GideType = reflect.TypeOf((*Gide)(nil)).Elem()

GideType is a Gide reflect.Type, suitable for checking for Type.Implements.

View Source
var Needs2KeyMap keyfun.Map

Needs2KeyMap is a map of the starting key sequences that require a second key -- auto-generated from active keymap

View Source
var Prefs = Preferences{}

Prefs are the overall Gide preferences

View Source
var PrefsCmdsFileName = "command_prefs.toml"

PrefsCmdsFileName is the name of the preferences file in App prefs directory for saving / loading your CustomCmds commands list

View Source
var PrefsFileName = "gide_prefs.toml"

PrefsFileName is the name of the preferences file in GoGi prefs directory

View Source
var PrefsKeyMapsFileName = "key_maps_prefs.json"

PrefsKeyMapsFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailKeyMaps key maps list

View Source
var PrefsLangsFileName = "lang_prefs.toml"

PrefsLangsFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailLangs languages list

View Source
var PrefsRegistersFileName = "registers_prefs.toml"

PrefsRegistersFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailRegisters

View Source
var PrefsSplitsFileName = "splits_prefs.json"

PrefsSplitsFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailSplits

View Source
var SpellViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.SpellView",
	ShortName:  "gide.SpellView",
	IDName:     "spell-view",
	Doc:        "SpellView is a widget that displays results of spell check",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Gide", &gti.Field{Name: "Gide", Type: "goki.dev/gide/v2/gide.Gide", LocalType: "Gide", Doc: "parent gide project", Directives: gti.Directives{}, Tag: "json:\"-\" xml:\"-\" copy:\"-\""}},
		{"Text", &gti.Field{Name: "Text", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*TextEditor", Doc: "textview that we're spell-checking", Directives: gti.Directives{}, Tag: "json:\"-\" xml:\"-\" copy:\"-\""}},
		{"Errs", &gti.Field{Name: "Errs", Type: "goki.dev/pi/v2/lex.Line", LocalType: "lex.Line", Doc: "current spelling errors", Directives: gti.Directives{}, Tag: ""}},
		{"CurLn", &gti.Field{Name: "CurLn", Type: "int", LocalType: "int", Doc: "current line in text we're on", Directives: gti.Directives{}, Tag: ""}},
		{"CurIdx", &gti.Field{Name: "CurIdx", Type: "int", LocalType: "int", Doc: "current index in Errs we're on", Directives: gti.Directives{}, Tag: ""}},
		{"UnkLex", &gti.Field{Name: "UnkLex", Type: "goki.dev/pi/v2/lex.Lex", LocalType: "lex.Lex", Doc: "current unknown lex token", Directives: gti.Directives{}, Tag: ""}},
		{"UnkWord", &gti.Field{Name: "UnkWord", Type: "string", LocalType: "string", Doc: "current unknown word", Directives: gti.Directives{}, Tag: ""}},
		{"Suggest", &gti.Field{Name: "Suggest", Type: "[]string", LocalType: "[]string", Doc: "a list of suggestions from spell checker", Directives: gti.Directives{}, Tag: ""}},
		{"LastAction", &gti.Field{Name: "LastAction", Type: "*goki.dev/gi/v2/gi.Button", LocalType: "*gi.Button", Doc: "last user action (ignore, change, learn)", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &SpellView{},
})

SpellViewType is the gti.Type for SpellView

View Source
var StackViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.StackView",
	ShortName:  "gide.StackView",
	IDName:     "stack-view",
	Doc:        "StackView is a view of the stack trace",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"FindFrames", &gti.Field{Name: "FindFrames", Type: "bool", LocalType: "bool", Doc: "if true, this is a find frames, not a regular stack", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &StackView{},
})

StackViewType is the gti.Type for StackView

View Source
var StdCmds = Commands{
	{Cat: "Build", Name: "Run Proj",
		Desc: "run RunExec executable set in project",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "{RunExecPath}"}},
		Dir:  "{RunExecDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},
	{Cat: "Build", Name: "Run Prompt",
		Desc: "run any command you enter at the prompt",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "{PromptString1}"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Build", Name: "Make",
		Desc: "run make with no args",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "make"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Build", Name: "Make Prompt",
		Desc: "run make with prompted make target",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "make",
			Args: []string{"{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "File", Name: "Grep",
		Desc: "recursive grep of all files for prompted value",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "grep",
			Args: []string{"-R", "-e", "{PromptString1}", "{FileDirPath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "File", Name: "Open",
		Desc: "open file using OS 'open' command",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "open",
			Args: []string{"{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "File", Name: "Open Target",
		Desc: "open project target file using OS 'open' command",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "open",
			Args: []string{"{RunExecPath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Imports File",
		Desc: "run goimports on file",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "goimports",
			Args: []string{"-w", "{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Fmt File",
		Desc: "run go fmt on file",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "gofmt",
			Args: []string{"-w", "{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Build Dir",
		Desc: "run go build to build in current dir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"build", "-v"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Build Proj",
		Desc: "run go build for project BuildDir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"build", "-v"}}},
		Dir:  "{BuildDir}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Install Dir",
		Desc: "run go install in current dir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"install", "-v"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Generate",
		Desc: "run go generate in current dir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"generate"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Test",
		Desc: "run go test in current dir.  Options include: -run TestName or -bench",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"test", "-v", "{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Vet",
		Desc: "run go vet in current dir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"vet"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Mod Tidy",
		Desc: "run go mod tidy in current dir",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"mod", "tidy"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Mod Init",
		Desc: "run go mod init in current dir with module path from prompt",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"mod", "init", "{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Get",
		Desc: "run go get on package(s) you enter at prompt",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args: []string{"get", "{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Go", Name: "Get Updt",
		Desc: "run go get -u (updt) on package(s) you enter at prompt.  use ./... for all.",
		Lang: fi.Go,
		Cmds: []CmdAndArgs{{Cmd: "go",
			Args:    []string{"get", "-u", "{PromptString1}"},
			Default: "./..."}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Add",
		Desc: "git add file",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"add", "{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Switch To Branch",
		Desc: "git switch to an existing branch",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"switch", "{PromptBranch}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Switch",
		Desc: "git switch to new branch or existing commit: -c or -C (force) <branch> to create new; --detatch <commit> to switch to older (non-HEAD) commit; --orphan to abandon history",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"switch", "{PromptString1}"},
			Default: "-c "}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Restore",
		Desc: "git restore: file, directory -- undoes any current changes and restores from last commit; -s option specifies source -- also available as revert in file view",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"restore", "{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Checkout",
		Desc: "git checkout: file, directory, branch; -b <branch> creates a new branch",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"checkout", "{PromptString1}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Status",
		Desc: "git status",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"status"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Diff",
		Desc: "git diff -- see changes since last checkin",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"diff"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm, Hilight: fi.Diff},

	{Cat: "Git", Name: "Log",
		Desc: "git log",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"log"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Commit",
		Desc: "git commit",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"commit", "-am", "{PromptString1}"}, PromptIsString: true}},
		Dir:  "{FileDirPath}",
		Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Pull Branch",
		Desc: "git pull from existing branch",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"pull", "origin", "{PromptBranch}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Pull",
		Desc: "git pull",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"pull", "{PromptString1}"},
			Default: "origin"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Push",
		Desc: "git push to update remote (origin) for given branch",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"push", "origin", "{PromptBranch}"},
			Default: "origin"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Push Force",
		Desc: "git push to update remote (origin) for given branch -- force -- needed for example after rebase or merge with conflicts",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"push", "--force", "origin", "{PromptBranch}"},
			Default: "origin"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Stash",
		Desc: "git stash: push / pop local changes for later without committing, resetting to HEAD: also list, show, drop, clear",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"stash", "{PromptString1}"},
			Default: "push"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Branch",
		Desc: "git branch: -a shows all; --list shows local; <branchname> makes a new one, optionally given sha; -d to delete; -r delete remote; -D force delete",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"branch", "{PromptString1}"},
			Default: "-a"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Branch Delete",
		Desc: "git branch -d -r selected branch name",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"branch", "-d", "-r", "{PromptBranch}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Rebase",
		Desc: "git rebase: updates current branch to given branch, often master",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"rebase", "{PromptBranch}"},
			Default: "master"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Rebase Continue",
		Desc: "git rebase: updates current branch to given branch, often master -- does --continue to continue process",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args: []string{"rebase", "--continue"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Reset",
		Desc: "git reset: resets current state to given source -- use --hard to override -- CAN RESULT IN LOSS OF CHANGES -- make sure everything is committed",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"reset", "{PromptString1}"},
			Default: "--hard origin/master"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Remote",
		Desc: "git remote: prune origin = remove stale branches; show; add <name> <URL>; remove <name>; get-url / set-url <name>",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "git",
			Args:    []string{"remote", "{PromptString1}"},
			Default: "prune origin"}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Git", Name: "Count LOC",
		Desc: "runs bash -c git ls-files with command sequence that counts lines of code in git repository -- edit with extra | grep steps to filter accordingly",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "bash",
			Args:    []string{"-c", "{PromptString1}"},
			Default: `"git ls-files | xargs wc -l"`}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Add",
		Desc: "svn add file",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"add", "{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Status",
		Desc: "svn status",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"status"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Info",
		Desc: "svn info",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"info"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Log",
		Desc: "svn log",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"log", "-v"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Commit Proj",
		Desc: "svn commit for entire project directory",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"commit", "-m", "{PromptString1}"}, PromptIsString: true}},
		Dir:  "{ProjPath}",
		Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Commit Dir",
		Desc: "svn commit in directory of current file",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"commit", "-m", "{PromptString1}"}, PromptIsString: true}},
		Dir:  "{FileDirPath}",
		Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "SVN", Name: "Update",
		Desc: "svn update",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "svn",
			Args: []string{"update"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "LaTeX", Name: "LaTeX PDF",
		Desc: "run PDFLaTeX on file",
		Lang: fi.TeX,
		Cmds: []CmdAndArgs{{Cmd: "pdflatex",
			Args: []string{"-file-line-error", "-interaction=nonstopmode", "{FilePath}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "LaTeX", Name: "BibTeX",
		Desc: "run BibTeX on file",
		Lang: fi.TeX,
		Cmds: []CmdAndArgs{{Cmd: "bibtex",
			Args: []string{"{FileNameNoExt}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "LaTeX", Name: "Biber",
		Desc: "run Biber on file",
		Lang: fi.TeX,
		Cmds: []CmdAndArgs{{Cmd: "biber",
			Args: []string{"{FileNameNoExt}"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "LaTeX", Name: "CleanTeX",
		Desc: "remove aux LaTeX files",
		Lang: fi.TeX,
		Cmds: []CmdAndArgs{{Cmd: "rm",
			Args: []string{"*.aux", "*.log", "*.blg", "*.bbl", "*.fff", "*.lof", "*.ttt", "*.toc", "*.spl"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Goki", Name: "Version-Release",
		Desc: "increments the patch-level version number and pushes a release tag at this new version",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "goki",
			Args: []string{"version-release"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Goki", Name: "Update Version",
		Desc: "increments the patch-level version number",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "goki",
			Args: []string{"update-version"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Goki", Name: "Release",
		Desc: "pushes a release tag at current version",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "goki",
			Args: []string{"release"}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "Goki", Name: "Generate All",
		Desc: "runs goki generate ./... to update all generated files in current dir and below",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "goki",
			Args: []string{"generate", "./..."}}},
		Dir:  "{FileDirPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "GSM", Name: "Changed",
		Desc: "show which packages are changed, at the root project level",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "gsm",
			Args: []string{"changed"}}},
		Dir:  "{ProjPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},

	{Cat: "GSM", Name: "Pull",
		Desc: "pull all packages at the root project level",
		Lang: fi.Any,
		Cmds: []CmdAndArgs{{Cmd: "gsm",
			Args: []string{"pull"}}},
		Dir:  "{ProjPath}",
		Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm},
}

StdCmds is the original compiled-in set of standard commands.

View Source
var StdKeyMaps = KeyMaps{
	{"MacStd", "Standard Mac KeyMap", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+M", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+M", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+M", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+M", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+O", ""}:          KeyFunFileOpen,
		KeySeq{"Control+M", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+M", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+M", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+M", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+S", ""}:          KeyFunBufSave,
		KeySeq{"Shift+Control+S", ""}:    KeyFunBufSaveAs,
		KeySeq{"Control+M", "s"}:         KeyFunBufSave,
		KeySeq{"Control+M", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+M", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+M", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+M", "k"}:         KeyFunBufClose,
		KeySeq{"Control+M", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+M", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+M", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+M", "n"}:         KeyFunBufClone,
		KeySeq{"Control+M", "Control+N"}: KeyFunBufClone,
		KeySeq{"Control+M", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+M", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+M", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+M", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+M", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+/", ""}:          KeyFunCommentOut,
		KeySeq{"Control+M", "t"}:         KeyFunCommentOut,
		KeySeq{"Control+M", "Control+T"}: KeyFunCommentOut,
		KeySeq{"Control+M", "i"}:         KeyFunIndent,
		KeySeq{"Control+M", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+M", "j"}:         KeyFunJump,
		KeySeq{"Control+M", "Control+J"}: KeyFunJump,
		KeySeq{"Control+M", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+M", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+M", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+M", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+M", "r"}:         KeyFunRunProj,
		KeySeq{"Control+M", "Control+R"}: KeyFunRunProj,
	}},
	{"MacEmacs", "Mac with emacs-style navigation -- emacs wins in conflicts", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+X", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+X", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+X", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+X", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+X", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+X", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+X", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+X", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+X", "s"}:         KeyFunBufSave,
		KeySeq{"Control+X", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+X", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+X", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+X", "k"}:         KeyFunBufClose,
		KeySeq{"Control+X", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+X", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+X", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+C", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+C", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+C", "o"}:         KeyFunBufClone,
		KeySeq{"Control+C", "Control+O"}: KeyFunBufClone,
		KeySeq{"Control+X", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+X", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+X", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+X", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+X", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+C", "k"}:         KeyFunCommentOut,
		KeySeq{"Control+C", "Control+K"}: KeyFunCommentOut,
		KeySeq{"Control+X", "i"}:         KeyFunIndent,
		KeySeq{"Control+X", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+X", "j"}:         KeyFunJump,
		KeySeq{"Control+X", "Control+J"}: KeyFunJump,
		KeySeq{"Control+X", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+X", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+X", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+X", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+X", "r"}:         KeyFunRunProj,
		KeySeq{"Control+X", "Control+R"}: KeyFunRunProj,
	}},
	{"LinuxEmacs", "Linux with emacs-style navigation -- emacs wins in conflicts", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+X", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+X", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+X", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+X", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+X", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+X", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+X", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+X", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+X", "s"}:         KeyFunBufSave,
		KeySeq{"Control+X", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+X", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+X", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+X", "k"}:         KeyFunBufClose,
		KeySeq{"Control+X", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+X", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+X", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+C", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+C", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+C", "o"}:         KeyFunBufClone,
		KeySeq{"Control+C", "Control+O"}: KeyFunBufClone,
		KeySeq{"Control+X", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+X", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+X", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+X", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+X", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+C", "k"}:         KeyFunCommentOut,
		KeySeq{"Control+C", "Control+K"}: KeyFunCommentOut,
		KeySeq{"Control+X", "i"}:         KeyFunIndent,
		KeySeq{"Control+X", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+X", "j"}:         KeyFunJump,
		KeySeq{"Control+X", "Control+J"}: KeyFunJump,
		KeySeq{"Control+X", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+X", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+M", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+M", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+M", "r"}:         KeyFunRunProj,
		KeySeq{"Control+M", "Control+R"}: KeyFunRunProj,
	}},
	{"LinuxStd", "Standard Linux KeySeqMap", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+M", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+M", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+M", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+M", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+O", ""}:          KeyFunFileOpen,
		KeySeq{"Control+M", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+M", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+M", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+M", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+S", ""}:          KeyFunBufSave,
		KeySeq{"Shift+Control+S", ""}:    KeyFunBufSaveAs,
		KeySeq{"Control+M", "s"}:         KeyFunBufSave,
		KeySeq{"Control+M", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+M", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+M", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+M", "k"}:         KeyFunBufClose,
		KeySeq{"Control+M", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+M", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+M", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+M", "n"}:         KeyFunBufClone,
		KeySeq{"Control+M", "Control+N"}: KeyFunBufClone,
		KeySeq{"Control+M", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+M", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+M", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+M", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+M", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+/", ""}:          KeyFunCommentOut,
		KeySeq{"Control+M", "t"}:         KeyFunCommentOut,
		KeySeq{"Control+M", "Control+T"}: KeyFunCommentOut,
		KeySeq{"Control+M", "i"}:         KeyFunIndent,
		KeySeq{"Control+M", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+M", "j"}:         KeyFunJump,
		KeySeq{"Control+M", "Control+J"}: KeyFunJump,
		KeySeq{"Control+M", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+M", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+M", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+M", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+M", "r"}:         KeyFunRunProj,
		KeySeq{"Control+M", "Control+R"}: KeyFunRunProj,
	}},
	{"WindowsStd", "Standard Windows KeySeqMap", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+M", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+M", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+M", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+M", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+O", ""}:          KeyFunFileOpen,
		KeySeq{"Control+M", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+M", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+M", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+M", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+S", ""}:          KeyFunBufSave,
		KeySeq{"Shift+Control+S", ""}:    KeyFunBufSaveAs,
		KeySeq{"Control+M", "s"}:         KeyFunBufSave,
		KeySeq{"Control+M", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+M", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+M", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+M", "k"}:         KeyFunBufClose,
		KeySeq{"Control+M", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+M", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+M", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+M", "n"}:         KeyFunBufClone,
		KeySeq{"Control+M", "Control+N"}: KeyFunBufClone,
		KeySeq{"Control+M", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+M", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+M", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+M", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+M", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+/", ""}:          KeyFunCommentOut,
		KeySeq{"Control+M", "t"}:         KeyFunCommentOut,
		KeySeq{"Control+M", "Control+T"}: KeyFunCommentOut,
		KeySeq{"Control+M", "i"}:         KeyFunIndent,
		KeySeq{"Control+M", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+M", "j"}:         KeyFunJump,
		KeySeq{"Control+M", "Control+J"}: KeyFunJump,
		KeySeq{"Control+M", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+M", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+M", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+M", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+M", "r"}:         KeyFunRunProj,
		KeySeq{"Control+M", "Control+R"}: KeyFunRunProj,
	}},
	{"ChromeStd", "Standard chrome-browser and linux-under-chrome bindings", KeySeqMap{
		KeySeq{"Control+Tab", ""}:        KeyFunNextPanel,
		KeySeq{"Shift+Control+Tab", ""}:  KeyFunPrevPanel,
		KeySeq{"Control+M", "o"}:         KeyFunNextPanel,
		KeySeq{"Control+M", "Control+O"}: KeyFunNextPanel,
		KeySeq{"Control+M", "p"}:         KeyFunPrevPanel,
		KeySeq{"Control+M", "Control+P"}: KeyFunPrevPanel,
		KeySeq{"Control+O", ""}:          KeyFunFileOpen,
		KeySeq{"Control+M", "f"}:         KeyFunFileOpen,
		KeySeq{"Control+M", "Control+F"}: KeyFunFileOpen,
		KeySeq{"Control+M", "b"}:         KeyFunBufSelect,
		KeySeq{"Control+M", "Control+B"}: KeyFunBufSelect,
		KeySeq{"Control+S", ""}:          KeyFunBufSave,
		KeySeq{"Shift+Control+S", ""}:    KeyFunBufSaveAs,
		KeySeq{"Control+M", "s"}:         KeyFunBufSave,
		KeySeq{"Control+M", "Control+S"}: KeyFunBufSave,
		KeySeq{"Control+M", "w"}:         KeyFunBufSaveAs,
		KeySeq{"Control+M", "Control+W"}: KeyFunBufSaveAs,
		KeySeq{"Control+M", "k"}:         KeyFunBufClose,
		KeySeq{"Control+M", "Control+K"}: KeyFunBufClose,
		KeySeq{"Control+M", "c"}:         KeyFunExecCmd,
		KeySeq{"Control+M", "Control+C"}: KeyFunExecCmd,
		KeySeq{"Control+M", "n"}:         KeyFunBufClone,
		KeySeq{"Control+M", "Control+N"}: KeyFunBufClone,
		KeySeq{"Control+M", "x"}:         KeyFunRegCopy,
		KeySeq{"Control+M", "g"}:         KeyFunRegPaste,
		KeySeq{"Control+M", "Control+X"}: KeyFunRectCut,
		KeySeq{"Control+M", "Control+Y"}: KeyFunRectPaste,
		KeySeq{"Control+M", "Alt+∑"}:     KeyFunRectCopy,
		KeySeq{"Control+/", ""}:          KeyFunCommentOut,
		KeySeq{"Control+M", "t"}:         KeyFunCommentOut,
		KeySeq{"Control+M", "Control+T"}: KeyFunCommentOut,
		KeySeq{"Control+M", "i"}:         KeyFunIndent,
		KeySeq{"Control+M", "Control+I"}: KeyFunIndent,
		KeySeq{"Control+M", "j"}:         KeyFunJump,
		KeySeq{"Control+M", "Control+J"}: KeyFunJump,
		KeySeq{"Control+M", "v"}:         KeyFunSetSplit,
		KeySeq{"Control+M", "Control+V"}: KeyFunSetSplit,
		KeySeq{"Control+M", "m"}:         KeyFunBuildProj,
		KeySeq{"Control+M", "Control+M"}: KeyFunBuildProj,
		KeySeq{"Control+M", "r"}:         KeyFunRunProj,
		KeySeq{"Control+M", "Control+R"}: KeyFunRunProj,
	}},
}

StdKeyMaps is the original compiled-in set of standard keymaps that have the lastest key functions bound to standard key chords.

View Source
var StdLangs = Langs{
	fi.Go: {CmdNames{"Go: Imports File"}},
}

StdLangs is the original compiled-in set of standard language options.

View Source
var StdSplits = Splits{
	{"Code", "2 text views, tabs", []float32{.1, .325, .325, .25}},
	{"Small", "1 text view, tabs", []float32{.1, .5, 0, .4}},
	{"BigTabs", "1 text view, big tabs", []float32{.1, .3, 0, .6}},
}

StdSplits is the original compiled-in set of standard named splits.

View Source
var SymNodeType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.SymNode",
	ShortName:  "gide.SymNode",
	IDName:     "sym-node",
	Doc:        "SymNode represents a language symbol -- the name of the node is\nthe name of the symbol. Some symbols, e.g. type have children",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Symbol", &gti.Field{Name: "Symbol", Type: "goki.dev/pi/v2/syms.Symbol", LocalType: "syms.Symbol", Doc: "the symbol", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Node", &gti.Field{Name: "Node", Type: "goki.dev/ki/v2.Node", LocalType: "ki.Node", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &SymNode{},
})

SymNodeType is the gti.Type for SymNode

View Source
var SymTreeViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.SymTreeView",
	ShortName:  "gide.SymTreeView",
	IDName:     "sym-tree-view",
	Doc:        "SymTreeView is a TreeView that knows how to operate on FileNode nodes",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"TreeView", &gti.Field{Name: "TreeView", Type: "goki.dev/gi/v2/giv.TreeView", LocalType: "giv.TreeView", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &SymTreeView{},
})

SymTreeViewType is the gti.Type for SymTreeView

View Source
var SymbolsViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.SymbolsView",
	ShortName:  "gide.SymbolsView",
	IDName:     "symbols-view",
	Doc:        "SymbolsView is a widget that displays results of a file or package parse",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Gide", &gti.Field{Name: "Gide", Type: "goki.dev/gide/v2/gide.Gide", LocalType: "Gide", Doc: "parent gide project", Directives: gti.Directives{}, Tag: "json:\"-\" xml:\"-\""}},
		{"SymParams", &gti.Field{Name: "SymParams", Type: "goki.dev/gide/v2/gide.SymbolsParams", LocalType: "SymbolsParams", Doc: "params for structure display", Directives: gti.Directives{}, Tag: ""}},
		{"Syms", &gti.Field{Name: "Syms", Type: "*goki.dev/gide/v2/gide.SymNode", LocalType: "*SymNode", Doc: "all the symbols for the file or package in a tree", Directives: gti.Directives{}, Tag: ""}},
		{"Match", &gti.Field{Name: "Match", Type: "string", LocalType: "string", Doc: "only show symbols that match this string", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &SymbolsView{},
})

SymbolsViewType is the gti.Type for SymbolsView

View Source
var TaskViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.TaskView",
	ShortName:  "gide.TaskView",
	IDName:     "task-view",
	Doc:        "TaskView is a view of the threads",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &TaskView{},
})

TaskViewType is the gti.Type for TaskView

View Source
var TextEditorType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.TextEditor",
	ShortName:  "gide.TextEditor",
	IDName:     "text-editor",
	Doc:        "TextEditor is the Gide-specific version of the TextEditor, with support for\nsetting / clearing breakpoints, etc",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Gide", &gti.Field{Name: "Gide", Type: "goki.dev/gide/v2/gide.Gide", LocalType: "Gide", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Editor", &gti.Field{Name: "Editor", Type: "goki.dev/gi/v2/texteditor.Editor", LocalType: "texteditor.Editor", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &TextEditor{},
})

TextEditorType is the gti.Type for TextEditor

View Source
var ThreadViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.ThreadView",
	ShortName:  "gide.ThreadView",
	IDName:     "thread-view",
	Doc:        "ThreadView is a view of the threads",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &ThreadView{},
})

ThreadViewType is the gti.Type for ThreadView

View Source
var VarViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.VarView",
	ShortName:  "gide.VarView",
	IDName:     "var-view",
	Doc:        "VarView shows a debug variable in an inspector-like framework,\nwith sub-variables in a tree.",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Var", &gti.Field{Name: "Var", Type: "*goki.dev/gide/v2/gidebug.Variable", LocalType: "*gidebug.Variable", Doc: "variable being edited", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"SelVar", &gti.Field{Name: "SelVar", Type: "*goki.dev/gide/v2/gidebug.Variable", LocalType: "*gidebug.Variable", Doc: "", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"FrameInfo", &gti.Field{Name: "FrameInfo", Type: "string", LocalType: "string", Doc: "frame info", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"DbgView", &gti.Field{Name: "DbgView", Type: "*goki.dev/gide/v2/gide.DebugView", LocalType: "*DebugView", Doc: "parent DebugView", Directives: gti.Directives{}, Tag: "json:\"-\" xml:\"-\""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Frame", &gti.Field{Name: "Frame", Type: "goki.dev/gi/v2/gi.Frame", LocalType: "gi.Frame", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &VarView{},
})

VarViewType is the gti.Type for VarView

View Source
var VarsViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gide.VarsView",
	ShortName:  "gide.VarsView",
	IDName:     "vars-view",
	Doc:        "VarsView is a view of the variables",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"GlobalVars", &gti.Field{Name: "GlobalVars", Type: "bool", LocalType: "bool", Doc: "if true, this is global vars, not local ones", Directives: gti.Directives{}, Tag: ""}},
	}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Layout", &gti.Field{Name: "Layout", Type: "goki.dev/gi/v2/gi.Layout", LocalType: "gi.Layout", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &VarsView{},
})

VarsViewType is the gti.Type for VarsView

Functions

func AppDataDir

func AppDataDir() string

AppDataDir returns the application-specific data directory for gide. It wraps gi.App.DataDir, and must be a separate function because the gi.App for gide may not exist yet at certain points. It ensures that the directory exists before returning it.

func ArgVarKeys

func ArgVarKeys() []string

ArgVarKeys creates a slice of string to hold the keys

func ArgVarPrompts

func ArgVarPrompts(arg string) (map[string]struct{}, bool)

ArgVarPrompts returns any Prompt* variables required by this string, false if none

func CmdsView

func CmdsView(pt *Commands)

CmdsView opens a view of a commands table

func CommandMenu

func CommandMenu(fn *filetree.Node) func(mm *gi.Scene)

CommandMenu returns a menu function for commands for given language and vcs name

func CommandName

func CommandName(cat, cmd string) string

CommandName returns a qualified command name as cat: cmd

func CompleteArg

func CompleteArg(data any, text string, posLn, posCh int) (md complete.Matches)

CompleteArg supplies directory variables to the completer

func CompleteArgEdit

func CompleteArgEdit(data any, text string, cursorPos int, c complete.Completion, seed string) (ed complete.Edit)

CompleteArgEdit edits completer text field after the user chooses from the candidate completions

func ConfigEditorTextEditor

func ConfigEditorTextEditor(ed *texteditor.Editor)

ConfigEditorTextEditor configures an editor texteditor

func ConfigOutputTextEditor

func ConfigOutputTextEditor(ed *texteditor.Editor)

ConfigOutputTextEditor configures a command-output textview within given parent layout

func InitPrefs

func InitPrefs()

InitPrefs must be called at startup in mainrun()

func KeyMapsView

func KeyMapsView(km *KeyMaps)

KeyMapsView opens a view of a key maps table

func LangsView

func LangsView(pt *Langs)

LangsView opens a view of a languages options map

func MarkupCmdOutput

func MarkupCmdOutput(out []byte) []byte

MarkupCmdOutput applies links to the first element in command output line if it looks like a file name / position

func MarkupStderr

func MarkupStderr(out []byte) []byte

func MarkupStdout

func MarkupStdout(out []byte) []byte

func MergeAvailCmds

func MergeAvailCmds()

MergeAvailCmds updates the AvailCmds list from CustomCmds and StdCmds

func NewDebugger

func NewDebugger(sup fi.Known, path, rootPath string, outbuf *texteditor.Buf, pars *gidebug.Params) (gidebug.GiDebug, error)

NewDebugger returns a new debugger for given supported file type

func OpenPaths

func OpenPaths()

OpenPaths loads the active SavedPaths from prefs dir

func PrefsView

func PrefsView(pf *Preferences) *giv.StructView

PrefsView opens a view of user preferences, returns structview if new (nil if recycled)

func ProjPrefsView

func ProjPrefsView(pf *ProjPrefs) *giv.StructView

ProjPrefsView opens a view of project preferences (settings), returns structview if not already open

func RegistersView

func RegistersView(pt *Registers)

RegistersView opens a view of a commands table

func RepoCurBranches

func RepoCurBranches(repo vci.Repo) (string, []string, error)

RepoCurBranches returns the current branch and a list of all branches ensuring that the current also appears on the list of all. In git, a new branch may not so appear.

func SavePaths

func SavePaths()

SavePaths saves the active SavedPaths to prefs dir

func SelectSymbol

func SelectSymbol(ge Gide, ssym syms.Symbol)

func SetActiveKeyMap

func SetActiveKeyMap(km *KeySeqMap, kmName KeyMapName)

SetActiveKeyMap sets the current ActiveKeyMap, calling Update on the map prior to setting it to ensure that it is a valid, complete map

func SetActiveKeyMapName

func SetActiveKeyMapName(mapnm KeyMapName)

SetActiveKeyMapName sets the current ActiveKeyMap by name from those defined in AvailKeyMaps, calling Update on the map prior to setting it to ensure that it is a valid, complete map

func SetGoMod

func SetGoMod(gomod bool)

ApplyGoMod applies the given gomod setting, setting the GO111MODULE env var

func SplitsView

func SplitsView(pt *Splits)

SplitsView opens a view of a splits table

Types

type ArgVarInfo

type ArgVarInfo struct {

	// description of arg var
	Desc string

	// type of variable -- used for checking usage and other special features such as prompting
	Type ArgVarTypes
}

ArgVarInfo has info about argument variables that fill in relevant values for commands, used in ArgVars list of variables

type ArgVarTypes

type ArgVarTypes int32 //enums:enum -trim-prefix ArgVar

ArgVarTypes describe the type of information in the arg var -- used for checking usage and special features.

const (
	// ArgVarFile is a file name, not a directory
	ArgVarFile ArgVarTypes = iota

	// ArgVarDir is a directory name, not a file
	ArgVarDir

	// ArgVarExt is a file extension
	ArgVarExt

	// ArgVarPos is a text position
	ArgVarPos

	// ArgVarText is text from a buffer
	ArgVarText

	// ArgVarPrompt is a user-prompted variable
	ArgVarPrompt
)
const ArgVarTypesN ArgVarTypes = 6

ArgVarTypesN is the highest valid value for type ArgVarTypes, plus one.

func ArgVarTypesValues

func ArgVarTypesValues() []ArgVarTypes

ArgVarTypesValues returns all possible values for the type ArgVarTypes.

func (ArgVarTypes) Desc

func (i ArgVarTypes) Desc() string

Desc returns the description of the ArgVarTypes value.

func (ArgVarTypes) Int64

func (i ArgVarTypes) Int64() int64

Int64 returns the ArgVarTypes value as an int64.

func (ArgVarTypes) IsValid

func (i ArgVarTypes) IsValid() bool

IsValid returns whether the value is a valid option for type ArgVarTypes.

func (ArgVarTypes) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (*ArgVarTypes) SetInt64

func (i *ArgVarTypes) SetInt64(in int64)

SetInt64 sets the ArgVarTypes value from an int64.

func (*ArgVarTypes) SetString

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

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

func (ArgVarTypes) String

func (i ArgVarTypes) String() string

String returns the string representation of this ArgVarTypes value.

func (*ArgVarTypes) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (ArgVarTypes) Values

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

Values returns all possible values for the type ArgVarTypes.

type ArgVarVals

type ArgVarVals map[string]string

ArgVarVals are current values of arg var vals -- updated on demand when a command is invoked

func (*ArgVarVals) Bind

func (avp *ArgVarVals) Bind(arg string) string

Bind replaces the variables in the given arg string with their values

func (*ArgVarVals) Set

func (avp *ArgVarVals) Set(fpath string, ppref *ProjPrefs, tv *texteditor.Editor)

Set sets the current values for arg variables -- prompts must be already set!

type BreakView

type BreakView struct {
	gi.Layout
}

BreakView is a view of the breakpoints

func NewBreakView

func NewBreakView(par ki.Ki, name ...string) *BreakView

NewBreakView adds a new BreakView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*BreakView) ConfigBreakView

func (sv *BreakView) ConfigBreakView(dv *DebugView)

func (*BreakView) DebugVw

func (sv *BreakView) DebugVw() *DebugView

func (*BreakView) KiType

func (t *BreakView) KiType() *gti.Type

KiType returns the *gti.Type of BreakView

func (*BreakView) New

func (t *BreakView) New() ki.Ki

New returns a new *BreakView value

func (*BreakView) SetClass

func (t *BreakView) SetClass(v string) *BreakView

SetClass sets the [BreakView.Class]

func (*BreakView) SetCustomContextMenu

func (t *BreakView) SetCustomContextMenu(v func(m *gi.Scene)) *BreakView

SetCustomContextMenu sets the [BreakView.CustomContextMenu]

func (*BreakView) SetStackTop

func (t *BreakView) SetStackTop(v int) *BreakView

SetStackTop sets the [BreakView.StackTop]

func (*BreakView) SetTooltip

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

SetTooltip sets the [BreakView.Tooltip]

func (*BreakView) ShowBreaks

func (sv *BreakView) ShowBreaks()

ShowBreaks triggers update of view of State.Breaks

func (*BreakView) TableView

func (sv *BreakView) TableView() *giv.TableView

TableView returns the tableview

type CmdAndArgs

type CmdAndArgs struct {

	// external program to execute -- must be on path or have full path specified -- use {RunExec} for the project RunExec executable.
	Cmd string `width:"25"`

	// args to pass to the program, one string per arg -- use {FileName} etc to refer to special variables -- just start typing { and you'll get a completion menu of options, and use backslash-quoted bracket to insert a literal curly bracket.  Use unix-standard path separators (/) -- they will be replaced with proper os-specific path separator (e.g., on Windows).
	Args CmdArgs `complete:"arg" width:"25"`

	// default value for prompt string, for first use -- thereafter it uses last value provided for given command
	Default string `width:"25"`

	// if true, then do not split any prompted string into separate space-separated fields -- otherwise do so, except for values within quotes
	PromptIsString bool
}

CmdAndArgs contains the name of an external program to execute and args to pass to that program

func (*CmdAndArgs) BindArgs

func (cm *CmdAndArgs) BindArgs(avp *ArgVarVals) []string

BindArgs replaces any variables in the args with their values, and returns resulting args

func (*CmdAndArgs) HasPrompts

func (cm *CmdAndArgs) HasPrompts() (map[string]struct{}, bool)

HasPrompts returns true if any prompts are required before running command, and the set of such args

func (CmdAndArgs) Label

func (cm CmdAndArgs) Label() string

Label satisfies the Labeler interface

func (*CmdAndArgs) PrepCmd

func (cm *CmdAndArgs) PrepCmd(avp *ArgVarVals) (*exec.Cmd, string)

PrepCmd prepares to run command, returning *exec.Cmd and a string of the full command

type CmdArgs

type CmdArgs []string

CmdArgs is a slice of arguments for a command

func (*CmdArgs) SetCompleter

func (cm *CmdArgs) SetCompleter(tf *gi.TextField, id string)

SetCompleter specifies the functions that do completion and post selection editing when inserting the chosen completion

type CmdName

type CmdName string

CmdName has an associated ValueView for selecting from the list of available command names, for use in preferences etc. Formatted as Cat: Name as in Command.Label()

func (CmdName) Command

func (cn CmdName) Command() (*Command, bool)

Command returns command associated with command name in AvailCmds, and false if it doesn't exist

func (CmdName) IsValid

func (cn CmdName) IsValid() bool

IsValid checks if command name exists on AvailCmds list

func (CmdName) Value

func (kn CmdName) Value() giv.Value

Value registers CmdValue as the viewer of CmdName

type CmdNames

type CmdNames []CmdName

CmdNames is a slice of command names

func (*CmdNames) Add

func (cn *CmdNames) Add(cmd CmdName)

Add adds a name to the list

type CmdRun

type CmdRun struct {

	// Name of command being run -- same as Command.Name
	Name string

	// command string
	CmdStr string

	// Details of the command and args
	CmdArgs *CmdAndArgs

	// exec.Cmd for the command
	Exec *exec.Cmd
}

CmdRun tracks running commands

func (*CmdRun) Kill

func (cm *CmdRun) Kill()

Kill kills the process

type CmdRuns

type CmdRuns []*CmdRun

CmdRuns is a slice list of running commands

func (*CmdRuns) Add

func (rc *CmdRuns) Add(cm *CmdRun)

Add adds a new running command

func (*CmdRuns) AddCmd

func (rc *CmdRuns) AddCmd(name, cmdstr string, cmdargs *CmdAndArgs, ex *exec.Cmd)

AddCmd adds a new running command, creating CmdRun via args

func (*CmdRuns) ByName

func (rc *CmdRuns) ByName(name string) (*CmdRun, int)

ByName returns command with given name

func (*CmdRuns) DeleteByName

func (rc *CmdRuns) DeleteByName(name string) bool

DeleteByName deletes command by name

func (*CmdRuns) DeleteIdx

func (rc *CmdRuns) DeleteIdx(idx int)

DeleteIdx delete command at given index

func (*CmdRuns) KillByName

func (rc *CmdRuns) KillByName(name string) bool

KillByName kills a running process by name, and removes it from the list of running commands

type CmdValue

type CmdValue struct {
	giv.ValueBase
}

CmdValue presents an action for displaying an CmdName and selecting

func (*CmdValue) ConfigDialog

func (vv *CmdValue) ConfigDialog(d *gi.Body) (bool, func())

func (*CmdValue) ConfigWidget

func (vv *CmdValue) ConfigWidget(w gi.Widget)

func (*CmdValue) HasDialog

func (vv *CmdValue) HasDialog() bool

func (*CmdValue) OpenDialog

func (vv *CmdValue) OpenDialog(ctx gi.Widget, fun func())

func (*CmdValue) UpdateWidget

func (vv *CmdValue) UpdateWidget()

func (*CmdValue) WidgetType

func (vv *CmdValue) WidgetType() *gti.Type

type Command

type Command struct {

	// category for the command -- commands are organized in to hierarchical menus according to category
	Cat string

	// name of this command (must be unique in list of commands)
	Name string `width:"20"`

	// brief description of this command
	Desc string `width:"40"`

	// supported language / file type that this command applies to -- choose Any or e.g., AnyCode for subtypes -- filters the list of commands shown based on file language type
	Lang fi.Known

	// sequence of commands to run for this overall command.
	Cmds []CmdAndArgs `tableview-select:"-"`

	// if specified, will change to this directory before executing the command -- e.g., use {FileDirPath} for current file's directory -- only use directory values here -- if not specified, directory will be project root directory.
	Dir string `width:"20" complete:"arg"`

	// if true, we wait for the command to run before displaying output -- mainly for post-save commands and those with subsequent steps: if multiple commands are present, then it uses Wait mode regardless.
	Wait bool

	// if true, keyboard focus is directed to the command output tab panel after the command runs.
	Focus bool

	// if true, command requires Ok / Cancel confirmation dialog -- only needed for non-prompt commands
	Confirm bool

	//	what type of file to use for syntax highlighting.  Bash is the default.
	Hilight fi.Known
}

Command defines different types of commands that can be run in the project. The output of the commands shows up in an associated tab.

func (*Command) AppendCmdOut

func (cm *Command) AppendCmdOut(ge Gide, buf *texteditor.Buf, out []byte)

AppendCmdOut appends command output to buffer, applying markup for links

func (*Command) HasPrompts

func (cm *Command) HasPrompts() (map[string]struct{}, bool)

HasPrompts returns true if any prompts are required before running command, and the set of such args

func (Command) Label

func (cm Command) Label() string

Label satisfies the Labeler interface

func (*Command) LangMatch

func (cm *Command) LangMatch(lang fi.Known) bool

LangMatch returns true if the given language matches the command Lang constraints

func (*Command) MarkupCmdOutput

func (cm *Command) MarkupCmdOutput(out []byte) []byte

MarkupCmdOutput applies links to the first element in command output line if it looks like a file name / position

func (*Command) PromptUser

func (cm *Command) PromptUser(ge Gide, buf *texteditor.Buf, pvals map[string]struct{})

PromptUser prompts for values that need prompting for, and then runs RunAfterPrompts if not otherwise cancelled by user

func (*Command) Run

func (cm *Command) Run(ge Gide, buf *texteditor.Buf)

Run runs the command and saves the output in the Buf if it is non-nil, which can be displayed -- if !wait, then Buf is updated online as output occurs. Status is updated with status of command exec. User is prompted for any values that might be needed for command.

func (*Command) RunAfterPrompts

func (cm *Command) RunAfterPrompts(ge Gide, buf *texteditor.Buf)

RunAfterPrompts runs after any prompts have been set, if needed

func (*Command) RunBuf

func (cm *Command) RunBuf(ge Gide, buf *texteditor.Buf, cma *CmdAndArgs) bool

RunBuf runs a command with output to the buffer, incrementally updating the buffer with new results line-by-line as they come in

func (*Command) RunBufWait

func (cm *Command) RunBufWait(ge Gide, buf *texteditor.Buf, cma *CmdAndArgs) bool

RunBufWait runs a command with output to the buffer, using CombinedOutput so it waits for completion -- returns overall command success, and logs one line of the command output to gide statusbar

func (*Command) RunNoBuf

func (cm *Command) RunNoBuf(ge Gide, cma *CmdAndArgs) bool

RunNoBuf runs a command without any output to the buffer -- can call using go as a goroutine for no-wait case -- returns overall command success, and logs one line of the command output to gide statusbar

func (*Command) RunStatus

func (cm *Command) RunStatus(ge Gide, buf *texteditor.Buf, cmdstr string, err error, out []byte) bool

RunStatus reports the status of the command run (given in cmdstr) to ge.StatusBar -- returns true if there are no errors, and false if there were errors

func (*Command) SetCompleter

func (cmd *Command) SetCompleter(tf *gi.TextField, id string)

SetCompleter adds a completer to the textfield - each field can have its own match and edit functions For this to be called add a "complete" tag to the struct field

type Commands

type Commands []*Command

Commands is a list of different commands

var AvailCmds Commands

AvailCmds is the current list of ALL available commands for use -- it combines StdCmds and CustomCmds. Custom overrides Std items with the same names.

func (*Commands) CmdByName

func (cm *Commands) CmdByName(name CmdName, msg bool) (*Command, int, bool)

CmdByName returns a command and index by name -- returns false and emits a message to log if not found if msg is true

func (*Commands) CopyFrom

func (cm *Commands) CopyFrom(cp Commands)

CopyFrom copies commands from given other map

func (*Commands) FilterCmdNames

func (cm *Commands) FilterCmdNames(lang fi.Known, vcnm filetree.VersCtrlName) [][]string

FilterCmdNames returns a slice of commands organized by category that are compatible with given language and version control system.

func (*Commands) Open

func (cm *Commands) Open(filename gi.FileName) error

Open opens commands from a toml-formatted file.

func (*Commands) OpenPrefs

func (cm *Commands) OpenPrefs() error

OpenPrefs opens custom Commands from App standard prefs directory, using PrefsCmdsFileName

func (*Commands) Save

func (cm *Commands) Save(filename gi.FileName) error

Save saves commands to a toml-formatted file.

func (*Commands) SavePrefs

func (cm *Commands) SavePrefs() error

SavePrefs saves custom Commands to App standard prefs directory, using PrefsCmdsFileName

func (*Commands) ViewStd

func (cm *Commands) ViewStd()

ViewStd shows the standard types that are compiled into the program and have all the lastest standards. Useful for comparing against custom lists.

type Console

type Console struct {

	// std out writer -- set to os.Stdout
	StdoutWrite *os.File `json:"-" xml:"-"`

	// std out reader -- used to read os.Stdout
	StdoutRead *os.File `json:"-" xml:"-"`

	// std err writer -- set to os.Stderr
	StderrWrite *os.File `json:"-" xml:"-"`

	// std err reader -- used to read os.Stderr
	StderrRead *os.File `json:"-" xml:"-"`

	// text buffer holding all output
	Buf *texteditor.Buf `json:"-" xml:"-"`

	// set to true to cancel monitoring
	Cancel bool `json:"-" xml:"-"`

	// mutex protecting updating of buffer between out / err
	Mu sync.Mutex `json:"-" xml:"-"`

	// original os.Stdout writer
	OrgoutWrite *os.File `json:"-" xml:"-"`

	// original os.Stderr writer
	OrgerrWrite *os.File `json:"-" xml:"-"`

	// log file writer
	LogWrite *os.File `json:"-" xml:"-"`
}

Console redirects our os.Stdout and os.Stderr to a buffer for display within app

var TheConsole Console

func (*Console) Close

func (cn *Console) Close()

Close closes all the files -- call on exit

func (*Console) Init

func (cn *Console) Init(logFile string)

Init initializes the console -- sets up the capture, Buf, and starts the routine that monitors output. if logFile is non-empty, writes output to that file as well.

func (*Console) MonitorErr

func (cn *Console) MonitorErr()

MonitorErr monitors std error and appends it to the buffer should be in a separate routine

func (*Console) MonitorOut

func (cn *Console) MonitorOut()

MonitorOut monitors std output and appends it to the buffer should be in a separate routine

type DebugBreakStatus

type DebugBreakStatus int32

DebugBreakStatus is the status of a given breakpoint

const (
	// DebugBreakInactive is an inactive break point
	DebugBreakInactive DebugBreakStatus = iota

	// DebugBreakActive is an active break point
	DebugBreakActive

	// DebugBreakCurrent is the current break point
	DebugBreakCurrent

	// DebugPCCurrent is the current program execution point,
	// updated for every ShowFile action
	DebugPCCurrent

	DebugBreakStatusN
)

type DebugView

type DebugView struct {
	gi.Layout

	// supported file type to determine debugger
	Sup fi.Known

	// path to executable / dir to debug
	ExePath string

	// time when dbg was last restarted
	DbgTime time.Time

	// the debugger
	Dbg gidebug.GiDebug `set:"-" json:"-" xml:"-"`

	// all relevant debug state info
	State gidebug.AllState `set:"-" json:"-" xml:"-"`

	// current ShowFile location -- cleared before next one or run
	CurFileLoc gidebug.Location `set:"-" json:"-" xml:"-"`

	// backup breakpoints list -- to track deletes
	BBreaks []*gidebug.Break `set:"-" json:"-" xml:"-"`

	// output from the debugger
	OutBuf *texteditor.Buf `set:"-" json:"-" xml:"-"`

	// parent gide project
	Gide Gide `set:"-" json:"-" xml:"-"`
}

DebugView is the debugger

func NewDebugView

func NewDebugView(par ki.Ki, name ...string) *DebugView

NewDebugView adds a new DebugView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*DebugView) ActionActivate

func (dv *DebugView) ActionActivate(act *gi.Button)

ActionActivate is the update function for actions that depend on the debugger being avail for input commands

func (*DebugView) AddBreak

func (dv *DebugView) AddBreak(fpath string, line int)

AddBreak adds a breakpoint at given file path and line number. note: all breakpoints are just set in our master list and uploaded to the system right before starting running.

func (DebugView) AllVarVw

func (dv DebugView) AllVarVw() *VarsView

AllVarVw returns the all vars view from tabs

func (*DebugView) BackupBreaks

func (dv *DebugView) BackupBreaks()

BackupBreaks makes a backup copy of current breaks

func (DebugView) BreakVw

func (dv DebugView) BreakVw() *BreakView

BreakVw returns the break view from tabs

func (*DebugView) ConfigDebugView

func (dv *DebugView) ConfigDebugView(ge Gide, sup fi.Known, exePath string)

ConfigDebugView configures the view -- parameters for the job must have already been set in ge.ProjParams.Debug.

func (*DebugView) ConfigTabs

func (dv *DebugView) ConfigTabs()

ConfigTabs configures the tabs

func (*DebugView) ConfigToolbar

func (dv *DebugView) ConfigToolbar()

func (*DebugView) ConfigWidget

func (dv *DebugView) ConfigWidget()

func (DebugView) ConsoleText

func (dv DebugView) ConsoleText() *texteditor.Editor

ConsoleText returns the console TextEditor

func (*DebugView) Continue

func (dv *DebugView) Continue()

Continue continues running from current point -- this MUST be called in a separate goroutine!

func (*DebugView) DbgCanStep

func (dv *DebugView) DbgCanStep() bool

DbgCanStep means the debugger is started AND process is not currently running, AND it is not already waiting for a next step

func (*DebugView) DbgIsActive

func (dv *DebugView) DbgIsActive() bool

DbgIsActive means debugger is started.

func (*DebugView) DbgIsAvail

func (dv *DebugView) DbgIsAvail() bool

DbgIsAvail means the debugger is started AND process is not currently running -- it is available for command input.

func (*DebugView) DeleteAllBreaks

func (dv *DebugView) DeleteAllBreaks()

DeleteAllBreaks deletes all breakpoints

func (*DebugView) DeleteBreak

func (dv *DebugView) DeleteBreak(fpath string, line int)

DeleteBreak deletes given breakpoint. If debugger is not yet activated then it just deletes from master list. Note that breakpoints can be turned on and off directly using On flag.

func (*DebugView) DeleteBreakIdx

func (dv *DebugView) DeleteBreakIdx(bidx int)

DeleteBreakIdx deletes break at given index in list of breaks

func (*DebugView) DeleteBreakImpl

func (dv *DebugView) DeleteBreakImpl(fpath string, line int)

DeleteBreakImpl deletes given breakpoint with no other updates

func (*DebugView) DeleteBreakInBuf

func (dv *DebugView) DeleteBreakInBuf(fpath string, line int)

DeleteBreakInBuf delete breakpoint in its TextBuf line is 1-based line number

func (*DebugView) DeleteCurPCInBuf

func (dv *DebugView) DeleteCurPCInBuf()

DeleteCurPCInBuf deletes the current PC location in given file line is 1-based line number

func (*DebugView) Destroy

func (dv *DebugView) Destroy()

func (*DebugView) Detach

func (dv *DebugView) Detach()

Detach from debugger

func (*DebugView) FindFrames

func (dv *DebugView) FindFrames(fpath string, line int)

FindFrames finds the frames where given file and line are active Selects the one that is closest and shows the others in Find Tab

func (DebugView) FindFramesVw

func (dv DebugView) FindFramesVw() *StackView

FindFramesVw returns the find frames view from tabs

func (*DebugView) InitState

func (dv *DebugView) InitState(ds *gidebug.State)

InitState updates the State and View from given debug state Call this when debugger returns from any action update

func (*DebugView) KiType

func (t *DebugView) KiType() *gti.Type

KiType returns the *gti.Type of DebugView

func (*DebugView) ListGlobalVars

func (dv *DebugView) ListGlobalVars(filter string)

ListGlobalVars lists global vars matching given optional filter in Global Vars tab

func (*DebugView) New

func (t *DebugView) New() ki.Ki

New returns a new *DebugView value

func (*DebugView) SetBreaks

func (dv *DebugView) SetBreaks()

SetBreaks sets the current breakpoints from State, call this prior to running

func (*DebugView) SetClass

func (t *DebugView) SetClass(v string) *DebugView

SetClass sets the [DebugView.Class]

func (*DebugView) SetCurPCInBuf

func (dv *DebugView) SetCurPCInBuf(fpath string, line int)

SetCurPCInBuf sets the current PC location in given file line is 1-based line number

func (*DebugView) SetCustomContextMenu

func (t *DebugView) SetCustomContextMenu(v func(m *gi.Scene)) *DebugView

SetCustomContextMenu sets the [DebugView.CustomContextMenu]

func (*DebugView) SetDbgTime

func (t *DebugView) SetDbgTime(v time.Time) *DebugView

SetDbgTime sets the [DebugView.DbgTime]: time when dbg was last restarted

func (*DebugView) SetExePath

func (t *DebugView) SetExePath(v string) *DebugView

SetExePath sets the [DebugView.ExePath]: path to executable / dir to debug

func (*DebugView) SetFrame

func (dv *DebugView) SetFrame(depth int)

SetFrame sets the given frame depth level as active

func (*DebugView) SetStackTop

func (t *DebugView) SetStackTop(v int) *DebugView

SetStackTop sets the [DebugView.StackTop]

func (*DebugView) SetStatus

func (dv *DebugView) SetStatus(stat gidebug.Status)

func (*DebugView) SetSup

func (t *DebugView) SetSup(v fi.Known) *DebugView

SetSup sets the [DebugView.Sup]: supported file type to determine debugger

func (*DebugView) SetThread

func (dv *DebugView) SetThread(threadID int)

SetThread sets the given thread as active -- this must be TaskID if HasTasks and ThreadID if not.

func (*DebugView) SetThreadIdx

func (dv *DebugView) SetThreadIdx(thridx int)

SetThreadIdx sets the given thread by index in threads list as active this must be TaskID if HasTasks and ThreadID if not.

func (*DebugView) SetTooltip

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

SetTooltip sets the [DebugView.Tooltip]

func (*DebugView) ShowBreakFile

func (dv *DebugView) ShowBreakFile(bidx int)

ShowBreakFile shows the file for given break index

func (*DebugView) ShowBreaks

func (dv *DebugView) ShowBreaks(selTab bool)

ShowBreaks shows the current breaks

func (*DebugView) ShowFile

func (dv *DebugView) ShowFile(fpath string, line int)

ShowFile shows the file name in gide

func (*DebugView) ShowFindFrames

func (dv *DebugView) ShowFindFrames(selTab bool)

ShowFindFrames shows the current find frames

func (*DebugView) ShowGlobalVars

func (dv *DebugView) ShowGlobalVars(selTab bool)

ShowGlobalVars shows the current allvars

func (*DebugView) ShowStack

func (dv *DebugView) ShowStack(selTab bool)

ShowStack shows the current stack

func (*DebugView) ShowTasks

func (dv *DebugView) ShowTasks(selTab bool)

ShowTasks shows the current tasks

func (*DebugView) ShowThreads

func (dv *DebugView) ShowThreads(selTab bool)

ShowThreads shows the current threads

func (*DebugView) ShowVar

func (dv *DebugView) ShowVar(name string) error

ShowVar shows info on a given variable within the current frame scope in a text view dialog

func (*DebugView) ShowVars

func (dv *DebugView) ShowVars(selTab bool)

ShowVars shows the current vars

func (*DebugView) SingleStep

func (dv *DebugView) SingleStep()

StepSingle steps a single cpu instruction.

func (DebugView) StackVw

func (dv DebugView) StackVw() *StackView

StackVw returns the stack view from tabs

func (*DebugView) Start

func (dv *DebugView) Start()

Start starts the debuger

func (*DebugView) StepInto

func (dv *DebugView) StepInto()

StepInto continues to the next source line, entering function calls.

func (*DebugView) StepOut

func (dv *DebugView) StepOut()

StepOut continues to the return point of the current function

func (*DebugView) StepOver

func (dv *DebugView) StepOver()

StepOver continues to the next source line, not entering function calls.

func (*DebugView) Stop

func (dv *DebugView) Stop()

Stop stops a running process

func (*DebugView) Tabs

func (dv *DebugView) Tabs() *gi.Tabs

Tabs returns the tabs

func (DebugView) TaskVw

func (dv DebugView) TaskVw() *TaskView

TaskVw returns the task view from tabs

func (DebugView) ThreadVw

func (dv DebugView) ThreadVw() *ThreadView

ThreadVw returns the thread view from tabs

func (*DebugView) Toolbar

func (dv *DebugView) Toolbar() *gi.Toolbar

Toolbar returns the debug toolbar

func (*DebugView) UpdateAllBreaks

func (dv *DebugView) UpdateAllBreaks()

UpdateAllBreaks updates all breakpoints

func (*DebugView) UpdateBreakInBuf

func (dv *DebugView) UpdateBreakInBuf(fpath string, line int, stat DebugBreakStatus)

UpdateBreakInBuf updates break status in its TextBuf line is 1-based line number

func (*DebugView) UpdateFmState

func (dv *DebugView) UpdateFmState()

UpdateFmState updates the view from current debugger state

func (*DebugView) UpdateToolbar

func (dv *DebugView) UpdateToolbar()

func (*DebugView) UpdateView

func (dv *DebugView) UpdateView()

UpdateView updates current view of state

func (*DebugView) VarValue

func (dv *DebugView) VarValue(varNm string) string

VarValue returns the value of given variable, first looking in local stack vars and then in global vars

func (DebugView) VarVw

func (dv DebugView) VarVw() *VarsView

VarVw returns the vars view from tabs

type FileNode

type FileNode struct {
	filetree.Node
}

FileNode is Gide version of FileNode for FileTree view

func NewFileNode

func NewFileNode(par ki.Ki, name ...string) *FileNode

NewFileNode adds a new FileNode with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*FileNode) EditFile

func (fn *FileNode) EditFile()

EditFile pulls up this file in Gide

func (*FileNode) EditFiles

func (fn *FileNode) EditFiles()

EditFiles calls EditFile on selected files

func (*FileNode) ExecCmdFile

func (fn *FileNode) ExecCmdFile()

ExecCmdFile pops up a menu to select a command appropriate for the given node, and shows output in MainTab with name of command

func (*FileNode) ExecCmdNameFile

func (fn *FileNode) ExecCmdNameFile(cmdNm string)

ExecCmdNameFile executes given command name on node

func (*FileNode) GideContextMenu

func (fn *FileNode) GideContextMenu(m *gi.Scene)

func (*FileNode) KiType

func (t *FileNode) KiType() *gti.Type

KiType returns the *gti.Type of FileNode

func (*FileNode) New

func (t *FileNode) New() ki.Ki

New returns a new *FileNode value

func (*FileNode) OnInit

func (fn *FileNode) OnInit()

func (*FileNode) RenameFiles

func (fn *FileNode) RenameFiles()

RenameFiles calls RenameFile on any selected nodes

func (*FileNode) SetClass

func (t *FileNode) SetClass(v string) *FileNode

SetClass sets the [FileNode.Class]

func (*FileNode) SetCustomContextMenu

func (t *FileNode) SetCustomContextMenu(v func(m *gi.Scene)) *FileNode

SetCustomContextMenu sets the [FileNode.CustomContextMenu]

func (*FileNode) SetIcon

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

SetIcon sets the [FileNode.Icon]

func (*FileNode) SetIndent

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

SetIndent sets the [FileNode.Indent]

func (*FileNode) SetOpenDepth

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

SetOpenDepth sets the [FileNode.OpenDepth]

func (*FileNode) SetRootView

func (t *FileNode) SetRootView(v *giv.TreeView) *FileNode

SetRootView sets the [FileNode.RootView]

func (*FileNode) SetRunExec

func (fn *FileNode) SetRunExec()

SetRunExec sets executable as the RunExec executable that will be run with Run / Debug buttons

func (*FileNode) SetRunExecs

func (fn *FileNode) SetRunExecs()

SetRunExecs sets executable as the RunExec executable that will be run with Run / Debug buttons

func (*FileNode) SetSelectedNodes

func (t *FileNode) SetSelectedNodes(v []giv.TreeViewer) *FileNode

SetSelectedNodes sets the [FileNode.SelectedNodes]

func (*FileNode) SetText

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

SetText sets the [FileNode.Text]

func (*FileNode) SetTooltip

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

SetTooltip sets the [FileNode.Tooltip]

func (*FileNode) SetViewIdx

func (t *FileNode) SetViewIdx(v int) *FileNode

SetViewIdx sets the [FileNode.ViewIdx]

func (*FileNode) SetWidgetSize

func (t *FileNode) SetWidgetSize(v mat32.Vec2) *FileNode

SetWidgetSize sets the [FileNode.WidgetSize]

type FilePrefs

type FilePrefs struct {

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

FilePrefs contains file view preferences

func (*FilePrefs) Defaults

func (pf *FilePrefs) Defaults()

Defaults are the defaults for FilePrefs

type FileSearchResults

type FileSearchResults struct {
	Node    *filetree.Node
	Count   int
	Matches []textbuf.Match
}

FileSearchResults is used to report search results

func FileTreeSearch

func FileTreeSearch(start *filetree.Node, find string, ignoreCase, regExp bool, loc FindLoc, activeDir string, langs []fi.Known) []FileSearchResults

FileTreeSearch returns list of all nodes starting at given node of given language(s) that contain the given string (non regexp version), sorted in descending order by number of occurrences -- ignoreCase transforms everything into lowercase

type FindLoc

type FindLoc int32 //enums:enum -trim-prefix FindLoc

FindLoc corresponds to the search scope

const (
	// FindLocAll finds in all open folders in the left file browser
	FindLocAll FindLoc = iota

	// FindLocFile only finds in the current active file
	FindLocFile

	// FindLocDir only finds in the directory of the current active file
	FindLocDir

	// FindLocNotTop finds in all open folders *except* the top-level folder
	FindLocNotTop
)
const FindLocN FindLoc = 4

FindLocN is the highest valid value for type FindLoc, plus one.

func FindLocValues

func FindLocValues() []FindLoc

FindLocValues returns all possible values for the type FindLoc.

func (FindLoc) Desc

func (i FindLoc) Desc() string

Desc returns the description of the FindLoc value.

func (FindLoc) Int64

func (i FindLoc) Int64() int64

Int64 returns the FindLoc value as an int64.

func (FindLoc) IsValid

func (i FindLoc) IsValid() bool

IsValid returns whether the value is a valid option for type FindLoc.

func (FindLoc) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (*FindLoc) SetInt64

func (i *FindLoc) SetInt64(in int64)

SetInt64 sets the FindLoc value from an int64.

func (*FindLoc) SetString

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

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

func (FindLoc) String

func (i FindLoc) String() string

String returns the string representation of this FindLoc value.

func (*FindLoc) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (FindLoc) Values

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

Values returns all possible values for the type FindLoc.

type FindParams

type FindParams struct {

	// find string
	Find string

	// replace string
	Replace string

	// ignore case
	IgnoreCase bool

	// use regexp regular expression search and replace
	Regexp bool

	// locations to search in
	Loc FindLoc

	// languages for files to search
	Langs []fi.Known

	// history of finds
	FindHist []string

	// history of replaces
	ReplHist []string
}

FindParams are parameters for find / replace

type FindView

type FindView struct {
	gi.Layout

	// parent gide project
	Gide Gide `json:"-" xml:"-"`

	// langs value view
	LangVV giv.Value

	// time of last find
	Time time.Time

	// compiled regexp
	Re *regexp.Regexp
}

FindView is a find / replace widget that displays results in a TextEditor and has a toolbar for controlling find / replace process.

func NewFindView

func NewFindView(par ki.Ki, name ...string) *FindView

NewFindView adds a new FindView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*FindView) CheckValidRegexp

func (fv *FindView) CheckValidRegexp() bool

CheckValidRegexp returns false if using regexp and it is not valid

func (*FindView) CompileRegexp

func (fv *FindView) CompileRegexp() bool

CompileRegexp compiles the regexp if necessary -- returns false if it is invalid

func (*FindView) ConfigFindView

func (fv *FindView) ConfigFindView()

Config configures the view

func (*FindView) ConfigToolbars

func (fv *FindView) ConfigToolbars(fb, rb *gi.BasicBar)

ConfigToolbars

func (*FindView) ConfigWidget

func (fv *FindView) ConfigWidget()

func (*FindView) FindAction

func (fv *FindView) FindAction()

FindAction runs a new find with current params

func (*FindView) FindBar

func (fv *FindView) FindBar() *gi.BasicBar

FindBar returns the find toolbar

func (*FindView) FindNextAct

func (fv *FindView) FindNextAct() *gi.Button

FindNextAct returns the find next action in toolbar -- selected first

func (*FindView) FindText

func (fv *FindView) FindText() *gi.Chooser

FindText returns the find textfield in toolbar

func (*FindView) HighlightFinds

func (fv *FindView) HighlightFinds(tv, ftv *texteditor.Editor, fbStLn, fCount int, find string)

HighlightFinds highlights all the find results in ftv buffer

func (*FindView) IgnoreBox

func (fv *FindView) IgnoreBox() *gi.Switch

IgnoreBox returns the ignore case checkbox in toolbar

func (*FindView) KiType

func (t *FindView) KiType() *gti.Type

KiType returns the *gti.Type of FindView

func (*FindView) LocCombo

func (fv *FindView) LocCombo() *gi.Chooser

LocCombo returns the loc combobox

func (*FindView) New

func (t *FindView) New() ki.Ki

New returns a new *FindView value

func (*FindView) NextFind

func (fv *FindView) NextFind()

NextFind shows next find result

func (*FindView) OpenFindURL

func (fv *FindView) OpenFindURL(ur string, ftv *texteditor.Editor) bool

OpenFindURL opens given find:/// url from Find

func (*FindView) Params

func (fv *FindView) Params() *FindParams

Params returns the find params

func (*FindView) PrevFind

func (fv *FindView) PrevFind()

PrevFind shows previous find result

func (*FindView) RegexpBox

func (fv *FindView) RegexpBox() *gi.Switch

RegexpBox returns the regexp checkbox in toolbar

func (*FindView) ReplBar

func (fv *FindView) ReplBar() *gi.BasicBar

ReplBar returns the replace toolbar

func (*FindView) ReplText

func (fv *FindView) ReplText() *gi.Chooser

ReplText returns the replace textfield in toolbar

func (*FindView) ReplaceAction

func (fv *FindView) ReplaceAction() bool

ReplaceAction performs the replace -- if using regexp mode, regexp must be compiled in advance

func (*FindView) ReplaceAll

func (fv *FindView) ReplaceAll()

ReplaceAll performs replace all

func (*FindView) ReplaceAllAction

func (fv *FindView) ReplaceAllAction()

ReplaceAllAction performs replace all, prompting before proceeding

func (*FindView) SaveFindString

func (fv *FindView) SaveFindString(find string)

SaveFindString saves the given find string to the find params history and current str

func (*FindView) SaveReplString

func (fv *FindView) SaveReplString(repl string)

SaveReplString saves the given replace string to the find params history and current str

func (*FindView) SetClass

func (t *FindView) SetClass(v string) *FindView

SetClass sets the [FindView.Class]

func (*FindView) SetCustomContextMenu

func (t *FindView) SetCustomContextMenu(v func(m *gi.Scene)) *FindView

SetCustomContextMenu sets the [FindView.CustomContextMenu]

func (*FindView) SetGide

func (t *FindView) SetGide(v Gide) *FindView

SetGide sets the [FindView.Gide]: parent gide project

func (*FindView) SetLangVv

func (t *FindView) SetLangVv(v giv.Value) *FindView

SetLangVv sets the [FindView.LangVV]: langs value view

func (*FindView) SetRe

func (t *FindView) SetRe(v *regexp.Regexp) *FindView

SetRe sets the [FindView.Re]: compiled regexp

func (*FindView) SetStackTop

func (t *FindView) SetStackTop(v int) *FindView

SetStackTop sets the [FindView.StackTop]

func (*FindView) SetTime

func (t *FindView) SetTime(v time.Time) *FindView

SetTime sets the [FindView.Time]: time of last find

func (*FindView) SetTooltip

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

SetTooltip sets the [FindView.Tooltip]

func (*FindView) ShowResults

func (fv *FindView) ShowResults(res []FileSearchResults)

ShowResults shows the results in the buffer

func (*FindView) TextEditor

func (fv *FindView) TextEditor() *texteditor.Editor

TextEditorLay returns the find results TextEditor

func (*FindView) UpdateFromParams

func (fv *FindView) UpdateFromParams()

UpdateFromParams is called in Find function with new params

type Gide

type Gide interface {
	gi.Widget

	// Scene returns the scene for the view
	Scene() *gi.Scene

	// ProjPrefs returns the gide.ProjPrefs
	ProjPrefs() *ProjPrefs

	// FileTree returns the gide.Files file tree
	FileTree() *filetree.Tree

	// LastSaveTime returns the time stamp when a file was last saved within project --
	// can be used for dirty flag state relative to other time stamps.
	LastSaveTime() time.Time

	// VersCtrl returns the version control system in effect, using the file tree detected
	// version or whatever is set in project preferences
	VersCtrl() filetree.VersCtrlName

	// CmdRuns returns the CmdRuns manager of running commands, used extensively
	// in commands.go
	CmdRuns() *CmdRuns

	// history of commands executed in this session
	CmdHist() *CmdNames

	// ArgVarVals returns the ArgVarVals argument variable values
	ArgVarVals() *ArgVarVals

	// SetStatus updates the statusbar label with given message, to be rendered next time
	SetStatus(msg string)

	// UpdateStatusLabel updates the statusbar label with current data
	UpdateStatusLabel()

	// SelectTabByLabel Selects given main tab, and returns all of its contents as well.
	SelectTabByLabel(label string) gi.Widget

	// FocusOnTabs moves keyboard focus to Tabs panel -- returns false if nothing at that tab
	FocusOnTabs() bool

	// ShowFile shows given file name at given line, returning TextEditor showing it
	// or error if not found.
	ShowFile(fname string, ln int) (*TextEditor, error)

	// FileNodeForFile returns file node for given file path.
	// add: if not found in existing tree and external files, then if add is true,
	// it is added to the ExtFiles list.
	FileNodeForFile(fpath string, add bool) *filetree.Node

	// TextBufForFile returns the TextBuf for given file path
	// add: if not found in existing tree and external files, then if add is true,
	// it is added to the ExtFiles list.
	TextBufForFile(fpath string, add bool) *texteditor.Buf

	// NextViewFileNode sets the next text view to view file in given node (opens
	// buffer if not already opened) -- if already being viewed, that is
	// activated, returns text view and index
	NextViewFileNode(fn *filetree.Node) (*TextEditor, int)

	// ActiveTextEditor returns the currently-active TextEditor
	ActiveTextEditor() *TextEditor

	// SetActiveTextEditor sets the given textview as the active one, and returns its index
	SetActiveTextEditor(av *TextEditor) int

	// ActiveFileNode returns the file node for the active file -- nil if none
	ActiveFileNode() *filetree.Node

	// ExecCmdFileNode pops up a menu to select a command appropriate for the given node,
	// and shows output in Tab with name of command
	ExecCmdFileNode(fn *filetree.Node)

	// ExecCmdNameFileNode executes command of given name on given node
	ExecCmdNameFileNode(fn *filetree.Node, cmdNm CmdName, sel bool, clearBuf bool)

	// ExecCmdNameFileName executes command of given name on given file name
	ExecCmdNameFileName(fn string, cmdNm CmdName, sel bool, clearBuf bool)

	// Find does Find / Replace in files, using given options and filters -- opens up a
	// main tab with the results and further controls.
	Find(find, repl string, ignoreCase, regExp bool, loc FindLoc, langs []fi.Known)

	// ParseOpenFindURL parses and opens given find:/// url from Find, return text
	// region encoded in url, and starting line of results in find buffer, and
	// number of results returned -- for parsing all the find results
	ParseOpenFindURL(ur string, ftv *texteditor.Editor) (tv *TextEditor, reg textbuf.Region, findBufStLn, findCount int, ok bool)

	// OpenFileAtRegion opens the specified file, highlights the region and sets the cursor
	OpenFileAtRegion(filename gi.FileName, reg textbuf.Region) (tv *TextEditor, ok bool)

	// SaveAllCheck checks if any files have not been saved, and prompt to save them.
	// returns true if there were unsaved files, false otherwise.
	// cancelOpt presents an option to cancel current command,
	// in which case function is not called.
	// if function is passed, then it is called in all cases except
	// if the user selects cancel.
	SaveAllCheck(cancelOpt bool, fun func()) bool

	// SaveAllOpenNodes saves all of the open filenodes to their current file names
	SaveAllOpenNodes()

	// CloseOpenNodes closes any nodes with open views (including those in directories under nodes).
	// called prior to rename.
	CloseOpenNodes(nodes []*FileNode)

	// LookupFun is the completion system Lookup function that makes a custom
	// textview dialog that has option to edit resulting file.
	LookupFun(data any, text string, posLn, posCh int) (ld complete.Lookup)

	// Spell checks spelling in active text view
	Spell()

	// Symbols calls a function to parse file or package
	Symbols()

	// Debug runs debugger on default exe
	Debug()

	// CurDebug returns the current debug view, or nil
	CurDebug() *DebugView

	// ClearDebug clears the current debugger setting -- no more debugger active.
	ClearDebug()
}

Gide provides the interface for the GideView functionality that is needed by the core gide infrastructure, to allow GideView to be in a separate package. It is not intended to be the full functionality of the GideView.

func ParentGide

func ParentGide(kn ki.Ki) (Gide, bool)

ParentGide returns the Gide parent of given node

type KeyFuns

type KeyFuns int32 //enums:enum -trim-prefix KeyFun

KeyFuns (i.e. gide.KeytFuns) are special functions for the overall control of the system -- moving between windows, running commands, etc. Multi-key sequences can be used.

const (
	KeyFunNil KeyFuns = iota
	// special internal signal returned by KeyFun indicating need for second key
	KeyFunNeeds2
	// move to next panel to the right
	KeyFunNextPanel
	// move to prev panel to the left
	KeyFunPrevPanel
	// open a new file in active textview
	KeyFunFileOpen
	// select an open buffer to edit in active textview
	KeyFunBufSelect
	// open active file in other view
	KeyFunBufClone
	// save active textview buffer to its file
	KeyFunBufSave
	// save as active textview buffer to its file
	KeyFunBufSaveAs
	// close active textview buffer
	KeyFunBufClose
	// execute a command on active textview buffer
	KeyFunExecCmd
	// copy rectangle
	KeyFunRectCopy
	// cut rectangle
	KeyFunRectCut
	// paste rectangle
	KeyFunRectPaste
	// copy selection to named register
	KeyFunRegCopy
	// paste selection from named register
	KeyFunRegPaste
	// comment out region
	KeyFunCommentOut
	// indent region
	KeyFunIndent
	// jump to line (same as keyfun.Jump)
	KeyFunJump
	// set named splitter config
	KeyFunSetSplit
	// build overall project
	KeyFunBuildProj
	// run overall project
	KeyFunRunProj
)
const KeyFunsN KeyFuns = 22

KeyFunsN is the highest valid value for type KeyFuns, plus one.

func KeyFun

func KeyFun(key1, key2 key.Chord) KeyFuns

KeyFun translates chord into keyboard function -- use oswin key.Chord to get chord -- it returns KeyFunNeeds2 if the key sequence requires 2 keys to be entered, and only the first is present

func KeyFunsValues

func KeyFunsValues() []KeyFuns

KeyFunsValues returns all possible values for the type KeyFuns.

func (KeyFuns) Desc

func (i KeyFuns) Desc() string

Desc returns the description of the KeyFuns value.

func (KeyFuns) Int64

func (i KeyFuns) Int64() int64

Int64 returns the KeyFuns value as an int64.

func (KeyFuns) IsValid

func (i KeyFuns) IsValid() bool

IsValid returns whether the value is a valid option for type KeyFuns.

func (KeyFuns) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (*KeyFuns) SetInt64

func (i *KeyFuns) SetInt64(in int64)

SetInt64 sets the KeyFuns value from an int64.

func (*KeyFuns) SetString

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

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

func (KeyFuns) String

func (i KeyFuns) String() string

String returns the string representation of this KeyFuns value.

func (*KeyFuns) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (KeyFuns) Values

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

Values returns all possible values for the type KeyFuns.

type KeyMapItem

type KeyMapItem struct {

	// the key chord sequence that activates a function
	Keys KeySeq

	// the function of that key
	Fun KeyFuns
}

KeyMapItem records one element of the key map -- used for organizing the map.

type KeyMapName

type KeyMapName string

KeyMapName has an associated ValueView for selecting from the list of available key map names, for use in preferences etc.

var ActiveKeyMapName KeyMapName

ActiveKeyMapName is the name of the active keymap

func (KeyMapName) Value

func (kn KeyMapName) Value() giv.Value

Value registers KeyMapValue as the viewer of KeyMapName

type KeyMapValue

type KeyMapValue struct {
	giv.ValueBase
}

KeyMapValue presents an action for displaying an KeyMapName and selecting from KeyMapChooserDialog

func (*KeyMapValue) ConfigDialog

func (vv *KeyMapValue) ConfigDialog(d *gi.Body) (bool, func())

func (*KeyMapValue) ConfigWidget

func (vv *KeyMapValue) ConfigWidget(w gi.Widget)

func (*KeyMapValue) HasDialog

func (vv *KeyMapValue) HasDialog() bool

func (*KeyMapValue) OpenDialog

func (vv *KeyMapValue) OpenDialog(ctx gi.Widget, fun func())

func (*KeyMapValue) UpdateWidget

func (vv *KeyMapValue) UpdateWidget()

func (*KeyMapValue) WidgetType

func (vv *KeyMapValue) WidgetType() *gti.Type

type KeyMaps

type KeyMaps []KeyMapsItem

KeyMaps is a list of KeyMap's -- users can edit these in Prefs -- to create a custom one, just duplicate an existing map, rename, and customize

var AvailKeyMaps KeyMaps

AvailKeyMaps is the current list of available keymaps for use -- can be loaded / saved / edited with preferences. This is set to StdKeyMaps at startup.

func (*KeyMaps) CopyFrom

func (km *KeyMaps) CopyFrom(cp KeyMaps)

CopyFrom copies keymaps from given other map

func (*KeyMaps) MapByName

func (km *KeyMaps) MapByName(name KeyMapName) (*KeySeqMap, int, bool)

MapByName returns a keymap and index by name -- returns false and emits a message to stdout if not found

func (*KeyMaps) Open

func (km *KeyMaps) Open(filename gi.FileName) error

Open opens keymaps from a json-formatted file.

func (*KeyMaps) OpenPrefs

func (km *KeyMaps) OpenPrefs() error

OpenPrefs opens KeyMaps from App standard prefs directory, using PrefsKeyMapsFileName

func (*KeyMaps) RevertToStd

func (km *KeyMaps) RevertToStd()

RevertToStd reverts this map to using the StdKeyMaps that are compiled into the program and have all the lastest key functions bound to standard values. If you have edited your maps, and are finding things not working, it is a good idea to save your current maps and try this, or at least do ViewStdMaps to see the current standards. <b>Your current map edits will be lost if you proceed!</b>

func (*KeyMaps) Save

func (km *KeyMaps) Save(filename gi.FileName) error

Save saves keymaps to a json-formatted file.

func (*KeyMaps) SavePrefs

func (km *KeyMaps) SavePrefs() error

SavePrefs saves KeyMaps to App standard prefs directory, using PrefsKeyMapsFileName

func (*KeyMaps) ViewStd

func (km *KeyMaps) ViewStd()

ViewStd shows the standard maps that are compiled into the program and have all the lastest key functions bound to standard values. Useful for comparing against custom maps.

type KeyMapsItem

type KeyMapsItem struct {

	// name of keymap
	Name string `width:"20"`

	// description of keymap -- good idea to include source it was derived from
	Desc string

	// to edit key sequence click button and type new key combination; to edit function mapped to key sequence choose from menu
	Map KeySeqMap
}

KeyMapsItem is an entry in a KeyMaps list

func (KeyMapsItem) Label

func (km KeyMapsItem) Label() string

Label satisfies the Labeler interface

type KeySeq

type KeySeq struct {
	Key1 key.Chord // first key
	Key2 key.Chord // second key (optional)
}

KeySeq defines a multiple-key sequence to initiate a key function

func ChordForFun

func ChordForFun(kf KeyFuns) KeySeq

ChordForFun returns first key sequence trigger for given KeyFun in ActiveKeyMap

func (KeySeq) Label

func (kf KeySeq) Label() string

Label satisfies gi.Labeler interface

func (KeySeq) MarshalText

func (kf KeySeq) MarshalText() ([]byte, error)

MarshalText is required for encoding of struct keys

func (KeySeq) String

func (kf KeySeq) String() string

String() satisfies fmt.Stringer interface

func (*KeySeq) UnmarshalText

func (kf *KeySeq) UnmarshalText(b []byte) error

UnmarshalText is required for decoding of struct keys

type KeySeqMap

type KeySeqMap map[KeySeq]KeyFuns

KeySeqMap is a map between a multi-key sequence (multiple chords) and a specific KeyFun function. This mapping must be unique, in that each chord has unique KeyFun, but multiple chords can trigger the same function.

var ActiveKeyMap *KeySeqMap

ActiveKeyMap points to the active map -- users can set this to an alternative map in Prefs

func (*KeySeqMap) ChordForFun

func (km *KeySeqMap) ChordForFun(kf KeyFuns) KeySeq

ChordForFun returns first key sequence trigger for given KeyFun in map

func (*KeySeqMap) ToSlice

func (km *KeySeqMap) ToSlice() []KeyMapItem

ToSlice copies this keymap to a slice of KeyMapItem's

func (*KeySeqMap) Update

func (km *KeySeqMap) Update(kmName KeyMapName)

Update ensures that the given keymap has at least one entry for every defined KeyFun, grabbing ones from the default map if not, and also eliminates any Nil entries which might reflect out-of-date functions

type LangOpts

type LangOpts struct {

	// command(s) to run after a file of this type is saved
	PostSaveCmds CmdNames
}

LangOpts defines options associated with a given language / file format only languages in fi.Known list are supported..

type Langs

type Langs map[fi.Known]*LangOpts

Langs is a map of language options

var AvailLangs Langs

AvailLangs is the current set of language options -- can be loaded / saved / edited with preferences. This is set to StdLangs at startup.

func (*Langs) CopyFrom

func (lt *Langs) CopyFrom(cp Langs)

CopyFrom copies languages from given other map

func (*Langs) Open

func (lt *Langs) Open(filename gi.FileName) error

Open opens languages from a toml-formatted file.

func (*Langs) OpenPrefs

func (lt *Langs) OpenPrefs() error

OpenPrefs opens Langs from App standard prefs directory, using PrefsLangsFileName

func (*Langs) RevertToStd

func (lt *Langs) RevertToStd()

RevertToStd reverts this map to using the StdLangs that are compiled into the program and have all the lastest standards.

func (*Langs) Save

func (lt *Langs) Save(filename gi.FileName) error

Save saves languages to a toml-formatted file.

func (*Langs) SavePrefs

func (lt *Langs) SavePrefs() error

SavePrefs saves Langs to App standard prefs directory, using PrefsLangsFileName

func (Langs) Validate

func (lt Langs) Validate() bool

Validate checks to make sure post save command names exist, issuing warnings to log for those that don't

func (*Langs) ViewStd

func (lt *Langs) ViewStd()

ViewStd shows the standard langs that are compiled into the program and have all the lastest standards. Useful for comparing against custom lists.

type OpenNodes

type OpenNodes []*filetree.Node

OpenNodes is a list of file nodes that have been opened for editing -- it is maintained in recency order -- most recent on top -- call Add every time a node is opened / visited for editing

func (*OpenNodes) Add

func (on *OpenNodes) Add(fn *filetree.Node) bool

Add adds given node to list of open nodes -- if already on the list it is moved to the top -- returns true if actually added. Connects to fn.TextBuf signal and auto-closes when buffer closes.

func (*OpenNodes) AddImpl

func (on *OpenNodes) AddImpl(fn *filetree.Node) bool

AddImpl adds given node to list of open nodes -- if already on the list it is moved to the top -- returns true if actually added.

func (*OpenNodes) ByStringName

func (on *OpenNodes) ByStringName(name string) *filetree.Node

ByStringName returns the open node with given strings name

func (*OpenNodes) Delete

func (on *OpenNodes) Delete(fn *filetree.Node) bool

Delete deletes given node in list of open nodes, returning true if found and deleted

func (*OpenNodes) DeleteDeleted

func (on *OpenNodes) DeleteDeleted()

DeleteDeleted deletes deleted nodes on list

func (*OpenNodes) DeleteIdx

func (on *OpenNodes) DeleteIdx(idx int)

DeleteIdx deletes at given index

func (*OpenNodes) NChanged

func (on *OpenNodes) NChanged() int

NChanged returns number of changed open files

func (*OpenNodes) Strings

func (on *OpenNodes) Strings() []string

Strings returns a string list of nodes, with paths relative to proj root

type Preferences

type Preferences struct {

	// file view preferences
	Files FilePrefs

	// environment variables to set for this app -- if run from the command line, standard shell environment variables are inherited, but on some OS's (Mac), they are not set when run as a gui app
	EnvVars map[string]string

	// key map for gide-specific keyboard sequences
	KeyMap KeyMapName

	// if set, the current available set of key maps is saved to your preferences directory, and automatically loaded at startup -- this should be set if you are using custom key maps, but it may be safer to keep it <i>OFF</i> if you are <i>not</i> using custom key maps, so that you'll always have the latest compiled-in standard key maps with all the current key functions bound to standard key chords
	SaveKeyMaps bool

	// if set, the current customized set of language options (see Edit Lang Opts) is saved / loaded along with other preferences -- if not set, then you always are using the default compiled-in standard set (which will be updated)
	SaveLangOpts bool

	// if set, the current customized set of command parameters (see Edit Cmds) is saved / loaded along with other preferences -- if not set, then you always are using the default compiled-in standard set (which will be updated)
	SaveCmds bool

	// flag that is set by StructView by virtue of changeflag tag, whenever an edit is made.  Used to drive save menus etc.
	Changed bool `view:"-" changeflag:"+" json:"-" toml:"-" xml:"-"`
}

Preferences are the overall user preferences for Gide.

func (*Preferences) Apply

func (pf *Preferences) Apply()

Apply preferences updates things according with settings

func (*Preferences) ApplyEnvVars

func (pf *Preferences) ApplyEnvVars()

ApplyEnvVars applies environment variables set in EnvVars

func (*Preferences) Defaults

func (pf *Preferences) Defaults()

Defaults are the defaults for Preferences

func (*Preferences) EditCmds

func (pf *Preferences) EditCmds()

EditCmds opens the CmdsView editor to customize commands you can run.

func (*Preferences) EditKeyMaps

func (pf *Preferences) EditKeyMaps()

EditKeyMaps opens the KeyMapsView editor to create new keymaps / save / load from other files, etc. Current avail keymaps are saved and loaded with preferences automatically.

func (*Preferences) EditLangOpts

func (pf *Preferences) EditLangOpts()

EditLangOpts opens the LangsView editor to customize options for each type of language / data / file type.

func (*Preferences) EditRegisters

func (pf *Preferences) EditRegisters()

EditRegisters opens the RegistersView editor to customize saved registers

func (*Preferences) EditSplits

func (pf *Preferences) EditSplits()

EditSplits opens the SplitsView editor to customize saved splitter settings

func (*Preferences) Open

func (pf *Preferences) Open() error

Open preferences from GoGi standard prefs directory, and applies them

func (*Preferences) Save

func (pf *Preferences) Save() error

Save Preferences to GoGi standard prefs directory

func (*Preferences) VersionInfo

func (pf *Preferences) VersionInfo() string

VersionInfo returns Gide version information

type ProjPrefs

type ProjPrefs struct {

	// file view preferences
	Files FilePrefs

	// editor preferences
	Editor gi.EditorPrefs `view:"inline"`

	// current named-split config in use for configuring the splitters
	SplitName SplitName

	// the language associated with the most frequently-encountered file extension in the file tree -- can be manually set here as well
	MainLang fi.Known

	// the type of version control system used in this project (git, svn, etc) -- filters commands available
	VersCtrl filetree.VersCtrlName

	// current project filename for saving / loading specific Gide configuration information in a .gide file (optional)
	ProjFilename gi.FileName `ext:".gide"`

	// root directory for the project -- all projects must be organized within a top-level root directory, with all the files therein constituting the scope of the project -- by default it is the path for ProjFilename
	ProjRoot gi.FileName

	// if true, use Go modules, otherwise use GOPATH -- this sets your effective GO111MODULE environment variable accordingly, dynamically -- updated by toolbar checkbox, dynamically
	GoMod bool

	// command(s) to run for main Build button
	BuildCmds CmdNames

	// build directory for main Build button -- set this to the directory where you want to build the main target for this project -- avail as {BuildDir} in commands
	BuildDir gi.FileName

	// build target for main Build button, if relevant for your  BuildCmds
	BuildTarg gi.FileName

	// executable to run for this project via main Run button -- called by standard Run Proj command
	RunExec gi.FileName

	// command(s) to run for main Run button (typically Run Proj)
	RunCmds CmdNames

	// custom debugger parameters for this project
	Debug gidebug.Params

	// saved find params
	Find FindParams `view:"-"`

	// saved structure params
	Symbols SymbolsParams `view:"-"`

	// directory properties
	Dirs filetree.DirFlagMap `view:"-"`

	// last register used
	Register RegisterName `view:"-"`

	// current splitter splits
	Splits []float32 `view:"-"`

	// flag that is set by StructView by virtue of changeflag tag, whenever an edit is made.  Used to drive save menus etc.
	Changed bool `view:"-" changeflag:"+" json:"-" toml:"-" xml:"-"`
}

ProjPrefs are the preferences for saving for a project -- this IS the project file

func (*ProjPrefs) Open

func (pf *ProjPrefs) Open(filename gi.FileName) error

Open open from file

func (*ProjPrefs) RunExecIsExec

func (pf *ProjPrefs) RunExecIsExec() bool

RunExecIsExec returns true if the RunExec is actually executable

func (*ProjPrefs) Save

func (pf *ProjPrefs) Save(filename gi.FileName) error

Save save to file

func (*ProjPrefs) Update

func (pf *ProjPrefs) Update()

type RegisterName

type RegisterName string

RegisterName has an associated ValueView for selecting from the list of available named registers

func (RegisterName) Value

func (kn RegisterName) Value() giv.Value

Value registers RegisterValue as the viewer of RegisterName

type RegisterValue

type RegisterValue struct {
	giv.ValueBase
}

RegisterValue presents an action for displaying an RegisterName and selecting

func (*RegisterValue) ConfigWidget

func (vv *RegisterValue) ConfigWidget(w gi.Widget)

func (*RegisterValue) HasDialog

func (vv *RegisterValue) HasDialog() bool

func (*RegisterValue) OpenDialog

func (vv *RegisterValue) OpenDialog(ctx gi.Widget, fun func())

func (*RegisterValue) UpdateWidget

func (vv *RegisterValue) UpdateWidget()

func (*RegisterValue) WidgetType

func (vv *RegisterValue) WidgetType() *gti.Type

type Registers

type Registers map[string]string

Registers is a list of named strings

var AvailRegisters Registers

AvailRegisters are available named registers. can be loaded / saved / edited with preferences.

func (*Registers) Names

func (lt *Registers) Names() []string

Names returns a slice of current register names

func (*Registers) Open

func (lt *Registers) Open(filename gi.FileName) error

Open opens named registers from a toml-formatted file.

func (*Registers) OpenPrefs

func (lt *Registers) OpenPrefs() error

OpenPrefs opens Registers from App standard prefs directory, using PrefRegistersFileName

func (*Registers) Save

func (lt *Registers) Save(filename gi.FileName) error

Save saves named registers to a toml-formatted file.

func (*Registers) SavePrefs

func (lt *Registers) SavePrefs() error

SavePrefs saves Registers to App standard prefs directory, using PrefRegistersFileName

type SpellView

type SpellView struct {
	gi.Layout

	// parent gide project
	Gide Gide `json:"-" xml:"-" copy:"-"`

	// textview that we're spell-checking
	Text *TextEditor `json:"-" xml:"-" copy:"-"`

	// current spelling errors
	Errs lex.Line

	// current line in text we're on
	CurLn int

	// current index in Errs we're on
	CurIdx int

	// current unknown lex token
	UnkLex lex.Lex

	// current unknown word
	UnkWord string

	// a list of suggestions from spell checker
	Suggest []string

	// last user action (ignore, change, learn)
	LastAction *gi.Button
}

SpellView is a widget that displays results of spell check

func NewSpellView

func NewSpellView(par ki.Ki, name ...string) *SpellView

NewSpellView adds a new SpellView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*SpellView) AcceptSuggestion

func (sv *SpellView) AcceptSuggestion(s string)

AcceptSuggestion replaces the misspelled word with the word in the ChangeText field

func (*SpellView) ChangeAct

func (sv *SpellView) ChangeAct() *gi.Button

ChangeAct returns the spell change action from toolbar

func (*SpellView) ChangeAction

func (sv *SpellView) ChangeAction()

ChangeAction replaces the known word with the selected suggested word and call CheckNextAction

func (*SpellView) ChangeAllAct

func (sv *SpellView) ChangeAllAct() *gi.Button

ChangeAllAct returns the spell change action from toolbar

func (*SpellView) ChangeAllAction

func (sv *SpellView) ChangeAllAction()

ChangeAllAction replaces the known word with the selected suggested word and call CheckNextAction

func (*SpellView) ChangeBar

func (sv *SpellView) ChangeBar() *gi.Toolbar

ChangeBar returns the suggest toolbar

func (*SpellView) ChangeText

func (sv *SpellView) ChangeText() *gi.TextField

ChangeText returns the unknown word textfield from toolbar

func (*SpellView) CheckNext

func (sv *SpellView) CheckNext()

CheckNext will find the next misspelled/unknown word and get suggestions for replacing it

func (*SpellView) ConfigSpellView

func (sv *SpellView) ConfigSpellView(ge Gide, atv *TextEditor)

Config configures the view

func (*SpellView) ConfigToolbar

func (sv *SpellView) ConfigToolbar()

ConfigToolbar adds toolbar.

func (*SpellView) Destroy

func (sv *SpellView) Destroy()

func (*SpellView) IgnoreAct

func (sv *SpellView) IgnoreAct() *gi.Button

IgnoreAct returns the ignore action from toolbar

func (*SpellView) IgnoreAction

func (sv *SpellView) IgnoreAction()

IgnoreAction will skip this and future instances of misspelled/unknown word and call CheckNextAction

func (*SpellView) KiType

func (t *SpellView) KiType() *gti.Type

KiType returns the *gti.Type of SpellView

func (*SpellView) LearnAct

func (sv *SpellView) LearnAct() *gi.Button

LearnAct returns the learn action from toolbar

func (*SpellView) LearnAction

func (sv *SpellView) LearnAction()

LearnAction will add the current unknown word to corpus and call CheckNext

func (*SpellView) New

func (t *SpellView) New() ki.Ki

New returns a new *SpellView value

func (*SpellView) SetClass

func (t *SpellView) SetClass(v string) *SpellView

SetClass sets the [SpellView.Class]

func (*SpellView) SetCurIdx

func (t *SpellView) SetCurIdx(v int) *SpellView

SetCurIdx sets the [SpellView.CurIdx]: current index in Errs we're on

func (*SpellView) SetCurLn

func (t *SpellView) SetCurLn(v int) *SpellView

SetCurLn sets the [SpellView.CurLn]: current line in text we're on

func (*SpellView) SetCustomContextMenu

func (t *SpellView) SetCustomContextMenu(v func(m *gi.Scene)) *SpellView

SetCustomContextMenu sets the [SpellView.CustomContextMenu]

func (*SpellView) SetErrs

func (t *SpellView) SetErrs(v lex.Line) *SpellView

SetErrs sets the [SpellView.Errs]: current spelling errors

func (*SpellView) SetGide

func (t *SpellView) SetGide(v Gide) *SpellView

SetGide sets the [SpellView.Gide]: parent gide project

func (*SpellView) SetLastAction

func (t *SpellView) SetLastAction(v *gi.Button) *SpellView

SetLastAction sets the [SpellView.LastAction]: last user action (ignore, change, learn)

func (*SpellView) SetStackTop

func (t *SpellView) SetStackTop(v int) *SpellView

SetStackTop sets the [SpellView.StackTop]

func (*SpellView) SetSuggest

func (t *SpellView) SetSuggest(v []string) *SpellView

SetSuggest sets the [SpellView.Suggest]: a list of suggestions from spell checker

func (*SpellView) SetText

func (t *SpellView) SetText(v *TextEditor) *SpellView

SetText sets the [SpellView.Text]: textview that we're spell-checking

func (*SpellView) SetTooltip

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

SetTooltip sets the [SpellView.Tooltip]

func (*SpellView) SetUnkLex

func (t *SpellView) SetUnkLex(v lex.Lex) *SpellView

SetUnkLex sets the [SpellView.UnkLex]: current unknown lex token

func (*SpellView) SetUnkWord

func (t *SpellView) SetUnkWord(v string) *SpellView

SetUnkWord sets the [SpellView.UnkWord]: current unknown word

func (*SpellView) SkipAct

func (sv *SpellView) SkipAct() *gi.Button

SkipAct returns the skip action from toolbar

func (*SpellView) SkipAction

func (sv *SpellView) SkipAction()

SkipAction will skip this single instance of misspelled/unknown word and call CheckNextAction

func (*SpellView) SpellAction

func (sv *SpellView) SpellAction()

SpellAction runs a new spell check with current params

func (*SpellView) SpellBar

func (sv *SpellView) SpellBar() *gi.Toolbar

SpellBar returns the spell toolbar

func (*SpellView) SuggestView

func (sv *SpellView) SuggestView() *giv.SliceView

SuggestView returns the view for the list of suggestions

func (*SpellView) TrainAction

func (sv *SpellView) TrainAction()

TrainAction allows you to train on additional text files and also to rebuild the spell model

func (*SpellView) UnkEndPos

func (sv *SpellView) UnkEndPos() lex.Pos

UnkEndPos returns the end position of the current unknown word

func (*SpellView) UnkStartPos

func (sv *SpellView) UnkStartPos() lex.Pos

UnkStartPos returns the start position of the current unknown word

func (*SpellView) UnknownBar

func (sv *SpellView) UnknownBar() *gi.Toolbar

UnknownBar returns the toolbar that displays the unknown word

func (*SpellView) UnknownText

func (sv *SpellView) UnknownText() *gi.TextField

UnknownText returns the unknown word textfield from toolbar

type Split

type Split struct {

	// name of splitter config
	Name string

	// brief description
	Desc string

	// splitter panel proportions
	Splits []float32 `min:"0" max:"1" step:".05" fixed-len:"4"`
}

Split is a named splitter configuration

func (Split) Label

func (sp Split) Label() string

Label satisfies the Labeler interface

func (*Split) SaveSplits

func (lt *Split) SaveSplits(sp []float32)

SaveSplits saves given splits to this setting -- must use copy!

type SplitName

type SplitName string

SplitName has an associated ValueView for selecting from the list of available named splits

func (SplitName) Value

func (kn SplitName) Value() giv.Value

Value registers SplitValue as the viewer of SplitName

type SplitValue

type SplitValue struct {
	giv.ValueBase
}

SplitValue presents an action for displaying an SplitName and selecting

func (*SplitValue) ConfigWidget

func (vv *SplitValue) ConfigWidget(w gi.Widget)

func (*SplitValue) HasDialog

func (vv *SplitValue) HasDialog() bool

func (*SplitValue) OpenDialog

func (vv *SplitValue) OpenDialog(ctx gi.Widget, fun func())

func (*SplitValue) UpdateWidget

func (vv *SplitValue) UpdateWidget()

func (*SplitValue) WidgetType

func (vv *SplitValue) WidgetType() *gti.Type

type Splits

type Splits []*Split

Splits is a list of named splitter configurations

var AvailSplits Splits

AvailSplits are available named splitter settings. can be loaded / saved / edited with preferences. This is set to StdSplits at startup.

func (*Splits) Add

func (lt *Splits) Add(name, desc string, splits []float32) (*Split, int)

Add adds a new splitter setting, returns split and index

func (*Splits) CopyFrom

func (lt *Splits) CopyFrom(cp Splits)

CopyFrom copies named splits from given other map

func (*Splits) FixLen

func (lt *Splits) FixLen()

FixLen ensures that there are exactly 4 splits in each

func (*Splits) Names

func (lt *Splits) Names() []string

Names returns a slice of current names

func (*Splits) Open

func (lt *Splits) Open(filename gi.FileName) error

Open opens named splits from a json-formatted file.

func (*Splits) OpenPrefs

func (lt *Splits) OpenPrefs() error

OpenPrefs opens Splits from App standard prefs directory, using PrefSplitsFileName

func (*Splits) Save

func (lt *Splits) Save(filename gi.FileName) error

Save saves named splits to a json-formatted file.

func (*Splits) SavePrefs

func (lt *Splits) SavePrefs() error

SavePrefs saves Splits to App standard prefs directory, using PrefSplitsFileName

func (*Splits) SplitByName

func (lt *Splits) SplitByName(name SplitName) (*Split, int, bool)

SplitByName returns a named split and index by name -- returns false and emits a message to stdout if not found

type StackView

type StackView struct {
	gi.Layout

	// if true, this is a find frames, not a regular stack
	FindFrames bool
}

StackView is a view of the stack trace

func NewStackView

func NewStackView(par ki.Ki, name ...string) *StackView

NewStackView adds a new StackView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*StackView) ConfigStackView

func (sv *StackView) ConfigStackView(dv *DebugView, findFrames bool)

func (*StackView) DebugVw

func (sv *StackView) DebugVw() *DebugView

func (*StackView) KiType

func (t *StackView) KiType() *gti.Type

KiType returns the *gti.Type of StackView

func (*StackView) New

func (t *StackView) New() ki.Ki

New returns a new *StackView value

func (*StackView) SetClass

func (t *StackView) SetClass(v string) *StackView

SetClass sets the [StackView.Class]

func (*StackView) SetCustomContextMenu

func (t *StackView) SetCustomContextMenu(v func(m *gi.Scene)) *StackView

SetCustomContextMenu sets the [StackView.CustomContextMenu]

func (*StackView) SetFindFrames

func (t *StackView) SetFindFrames(v bool) *StackView

SetFindFrames sets the [StackView.FindFrames]: if true, this is a find frames, not a regular stack

func (*StackView) SetStackTop

func (t *StackView) SetStackTop(v int) *StackView

SetStackTop sets the [StackView.StackTop]

func (*StackView) SetTooltip

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

SetTooltip sets the [StackView.Tooltip]

func (*StackView) ShowStack

func (sv *StackView) ShowStack()

ShowStack triggers update of view of State.Stack

func (*StackView) TableView

func (sv *StackView) TableView() *giv.TableView

TableView returns the tableview

type SymNode

type SymNode struct {
	ki.Node

	// the symbol
	Symbol syms.Symbol
}

SymNode represents a language symbol -- the name of the node is the name of the symbol. Some symbols, e.g. type have children

func NewSymNode

func NewSymNode(par ki.Ki, name ...string) *SymNode

NewSymNode adds a new SymNode with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*SymNode) GetIcon

func (sy *SymNode) GetIcon() icons.Icon

GetIcon returns the appropriate Icon for this symbol type

func (*SymNode) KiType

func (t *SymNode) KiType() *gti.Type

KiType returns the *gti.Type of SymNode

func (*SymNode) New

func (t *SymNode) New() ki.Ki

New returns a new *SymNode value

func (*SymNode) OpenSyms

func (sn *SymNode) OpenSyms(pkg *syms.Symbol, fname, match string)

OpenSyms opens symbols from given symbol map (assumed to be package-level symbols) filtered by filename and match -- called on root node of tree.

func (*SymNode) SetSymbol

func (t *SymNode) SetSymbol(v syms.Symbol) *SymNode

SetSymbol sets the [SymNode.Symbol]: the symbol

type SymScopes

type SymScopes int32 //enums:enum -trim-prefix SymScope

SymScopes corresponds to the search scope

const (
	// SymScopePackage scopes list of symbols to the package of the active file
	SymScopePackage SymScopes = iota

	// SymScopeFile restricts the list of symbols to the active file
	SymScopeFile
)
const SymScopesN SymScopes = 2

SymScopesN is the highest valid value for type SymScopes, plus one.

func SymScopesValues

func SymScopesValues() []SymScopes

SymScopesValues returns all possible values for the type SymScopes.

func (SymScopes) Desc

func (i SymScopes) Desc() string

Desc returns the description of the SymScopes value.

func (SymScopes) Int64

func (i SymScopes) Int64() int64

Int64 returns the SymScopes value as an int64.

func (SymScopes) IsValid

func (i SymScopes) IsValid() bool

IsValid returns whether the value is a valid option for type SymScopes.

func (SymScopes) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (*SymScopes) SetInt64

func (i *SymScopes) SetInt64(in int64)

SetInt64 sets the SymScopes value from an int64.

func (*SymScopes) SetString

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

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

func (SymScopes) String

func (i SymScopes) String() string

String returns the string representation of this SymScopes value.

func (*SymScopes) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (SymScopes) Values

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

Values returns all possible values for the type SymScopes.

type SymTreeView

type SymTreeView struct {
	giv.TreeView
}

SymTreeView is a TreeView that knows how to operate on FileNode nodes

func NewSymTreeView

func NewSymTreeView(par ki.Ki, name ...string) *SymTreeView

NewSymTreeView adds a new SymTreeView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*SymTreeView) KiType

func (t *SymTreeView) KiType() *gti.Type

KiType returns the *gti.Type of SymTreeView

func (*SymTreeView) New

func (t *SymTreeView) New() ki.Ki

New returns a new *SymTreeView value

func (*SymTreeView) OnInit

func (st *SymTreeView) OnInit()

func (*SymTreeView) SetClass

func (t *SymTreeView) SetClass(v string) *SymTreeView

SetClass sets the [SymTreeView.Class]

func (*SymTreeView) SetCustomContextMenu

func (t *SymTreeView) SetCustomContextMenu(v func(m *gi.Scene)) *SymTreeView

SetCustomContextMenu sets the [SymTreeView.CustomContextMenu]

func (*SymTreeView) SetIcon

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

SetIcon sets the [SymTreeView.Icon]

func (*SymTreeView) SetIndent

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

SetIndent sets the [SymTreeView.Indent]

func (*SymTreeView) SetOpenDepth

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

SetOpenDepth sets the [SymTreeView.OpenDepth]

func (*SymTreeView) SetRootView

func (t *SymTreeView) SetRootView(v *giv.TreeView) *SymTreeView

SetRootView sets the [SymTreeView.RootView]

func (*SymTreeView) SetSelectedNodes

func (t *SymTreeView) SetSelectedNodes(v []giv.TreeViewer) *SymTreeView

SetSelectedNodes sets the [SymTreeView.SelectedNodes]

func (*SymTreeView) SetSymIcon

func (st *SymTreeView) SetSymIcon()

func (*SymTreeView) SetText

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

SetText sets the [SymTreeView.Text]

func (*SymTreeView) SetTooltip

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

SetTooltip sets the [SymTreeView.Tooltip]

func (*SymTreeView) SetViewIdx

func (t *SymTreeView) SetViewIdx(v int) *SymTreeView

SetViewIdx sets the [SymTreeView.ViewIdx]

func (*SymTreeView) SetWidgetSize

func (t *SymTreeView) SetWidgetSize(v mat32.Vec2) *SymTreeView

SetWidgetSize sets the [SymTreeView.WidgetSize]

func (*SymTreeView) SymNode

func (st *SymTreeView) SymNode() *SymNode

SymNode returns the SrcNode as a *gide* SymNode

func (*SymTreeView) UpdateBranchIcons

func (st *SymTreeView) UpdateBranchIcons()

type SymbolsParams

type SymbolsParams struct {

	// scope of symbols to list
	Scope SymScopes
}

SymbolsParams are parameters for structure view of file or package

type SymbolsView

type SymbolsView struct {
	gi.Layout

	// parent gide project
	Gide Gide `json:"-" xml:"-"`

	// params for structure display
	SymParams SymbolsParams

	// all the symbols for the file or package in a tree
	Syms *SymNode

	// only show symbols that match this string
	Match string
}

SymbolsView is a widget that displays results of a file or package parse

func NewSymbolsView

func NewSymbolsView(par ki.Ki, name ...string) *SymbolsView

NewSymbolsView adds a new SymbolsView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*SymbolsView) ConfigSymbolsView

func (sv *SymbolsView) ConfigSymbolsView(ge Gide, sp SymbolsParams)

Config configures the view

func (*SymbolsView) ConfigToolbar

func (sv *SymbolsView) ConfigToolbar()

ConfigToolbar adds toolbar.

func (*SymbolsView) ConfigTree

func (sv *SymbolsView) ConfigTree(scope SymScopes)

ConfigTree adds a treeview to the symbolsview. This is called for refresh action.

func (*SymbolsView) Frame

func (sv *SymbolsView) Frame() *gi.Frame

Toolbar returns the spell toolbar

func (*SymbolsView) KiType

func (t *SymbolsView) KiType() *gti.Type

KiType returns the *gti.Type of SymbolsView

func (*SymbolsView) New

func (t *SymbolsView) New() ki.Ki

New returns a new *SymbolsView value

func (*SymbolsView) OpenFile

func (sv *SymbolsView) OpenFile()

OpenFile opens file-level symbols for current active textview

func (*SymbolsView) OpenPackage

func (sv *SymbolsView) OpenPackage()

OpenPackage opens package-level symbols for current active textview

func (*SymbolsView) Params

func (sv *SymbolsView) Params() *SymbolsParams

Params returns the symbols params

func (*SymbolsView) RefreshAction

func (sv *SymbolsView) RefreshAction()

RefreshAction loads symbols for current file and scope

func (*SymbolsView) ScopeChooser

func (sv *SymbolsView) ScopeChooser() *gi.Chooser

ScopeChooser returns the scope Chooser

func (*SymbolsView) SearchText

func (sv *SymbolsView) SearchText() *gi.TextField

SearchText returns the unknown word textfield from toolbar

func (*SymbolsView) SetClass

func (t *SymbolsView) SetClass(v string) *SymbolsView

SetClass sets the [SymbolsView.Class]

func (*SymbolsView) SetCustomContextMenu

func (t *SymbolsView) SetCustomContextMenu(v func(m *gi.Scene)) *SymbolsView

SetCustomContextMenu sets the [SymbolsView.CustomContextMenu]

func (*SymbolsView) SetGide

func (t *SymbolsView) SetGide(v Gide) *SymbolsView

SetGide sets the [SymbolsView.Gide]: parent gide project

func (*SymbolsView) SetMatch

func (t *SymbolsView) SetMatch(v string) *SymbolsView

SetMatch sets the [SymbolsView.Match]: only show symbols that match this string

func (*SymbolsView) SetStackTop

func (t *SymbolsView) SetStackTop(v int) *SymbolsView

SetStackTop sets the [SymbolsView.StackTop]

func (*SymbolsView) SetSymParams

func (t *SymbolsView) SetSymParams(v SymbolsParams) *SymbolsView

SetSymParams sets the [SymbolsView.SymParams]: params for structure display

func (*SymbolsView) SetSyms

func (t *SymbolsView) SetSyms(v *SymNode) *SymbolsView

SetSyms sets the [SymbolsView.Syms]: all the symbols for the file or package in a tree

func (*SymbolsView) SetTooltip

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

SetTooltip sets the [SymbolsView.Tooltip]

func (*SymbolsView) Toolbar

func (sv *SymbolsView) Toolbar() *gi.Toolbar

Toolbar returns the symbols toolbar

type TaskView

type TaskView struct {
	gi.Layout
}

TaskView is a view of the threads

func NewTaskView

func NewTaskView(par ki.Ki, name ...string) *TaskView

NewTaskView adds a new TaskView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*TaskView) ConfigTaskView

func (sv *TaskView) ConfigTaskView(dv *DebugView)

func (*TaskView) DebugVw

func (sv *TaskView) DebugVw() *DebugView

func (*TaskView) KiType

func (t *TaskView) KiType() *gti.Type

KiType returns the *gti.Type of TaskView

func (*TaskView) New

func (t *TaskView) New() ki.Ki

New returns a new *TaskView value

func (*TaskView) SetClass

func (t *TaskView) SetClass(v string) *TaskView

SetClass sets the [TaskView.Class]

func (*TaskView) SetCustomContextMenu

func (t *TaskView) SetCustomContextMenu(v func(m *gi.Scene)) *TaskView

SetCustomContextMenu sets the [TaskView.CustomContextMenu]

func (*TaskView) SetStackTop

func (t *TaskView) SetStackTop(v int) *TaskView

SetStackTop sets the [TaskView.StackTop]

func (*TaskView) SetTooltip

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

SetTooltip sets the [TaskView.Tooltip]

func (*TaskView) ShowTasks

func (sv *TaskView) ShowTasks()

ShowTasks triggers update of view of State.Tasks

func (*TaskView) TableView

func (sv *TaskView) TableView() *giv.TableView

TableView returns the tableview

type TextEditor

type TextEditor struct {
	texteditor.Editor

	Gide Gide
}

TextEditor is the Gide-specific version of the TextEditor, with support for setting / clearing breakpoints, etc

func NewTextEditor

func NewTextEditor(par ki.Ki, name ...string) *TextEditor

NewTextEditor adds a new TextEditor with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*TextEditor) ClearBreakpoint

func (ed *TextEditor) ClearBreakpoint(ln int)

func (*TextEditor) ContextMenu

func (ed *TextEditor) ContextMenu(m *gi.Scene)

ContextMenu builds the text editor context menu

func (*TextEditor) CurDebug

func (ed *TextEditor) CurDebug() (*DebugView, bool)

CurDebug returns the current debugger, true if it is present

func (*TextEditor) DebugVarValueAtPos

func (ed *TextEditor) DebugVarValueAtPos(pos image.Point) string

DebugVarValueAtPos returns debugger variable value for given mouse position

func (*TextEditor) FindFrames

func (ed *TextEditor) FindFrames(ln int)

FindFrames finds stack frames in the debugger containing this file and line

func (*TextEditor) HandleDebugDoubleClick

func (ed *TextEditor) HandleDebugDoubleClick(e events.Event, tpos lex.Pos)

DoubleClickEvent processes double-clicks NOT on the line-number section

func (*TextEditor) HandleEvents

func (ed *TextEditor) HandleEvents()

TextEditorEvents sets connections between mouse and key events and actions

func (*TextEditor) HasBreakpoint

func (ed *TextEditor) HasBreakpoint(ln int) bool

HasBreakpoint checks if line has a breakpoint

func (*TextEditor) KiType

func (t *TextEditor) KiType() *gti.Type

KiType returns the *gti.Type of TextEditor

func (*TextEditor) LineNoDoubleClick

func (ed *TextEditor) LineNoDoubleClick(tpos lex.Pos)

LineNoDoubleClick processes double-clicks on the line-number section

func (*TextEditor) New

func (t *TextEditor) New() ki.Ki

New returns a new *TextEditor value

func (*TextEditor) OnInit

func (ed *TextEditor) OnInit()

func (*TextEditor) SetBreakpoint

func (ed *TextEditor) SetBreakpoint(ln int)

SetBreakpoint sets breakpoint at given line (e.g., tv.CursorPos.Ln)

func (*TextEditor) SetClass

func (t *TextEditor) SetClass(v string) *TextEditor

SetClass sets the [TextEditor.Class]

func (*TextEditor) SetCursorColor

func (t *TextEditor) SetCursorColor(v image.Image) *TextEditor

SetCursorColor sets the [TextEditor.CursorColor]

func (*TextEditor) SetCursorWidth

func (t *TextEditor) SetCursorWidth(v units.Value) *TextEditor

SetCursorWidth sets the [TextEditor.CursorWidth]

func (*TextEditor) SetCustomContextMenu

func (t *TextEditor) SetCustomContextMenu(v func(m *gi.Scene)) *TextEditor

SetCustomContextMenu sets the [TextEditor.CustomContextMenu]

func (*TextEditor) SetGide

func (t *TextEditor) SetGide(v Gide) *TextEditor

SetGide sets the [TextEditor.Gide]

func (*TextEditor) SetHighlightColor

func (t *TextEditor) SetHighlightColor(v image.Image) *TextEditor

SetHighlightColor sets the [TextEditor.HighlightColor]

func (*TextEditor) SetLineNumberColor

func (t *TextEditor) SetLineNumberColor(v image.Image) *TextEditor

SetLineNumberColor sets the [TextEditor.LineNumberColor]

func (*TextEditor) SetLinkHandler

func (t *TextEditor) SetLinkHandler(v func(tl *paint.TextLink)) *TextEditor

SetLinkHandler sets the [TextEditor.LinkHandler]

func (*TextEditor) SetPlaceholder

func (t *TextEditor) SetPlaceholder(v string) *TextEditor

SetPlaceholder sets the [TextEditor.Placeholder]

func (*TextEditor) SetSelectColor

func (t *TextEditor) SetSelectColor(v image.Image) *TextEditor

SetSelectColor sets the [TextEditor.SelectColor]

func (*TextEditor) SetStackTop

func (t *TextEditor) SetStackTop(v int) *TextEditor

SetStackTop sets the [TextEditor.StackTop]

func (*TextEditor) SetStyles

func (ed *TextEditor) SetStyles()

func (*TextEditor) SetTooltip

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

SetTooltip sets the [TextEditor.Tooltip]

func (*TextEditor) ToggleBreakpoint

func (ed *TextEditor) ToggleBreakpoint(ln int)

type ThreadView

type ThreadView struct {
	gi.Layout
}

ThreadView is a view of the threads

func NewThreadView

func NewThreadView(par ki.Ki, name ...string) *ThreadView

NewThreadView adds a new ThreadView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*ThreadView) ConfigThreadView

func (sv *ThreadView) ConfigThreadView(dv *DebugView)

func (*ThreadView) DebugVw

func (sv *ThreadView) DebugVw() *DebugView

func (*ThreadView) KiType

func (t *ThreadView) KiType() *gti.Type

KiType returns the *gti.Type of ThreadView

func (*ThreadView) New

func (t *ThreadView) New() ki.Ki

New returns a new *ThreadView value

func (*ThreadView) SetClass

func (t *ThreadView) SetClass(v string) *ThreadView

SetClass sets the [ThreadView.Class]

func (*ThreadView) SetCustomContextMenu

func (t *ThreadView) SetCustomContextMenu(v func(m *gi.Scene)) *ThreadView

SetCustomContextMenu sets the [ThreadView.CustomContextMenu]

func (*ThreadView) SetStackTop

func (t *ThreadView) SetStackTop(v int) *ThreadView

SetStackTop sets the [ThreadView.StackTop]

func (*ThreadView) SetTooltip

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

SetTooltip sets the [ThreadView.Tooltip]

func (*ThreadView) ShowThreads

func (sv *ThreadView) ShowThreads()

ShowThreads triggers update of view of State.Threads

func (*ThreadView) TableView

func (sv *ThreadView) TableView() *giv.TableView

TableView returns the tableview

type VarView

type VarView struct {
	gi.Frame

	// variable being edited
	Var *gidebug.Variable `set:"-"`

	SelVar *gidebug.Variable `set:"-"`

	// frame info
	FrameInfo string `set:"-"`

	// parent DebugView
	DbgView *DebugView `json:"-" xml:"-"`
}

VarView shows a debug variable in an inspector-like framework, with sub-variables in a tree.

func NewVarView

func NewVarView(par ki.Ki, name ...string) *VarView

NewVarView adds a new VarView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func VarViewDialog

func VarViewDialog(vr *gidebug.Variable, frinfo string, dbgVw *DebugView) *VarView

VarViewDialog opens an interactive editor of the given Ki tree, at its root, returns VarView and window

func (*VarView) ConfigSplits

func (vv *VarView) ConfigSplits()

ConfigSplits configures the SplitView.

func (*VarView) ConfigToolbar

func (vv *VarView) ConfigToolbar(tb *gi.Toolbar)

func (*VarView) ConfigVarView

func (vv *VarView) ConfigVarView()

Config configures the widget

func (*VarView) KiType

func (t *VarView) KiType() *gti.Type

KiType returns the *gti.Type of VarView

func (*VarView) New

func (t *VarView) New() ki.Ki

New returns a new *VarView value

func (*VarView) SetClass

func (t *VarView) SetClass(v string) *VarView

SetClass sets the [VarView.Class]

func (*VarView) SetCustomContextMenu

func (t *VarView) SetCustomContextMenu(v func(m *gi.Scene)) *VarView

SetCustomContextMenu sets the [VarView.CustomContextMenu]

func (*VarView) SetDbgView

func (t *VarView) SetDbgView(v *DebugView) *VarView

SetDbgView sets the [VarView.DbgView]: parent DebugView

func (*VarView) SetFrameInfo

func (vv *VarView) SetFrameInfo(finfo string)

SetFrameInfo sets the frame info

func (*VarView) SetStackTop

func (t *VarView) SetStackTop(v int) *VarView

SetStackTop sets the [VarView.StackTop]

func (*VarView) SetStripes

func (t *VarView) SetStripes(v gi.Stripes) *VarView

SetStripes sets the [VarView.Stripes]

func (*VarView) SetTooltip

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

SetTooltip sets the [VarView.Tooltip]

func (*VarView) SetVar

func (vv *VarView) SetVar(vr *gidebug.Variable, frinfo string)

SetVar sets the source variable and ensures configuration

func (*VarView) SplitView

func (vv *VarView) SplitView() *gi.Splits

SplitView returns the main SplitView

func (*VarView) StructView

func (vv *VarView) StructView() *giv.StructView

StructView returns the main StructView

func (*VarView) TreeView

func (vv *VarView) TreeView() *giv.TreeView

TreeView returns the main TreeView

type VarsView

type VarsView struct {
	gi.Layout

	// if true, this is global vars, not local ones
	GlobalVars bool
}

VarsView is a view of the variables

func NewVarsView

func NewVarsView(par ki.Ki, name ...string) *VarsView

NewVarsView adds a new VarsView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*VarsView) ConfigVarsView

func (sv *VarsView) ConfigVarsView(dv *DebugView, globalVars bool)

func (*VarsView) DebugVw

func (sv *VarsView) DebugVw() *DebugView

func (*VarsView) KiType

func (t *VarsView) KiType() *gti.Type

KiType returns the *gti.Type of VarsView

func (*VarsView) New

func (t *VarsView) New() ki.Ki

New returns a new *VarsView value

func (*VarsView) SetClass

func (t *VarsView) SetClass(v string) *VarsView

SetClass sets the [VarsView.Class]

func (*VarsView) SetCustomContextMenu

func (t *VarsView) SetCustomContextMenu(v func(m *gi.Scene)) *VarsView

SetCustomContextMenu sets the [VarsView.CustomContextMenu]

func (*VarsView) SetGlobalVars

func (t *VarsView) SetGlobalVars(v bool) *VarsView

SetGlobalVars sets the [VarsView.GlobalVars]: if true, this is global vars, not local ones

func (*VarsView) SetStackTop

func (t *VarsView) SetStackTop(v int) *VarsView

SetStackTop sets the [VarsView.StackTop]

func (*VarsView) SetTooltip

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

SetTooltip sets the [VarsView.Tooltip]

func (*VarsView) ShowVars

func (sv *VarsView) ShowVars()

ShowVars triggers update of view of State.Vars

func (*VarsView) TableView

func (sv *VarsView) TableView() *giv.TableView

TableView returns the tableview

Jump to

Keyboard shortcuts

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