gidev

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: 44 Imported by: 0

Documentation

Overview

Package gidev implements the GideView editor, using all the elements from the gide interface. Having it in a separate package allows GideView to also include other packages that tap into the gide interface, such as the GoPi interactive parser.

Index

Constants

View Source
const (
	FileTreeIdx = iota
	TextEditor1Idx
	TextEditor2Idx
	TabsIdx
)

These are then the fixed indices of the different elements in the splitview

View Source
const NTextEditors = 2

NTextEditors is the number of text views to create -- to keep things simple and consistent (e.g., splitter settings always have the same number of values), we fix this degree of freedom, and have flexibility in the splitter settings for what to actually show.

Variables

CatNoEdit are the files to NOT edit from categories: Doc, Data

View Source
var GideViewType = gti.AddType(&gti.Type{
	Name:       "goki.dev/gide/v2/gidev.GideView",
	ShortName:  "gidev.GideView",
	IDName:     "gide-view",
	Doc:        "GideView is the core editor and tab viewer framework for the Gide system.  The\ndefault view has a tree browser of files on the left, editor panels in the\nmiddle, and a tabbed viewer on the right.",
	Directives: gti.Directives{},
	Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"ProjRoot", &gti.Field{Name: "ProjRoot", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "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", Directives: gti.Directives{}, Tag: ""}},
		{"ProjFilename", &gti.Field{Name: "ProjFilename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "current project filename for saving / loading specific Gide configuration information in a .gide file (optional)", Directives: gti.Directives{}, Tag: "ext:\".gide\""}},
		{"ActiveFilename", &gti.Field{Name: "ActiveFilename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "filename of the currently-active textview", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"ActiveLang", &gti.Field{Name: "ActiveLang", Type: "goki.dev/fi.Known", LocalType: "fi.Known", Doc: "language for current active filename", Directives: gti.Directives{}, Tag: ""}},
		{"ActiveVCS", &gti.Field{Name: "ActiveVCS", Type: "goki.dev/vci/v2.Repo", LocalType: "vci.Repo", Doc: "VCS repo for current active filename", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"ActiveVCSInfo", &gti.Field{Name: "ActiveVCSInfo", Type: "string", LocalType: "string", Doc: "VCS info for current active filename (typically branch or revision) -- for status", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"Changed", &gti.Field{Name: "Changed", Type: "bool", LocalType: "bool", Doc: "has the root changed?  we receive update signals from root for changes", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"StatusMessage", &gti.Field{Name: "StatusMessage", Type: "string", LocalType: "string", Doc: "the last status update message", Directives: gti.Directives{}, Tag: ""}},
		{"LastSaveTStamp", &gti.Field{Name: "LastSaveTStamp", Type: "time.Time", LocalType: "time.Time", Doc: "timestamp for when a file was last saved -- provides dirty state for various updates including rebuilding in debugger", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"Files", &gti.Field{Name: "Files", Type: "*goki.dev/gi/v2/filetree.Tree", LocalType: "*filetree.Tree", Doc: "all the files in the project directory and subdirectories", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"ActiveTextEditorIdx", &gti.Field{Name: "ActiveTextEditorIdx", Type: "int", LocalType: "int", Doc: "index of the currently-active textview -- new files will be viewed in other views if available", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"OpenNodes", &gti.Field{Name: "OpenNodes", Type: "goki.dev/gide/v2/gide.OpenNodes", LocalType: "gide.OpenNodes", Doc: "list of open nodes, most recent first", Directives: gti.Directives{}, Tag: "json:\"-\""}},
		{"CmdBufs", &gti.Field{Name: "CmdBufs", Type: "map[string]*goki.dev/gi/v2/texteditor.Buf", LocalType: "map[string]*texteditor.Buf", Doc: "the command buffers for commands run in this project", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"CmdHistory", &gti.Field{Name: "CmdHistory", Type: "goki.dev/gide/v2/gide.CmdNames", LocalType: "gide.CmdNames", Doc: "history of commands executed in this session", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}},
		{"RunningCmds", &gti.Field{Name: "RunningCmds", Type: "goki.dev/gide/v2/gide.CmdRuns", LocalType: "gide.CmdRuns", Doc: "currently running commands in this project", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"ArgVals", &gti.Field{Name: "ArgVals", Type: "goki.dev/gide/v2/gide.ArgVarVals", LocalType: "gide.ArgVarVals", Doc: "current arg var vals", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}},
		{"Prefs", &gti.Field{Name: "Prefs", Type: "goki.dev/gide/v2/gide.ProjPrefs", LocalType: "gide.ProjPrefs", Doc: "preferences for this project -- this is what is saved in a .gide project file", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"CurDbg", &gti.Field{Name: "CurDbg", Type: "*goki.dev/gide/v2/gide.DebugView", LocalType: "*gide.DebugView", Doc: "current debug view", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"KeySeq1", &gti.Field{Name: "KeySeq1", Type: "goki.dev/goosi/events/key.Chord", LocalType: "key.Chord", Doc: "first key in sequence if needs2 key pressed", Directives: gti.Directives{}, Tag: "set:\"-\""}},
		{"UpdtMu", &gti.Field{Name: "UpdtMu", Type: "sync.Mutex", LocalType: "sync.Mutex", Doc: "mutex for protecting overall updates to GideView", Directives: gti.Directives{}, Tag: "set:\"-\""}},
	}),
	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]{
		{"ExecCmdNameActive", &gti.Method{Name: "ExecCmdNameActive", Doc: "ExecCmdNameActive calls given command on current active textview", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"cmdNm", &gti.Field{Name: "cmdNm", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"ExecCmd", &gti.Method{Name: "ExecCmd", Doc: "ExecCmd pops up a menu to select a command appropriate for the current\nactive text view, and shows output in Tab 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]{})}},
		{"Build", &gti.Method{Name: "Build", Doc: "Build runs the BuildCmds set for this project", 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]{})}},
		{"Run", &gti.Method{Name: "Run", Doc: "Run runs the RunCmds set for this project", 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]{})}},
		{"Commit", &gti.Method{Name: "Commit", Doc: "Commit commits the current changes using relevant VCS tool.\nChecks for VCS setting and for unsaved 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]{})}},
		{"CursorToHistPrev", &gti.Method{Name: "CursorToHistPrev", Doc: "CursorToHistPrev moves cursor to previous position on history list --\nreturns true if moved", 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]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"CursorToHistNext", &gti.Method{Name: "CursorToHistNext", Doc: "CursorToHistNext moves cursor to next position on history list --\nreturns true if moved", 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]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"ReplaceInActive", &gti.Method{Name: "ReplaceInActive", Doc: "ReplaceInActive does query-replace in active file only", 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]{})}},
		{"CutRect", &gti.Method{Name: "CutRect", Doc: "CutRect cuts rectangle in active text view", 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]{})}},
		{"CopyRect", &gti.Method{Name: "CopyRect", Doc: "CopyRect copies rectangle in active text view", 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]{})}},
		{"PasteRect", &gti.Method{Name: "PasteRect", Doc: "PasteRect cuts rectangle in active text view", 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]{})}},
		{"RegisterCopy", &gti.Method{Name: "RegisterCopy", Doc: "RegisterCopy saves current selection in active text view to register of given name\nreturns true if saved", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"name", &gti.Field{Name: "name", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"RegisterPaste", &gti.Method{Name: "RegisterPaste", Doc: "RegisterPaste pastes register of given name into active text view\nreturns true if pasted", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"name", &gti.Field{Name: "name", Type: "goki.dev/gide/v2/gide.RegisterName", LocalType: "gide.RegisterName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"CommentOut", &gti.Method{Name: "CommentOut", Doc: "CommentOut comments-out selected lines in active text view\nand uncomments if already commented\nIf multiple lines are selected and any line is uncommented all will be commented", 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]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"Indent", &gti.Method{Name: "Indent", Doc: "Indent indents selected lines in active view", 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]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"ReCase", &gti.Method{Name: "ReCase", Doc: "ReCase replaces currently selected text in current active view with given case", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"c", &gti.Field{Name: "c", Type: "goki.dev/gi/v2/texteditor/textbuf.Cases", LocalType: "textbuf.Cases", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"string", &gti.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"JoinParaLines", &gti.Method{Name: "JoinParaLines", Doc: "JoinParaLines merges sequences of lines with hard returns forming paragraphs,\nseparated by blank lines, into a single line per paragraph,\nfor given selected region (full text if no selection)", 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]{})}},
		{"TabsToSpaces", &gti.Method{Name: "TabsToSpaces", Doc: "TabsToSpaces converts tabs to spaces\nfor given selected region (full text if no selection)", 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]{})}},
		{"SpacesToTabs", &gti.Method{Name: "SpacesToTabs", Doc: "SpacesToTabs converts spaces to tabs\nfor given selected region (full text if no selection)", 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]{})}},
		{"DiffFiles", &gti.Method{Name: "DiffFiles", Doc: "DiffFiles shows the differences between two given files\nin side-by-side DiffView and in the console as a context diff.\nIt opens the files as file nodes and uses existing contents if open already.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"fnmA", &gti.Field{Name: "fnmA", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"DiffFileNode", &gti.Method{Name: "DiffFileNode", Doc: "DiffFileNode shows the differences between given file node as the A file,\nand another given file as the B file,\nin side-by-side DiffView and in the console as a context diff.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"fna", &gti.Field{Name: "fna", Type: "*goki.dev/gi/v2/filetree.Node", LocalType: "*filetree.Node", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"fnmB", &gti.Field{Name: "fnmB", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"CountWords", &gti.Method{Name: "CountWords", Doc: "CountWords counts number of words (and lines) in active file\nreturns a string report thereof.", 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]{
			{"string", &gti.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"CountWordsRegion", &gti.Method{Name: "CountWordsRegion", Doc: "CountWordsRegion counts number of words (and lines) in selected region in file\nif no selection, returns numbers for entire file.", 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]{
			{"string", &gti.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"SaveActiveView", &gti.Method{Name: "SaveActiveView", Doc: "SaveActiveView saves the contents of the currently-active textview", 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]{})}},
		{"SaveActiveViewAs", &gti.Method{Name: "SaveActiveViewAs", Doc: "SaveActiveViewAs save with specified filename the contents of the\ncurrently-active textview", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"filename", &gti.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"RevertActiveView", &gti.Method{Name: "RevertActiveView", Doc: "RevertActiveView revert active view to saved version", 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]{})}},
		{"CloseActiveView", &gti.Method{Name: "CloseActiveView", Doc: "CloseActiveView closes the buffer associated with active view", 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]{})}},
		{"NextViewFile", &gti.Method{Name: "NextViewFile", Doc: "NextViewFile sets the next text view to view given file name -- include as\nmuch of name as possible to disambiguate -- will use the first matching --\nif already being viewed, that is activated -- returns textview and its\nindex, false if not found", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"fnm", &gti.Field{Name: "fnm", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"TextEditor", &gti.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"int", &gti.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"ViewFile", &gti.Method{Name: "ViewFile", Doc: "ViewFile views file in an existing TextEditor if it is already viewing that\nfile, otherwise opens ViewFileNode in active buffer", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"fnm", &gti.Field{Name: "fnm", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"TextEditor", &gti.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"int", &gti.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"CloneActiveView", &gti.Method{Name: "CloneActiveView", Doc: "CloneActiveView sets the next text view to view the same file currently being vieweds\nin the active view. returns text view and index", 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]{
			{"TextEditor", &gti.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"int", &gti.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"SaveAll", &gti.Method{Name: "SaveAll", Doc: "SaveAll saves all of the open filenodes to their current file names\nand saves the project state if it has been saved before (i.e., the .gide file exists)", 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]{})}},
		{"UpdateFiles", &gti.Method{Name: "UpdateFiles", Doc: "UpdateFiles updates the list of files saved in project", 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]{})}},
		{"OpenRecent", &gti.Method{Name: "OpenRecent", Doc: "OpenRecent opens a recently-used file", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"filename", &gti.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"OpenFile", &gti.Method{Name: "OpenFile", Doc: "OpenFile opens file in an open project if it has the same path as the file\nor in a new window.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"fnm", &gti.Field{Name: "fnm", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"OpenPath", &gti.Method{Name: "OpenPath", Doc: "OpenPath creates a new project by opening given path, which can either be a\nspecific file or a folder containing multiple files of interest -- opens in\ncurrent GideView object if it is empty, or otherwise opens a new window.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"path", &gti.Field{Name: "path", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"GideView", &gti.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"OpenProj", &gti.Method{Name: "OpenProj", Doc: "OpenProj opens .gide project file and its settings from given filename, in a standard\ntoml-formatted file", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"filename", &gti.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"GideView", &gti.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"NewProj", &gti.Method{Name: "NewProj", Doc: "NewProj creates a new project at given path, making a new folder in that\npath -- all GideView projects are essentially defined by a path to a folder\ncontaining files.  If the folder already exists, then use OpenPath.\nCan also specify main language and version control type", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"path", &gti.Field{Name: "path", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"folder", &gti.Field{Name: "folder", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"mainLang", &gti.Field{Name: "mainLang", Type: "goki.dev/fi.Known", LocalType: "fi.Known", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"versCtrl", &gti.Field{Name: "versCtrl", Type: "goki.dev/gi/v2/filetree.VersCtrlName", LocalType: "filetree.VersCtrlName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"GideView", &gti.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"NewFile", &gti.Method{Name: "NewFile", Doc: "NewFile creates a new file in the project", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"filename", &gti.Field{Name: "filename", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"addToVcs", &gti.Field{Name: "addToVcs", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"SaveProj", &gti.Method{Name: "SaveProj", Doc: "SaveProj saves project file containing custom project settings, in a\nstandard toml-formatted file", 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]{})}},
		{"SaveProjAs", &gti.Method{Name: "SaveProjAs", Doc: "SaveProjAs saves project custom settings to given filename, in a standard\ntoml-formatted file\nsaveAllFiles indicates if user should be prompted for saving all files\nreturns true if the user was prompted, false otherwise", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"filename", &gti.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"bool", &gti.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"EditProjPrefs", &gti.Method{Name: "EditProjPrefs", Doc: "EditProjPrefs allows editing of project preferences (settings specific to this project)", 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]{})}},
		{"SplitsSetView", &gti.Method{Name: "SplitsSetView", Doc: "SplitsSetView sets split view splitters to given named setting", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"split", &gti.Field{Name: "split", Type: "goki.dev/gide/v2/gide.SplitName", LocalType: "gide.SplitName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"SplitsSave", &gti.Method{Name: "SplitsSave", Doc: "SplitsSave saves current splitter settings to named splitter settings under\nexisting name, and saves to prefs file", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"split", &gti.Field{Name: "split", Type: "goki.dev/gide/v2/gide.SplitName", LocalType: "gide.SplitName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"SplitsSaveAs", &gti.Method{Name: "SplitsSaveAs", Doc: "SplitsSaveAs saves current splitter settings to new named splitter settings, and\nsaves to prefs file", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"name", &gti.Field{Name: "name", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"SplitsEdit", &gti.Method{Name: "SplitsEdit", Doc: "SplitsEdit opens the SplitsView editor to customize saved splitter settings", 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]{})}},
		{"TopAppBar", &gti.Method{Name: "TopAppBar", Doc: "", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"tb", &gti.Field{Name: "tb", Type: "*goki.dev/gi/v2/gi.TopAppBar", LocalType: "*gi.TopAppBar", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"Find", &gti.Method{Name: "Find", Doc: "Find does Find / Replace in files, using given options and filters -- opens up a\nmain tab with the results and further controls.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"find", &gti.Field{Name: "find", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"repl", &gti.Field{Name: "repl", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"ignoreCase", &gti.Field{Name: "ignoreCase", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"regExp", &gti.Field{Name: "regExp", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"loc", &gti.Field{Name: "loc", Type: "goki.dev/gide/v2/gide.FindLoc", LocalType: "gide.FindLoc", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"langs", &gti.Field{Name: "langs", Type: "[]goki.dev/fi.Known", LocalType: "[]fi.Known", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"Spell", &gti.Method{Name: "Spell", Doc: "Spell checks spelling in active text view", 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]{})}},
		{"Symbols", &gti.Method{Name: "Symbols", Doc: "Symbols displays the Symbols of a file or package", 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]{})}},
		{"Debug", &gti.Method{Name: "Debug", Doc: "Debug starts the debugger on the RunExec executable.", 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]{})}},
		{"DebugTest", &gti.Method{Name: "DebugTest", Doc: "DebugTest runs the debugger using testing mode in current active textview path", 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]{})}},
		{"DebugAttach", &gti.Method{Name: "DebugAttach", Doc: "DebugAttach runs the debugger by attaching to an already-running process.\npid is the process id to attach to.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"pid", &gti.Field{Name: "pid", Type: "uint64", LocalType: "uint64", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"VCSUpdateAll", &gti.Method{Name: "VCSUpdateAll", Doc: "VCSUpdateAll does an Update (e.g., Pull) on all VCS repositories within\nthe open tree nodes in FileTree.", 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]{})}},
		{"VCSLog", &gti.Method{Name: "VCSLog", Doc: "VCSLog shows the VCS log of commits for this file, optionally with a\nsince date qualifier: If since is non-empty, it should be\na date-like expression that the VCS will understand, such as\n1/1/2020, yesterday, last year, etc.  SVN only understands a\nnumber as a maximum number of items to return.\nIf allFiles is true, then the log will show revisions for all files, not just\nthis one.\nReturns the Log and also shows it in a VCSLogView which supports further actions.", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"since", &gti.Field{Name: "since", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"Log", &gti.Field{Name: "Log", Type: "goki.dev/vci/v2.Log", LocalType: "vci.Log", Doc: "", Directives: gti.Directives{}, Tag: ""}},
			{"error", &gti.Field{Name: "error", Type: "error", LocalType: "error", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		})}},
		{"OpenConsoleTab", &gti.Method{Name: "OpenConsoleTab", Doc: "OpenConsoleTab opens a main tab displaying console output (stdout, stderr)", 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]{})}},
		{"ChooseRunExec", &gti.Method{Name: "ChooseRunExec", Doc: "ChooseRunExec selects the executable to run for the project", Directives: gti.Directives{
			&gti.Directive{Tool: "gti", Directive: "add", Args: []string{}},
		}, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
			{"exePath", &gti.Field{Name: "exePath", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}},
		}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}},
		{"HelpWiki", &gti.Method{Name: "HelpWiki", Doc: "HelpWiki opens wiki page for gide on github", 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: &GideView{},
})

GideViewType is the gti.Type for GideView

Functions

func CheckForProjAtPath

func CheckForProjAtPath(path string) (string, bool)

CheckForProjAtPath checks if there is a .gide project at the given path returns project path and true if found, otherwise false

func ExecCmds

func ExecCmds(ge *GideView) [][]string

ExecCmds gets list of available commands for current active file

func GideViewOpenNodes

func GideViewOpenNodes(it any, sc *gi.Scene) []string

GideViewOpenNodes gets list of open nodes for submenu-func

func ProjPathParse

func ProjPathParse(path string) (root, projnm, fnm string, ok bool)

ProjPathParse parses given project path into a root directory (which could be the path or just the directory portion of the path, depending in whether the path is a directory or not), and a bool if all is good (otherwise error message has been reported). projnm is always the last directory of the path.

func QuitReq

func QuitReq() bool

QuitReq is called when user tries to quit the app -- we go through all open main windows and look for gide windows and call their CloseWindowReq functions!

func TextLinkHandler

func TextLinkHandler(tl paint.TextLink) bool

TextLinkHandler is the GideView handler for text links -- preferred one b/c directly connects to correct GideView project

Types

type GideView

type GideView struct {
	gi.Frame

	// 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

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

	// filename of the currently-active textview
	ActiveFilename gi.FileName `set:"-"`

	// language for current active filename
	ActiveLang fi.Known

	// VCS repo for current active filename
	ActiveVCS vci.Repo `set:"-"`

	// VCS info for current active filename (typically branch or revision) -- for status
	ActiveVCSInfo string `set:"-"`

	// has the root changed?  we receive update signals from root for changes
	Changed bool `set:"-" json:"-"`

	// the last status update message
	StatusMessage string

	// timestamp for when a file was last saved -- provides dirty state for various updates including rebuilding in debugger
	LastSaveTStamp time.Time `set:"-" json:"-"`

	// all the files in the project directory and subdirectories
	Files *filetree.Tree `set:"-" json:"-"`

	// index of the currently-active textview -- new files will be viewed in other views if available
	ActiveTextEditorIdx int `set:"-" json:"-"`

	// list of open nodes, most recent first
	OpenNodes gide.OpenNodes `json:"-"`

	// the command buffers for commands run in this project
	CmdBufs map[string]*texteditor.Buf `set:"-" json:"-"`

	// history of commands executed in this session
	CmdHistory gide.CmdNames `set:"-" json:"-"`

	// currently running commands in this project
	RunningCmds gide.CmdRuns `set:"-" json:"-" xml:"-"`

	// current arg var vals
	ArgVals gide.ArgVarVals `set:"-" json:"-" xml:"-"`

	// preferences for this project -- this is what is saved in a .gide project file
	Prefs gide.ProjPrefs `set:"-"`

	// current debug view
	CurDbg *gide.DebugView `set:"-"`

	// first key in sequence if needs2 key pressed
	KeySeq1 key.Chord `set:"-"`

	// mutex for protecting overall updates to GideView
	UpdtMu sync.Mutex `set:"-"`
}

GideView is the core editor and tab viewer framework for the Gide system. The default view has a tree browser of files on the left, editor panels in the middle, and a tabbed viewer on the right.

func GideInScene

func GideInScene(sc *gi.Scene) *GideView

func NewGideProjPath

func NewGideProjPath(path string) *GideView

NewGideProjPath creates a new GideView window with a new GideView project for given path, returning the window and the path

func NewGideView

func NewGideView(par ki.Ki, name ...string) *GideView

NewGideView adds a new GideView 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 NewGideWindow

func NewGideWindow(path, projnm, root string, doPath bool) *GideView

NewGideWindow is common code for Open GideWindow from Proj or Path

func OpenGideProj

func OpenGideProj(projfile string) *GideView

OpenGideProj creates a new GideView window opened to given GideView project, returning the window and the path

func (*GideView) ActiveFileNode

func (ge *GideView) ActiveFileNode() *filetree.Node

ActiveFileNode returns the file node for the active file -- nil if none

func (*GideView) ActiveTextEditor

func (ge *GideView) ActiveTextEditor() *gide.TextEditor

ActiveTextEditor returns the currently-active TextEditor

func (*GideView) AppBarConfig

func (ge *GideView) AppBarConfig(pw gi.Widget)

func (*GideView) ApplyPrefs

func (ge *GideView) ApplyPrefs()

ApplyPrefs applies current project preference settings into places where they are used -- only for those done prior to loading

func (*GideView) ApplyPrefsAction

func (ge *GideView) ApplyPrefsAction()

ApplyPrefsAction applies current preferences to the project, and updates the project

func (*GideView) ArgVarVals

func (ge *GideView) ArgVarVals() *gide.ArgVarVals

func (*GideView) AutoSaveCheck

func (ge *GideView) AutoSaveCheck(tv *gide.TextEditor, vidx int, fn *filetree.Node) bool

AutoSaveCheck checks for an autosave file and prompts user about opening it -- returns true if autosave file does exist for a file that currently unchanged (means just opened)

func (*GideView) Build

func (ge *GideView) Build()

Build runs the BuildCmds set for this project

func (*GideView) CallFind

func (ge *GideView) CallFind(ctx gi.Widget)

func (*GideView) CallSaveActiveViewAs

func (ge *GideView) CallSaveActiveViewAs(ctx gi.Widget)

func (*GideView) CallSplitsSetView

func (ge *GideView) CallSplitsSetView(ctx gi.Widget)

func (*GideView) CallViewFile

func (ge *GideView) CallViewFile(ctx gi.Widget)

CallViewFile calls ViewFile with ActiveFilename set as arg

func (*GideView) ChooseRunExec

func (ge *GideView) ChooseRunExec(exePath gi.FileName)

ChooseRunExec selects the executable to run for the project

func (*GideView) ClearDebug

func (ge *GideView) ClearDebug()

ClearDebug clears the current debugger setting -- no more debugger active.

func (*GideView) CloneActiveView

func (ge *GideView) CloneActiveView() (*gide.TextEditor, int)

CloneActiveView sets the next text view to view the same file currently being vieweds in the active view. returns text view and index

func (*GideView) CloseActiveView

func (ge *GideView) CloseActiveView()

CloseActiveView closes the buffer associated with active view

func (*GideView) CloseOpenNodes

func (ge *GideView) CloseOpenNodes(nodes []*gide.FileNode)

CloseOpenNodes closes any nodes with open views (including those in directories under nodes). called prior to rename.

func (*GideView) CloseWindow

func (ge *GideView) CloseWindow()

CloseWindow actually closes the window

func (*GideView) CloseWindowReq

func (ge *GideView) CloseWindowReq() bool

CloseWindowReq is called when user tries to close window -- we automatically save the project if it already exists (no harm), and prompt to save open files -- if this returns true, then it is OK to close -- otherwise not

func (*GideView) CmdHist

func (ge *GideView) CmdHist() *gide.CmdNames

func (*GideView) CmdRuns

func (ge *GideView) CmdRuns() *gide.CmdRuns

func (*GideView) CommandFromMenu

func (ge *GideView) CommandFromMenu(fn *filetree.Node)

CommandFromMenu pops up a menu of commands for given language, with given last command selected by default, and runs selected command.

func (*GideView) CommentOut

func (ge *GideView) CommentOut() bool

CommentOut comments-out selected lines in active text view and uncomments if already commented If multiple lines are selected and any line is uncommented all will be commented

func (*GideView) Commit

func (ge *GideView) Commit()

Commit commits the current changes using relevant VCS tool. Checks for VCS setting and for unsaved files.

func (*GideView) CommitNoChecks

func (ge *GideView) CommitNoChecks()

CommitNoChecks does the commit without any further checks for VCS, and unsaved files

func (*GideView) ConfigActiveFilename

func (ge *GideView) ConfigActiveFilename(fb *giv.FuncButton) *giv.FuncButton

ConfigActiveFilename configures the first arg of given FuncButton to use the ActiveFilename

func (*GideView) ConfigFindButton

func (ge *GideView) ConfigFindButton(fb *giv.FuncButton) *giv.FuncButton

ConfigFindButton configures the Find FuncButton with current params

func (*GideView) ConfigGideView

func (ge *GideView) ConfigGideView()

Config configures the view

func (*GideView) ConfigSplits

func (ge *GideView) ConfigSplits()

ConfigSplits configures the Splits.

func (*GideView) ConfigStatusBar

func (ge *GideView) ConfigStatusBar()

ConfigStatusBar configures statusbar with label

func (*GideView) ConfigTextBuf

func (ge *GideView) ConfigTextBuf(tb *texteditor.Buf)

ConfigTextBuf configures the text buf according to prefs

func (*GideView) ConfigToolbar

func (ge *GideView) ConfigToolbar(tb *gi.Toolbar)

func (*GideView) ConfigWidget

func (ge *GideView) ConfigWidget()

func (*GideView) CopyRect

func (ge *GideView) CopyRect()

CopyRect copies rectangle in active text view

func (*GideView) CountWords

func (ge *GideView) CountWords() string

CountWords counts number of words (and lines) in active file returns a string report thereof.

func (*GideView) CountWordsRegion

func (ge *GideView) CountWordsRegion() string

CountWordsRegion counts number of words (and lines) in selected region in file if no selection, returns numbers for entire file.

func (*GideView) CurDebug

func (ge *GideView) CurDebug() *gide.DebugView

CurDebug returns the current debug view

func (*GideView) CurPanel

func (ge *GideView) CurPanel() int

CurPanel returns the splitter panel that currently has keyboard focus

func (*GideView) CursorToHistNext

func (ge *GideView) CursorToHistNext() bool

CursorToHistNext moves cursor to next position on history list -- returns true if moved

func (*GideView) CursorToHistPrev

func (ge *GideView) CursorToHistPrev() bool

CursorToHistPrev moves cursor to previous position on history list -- returns true if moved

func (*GideView) CutRect

func (ge *GideView) CutRect()

CutRect cuts rectangle in active text view

func (*GideView) Debug

func (ge *GideView) Debug()

Debug starts the debugger on the RunExec executable.

func (*GideView) DebugAttach

func (ge *GideView) DebugAttach(pid uint64)

DebugAttach runs the debugger by attaching to an already-running process. pid is the process id to attach to.

func (*GideView) DebugTest

func (ge *GideView) DebugTest()

DebugTest runs the debugger using testing mode in current active textview path

func (*GideView) Defaults

func (ge *GideView) Defaults()

Defaults sets new project defaults based on overall preferences

func (*GideView) DiffFileNode

func (ge *GideView) DiffFileNode(fna *filetree.Node, fnmB gi.FileName)

DiffFileNode shows the differences between given file node as the A file, and another given file as the B file, in side-by-side DiffView and in the console as a context diff.

func (*GideView) DiffFiles

func (ge *GideView) DiffFiles(fnmA, fnmB gi.FileName)

DiffFiles shows the differences between two given files in side-by-side DiffView and in the console as a context diff. It opens the files as file nodes and uses existing contents if open already.

func (*GideView) EditProjPrefs

func (ge *GideView) EditProjPrefs()

EditProjPrefs allows editing of project preferences (settings specific to this project)

func (*GideView) EditRecents

func (ge *GideView) EditRecents()

RecentsEdit opens a dialog editor for deleting from the recents project list

func (*GideView) ExecCmd

func (ge *GideView) ExecCmd()

ExecCmd pops up a menu to select a command appropriate for the current active text view, and shows output in Tab with name of command

func (*GideView) ExecCmdFileNode

func (ge *GideView) ExecCmdFileNode(fn *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

func (*GideView) ExecCmdName

func (ge *GideView) ExecCmdName(cmdNm gide.CmdName, sel bool, clearBuf bool)

ExecCmdName executes command of given name -- this is the final common pathway for all command invokation except on a node. if sel, select tab. if clearBuf, clear the buffer prior to command

func (*GideView) ExecCmdNameActive

func (ge *GideView) ExecCmdNameActive(cmdNm string)

ExecCmdNameActive calls given command on current active textview

func (*GideView) ExecCmdNameFileName

func (ge *GideView) ExecCmdNameFileName(fn string, cmdNm gide.CmdName, sel bool, clearBuf bool)

ExecCmdNameFileName executes command of given name on given file name

func (*GideView) ExecCmdNameFileNode

func (ge *GideView) ExecCmdNameFileNode(fn *filetree.Node, cmdNm gide.CmdName, sel bool, clearBuf bool)

ExecCmdNameFileNode executes command of given name on given node

func (*GideView) ExecCmds

func (ge *GideView) ExecCmds(cmdNms gide.CmdNames, sel bool, clearBuf bool)

ExecCmds executes a sequence of commands, sel = select tab, clearBuf = clear buffer

func (*GideView) ExecCmdsFileNode

func (ge *GideView) ExecCmdsFileNode(fn *filetree.Node, cmdNms gide.CmdNames, sel bool, clearBuf bool)

ExecCmdsFileNode executes a sequence of commands on file node, sel = select tab, clearBuf = clear buffer

func (*GideView) FileNodeForFile

func (ge *GideView) FileNodeForFile(fpath string, add bool) *filetree.Node

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.

func (*GideView) FileNodeOpened

func (ge *GideView) FileNodeOpened(fn *filetree.Node)

FileNodeOpened is called whenever file node is double-clicked in file tree

func (*GideView) FileNodeRunExe

func (ge *GideView) FileNodeRunExe(fn *filetree.Node)

FileNodeRunExe runs the given executable file node

func (*GideView) FileNodeSelected

func (ge *GideView) FileNodeSelected(fn *filetree.Node)

FileNodeSelected is called whenever tree browser has file node selected

func (*GideView) FileTree

func (ge *GideView) FileTree() *filetree.Tree

func (*GideView) Find

func (ge *GideView) Find(find string, repl string, ignoreCase bool, regExp bool, loc gide.FindLoc, langs []fi.Known)

Find does Find / Replace in files, using given options and filters -- opens up a main tab with the results and further controls.

func (*GideView) FocusNextPanel

func (ge *GideView) FocusNextPanel()

FocusNextPanel moves the keyboard focus to the next panel to the right

func (*GideView) FocusOnPanel

func (ge *GideView) FocusOnPanel(panel int) bool

FocusOnPanel moves keyboard focus to given panel -- returns false if nothing at that tab

func (*GideView) FocusOnTabs

func (ge *GideView) FocusOnTabs() bool

func (*GideView) FocusPrevPanel

func (ge *GideView) FocusPrevPanel()

FocusPrevPanel moves the keyboard focus to the previous panel to the left

func (*GideView) GideViewKeys

func (ge *GideView) GideViewKeys(kt events.Event)

func (*GideView) GrabPrefs

func (ge *GideView) GrabPrefs()

GrabPrefs grabs the current project preference settings from various places, e.g., prior to saving or editing.

func (*GideView) GuessMainLang

func (ge *GideView) GuessMainLang() bool

GuessMainLang guesses the main language in the project -- returns true if successful

func (*GideView) HandleEvents

func (ge *GideView) HandleEvents()

func (*GideView) HelpWiki

func (ge *GideView) HelpWiki()

HelpWiki opens wiki page for gide on github

func (*GideView) Indent

func (ge *GideView) Indent() bool

Indent indents selected lines in active view

func (*GideView) IsConfiged

func (ge *GideView) IsConfiged() bool

IsConfiged returns true if the view is configured

func (*GideView) IsEmpty

func (ge *GideView) IsEmpty() bool

func (*GideView) JoinParaLines

func (ge *GideView) JoinParaLines()

JoinParaLines merges sequences of lines with hard returns forming paragraphs, separated by blank lines, into a single line per paragraph, for given selected region (full text if no selection)

func (*GideView) KiType

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

KiType returns the *gti.Type of GideView

func (*GideView) LangDefaults

func (ge *GideView) LangDefaults()

LangDefaults applies default language settings based on MainLang

func (*GideView) LastSaveTime

func (ge *GideView) LastSaveTime() time.Time

func (*GideView) LinkViewFile

func (ge *GideView) LinkViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)

LinkViewFile opens the file in the 2nd textview, which is next to the tabs where links are clicked, if it is not collapsed -- else 1st

func (*GideView) LinkViewFileNode

func (ge *GideView) LinkViewFileNode(fn *filetree.Node) (*gide.TextEditor, int)

LinkViewFileNode opens the file node in the 2nd textview, which is next to the tabs where links are clicked, if it is not collapsed -- else 1st

func (*GideView) LookupFun

func (ge *GideView) LookupFun(data any, text string, posLn, posCh int) (ld complete.Lookup)

LookupFun is the completion system Lookup function that makes a custom textview dialog that has option to edit resulting file.

func (*GideView) NChangedFiles

func (ge *GideView) NChangedFiles() int

NChangedFiles returns number of opened files with unsaved changes

func (*GideView) New

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

New returns a new *GideView value

func (*GideView) NewFile

func (ge *GideView) NewFile(filename string, addToVcs bool)

NewFile creates a new file in the project

func (*GideView) NewProj

func (ge *GideView) NewProj(path gi.FileName, folder string, mainLang fi.Known, versCtrl filetree.VersCtrlName) *GideView

NewProj creates a new project at given path, making a new folder in that path -- all GideView projects are essentially defined by a path to a folder containing files. If the folder already exists, then use OpenPath. Can also specify main language and version control type

func (*GideView) NextTextEditor

func (ge *GideView) NextTextEditor() (*gide.TextEditor, int)

NextTextEditor returns the next text view available for viewing a file and its index -- if the active text view is empty, then it is used, otherwise it is the next one (if visible)

func (*GideView) NextViewFile

func (ge *GideView) NextViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)

NextViewFile sets the next text view to view given file name -- include as much of name as possible to disambiguate -- will use the first matching -- if already being viewed, that is activated -- returns textview and its index, false if not found

func (*GideView) NextViewFileNode

func (ge *GideView) NextViewFileNode(fn *filetree.Node) (*gide.TextEditor, int)

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

func (*GideView) OnInit

func (ge *GideView) OnInit()

func (*GideView) OpenConsoleTab

func (ge *GideView) OpenConsoleTab()

OpenConsoleTab opens a main tab displaying console output (stdout, stderr)

func (*GideView) OpenFile

func (ge *GideView) OpenFile(fnm string)

OpenFile opens file in an open project if it has the same path as the file or in a new window.

func (*GideView) OpenFileAtRegion

func (ge *GideView) OpenFileAtRegion(filename gi.FileName, tr textbuf.Region) (tv *gide.TextEditor, ok bool)

func (*GideView) OpenFileNode

func (ge *GideView) OpenFileNode(fn *filetree.Node) (bool, error)

OpenFileNode opens file for file node -- returns new bool and error

func (*GideView) OpenFileURL

func (ge *GideView) OpenFileURL(ur string, ftv *texteditor.Editor) bool

OpenFileURL opens given file:/// url

func (*GideView) OpenFindURL

func (ge *GideView) OpenFindURL(ur string, ftv *texteditor.Editor) bool

OpenFindURL opens given find:/// url from Find -- delegates to FindView

func (*GideView) OpenNodeForTextEditor

func (ge *GideView) OpenNodeForTextEditor(tv *gide.TextEditor) (*filetree.Node, int, bool)

OpenNodeForTextEditor finds the FileNode that a given TextEditor is viewing, returning its index within OpenNodes list, or false if not found

func (*GideView) OpenPath

func (ge *GideView) OpenPath(path gi.FileName) *GideView

OpenPath creates a new project by opening given path, which can either be a specific file or a folder containing multiple files of interest -- opens in current GideView object if it is empty, or otherwise opens a new window.

func (*GideView) OpenProj

func (ge *GideView) OpenProj(filename gi.FileName) *GideView

OpenProj opens .gide project file and its settings from given filename, in a standard toml-formatted file

func (*GideView) OpenRecent

func (ge *GideView) OpenRecent(filename gi.FileName)

OpenRecent opens a recently-used file

func (*GideView) PanelIsOpen

func (ge *GideView) PanelIsOpen(panel int) bool

PanelIsOpen returns true if the given panel has not been collapsed and is avail and visible for displaying something

func (*GideView) ParseOpenFindURL

func (ge *GideView) ParseOpenFindURL(ur string, ftv *texteditor.Editor) (tv *gide.TextEditor, reg textbuf.Region, findBufStLn, findCount int, ok bool)

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

func (*GideView) PasteRect

func (ge *GideView) PasteRect()

PasteRect cuts rectangle in active text view

func (*GideView) ProjPrefs

func (ge *GideView) ProjPrefs() *gide.ProjPrefs

func (*GideView) ReCase

func (ge *GideView) ReCase(c textbuf.Cases) string

ReCase replaces currently selected text in current active view with given case

func (*GideView) RecycleCmdBuf

func (ge *GideView) RecycleCmdBuf(cmdNm string, clear bool) (*texteditor.Buf, bool)

RecycleCmdBuf creates the buffer for command output, or returns existing. If clear is true, then any existing buffer is cleared. Returns true if new buffer created.

func (*GideView) RecycleCmdTab

func (ge *GideView) RecycleCmdTab(cmdNm string, sel bool, clearBuf bool) (*texteditor.Buf, *texteditor.Editor, bool)

RecycleCmdTab creates the tab to show command output, including making a buffer object to save output from the command. returns true if a new buffer was created, false if one already existed. if sel, select tab. if clearBuf, then any existing buffer is cleared. Also returns index of tab.

func (*GideView) RecycleTabTextEditor

func (ge *GideView) RecycleTabTextEditor(label string, sel bool) *texteditor.Editor

RecycleTabTextEditor returns a tab with given name, first by looking for an existing one, and if not found, making a new one with a TextEditor in it. if sel, then select it. returns widget

func (*GideView) RegisterCopy

func (ge *GideView) RegisterCopy(name string) bool

RegisterCopy saves current selection in active text view to register of given name returns true if saved

func (*GideView) RegisterPaste

func (ge *GideView) RegisterPaste(name gide.RegisterName) bool

RegisterPaste pastes register of given name into active text view returns true if pasted

func (*GideView) ReplaceInActive

func (ge *GideView) ReplaceInActive()

ReplaceInActive does query-replace in active file only

func (*GideView) ResourceCommands

func (ge *GideView) ResourceCommands() uri.URIs

ResourceCommands adds the commands

func (*GideView) ResourceFiles

func (ge *GideView) ResourceFiles() uri.URIs

ResourceFiles adds the files

func (*GideView) ResourceSymbols

func (ge *GideView) ResourceSymbols() uri.URIs

ResourceSymbols adds the symbols

func (*GideView) RevertActiveView

func (ge *GideView) RevertActiveView()

RevertActiveView revert active view to saved version

func (*GideView) Run

func (ge *GideView) Run()

Run runs the RunCmds set for this project

func (*GideView) RunPostCmdsActiveView

func (ge *GideView) RunPostCmdsActiveView() bool

RunPostCmdsActiveView runs any registered post commands on the active view -- returns true if commands were run and file was reverted after that -- uses MainLang to disambiguate if multiple languages associated with extension.

func (*GideView) RunPostCmdsFileNode

func (ge *GideView) RunPostCmdsFileNode(fn *filetree.Node) bool

RunPostCmdsFileNode runs any registered post commands on the given file node -- returns true if commands were run and file was reverted after that -- uses MainLang to disambiguate if multiple languages associated with extension.

func (*GideView) SaveActiveView

func (ge *GideView) SaveActiveView()

SaveActiveView saves the contents of the currently-active textview

func (*GideView) SaveActiveViewAs

func (ge *GideView) SaveActiveViewAs(filename gi.FileName)

SaveActiveViewAs save with specified filename the contents of the currently-active textview

func (*GideView) SaveAll

func (ge *GideView) SaveAll()

SaveAll saves all of the open filenodes to their current file names and saves the project state if it has been saved before (i.e., the .gide file exists)

func (*GideView) SaveAllCheck

func (ge *GideView) SaveAllCheck(cancelOpt bool, fun func()) bool

SaveAllCheck -- check 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.

func (*GideView) SaveAllOpenNodes

func (ge *GideView) SaveAllOpenNodes()

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

func (*GideView) SaveProj

func (ge *GideView) SaveProj()

SaveProj saves project file containing custom project settings, in a standard toml-formatted file

func (*GideView) SaveProjAs

func (ge *GideView) SaveProjAs(filename gi.FileName) bool

SaveProjAs saves project custom settings to given filename, in a standard toml-formatted file saveAllFiles indicates if user should be prompted for saving all files returns true if the user was prompted, false otherwise

func (*GideView) SaveProjIfExists

func (ge *GideView) SaveProjIfExists(saveAllFiles bool) bool

SaveProjIfExists saves project file containing custom project settings, in a standard toml-formatted file, only if it already exists -- returns true if saved saveAllFiles indicates if user should be prompted for saving all files

func (*GideView) Scene

func (ge *GideView) Scene() *gi.Scene

func (*GideView) SelectOpenNode

func (ge *GideView) SelectOpenNode()

SelectOpenNode pops up a menu to select an open node (aka buffer) to view in current active textview

func (*GideView) SelectTabByLabel

func (ge *GideView) SelectTabByLabel(label string) gi.Widget

SelectTabByLabel Selects given main tab, and returns all of its contents as well.

func (*GideView) SelectedFileNode

func (ge *GideView) SelectedFileNode() *filetree.Node

SelectedFileNode returns currently selected file tree node as a *filetree.Node could be nil.

func (*GideView) SetActiveFileInfo

func (ge *GideView) SetActiveFileInfo(buf *texteditor.Buf)

SetActiveFileInfo sets the active file info from textbuf

func (*GideView) SetActiveLang

func (t *GideView) SetActiveLang(v fi.Known) *GideView

SetActiveLang sets the [GideView.ActiveLang]: language for current active filename

func (*GideView) SetActiveTextEditor

func (ge *GideView) SetActiveTextEditor(av *gide.TextEditor) int

SetActiveTextEditor sets the given textview as the active one, and returns its index

func (*GideView) SetActiveTextEditorIdx

func (ge *GideView) SetActiveTextEditorIdx(idx int) *gide.TextEditor

SetActiveTextEditorIdx sets the given view index as the currently-active TextEditor -- returns that textview. This is the main method for activating a text editor.

func (*GideView) SetArgVarVals

func (ge *GideView) SetArgVarVals()

SetArgVarVals sets the ArgVar values for commands, from GideView values

func (*GideView) SetClass

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

SetClass sets the [GideView.Class]

func (*GideView) SetCustomContextMenu

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

SetCustomContextMenu sets the [GideView.CustomContextMenu]

func (*GideView) SetOpenNodes

func (t *GideView) SetOpenNodes(v gide.OpenNodes) *GideView

SetOpenNodes sets the [GideView.OpenNodes]: list of open nodes, most recent first

func (*GideView) SetPriorityEvents

func (t *GideView) SetPriorityEvents(v []events.Types) *GideView

SetPriorityEvents sets the [GideView.PriorityEvents]

func (*GideView) SetProjFilename

func (t *GideView) SetProjFilename(v gi.FileName) *GideView

SetProjFilename sets the [GideView.ProjFilename]: current project filename for saving / loading specific Gide configuration information in a .gide file (optional)

func (*GideView) SetProjRoot

func (t *GideView) SetProjRoot(v gi.FileName) *GideView

SetProjRoot sets the [GideView.ProjRoot]: 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

func (*GideView) SetStackTop

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

SetStackTop sets the [GideView.StackTop]

func (*GideView) SetStatus

func (ge *GideView) SetStatus(msg string)

SetStatus sets the current status update message for the StatusBar next time it renders

func (*GideView) SetStatusMessage

func (t *GideView) SetStatusMessage(v string) *GideView

SetStatusMessage sets the [GideView.StatusMessage]: the last status update message

func (*GideView) SetStripes

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

SetStripes sets the [GideView.Stripes]

func (*GideView) SetTooltip

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

SetTooltip sets the [GideView.Tooltip]

func (*GideView) SetWindowNameTitle

func (ge *GideView) SetWindowNameTitle()

SetWindowNameTitle sets the window name and title based on current project name

func (*GideView) ShowFile

func (ge *GideView) ShowFile(fname string, ln int) (*gide.TextEditor, error)

ShowFile shows given file name at given line, returning TextEditor showing it or error if not found.

func (*GideView) SpacesToTabs

func (ge *GideView) SpacesToTabs()

SpacesToTabs converts spaces to tabs for given selected region (full text if no selection)

func (*GideView) Spell

func (ge *GideView) Spell()

Spell checks spelling in active text view

func (*GideView) Splits

func (ge *GideView) Splits() *gi.Splits

Splits returns the main Splits

func (*GideView) SplitsEdit

func (ge *GideView) SplitsEdit()

SplitsEdit opens the SplitsView editor to customize saved splitter settings

func (*GideView) SplitsSave

func (ge *GideView) SplitsSave(split gide.SplitName)

SplitsSave saves current splitter settings to named splitter settings under existing name, and saves to prefs file

func (*GideView) SplitsSaveAs

func (ge *GideView) SplitsSaveAs(name, desc string)

SplitsSaveAs saves current splitter settings to new named splitter settings, and saves to prefs file

func (*GideView) SplitsSetView

func (ge *GideView) SplitsSetView(split gide.SplitName)

SplitsSetView sets split view splitters to given named setting

func (*GideView) StatusBar

func (ge *GideView) StatusBar() *gi.Frame

StatusBar returns the statusbar widget

func (*GideView) StatusLabel

func (ge *GideView) StatusLabel() *gi.Label

StatusLabel returns the statusbar label widget

func (*GideView) SwapTextEditors

func (ge *GideView) SwapTextEditors() bool

SwapTextEditors switches the buffers for the two open textviews only operates if both panels are open

func (*GideView) Symbols

func (ge *GideView) Symbols()

Symbols displays the Symbols of a file or package

func (*GideView) TabByLabel

func (ge *GideView) TabByLabel(label string) gi.Widget

TabByLabel returns a tab with given name, nil if not found.

func (*GideView) TabDeleted

func (ge *GideView) TabDeleted(tabnm string)

TabDeleted is called when a main tab is deleted -- we cancel any running commmands

func (*GideView) Tabs

func (ge *GideView) Tabs() *gi.Tabs

Tabs returns the main TabView

func (*GideView) TabsToSpaces

func (ge *GideView) TabsToSpaces()

TabsToSpaces converts tabs to spaces for given selected region (full text if no selection)

func (*GideView) TextBufForFile

func (ge *GideView) TextBufForFile(fpath string, add bool) *texteditor.Buf

TextBufForFile returns 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.

func (*GideView) TextEditorButtonByIndex

func (ge *GideView) TextEditorButtonByIndex(idx int) *gi.Button

TextEditorButtonByIndex returns the top textview menu button by index (0 or 1)

func (*GideView) TextEditorButtonMenu

func (ge *GideView) TextEditorButtonMenu(idx int, m *gi.Scene)

func (*GideView) TextEditorByIndex

func (ge *GideView) TextEditorByIndex(idx int) *gide.TextEditor

TextEditorByIndex returns the TextEditor by index (0 or 1), nil if not found

func (*GideView) TextEditorForFile

func (ge *GideView) TextEditorForFile(fnm gi.FileName) (*gide.TextEditor, int, bool)

TextEditorForFile finds FileNode for file, and returns TextEditor and index that is viewing that FileNode, or false if none is

func (*GideView) TextEditorForFileNode

func (ge *GideView) TextEditorForFileNode(fn *filetree.Node) (*gide.TextEditor, int, bool)

TextEditorForFileNode finds a TextEditor that is viewing given FileNode, and its index, or false if none is

func (*GideView) TextEditorIndex

func (ge *GideView) TextEditorIndex(av *gide.TextEditor) int

TextEditorIndex finds index of given textview (0 or 1)

func (*GideView) UpdateFiles

func (ge *GideView) UpdateFiles()

UpdateFiles updates the list of files saved in project

func (*GideView) UpdateStatusLabel

func (ge *GideView) UpdateStatusLabel()

UpdateStatusLabel updates the statusbar label, called for each render!

func (*GideView) UpdateTextButtons

func (ge *GideView) UpdateTextButtons()

UpdateTextButtons updates textview menu buttons is called by SetStatus and is generally under cover of TopUpdateStart / End doesn't do anything unless a change is required -- safe to call frequently.

func (*GideView) VCSLog

func (ge *GideView) VCSLog(since string) (vci.Log, error)

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

func (*GideView) VCSUpdateAll

func (ge *GideView) VCSUpdateAll()

VCSUpdateAll does an Update (e.g., Pull) on all VCS repositories within the open tree nodes in FileTree.

func (*GideView) VersCtrl

func (ge *GideView) VersCtrl() filetree.VersCtrlName

VersCtrl returns the version control system in effect, using the file tree detected version or whatever is set in project preferences

func (*GideView) ViewFile

func (ge *GideView) ViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)

ViewFile views file in an existing TextEditor if it is already viewing that file, otherwise opens ViewFileNode in active buffer

func (*GideView) ViewFileInIdx

func (ge *GideView) ViewFileInIdx(fnm gi.FileName, idx int) (*gide.TextEditor, int, bool)

ViewFileInIdx views file in given text view index

func (*GideView) ViewFileNode

func (ge *GideView) ViewFileNode(tv *gide.TextEditor, vidx int, fn *filetree.Node)

ViewFileNode sets the given text view to view file in given node (opens buffer if not already opened). This is the main method for viewing a file.

func (*GideView) ViewOpenNodeName

func (ge *GideView) ViewOpenNodeName(name string)

ViewOpenNodeName views given open node (by name) in active view

Jump to

Keyboard shortcuts

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