Documentation ¶
Overview ¶
package gide provides the core Gide editor object.
Derived classes can extend the functionality for specific domains.
WARNING: auto-generated by Makefile release target -- run 'make release' to update
Index ¶
- Constants
- Variables
- func ArgVarKeys() []string
- func ArgVarPrompts(arg string) (map[string]struct{}, bool)
- func BindArgVars(arg string) string
- func CheckForProjAtPath(path string) (string, bool)
- func CmdsView(pt *Commands)
- func CompleteArg(data interface{}, text string, pos token.Position) (md complete.MatchData)
- func CompleteArgEdit(data interface{}, text string, cursorPos int, c complete.Completion, ...) (ed complete.EditData)
- func FileTreeViewExecCmds(it interface{}, vp *gi.Viewport2D) []string
- func GideExecCmds(it interface{}, vp *gi.Viewport2D) []string
- func GideOpenNodes(it interface{}, vp *gi.Viewport2D) []string
- func InitPrefs()
- func KeyMapsView(km *KeyMaps)
- func LangNamesMatchFilename(filename string, langs LangNames) bool
- func LangsView(pt *Langs)
- func MarkupCmdOutput(out []byte) []byte
- func MergeAvailCmds()
- func OpenIcons() error
- func OpenPaths()
- func PrefsView(pf *Preferences) (*giv.StructView, *gi.Window)
- func ProjPathParse(path string) (root, projnm, fnm string, ok bool)
- func ProjPrefsView(pf *ProjPrefs) (*giv.StructView, *gi.Window)
- func QuitReq() bool
- func RegistersView(pt *Registers)
- func SavePaths()
- func SetActiveKeyMap(km *KeySeqMap, kmName KeyMapName)
- func SetActiveKeyMapName(mapnm KeyMapName)
- func SetArgVarVals(avp *map[string]string, fpath string, ppref *ProjPrefs, tv *giv.TextView)
- func SplitsView(pt *Splits)
- func TextLinkHandler(tl gi.TextLink) bool
- func UpdtExtToLangMap()
- func VersCtrlCmdNames(vcnm VersCtrlName, cmds []string) []string
- type ArgVarInfo
- type ArgVarTypes
- type ChangeLog
- type ChangeRec
- type CmdAndArgs
- type CmdArgs
- type CmdName
- type CmdNames
- type CmdRun
- type CmdRuns
- func (rc *CmdRuns) Add(cm *CmdRun)
- func (rc *CmdRuns) AddCmd(name, cmdstr string, cmdargs *CmdAndArgs, ex *exec.Cmd)
- func (rc *CmdRuns) ByName(name string) (*CmdRun, int)
- func (rc *CmdRuns) DeleteByName(name string) bool
- func (rc *CmdRuns) DeleteIdx(idx int)
- func (rc *CmdRuns) KillByName(name string) bool
- type CmdValueView
- type Command
- func (cm *Command) AppendCmdOut(ge *Gide, buf *giv.TextBuf, out []byte)
- func (cm *Command) HasPrompts() (map[string]struct{}, bool)
- func (cm Command) Label() string
- func (cm *Command) LangMatch(langs LangNames) bool
- func (cm *Command) PromptUser(ge *Gide, buf *giv.TextBuf, pvals map[string]struct{})
- func (cm *Command) Run(ge *Gide, buf *giv.TextBuf)
- func (cm *Command) RunAfterPrompts(ge *Gide, buf *giv.TextBuf)
- func (cm *Command) RunBuf(ge *Gide, buf *giv.TextBuf, cma *CmdAndArgs) bool
- func (cm *Command) RunBufWait(ge *Gide, buf *giv.TextBuf, cma *CmdAndArgs) bool
- func (cm *Command) RunNoBuf(ge *Gide, cma *CmdAndArgs) bool
- func (cm *Command) RunStatus(ge *Gide, buf *giv.TextBuf, cmdstr string, err error, out []byte) bool
- func (cmd *Command) SetCompleter(tf *gi.TextField, id string)
- type Commands
- func (cm *Commands) CmdByName(name CmdName, msg bool) (*Command, int, bool)
- func (cm *Commands) CopyFrom(cp Commands)
- func (cm *Commands) FilterCmdNames(langs LangNames, vcnm VersCtrlName) []string
- func (cm *Commands) LangCmdNames(langs LangNames) []string
- func (cm *Commands) OpenJSON(filename gi.FileName) error
- func (cm *Commands) OpenPrefs() error
- func (cm *Commands) SaveJSON(filename gi.FileName) error
- func (cm *Commands) SavePrefs() error
- func (cm *Commands) ViewStd()
- type Console
- type EditorPrefs
- type FileNode
- type FilePrefs
- type FileSearchResults
- type FileTreeView
- type FindLoc
- type FindParams
- type FindView
- func (fv *FindView) ConfigToolbar()
- func (fv *FindView) CurDirBox() *gi.CheckBox
- func (fv *FindView) FindAction()
- func (fv *FindView) FindBar() *gi.ToolBar
- func (fv *FindView) FindNextAct() *gi.Action
- func (fv *FindView) FindText() *gi.ComboBox
- func (fv *FindView) HighlightFinds(tv, ftv *giv.TextView, fbStLn, fCount int, find string)
- func (fv *FindView) IgnoreBox() *gi.CheckBox
- func (fv *FindView) LocCombo() *gi.ComboBox
- func (fv *FindView) NextFind()
- func (fv *FindView) OpenFindURL(ur string, ftv *giv.TextView) bool
- func (fv *FindView) Params() *FindParams
- func (fv *FindView) PrevFind()
- func (fv *FindView) ReplBar() *gi.ToolBar
- func (fv *FindView) ReplText() *gi.ComboBox
- func (fv *FindView) ReplaceAction() bool
- func (fv *FindView) ReplaceAllAction()
- func (fv *FindView) SaveFindString(find string)
- func (fv *FindView) SaveReplString(repl string)
- func (fv *FindView) StdConfig() kit.TypeAndNameList
- func (fv *FindView) StdFindConfig() (mods, updt bool)
- func (fv *FindView) TextView() *giv.TextView
- func (fv *FindView) TextViewLay() *gi.Layout
- func (fv *FindView) UpdateView(ge *Gide)
- type Gide
- func (ge *Gide) ActiveTextView() *giv.TextView
- func (ge *Gide) ApplyPrefs()
- func (ge *Gide) ApplyPrefsAction()
- func (ge *Gide) AutoSaveCheck(tv *giv.TextView, vidx int, fn *giv.FileNode) bool
- func (ge *Gide) Build()
- func (ge *Gide) CloneActiveView() (*giv.TextView, int)
- func (ge *Gide) CloseActiveView()
- func (ge *Gide) CloseWindowReq() bool
- func (ge *Gide) CommentOut() bool
- func (ge *Gide) Commit()
- func (ge *Gide) CommitNoChecks()
- func (ge *Gide) CommitUpdtLog(cmdnm string)
- func (ge *Gide) ConfigOutputTextView(ly *gi.Layout) *giv.TextView
- func (ge *Gide) ConfigSplitView()
- func (ge *Gide) ConfigStatusBar()
- func (ge *Gide) ConfigTextBuf(tb *giv.TextBuf)
- func (ge *Gide) ConfigToolbar()
- func (ge *Gide) ConnectEvents2D()
- func (ge *Gide) CurPanel() int
- func (ge *Gide) CursorToHistNext() bool
- func (ge *Gide) CursorToHistPrev() bool
- func (ge *Gide) Defaults()
- func (ge *Gide) DiffFileNode(fnm gi.FileName, fn *giv.FileNode)
- func (ge *Gide) DiffFiles(fnm1, fnm2 gi.FileName)
- func (ge *Gide) ExecCmd()
- func (ge *Gide) ExecCmdFileNode(fn *giv.FileNode)
- func (ge *Gide) ExecCmdName(cmdNm CmdName, sel bool, clearBuf bool)
- func (ge *Gide) ExecCmdNameActive(cmdNm string)
- func (ge *Gide) ExecCmdNameFileNode(fn *giv.FileNode, cmdNm CmdName, sel bool, clearBuf bool)
- func (ge *Gide) ExecCmds(cmdNms CmdNames, sel bool, clearBuf bool)
- func (ge *Gide) ExecCmdsFileNode(fn *giv.FileNode, cmdNms CmdNames, sel bool, clearBuf bool)
- func (ge *Gide) FileNodeClosed(fn *giv.FileNode, tvn *FileTreeView)
- func (ge *Gide) FileNodeOpened(fn *giv.FileNode, tvn *FileTreeView)
- func (ge *Gide) FileNodeSelected(fn *giv.FileNode, tvn *FileTreeView)
- func (ge *Gide) FileTree() *giv.TreeView
- func (ge *Gide) Find(find, repl string, ignoreCase bool, loc FindLoc, langs LangNames)
- func (ge *Gide) FindOrMakeCmdBuf(cmdNm string, clear bool) (*giv.TextBuf, bool)
- func (ge *Gide) FindOrMakeCmdTab(cmdNm string, sel bool, clearBuf bool) (*giv.TextBuf, *giv.TextView, int, bool)
- func (ge *Gide) FindOrMakeMainTab(label string, typ reflect.Type, sel bool) (gi.Node2D, int)
- func (ge *Gide) FindOrMakeMainTabTextView(label string, sel bool) (*giv.TextView, int)
- func (ge *Gide) FocusNextPanel()
- func (ge *Gide) FocusOnPanel(panel int) bool
- func (ge *Gide) FocusPrevPanel()
- func (ge *Gide) GideKeys(kt *key.ChordEvent)
- func (ge *Gide) GrabPrefs()
- func (ge *Gide) GuessMainLang() bool
- func (ge *Gide) GuessVersCtrl() bool
- func (ge *Gide) HelpWiki()
- func (ge *Gide) Indent() bool
- func (ge *Gide) IsEmpty() bool
- func (ge *Gide) KeyChordEvent()
- func (ge *Gide) LangDefaults() bool
- func (ge *Gide) LinkViewFile(fnm gi.FileName) (*giv.TextView, int, bool)
- func (ge *Gide) LinkViewFileNode(fn *giv.FileNode) (*giv.TextView, int)
- func (ge *Gide) MainTabByName(label string) (gi.Node2D, int, bool)
- func (ge *Gide) MainTabDeleted(tabnm string)
- func (ge *Gide) MainTabs() *gi.TabView
- func (ge *Gide) NChangedFiles() int
- func (ge *Gide) NewFile(filename string)
- func (ge *Gide) NewProj(path gi.FileName, folder string, mainLang LangName, versCtrl VersCtrlName) (*gi.Window, *Gide)
- func (ge *Gide) NextTextView() (*giv.TextView, int)
- func (ge *Gide) NextViewFile(fnm gi.FileName) (*giv.TextView, int, bool)
- func (ge *Gide) NextViewFileNode(fn *giv.FileNode) (*giv.TextView, int)
- func (ge *Gide) OpenConsoleTab()
- func (ge *Gide) OpenFileNode(fn *giv.FileNode) (bool, error)
- func (ge *Gide) OpenFileURL(ur string) bool
- func (ge *Gide) OpenFindURL(ur string, ftv *giv.TextView) bool
- func (ge *Gide) OpenNodeForTextView(tv *giv.TextView) (*giv.FileNode, int, bool)
- func (ge *Gide) OpenPath(path gi.FileName) (*gi.Window, *Gide)
- func (ge *Gide) OpenProj(filename gi.FileName) (*gi.Window, *Gide)
- func (ge *Gide) OpenRecent(filename gi.FileName)
- func (ge *Gide) OpenSpellURL(ur string, stv *giv.TextView) bool
- func (ge *Gide) PanelIsOpen(panel int) bool
- func (ge *Gide) ParseOpenFindURL(ur string, ftv *giv.TextView) (tv *giv.TextView, reg giv.TextRegion, findBufStLn, findCount int, ok bool)
- func (ge *Gide) ProjPrefs()
- func (ge *Gide) RegisterCopy(name string) bool
- func (ge *Gide) RegisterPaste(name RegisterName) bool
- func (ge *Gide) Render2D()
- func (ge *Gide) ReplaceInActive()
- func (ge *Gide) RevertActiveView()
- func (ge *Gide) Run()
- func (ge *Gide) RunPostCmdsActiveView() bool
- func (ge *Gide) RunPostCmdsFileNode(fn *giv.FileNode) bool
- func (ge *Gide) SaveActiveView()
- func (ge *Gide) SaveActiveViewAs(filename gi.FileName)
- func (ge *Gide) SaveAllCheck(cancelOpt bool, fun func(ge *Gide)) bool
- func (ge *Gide) SaveAllOpenNodes()
- func (ge *Gide) SaveProj()
- func (ge *Gide) SaveProjAs(filename gi.FileName, saveAllFiles bool) bool
- func (ge *Gide) SaveProjIfExists(saveAllFiles bool) bool
- func (ge *Gide) SelectMainTabByName(label string) (gi.Node2D, int, bool)
- func (ge *Gide) SelectOpenNode()
- func (ge *Gide) SetActiveFilename(fname gi.FileName)
- func (ge *Gide) SetActiveTextView(av *giv.TextView) int
- func (ge *Gide) SetActiveTextViewIdx(idx int) *giv.TextView
- func (ge *Gide) SetArgVarVals()
- func (ge *Gide) SetStatus(msg string)
- func (ge *Gide) Spell()
- func (ge *Gide) SplitView() *gi.SplitView
- func (ge *Gide) SplitViewConfig() kit.TypeAndNameList
- func (ge *Gide) SplitsEdit()
- func (ge *Gide) SplitsSave(split SplitName)
- func (ge *Gide) SplitsSaveAs(name, desc string)
- func (ge *Gide) SplitsSetView(split SplitName)
- func (ge *Gide) StatusBar() *gi.Frame
- func (ge *Gide) StatusLabel() *gi.Label
- func (ge *Gide) StdConfig() (mods, updt bool)
- func (ge *Gide) StdFrameConfig() kit.TypeAndNameList
- func (ge *Gide) TextViewByIndex(idx int) *giv.TextView
- func (ge *Gide) TextViewForFile(fnm gi.FileName) (*giv.TextView, int, bool)
- func (ge *Gide) TextViewForFileNode(fn *giv.FileNode) (*giv.TextView, int, bool)
- func (ge *Gide) TextViewIndex(av *giv.TextView) int
- func (ge *Gide) TextViewSig(tv *giv.TextView, sig giv.TextViewSignals)
- func (ge *Gide) ToolBar() *gi.ToolBar
- func (ge *Gide) UpdateFiles()
- func (ge *Gide) UpdateProj()
- func (ge *Gide) ViewFile(fnm gi.FileName) (*giv.TextView, int, bool)
- func (ge *Gide) ViewFileNode(tv *giv.TextView, vidx int, fn *giv.FileNode)
- func (ge *Gide) ViewOpenNodeName(name string)
- func (ge *Gide) VisTabByName(label string) (gi.Node2D, int, bool)
- func (ge *Gide) VisTabs() *gi.TabView
- type KeyFuns
- type KeyMapItem
- type KeyMapName
- type KeyMapValueView
- type KeyMaps
- func (km *KeyMaps) CopyFrom(cp KeyMaps)
- func (km *KeyMaps) MapByName(name KeyMapName) (*KeySeqMap, int, bool)
- func (km *KeyMaps) OpenJSON(filename gi.FileName) error
- func (km *KeyMaps) OpenPrefs() error
- func (km *KeyMaps) RevertToStd()
- func (km *KeyMaps) SaveJSON(filename gi.FileName) error
- func (km *KeyMaps) SavePrefs() error
- func (km *KeyMaps) ViewStd()
- type KeyMapsItem
- type KeySeq
- type KeySeqMap
- type Lang
- type LangName
- type LangNames
- type LangValueView
- type Langs
- func (lt *Langs) CompileExtMap() map[string]Langs
- func (lt *Langs) CopyFrom(cp Langs)
- func (lt *Langs) LangByName(name LangName) (*Lang, int, bool)
- func (lt *Langs) OpenJSON(filename gi.FileName) error
- func (lt *Langs) OpenPrefs() error
- func (lt *Langs) RevertToStd()
- func (lt *Langs) SaveJSON(filename gi.FileName) error
- func (lt *Langs) SavePrefs() error
- func (lt *Langs) Validate() bool
- func (lt *Langs) ViewStd()
- type OpenNodes
- func (on *OpenNodes) Add(fn *giv.FileNode)
- func (on *OpenNodes) ByStringName(name string) *giv.FileNode
- func (on *OpenNodes) Delete(fn *giv.FileNode) bool
- func (on *OpenNodes) DeleteDeleted()
- func (on *OpenNodes) DeleteIdx(idx int)
- func (on *OpenNodes) NChanged() int
- func (on *OpenNodes) Strings() []string
- type Preferences
- func (pf *Preferences) Apply()
- func (pf *Preferences) Defaults()
- func (pf *Preferences) EditCmds()
- func (pf *Preferences) EditHiStyles()
- func (pf *Preferences) EditKeyMaps()
- func (pf *Preferences) EditLangs()
- func (pf *Preferences) EditRegisters()
- func (pf *Preferences) EditSplits()
- func (pf *Preferences) Open() error
- func (pf *Preferences) Save() error
- func (pf *Preferences) VersionInfo() string
- type ProjPrefs
- type RegisterName
- type RegisterValueView
- type Registers
- type SpellParams
- type SpellView
- func (sv *SpellView) AcceptSuggestion(s string)
- func (sv *SpellView) AdjustTextPos(tp giv.TextPos) giv.TextPos
- func (sv *SpellView) ChangeAct() *gi.Action
- func (sv *SpellView) ChangeAction()
- func (sv *SpellView) ChangeAllAct() *gi.Action
- func (sv *SpellView) ChangeAllAction()
- func (sv *SpellView) ChangeBar() *gi.ToolBar
- func (sv *SpellView) ChangeText() *gi.TextField
- func (sv *SpellView) CheckAct() *gi.Action
- func (sv *SpellView) CheckNext()
- func (sv *SpellView) ConfigToolbar()
- func (sv *SpellView) IgnoreAct() *gi.Action
- func (sv *SpellView) IgnoreAction()
- func (sv *SpellView) LearnAct() *gi.Action
- func (sv *SpellView) LearnAction()
- func (sv *SpellView) OpenSpellURL(ur string, ftv *giv.TextView) bool
- func (sv *SpellView) SetUnknownAndSuggest(unknown gi.TextWord, suggests []string)
- func (sv *SpellView) SkipAct() *gi.Action
- func (sv *SpellView) SkipAction()
- func (sv *SpellView) SpellAction()
- func (sv *SpellView) SpellBar() *gi.ToolBar
- func (sv *SpellView) SpellNextAct() *gi.Action
- func (sv *SpellView) StdConfig() kit.TypeAndNameList
- func (sv *SpellView) StdSpellConfig() (mods, updt bool)
- func (sv *SpellView) SuggestBar() *gi.ToolBar
- func (sv *SpellView) SuggestView() *giv.SliceView
- func (sv *SpellView) TextView() *giv.TextView
- func (sv *SpellView) TextViewLay() *gi.Layout
- func (sv *SpellView) TrainAction()
- func (sv *SpellView) UnknownBar() *gi.ToolBar
- func (sv *SpellView) UnknownEndPos() giv.TextPos
- func (sv *SpellView) UnknownStartPos() giv.TextPos
- func (sv *SpellView) UnknownText() *gi.TextField
- func (sv *SpellView) UpdateView(ge *Gide, sp SpellParams)
- type Split
- type SplitName
- type SplitValueView
- type Splits
- func (lt *Splits) Add(name, desc string, splits []float32) (*Split, int)
- func (lt *Splits) CopyFrom(cp Splits)
- func (lt *Splits) Names() []string
- func (lt *Splits) OpenJSON(filename gi.FileName) error
- func (lt *Splits) OpenPrefs() error
- func (lt *Splits) SaveJSON(filename gi.FileName) error
- func (lt *Splits) SavePrefs() error
- func (lt *Splits) SplitByName(name SplitName) (*Split, int, bool)
- type VersCtrlName
- type VersCtrlValueView
Constants ¶
const ( FileTreeIdx = iota TextView1Idx TextView2Idx MainTabsIdx VisTabsIdx )
These are then the fixed indices of the different elements in the splitview
const ( Version = "v0.5.3" GitCommit = "b3b4871" // the commit JUST BEFORE the release VersionDate = "2018-11-15 01:36" // UTC )
const NTextViews = 2
NTextViews 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 ¶
var ArgVarVals map[string]string
ArgVarVals are current values of arg var vals -- updated on demand when a command is invoked
var ArgVars = map[string]ArgVarInfo{ "{FilePath}": ArgVarInfo{"Current file name with full path.", ArgVarFile}, "{FileName}": ArgVarInfo{"Current file name only, without path.", ArgVarFile}, "{FileExt}": ArgVarInfo{"Extension of current file name.", ArgVarExt}, "{FileExtLC}": ArgVarInfo{"Extension of current file name, lowercase.", ArgVarExt}, "{FileNameNoExt}": ArgVarInfo{"Current file name without path and extension.", ArgVarFile}, "{FileDir}": ArgVarInfo{"Name only of current file's directory.", ArgVarDir}, "{FileDirPath}": ArgVarInfo{"Full path to current file's directory.", ArgVarDir}, "{FileDirProjRel}": ArgVarInfo{"Path to current file's directory relative to project root.", ArgVarDir}, "{ProjDir}": ArgVarInfo{"Current project directory name, without full path.", ArgVarDir}, "{ProjPath}": ArgVarInfo{"Full path to current project directory.", ArgVarDir}, "{BuildDir}": ArgVarInfo{"Full path to BuildDir specified in project prefs -- the default Build.", ArgVarDir}, "{BuildDirRel}": ArgVarInfo{"Path to BuildDir relative to project root.", ArgVarDir}, "{BuildTarg}": ArgVarInfo{"Build target specified in prefs BuildTarg, just filename by itself, without path.", ArgVarFile}, "{BuildTargPath}": ArgVarInfo{"Full path to build target specified in prefs BuildTarg.", ArgVarFile}, "{BuildTargDirPath}": ArgVarInfo{"Full path to build target directory, without filename.", ArgVarDir}, "{BuildTargDirPathRel}": ArgVarInfo{"Project-relative path to build target directory, without filename.", ArgVarDir}, "{RunExec}": ArgVarInfo{"Run-time executable file RunExec specified in project prefs -- just the raw name of the file, without path.", ArgVarFile}, "{RunExecPath}": ArgVarInfo{"Full path to the run-time executable file RunExec specified in project prefs.", ArgVarFile}, "{RunExecDirPath}": ArgVarInfo{"Full path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir}, "{RunExecDirPathRel}": ArgVarInfo{"Project-root relative path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir}, "{CurLine}": ArgVarInfo{"Cursor current line number (starts at 1).", ArgVarPos}, "{CurCol}": ArgVarInfo{"Cursor current column number (starts at 0).", ArgVarPos}, "{SelStartLine}": ArgVarInfo{"Selection starting line (same as CurLine if no selection).", ArgVarPos}, "{SelStartCol}": ArgVarInfo{"Selection starting column (same as CurCol if no selection).", ArgVarPos}, "{SelEndLine}": ArgVarInfo{"Selection ending line (same as CurLine if no selection).", ArgVarPos}, "{SelEndCol}": ArgVarInfo{"Selection ending column (same as CurCol if no selection).", ArgVarPos}, "{CurSel}": ArgVarInfo{"Currently selected text.", ArgVarText}, "{CurLineText}": ArgVarInfo{"Current line text under cursor.", ArgVarText}, "{CurWord}": ArgVarInfo{"Current word under cursor.", ArgVarText}, "{PromptFilePath}": ArgVarInfo{"Prompt user for a file, and this is the full path to that file.", ArgVarPrompt}, "{PromptFileName}": ArgVarInfo{"Prompt user for a file, and this is the filename (only) of that file.", ArgVarPrompt}, "{PromptFileDir}": ArgVarInfo{"Prompt user for a file, and this is the directory name (only) of that file.", ArgVarPrompt}, "{PromptFileDirPath}": ArgVarInfo{"Prompt user for a file, and this is the full path to that directory.", ArgVarPrompt}, "{PromptFileDirProjRel}": ArgVarInfo{"Prompt user for a file, and this is the path of that directory relative to the project root.", ArgVarPrompt}, "{PromptString1}": ArgVarInfo{"Prompt user for a string -- this is it.", ArgVarPrompt}, "{PromptString2}": ArgVarInfo{"Prompt user for another string -- this is it.", ArgVarPrompt}, }
ArgVars are variables that can be used for arguments to commands in CmdAndArgs
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..
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..
var AvailRegisterNames []string
AvailRegisterNames are the names of the current AvailRegisters -- used for some choosers
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..
var AvailSplitNames []string
AvailSplitNames are the names of the current AvailSplits -- used for some choosers
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..
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.
var CmdOutStatusLen = 80
CmdOutStatusLen is amount of command output to include in the status update
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.
var CommandsProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenPrefs", ki.Props{}}, {"SavePrefs", ki.Props{ "shortcut": "Command+S", "updtfunc": giv.ActionUpdateFunc(func(cmi interface{}, act *gi.Action) { act.SetActiveState(CustomCmdsChanged && cmi.(*Commands) == &CustomCmds) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "desc": "You can save and open commands to / from files to share, experiment, transfer, etc", "shortcut": "Command+O", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "desc": "You can save and open commands to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, }}, {"Edit", "Copy Cut Paste Dupe"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"SavePrefs", ki.Props{ "desc": "saves Commands to App standard prefs directory, in file proj_types_prefs.json, which will be loaded automatically at startup if prefs SaveCommands is checked (should be if you're using custom commands)", "icon": "file-save", "updtfunc": giv.ActionUpdateFunc(func(cmi interface{}, act *gi.Action) { act.SetActiveState(CustomCmdsChanged && cmi.(*Commands) == &CustomCmds) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "icon": "file-open", "desc": "You can save and open commands to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "icon": "file-save", "desc": "You can save and open commands to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"sep-std", ki.BlankProp{}}, {"ViewStd", ki.Props{ "desc": "Shows the standard commands that are compiled into the program (edits will not be saved -- even though the viewer is editable). Custom commands override standard ones of the same name, so that is the way to change any existing commands.", "updtfunc": giv.ActionUpdateFunc(func(cmi interface{}, act *gi.Action) { act.SetActiveState(cmi.(*Commands) != &StdCmds) }), }}, }, }
CommandsProps define the ToolBar and MenuBar for TableView of Commands, e.g., CmdsView
var CustomCmdsChanged = false
CustomCmdsChanged is used to update giv.CmdsView toolbars via following menu, toolbar props update methods.
var DefaultKeyMap = KeyMapName("MacEmacs")
DefaultKeyMap is the overall default keymap -- reinitialized in gimain init() depending on platform
var ExtToLangMap = map[string]Langs{}
ExtToLangMap is a compiled map of file extensions (always lowercased) and their associated language(s) -- there can be some ambiguity (e.g., .h files), so multiple languages are allowed
var FileNodeProps = ki.Props{ "CallMethods": ki.PropSlice{ {"RenameFile", ki.Props{ "label": "Rename", "desc": "Rename file to new file name", "Args": ki.PropSlice{ {"New Name", ki.Props{ "default-field": "Name", "width": 60, }}, }, }}, }, }
var FileTreeActiveDirFunc = giv.ActionUpdateFunc(func(fni interface{}, act *gi.Action) { ft := fni.(ki.Ki).Embed(KiT_FileTreeView).(*FileTreeView) fn := ft.FileNode() if fn != nil { act.SetActiveState(fn.IsDir()) } })
FileTreeActiveDirFunc is an ActionUpdateFunc that activates action if node is a dir
var FileTreeInactiveDirFunc = giv.ActionUpdateFunc(func(fni interface{}, act *gi.Action) { ft := fni.(ki.Ki).Embed(KiT_FileTreeView).(*FileTreeView) fn := ft.FileNode() if fn != nil { act.SetInactiveState(fn.IsDir()) } })
FileTreeInactiveDirFunc is an ActionUpdateFunc that inactivates action if node is a dir
var FileTreeViewProps = ki.Props{ "indent": units.NewValue(2, units.Ch), "spacing": units.NewValue(.5, units.Ch), "border-width": units.NewValue(0, units.Px), "border-radius": units.NewValue(0, units.Px), "padding": units.NewValue(0, units.Px), "margin": units.NewValue(1, units.Px), "text-align": gi.AlignLeft, "vertical-align": gi.AlignTop, "color": &gi.Prefs.Colors.Font, "background-color": "inherit", ".exec": ki.Props{ "font-weight": gi.WeightBold, }, ".open": ki.Props{ "font-style": gi.FontItalic, }, "#icon": ki.Props{ "width": units.NewValue(1, units.Em), "height": units.NewValue(1, units.Em), "margin": units.NewValue(0, units.Px), "padding": units.NewValue(0, units.Px), "fill": &gi.Prefs.Colors.Icon, "stroke": &gi.Prefs.Colors.Font, }, "#branch": ki.Props{ "icon": "widget-wedge-down", "icon-off": "widget-wedge-right", "margin": units.NewValue(0, units.Px), "padding": units.NewValue(0, units.Px), "background-color": color.Transparent, "max-width": units.NewValue(.8, units.Em), "max-height": units.NewValue(.8, units.Em), }, "#space": ki.Props{ "width": units.NewValue(.5, units.Em), }, "#label": ki.Props{ "margin": units.NewValue(0, units.Px), "padding": units.NewValue(0, units.Px), "min-width": units.NewValue(16, units.Ch), }, "#menu": ki.Props{ "indicator": "none", }, giv.TreeViewSelectors[giv.TreeViewActive]: ki.Props{}, giv.TreeViewSelectors[giv.TreeViewSel]: ki.Props{ "background-color": &gi.Prefs.Colors.Select, }, giv.TreeViewSelectors[giv.TreeViewFocus]: ki.Props{ "background-color": &gi.Prefs.Colors.Control, }, "CtxtMenuActive": ki.PropSlice{ {"ViewFiles", ki.Props{ "label": "View", "updtfunc": FileTreeInactiveDirFunc, }}, {"ExecCmdFiles", ki.Props{ "label": "Exec Cmd", "submenu-func": giv.SubMenuFunc(FileTreeViewExecCmds), "Args": ki.PropSlice{ {"Cmd Name", ki.Props{}}, }, }}, {"DuplicateFiles", ki.Props{ "label": "Duplicate", "updtfunc": FileTreeInactiveDirFunc, }}, {"DeleteFiles", ki.Props{ "label": "Delete", "desc": "Ok to delete file(s)? This is not undoable and is not moving to trash / recycle bin", "confirm": true, "updtfunc": FileTreeInactiveDirFunc, }}, {"RenameFiles", ki.Props{ "label": "Rename", "desc": "Rename file to new file name", }}, {"sep-open", ki.BlankProp{}}, {"OpenDirs", ki.Props{ "label": "Open Dir", "desc": "open given folder to see files within", "updtfunc": FileTreeActiveDirFunc, }}, {"NewFile", ki.Props{ "label": "New File...", "desc": "make a new file in this folder", "updtfunc": FileTreeActiveDirFunc, "Args": ki.PropSlice{ {"File Name", ki.Props{ "width": 60, }}, }, }}, {"NewFolder", ki.Props{ "label": "New Folder...", "desc": "make a new folder within this folder", "updtfunc": FileTreeActiveDirFunc, "Args": ki.PropSlice{ {"Folder Name", ki.Props{ "width": 60, }}, }, }}, }, }
var FindViewProps = ki.Props{ "background-color": &gi.Prefs.Colors.Background, "color": &gi.Prefs.Colors.Font, "max-width": -1, "max-height": -1, }
var GideBigFileSize = 10000000 // 10Mb?
var GideInactiveEmptyFunc = giv.ActionUpdateFunc(func(gei interface{}, act *gi.Action) { ge := gei.(ki.Ki).Embed(KiT_Gide).(*Gide) act.SetInactiveState(ge.IsEmpty()) })
GideInactiveEmptyFunc is an ActionUpdateFunc that inactivates action if project is empty
var GideProps = ki.Props{ "background-color": &gi.Prefs.Colors.Background, "color": &gi.Prefs.Colors.Font, "max-width": -1, "max-height": -1, "#title": ki.Props{ "max-width": -1, "horizontal-align": gi.AlignCenter, "vertical-align": gi.AlignTop, }, "MethViewNoUpdateAfter": true, "ToolBar": ki.PropSlice{ {"UpdateFiles", ki.Props{ "shortcut": "Command+U", "desc": "update file browser list of files", "icon": "update", }}, {"ViewFile", ki.Props{ "label": "Open", "icon": "file-open", "desc": "open a file in current active text view", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunFileOpen).String()) }), "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ActiveFilename", }}, }, }}, {"SaveActiveView", ki.Props{ "label": "Save", "desc": "save active text view file to its current filename", "icon": "file-save", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufSave).String()) }), }}, {"SaveActiveViewAs", ki.Props{ "label": "Save As...", "icon": "file-save", "desc": "save active text view file to a new filename", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufSaveAs).String()) }), "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ActiveFilename", }}, }, }}, {"ViewOpenNodeName", ki.Props{ "icon": "file-text", "label": "Edit", "desc": "select an open file to view in active text view", "submenu-func": giv.SubMenuFunc(GideOpenNodes), "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufSelect).String()) }), "Args": ki.PropSlice{ {"Node Name", ki.Props{}}, }, }}, {"sep-find", ki.BlankProp{}}, {"CursorToHistPrev", ki.Props{ "icon": "widget-wedge-left", "shortcut": gi.KeyFunHistPrev, "label": "", "desc": "move cursor to previous location in active text view", }}, {"CursorToHistNext", ki.Props{ "icon": "widget-wedge-right", "shortcut": gi.KeyFunHistNext, "label": "", "desc": "move cursor to next location in active text view", }}, {"Find", ki.Props{ "label": "Find...", "icon": "search", "desc": "Find / replace in all open folders in file browser", "shortcut": gi.KeyFunFind, "Args": ki.PropSlice{ {"Search For", ki.Props{ "default-field": "Prefs.Find.Find", "history-field": "Prefs.Find.FindHist", "width": 80, }}, {"Replace With", ki.Props{ "desc": "Optional replace string -- replace will be controlled interactively in Find panel, including replace all", "default-field": "Prefs.Find.Replace", "history-field": "Prefs.Find.ReplHist", "width": 80, }}, {"Ignore Case", ki.Props{ "default-field": "Prefs.Find.IgnoreCase", }}, {"Location", ki.Props{ "desc": "location to find in", "default-field": "Prefs.Find.Loc", }}, {"Languages", ki.Props{ "desc": "restrict find to files associated with these languages -- leave empty for all files", "default-field": "Prefs.Find.Langs", }}, }, }}, {"Spell", ki.Props{ "label": "Spelling...", "icon": "spelling", }}, {"sep-file", ki.BlankProp{}}, {"Build", ki.Props{ "icon": "terminal", "tooltip": "build the project -- command(s) specified in Project Prefs", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBuildProj).String()) }), }}, {"Run", ki.Props{ "icon": "terminal", "tooltip": "run the project -- command(s) specified in Project Prefs", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunRunProj).String()) }), }}, {"Commit", ki.Props{ "icon": "star", }}, {"ExecCmdNameActive", ki.Props{ "icon": "terminal", "label": "Exec Cmd", "desc": "execute given command on active file / directory / project", "submenu-func": giv.SubMenuFunc(GideExecCmds), "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunExecCmd).String()) }), "Args": ki.PropSlice{ {"Cmd Name", ki.Props{}}, }, }}, {"sep-splt", ki.BlankProp{}}, {"Splits", ki.PropSlice{ {"SplitsSetView", ki.Props{ "label": "Set View", "submenu": &AvailSplitNames, "Args": ki.PropSlice{ {"Split Name", ki.Props{ "default-field": "Prefs.SplitName", }}, }, }}, {"SplitsSaveAs", ki.Props{ "label": "Save As...", "desc": "save current splitter values to a new named split configuration", "Args": ki.PropSlice{ {"Name", ki.Props{ "width": 60, }}, {"Desc", ki.Props{ "width": 60, }}, }, }}, {"SplitsSave", ki.Props{ "label": "Save", "submenu": &AvailSplitNames, "Args": ki.PropSlice{ {"Split Name", ki.Props{ "default-field": "Prefs.SplitName", }}, }, }}, {"SplitsEdit", ki.Props{ "label": "Edit...", }}, }}, }, "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenRecent", ki.Props{ "submenu": &SavedPaths, "Args": ki.PropSlice{ {"File Name", ki.Props{}}, }, }}, {"OpenProj", ki.Props{ "shortcut": "Command+O", "label": "Open Project...", "desc": "open a gide project -- can be a .gide file or just a file or directory (projects are just directories with relevant files)", "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ProjFilename", "ext": ".gide", }}, }, }}, {"OpenPath", ki.Props{ "label": "Open Path...", "desc": "open a gide project for a file or directory (projects are just directories with relevant files)", "Args": ki.PropSlice{ {"Path", ki.Props{}}, }, }}, {"New", ki.PropSlice{ {"NewProj", ki.Props{ "shortcut": "Command+N", "label": "New Project...", "desc": "Create a new project -- select a path for the parent folder, and a folder name for the new project -- all Gide projects are basically folders with files. You can also specify the main language and {version control system for the project. For other options, do <code>Proj Prefs</code> in the File menu of the new project.", "Args": ki.PropSlice{ {"Parent Folder", ki.Props{ "dirs-only": true, "default-field": "ProjRoot", }}, {"Folder", ki.Props{ "width": 60, }}, {"Main Lang", ki.Props{}}, {"Version Ctrl", ki.Props{}}, }, }}, {"NewFile", ki.Props{ "label": "New File...", "desc": "Create a new file in project -- to create in sub-folders, use context menu on folder in file browser", "Args": ki.PropSlice{ {"File Name", ki.Props{ "width": 60, }}, }, }}, }}, {"SaveProj", ki.Props{ "label": "Save Project", "updtfunc": GideInactiveEmptyFunc, }}, {"SaveProjAs", ki.Props{ "label": "Save Project As...", "desc": "Save project to given file name -- this is the .gide file containing preferences and current settings -- also saves all open files -- once saved, further saving is automatic", "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ProjFilename", "ext": ".gide", }}, {"SaveAll", ki.Props{ "value": false, }}, }, }}, {"sep-af", ki.BlankProp{}}, {"ViewFile", ki.Props{ "label": "Open File...", "shortcut-func": func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunFileOpen).String()) }, "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"File Name", ki.Props{}}, }, }}, {"SaveActiveView", ki.Props{ "label": "Save File", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufSave).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, {"SaveActiveViewAs", ki.Props{ "label": "Save File As...", "updtfunc": GideInactiveEmptyFunc, "desc": "save active text view file to a new filename", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufSaveAs).String()) }), "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ActiveFilename", }}, }, }}, {"RevertActiveView", ki.Props{ "desc": "Revert active file to last saved version: this will lose all active changes -- are you sure?", "confirm": true, "label": "Revert File...", "updtfunc": GideInactiveEmptyFunc, }}, {"CloseActiveView", ki.Props{ "label": "Close File", "updtfunc": GideInactiveEmptyFunc, "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufClose).String()) }), }}, {"sep-prefs", ki.BlankProp{}}, {"ProjPrefs", ki.Props{ "label": "Project Prefs...", "updtfunc": GideInactiveEmptyFunc, }}, {"sep-close", ki.BlankProp{}}, {"Close Window", ki.BlankProp{}}, }}, {"Edit", ki.PropSlice{ {"Copy", ki.Props{ "keyfun": gi.KeyFunCopy, }}, {"Cut", ki.Props{ "keyfun": gi.KeyFunCut, }}, {"Paste", ki.Props{ "keyfun": gi.KeyFunPaste, }}, {"Paste History...", ki.Props{ "keyfun": gi.KeyFunPasteHist, }}, {"Registers", ki.PropSlice{ {"RegisterCopy", ki.Props{ "label": "Copy...", "desc": "save currently-selected text to a named register, which can be pasted later -- persistent across sessions as well", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunRegCopy).String()) }), "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Register Name", ki.Props{}}, }, }}, {"RegisterPaste", ki.Props{ "label": "Paste...", "desc": "paste text from named register", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunRegPaste).String()) }), "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Register Name", ki.Props{ "default-field": "Prefs.Register", }}, }, }}, }}, {"sep-undo", ki.BlankProp{}}, {"Undo", ki.Props{ "keyfun": gi.KeyFunUndo, }}, {"Redo", ki.Props{ "keyfun": gi.KeyFunRedo, }}, {"sep-find", ki.BlankProp{}}, {"Find", ki.Props{ "label": "Find...", "shortcut": gi.KeyFunFind, "desc": "Find / replace in all open folders in file browser", "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Search For", ki.Props{ "default-field": "Prefs.Find.Find", "history-field": "Prefs.Find.FindHist", "width": 80, }}, {"Replace With", ki.Props{ "desc": "Optional replace string -- replace will be controlled interactively in Find panel, including replace all", "default-field": "Prefs.Find.Replace", "history-field": "Prefs.Find.ReplHist", "width": 80, }}, {"Ignore Case", ki.Props{ "default-field": "Prefs.Find.IgnoreCase", }}, {"Location", ki.Props{ "desc": "location to find in", "default-field": "Prefs.Find.Loc", }}, {"Languages", ki.Props{ "desc": "restrict find to files associated with these languages -- leave empty for all files", "default-field": "Prefs.Find.Langs", }}, }, }}, {"ReplaceInActive", ki.Props{ "label": "Replace In Active...", "shortcut": gi.KeyFunReplace, "desc": "query-replace in current active text view only (use Find for multi-file)", "updtfunc": GideInactiveEmptyFunc, }}, {"Spell", ki.Props{ "label": "Spelling...", "updtfunc": GideInactiveEmptyFunc, }}, {"ShowCompletions", ki.Props{ "keyfun": gi.KeyFunComplete, "updtfunc": GideInactiveEmptyFunc, }}, {"sep-adv", ki.BlankProp{}}, {"CommentOut", ki.Props{ "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunCommentOut).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, {"Indent", ki.Props{ "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunIndent).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, }}, {"View", ki.PropSlice{ {"Panels", ki.PropSlice{ {"FocusNextPanel", ki.Props{ "label": "Focus Next", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunNextPanel).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, {"FocusPrevPanel", ki.Props{ "label": "Focus Prev", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunPrevPanel).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, {"CloneActiveView", ki.Props{ "label": "Clone Active", "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBufClone).String()) }), "updtfunc": GideInactiveEmptyFunc, }}, }}, {"Splits", ki.PropSlice{ {"SplitsSetView", ki.Props{ "label": "Set View", "submenu": &AvailSplitNames, "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Split Name", ki.Props{}}, }, }}, {"SplitsSaveAs", ki.Props{ "label": "Save As...", "desc": "save current splitter values to a new named split configuration", "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Name", ki.Props{ "width": 60, }}, {"Desc", ki.Props{ "width": 60, }}, }, }}, {"SplitsSave", ki.Props{ "label": "Save", "submenu": &AvailSplitNames, "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Split Name", ki.Props{}}, }, }}, {"SplitsEdit", ki.Props{ "updtfunc": GideInactiveEmptyFunc, "label": "Edit...", }}, }}, {"OpenConsoleTab", ki.Props{ "updtfunc": GideInactiveEmptyFunc, }}, }}, {"Navigate", ki.PropSlice{ {"Cursor", ki.PropSlice{ {"Back", ki.Props{ "keyfun": gi.KeyFunHistPrev, }}, {"Forward", ki.Props{ "keyfun": gi.KeyFunHistNext, }}, {"Jump To Line", ki.Props{ "keyfun": gi.KeyFunJump, }}, }}, }}, {"Command", ki.PropSlice{ {"Build", ki.Props{ "updtfunc": GideInactiveEmptyFunc, "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunBuildProj).String()) }), }}, {"Run", ki.Props{ "updtfunc": GideInactiveEmptyFunc, "shortcut-func": giv.ShortcutFunc(func(gei interface{}, act *gi.Action) key.Chord { return key.Chord(ChordForFun(KeyFunRunProj).String()) }), }}, {"Commit", ki.Props{ "updtfunc": GideInactiveEmptyFunc, }}, {"ExecCmdNameActive", ki.Props{ "label": "Exec Cmd", "submenu-func": giv.SubMenuFunc(GideExecCmds), "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"Cmd Name", ki.Props{}}, }, }}, {"DiffFiles", ki.Props{ "updtfunc": GideInactiveEmptyFunc, "Args": ki.PropSlice{ {"File Name 1", ki.Props{}}, {"File Name 2", ki.Props{}}, }, }}, }}, {"Window", "Windows"}, {"Help", ki.PropSlice{ {"HelpWiki", ki.Props{}}, }}, }, "CallMethods": ki.PropSlice{ {"NextViewFile", ki.Props{ "Args": ki.PropSlice{ {"File Name", ki.Props{ "default-field": "ActiveFilename", }}, }, }}, {"SplitsSetView", ki.Props{ "Args": ki.PropSlice{ {"Split Name", ki.Props{}}, }, }}, {"ExecCmd", ki.Props{}}, }, }
var KeyMapsProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenPrefs", ki.Props{}}, {"SavePrefs", ki.Props{ "shortcut": "Command+S", "updtfunc": func(kmi interface{}, act *gi.Action) { act.SetActiveState(AvailKeyMapsChanged && kmi.(*KeyMaps) == &AvailKeyMaps) }, }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "desc": "You can save and open key maps to / from files to share, experiment, transfer, etc", "shortcut": "Command+O", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "desc": "You can save and open key maps to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"RevertToStd", ki.Props{ "desc": "This reverts the keymaps to using the StdKeyMaps that are compiled into the program and have all the lastest key functions defined. 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> Continue?", "confirm": true, }}, }}, {"Edit", "Copy Cut Paste Dupe"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"SavePrefs", ki.Props{ "desc": "saves KeyMaps to App standard prefs directory, in file key_maps_prefs.json, which will be loaded automatically at startup if prefs SaveKeyMaps is checked (should be if you're using custom keymaps)", "icon": "file-save", "updtfunc": func(kmi interface{}, act *gi.Action) { act.SetActiveState(AvailKeyMapsChanged && kmi.(*KeyMaps) == &AvailKeyMaps) }, }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "icon": "file-open", "desc": "You can save and open key maps to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "icon": "file-save", "desc": "You can save and open key maps to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"sep-std", ki.BlankProp{}}, {"ViewStd", ki.Props{ "desc": "Shows the standard maps that are compiled into the program and have all the lastest key functions bound to standard key chords. Useful for comparing against custom maps.", "confirm": true, "updtfunc": func(kmi interface{}, act *gi.Action) { act.SetActiveStateUpdt(kmi.(*KeyMaps) != &StdKeyMaps) }, }}, {"RevertToStd", ki.Props{ "icon": "update", "desc": "This reverts the keymaps to using the StdKeyMaps that are compiled into the program and have all the lastest key functions bound to standard key chords. 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> Continue?", "confirm": true, "updtfunc": func(kmi interface{}, act *gi.Action) { act.SetActiveStateUpdt(kmi.(*KeyMaps) != &StdKeyMaps) }, }}, }, }
KeyMapsProps define the ToolBar and MenuBar for TableView of KeyMaps, e.g., giv.KeyMapsView
var KiT_ArgVarTypes = kit.Enums.AddEnumAltLower(ArgVarTypesN, false, nil, "ArgVar")
var KiT_CmdValueView = kit.Types.AddType(&CmdValueView{}, nil)
var KiT_Commands = kit.Types.AddType(&Commands{}, CommandsProps)
var KiT_Console = kit.Types.AddType(&Console{}, nil)
var KiT_FileNode = kit.Types.AddType(&FileNode{}, FileNodeProps)
var KiT_FileTreeView = kit.Types.AddType(&FileTreeView{}, nil)
var KiT_FindView = kit.Types.AddType(&FindView{}, FindViewProps)
var KiT_Gide = kit.Types.AddType(&Gide{}, nil)
var KiT_KeyMapValueView = kit.Types.AddType(&KeyMapValueView{}, nil)
var KiT_KeyMaps = kit.Types.AddType(&KeyMaps{}, KeyMapsProps)
var KiT_LangValueView = kit.Types.AddType(&LangValueView{}, nil)
var KiT_Langs = kit.Types.AddType(&Langs{}, LangsProps)
var KiT_Preferences = kit.Types.AddType(&Preferences{}, PreferencesProps)
var KiT_ProjPrefs = kit.Types.AddType(&ProjPrefs{}, ProjPrefsProps)
var KiT_RegisterValueView = kit.Types.AddType(&RegisterValueView{}, nil)
var KiT_Registers = kit.Types.AddType(&Registers{}, RegistersProps)
var KiT_SpellView = kit.Types.AddType(&SpellView{}, SpellViewProps)
var KiT_SplitValueView = kit.Types.AddType(&SplitValueView{}, nil)
var KiT_Splits = kit.Types.AddType(&Splits{}, SplitsProps)
var KiT_VersCtrlValueView = kit.Types.AddType(&VersCtrlValueView{}, nil)
var LangsProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenPrefs", ki.Props{}}, {"SavePrefs", ki.Props{ "shortcut": "Command+S", "updtfunc": giv.ActionUpdateFunc(func(lti interface{}, act *gi.Action) { act.SetActiveState(AvailLangsChanged && lti.(*Langs) == &AvailLangs) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "desc": "You can save and open languages to / from files to share, experiment, transfer, etc", "shortcut": "Command+O", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "desc": "You can save and open languages to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"RevertToStd", ki.Props{ "desc": "This reverts the languages to using the StdLangs that are compiled into the program and have all the lastest standards. <b>Your current edits will be lost if you proceed!</b> Continue?", "confirm": true, }}, }}, {"Edit", "Copy Cut Paste Dupe"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"SavePrefs", ki.Props{ "desc": "saves Langs to App standard prefs directory, in file lang_prefs.json, which will be loaded automatically at startup if prefs SaveLangs is checked (should be if you're using custom languages)", "icon": "file-save", "updtfunc": giv.ActionUpdateFunc(func(lti interface{}, act *gi.Action) { act.SetActiveState(AvailLangsChanged && lti.(*Langs) == &AvailLangs) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "icon": "file-open", "desc": "You can save and open languages to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "icon": "file-save", "desc": "You can save and open languages to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"sep-std", ki.BlankProp{}}, {"ViewStd", ki.Props{ "desc": "Shows the standard languages that are compiled into the program and have all the latest changes. Useful for comparing against custom langs.", "updtfunc": giv.ActionUpdateFunc(func(lti interface{}, act *gi.Action) { act.SetActiveState(lti.(*Langs) != &StdLangs) }), }}, {"RevertToStd", ki.Props{ "icon": "update", "desc": "This reverts the languages to using the StdLangs that are compiled into the program and have all the lastest standards. <b>Your current edits will be lost if you proceed!</b> Continue?", "confirm": true, "updtfunc": giv.ActionUpdateFunc(func(lti interface{}, act *gi.Action) { act.SetActiveState(lti.(*Langs) != &StdLangs) }), }}, }, }
LangsProps define the ToolBar and MenuBar for TableView of Langs, e.g., giv.LangsView
var Needs2KeyMap gi.KeyMap
Needs2KeyMap is a map of the starting key sequences that require a second key -- auto-generated from active keymap
var PreferencesProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"Open", ki.Props{ "shortcut": "Command+O", }}, {"Save", ki.Props{ "shortcut": "Command+S", "updtfunc": giv.ActionUpdateFunc(func(pfi interface{}, act *gi.Action) { pf := pfi.(*Preferences) act.SetActiveState(pf.Changed) }), }}, {"sep-close", ki.BlankProp{}}, {"Close Window", ki.BlankProp{}}, }}, {"Edit", "Copy Cut Paste"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"Apply", ki.Props{ "desc": "Applies current prefs settings so they affect actual functionality.", "icon": "update", }}, {"Save", ki.Props{ "desc": "Saves current preferences to standard prefs.json file, which is auto-loaded at startup.", "icon": "file-save", "updtfunc": giv.ActionUpdateFunc(func(pfi interface{}, act *gi.Action) { pf := pfi.(*Preferences) act.SetActiveStateUpdt(pf.Changed) }), }}, {"VersionInfo", ki.Props{ "desc": "shows current Gide version information", "icon": "info", "show-return": true, }}, {"sep-key", ki.BlankProp{}}, {"EditKeyMaps", ki.Props{ "icon": "keyboard", "desc": "opens the KeyMapsView editor to create new keymaps / save / load from other files, etc. Current keymaps are saved and loaded with preferences automatically if SaveKeyMaps is clicked (will be turned on automatically if you open this editor).", }}, {"EditLangs", ki.Props{ "icon": "file-text", "desc": "opens the LangsView editor to customize settings for each type of language / data / file type. Current customized settings are saved and loaded with preferences automatically if SaveLangs is clicked (will be turned on automatically if you open this editor).", }}, {"EditCmds", ki.Props{ "icon": "file-binary", "desc": "opens the CmdsView editor to add custom commands you can run, in addition to standard commands built into the system. Current customized settings are saved and loaded with preferences automatically if SaveCmds is clicked (will be turned on automatically if you open this editor).", }}, {"EditSplits", ki.Props{ "icon": "file-binary", "desc": "opens the SplitsView editor of saved named splitter settings. Current customized settings are saved and loaded with preferences automatically.", }}, {"EditRegisters", ki.Props{ "icon": "file-binary", "desc": "opens the RegistersView editor of saved named text registers. Current values are saved and loaded with preferences automatically.", }}, {"EditHiStyles", ki.Props{ "icon": "file-binary", "desc": "opens the HiStylesView editor of highlighting styles.", }}, }, }
PreferencesProps define the ToolBar and MenuBar for StructView, e.g., giv.PrefsView
var Prefs = Preferences{}
Prefs are the overall Gide preferences
var PrefsCmdsFileName = "command_prefs.json"
PrefsCmdsFileName is the name of the preferences file in App prefs directory for saving / loading your CustomCmds commands list
var PrefsFileName = "gide_prefs.json"
PrefsFileName is the name of the preferences file in GoGi prefs directory
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
var PrefsLangsFileName = "lang_prefs.json"
PrefsLangsFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailLangs languages list
var PrefsRegistersFileName = "registers_prefs.json"
PrefsRegistersFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailRegisters
var PrefsSplitsFileName = "splits_prefs.json"
PrefsSplitsFileName is the name of the preferences file in App prefs directory for saving / loading the default AvailSplits
var ProjPrefsProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"Close Window", ki.BlankProp{}}, }}, {"Edit", "Copy Cut Paste"}, {"Window", "Windows"}, }, }
ProjPrefsProps define the ToolBar and MenuBar for StructView, e.g., giv.PrefsView -- don't have a save option as that would save to regular prefs
var RegistersProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenPrefs", ki.Props{}}, {"SavePrefs", ki.Props{ "shortcut": "Command+S", "updtfunc": giv.ActionUpdateFunc(func(ari interface{}, act *gi.Action) { act.SetActiveState(AvailRegistersChanged && ari.(*Registers) == &AvailRegisters) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "desc": "You can save and open named registers to / from files to share, experiment, transfer, etc", "shortcut": "Command+O", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "desc": "You can save and open named registers to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, }}, {"Edit", "Copy Cut Paste Dupe"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"SavePrefs", ki.Props{ "desc": "saves Registers to App standard prefs directory, in file registers_prefs.json, which will be loaded automatically at startup)", "icon": "file-save", "updtfunc": giv.ActionUpdateFunc(func(ari interface{}, act *gi.Action) { act.SetActiveState(AvailRegistersChanged && ari.(*Registers) == &AvailRegisters) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "icon": "file-open", "desc": "You can save and open named registers to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "icon": "file-save", "desc": "You can save and open named registers to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, }, }
RegistersProps define the ToolBar and MenuBar for TableView of Registers
var SavedPaths gi.FilePaths
var SavedPathsFileName = "gide_saved_paths.json"
SavedPathsFileName is the name of the saved file paths file in GoGi prefs directory
var SpellViewProps = ki.Props{ "background-color": &gi.Prefs.Colors.Background, "color": &gi.Prefs.Colors.Font, "max-width": -1, "max-height": -1, }
var SplitsProps = ki.Props{ "MainMenu": ki.PropSlice{ {"AppMenu", ki.BlankProp{}}, {"File", ki.PropSlice{ {"OpenPrefs", ki.Props{}}, {"SavePrefs", ki.Props{ "shortcut": "Command+S", "updtfunc": giv.ActionUpdateFunc(func(spi interface{}, act *gi.Action) { act.SetActiveState(AvailSplitsChanged && spi.(*Splits) == &AvailSplits) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "desc": "You can save and open named splits to / from files to share, experiment, transfer, etc", "shortcut": "Command+O", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "desc": "You can save and open named splits to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, }}, {"Edit", "Copy Cut Paste Dupe"}, {"Window", "Windows"}, }, "ToolBar": ki.PropSlice{ {"SavePrefs", ki.Props{ "desc": "saves Splits to App standard prefs directory, in file splits_prefs.json, which will be loaded automatically at startup)", "icon": "file-save", "updtfunc": giv.ActionUpdateFunc(func(spi interface{}, act *gi.Action) { act.SetActiveState(AvailSplitsChanged && spi.(*Splits) == &AvailSplits) }), }}, {"sep-file", ki.BlankProp{}}, {"OpenJSON", ki.Props{ "label": "Open from file", "icon": "file-open", "desc": "You can save and open named splits to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, {"SaveJSON", ki.Props{ "label": "Save to file", "icon": "file-save", "desc": "You can save and open named splits to / from files to share, experiment, transfer, etc", "Args": ki.PropSlice{ {"File Name", ki.Props{ "ext": ".json", }}, }, }}, }, }
SplitsProps define the ToolBar and MenuBar for TableView of Splits
var StdCmds = Commands{ {"Run Proj", "run RunExec executable set in project", nil, []CmdAndArgs{CmdAndArgs{"{RunExecPath}", nil}}, "{RunExecDirPath}", false, false, false}, {"Run Prompt", "run any command you enter at the prompt", nil, []CmdAndArgs{CmdAndArgs{"{PromptString1}", nil}}, "{FileDirPath}", false, false, false}, {"Make", "run make with no args", nil, []CmdAndArgs{CmdAndArgs{"make", nil}}, "{FileDirPath}", false, false, false}, {"Make Prompt", "run make with prompted make target", nil, []CmdAndArgs{CmdAndArgs{"make", []string{"{PromptString1}"}}}, "{FileDirPath}", false, false, false}, {"Imports Go File", "run goimports on file", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"goimports", []string{"-w", "{FilePath}"}}}, "{FileDirPath}", true, false, false}, {"Fmt Go File", "run go fmt on file", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"gofmt", []string{"-w", "{FilePath}"}}}, "{FileDirPath}", true, false, false}, {"Build Go Dir", "run go build to build in current dir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"build", "-v"}}}, "{FileDirPath}", false, false, false}, {"Build Go Proj", "run go build for project BuildDir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"build", "-v"}}}, "{BuildDir}", false, false, false}, {"Install Go Proj", "run go install for project BuildDir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"install", "-v"}}}, "{BuildDir}", false, false, false}, {"Generate Go", "run go generate in current dir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"generate"}}}, "{FileDirPath}", false, false, false}, {"Test Go", "run go test in current dir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"test", "-v"}}}, "{FileDirPath}", false, false, false}, {"Vet Go", "run go vet in current dir", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"vet"}}}, "{FileDirPath}", false, false, false}, {"Get Go", "run go get on package you enter at prompt", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"get", "{PromptString1}"}}}, "{FileDirPath}", false, false, false}, {"Get Go Updt", "run go get -u (updt) on package you enter at prompt", LangNames{"Go"}, []CmdAndArgs{CmdAndArgs{"go", []string{"get", "{PromptString1}"}}}, "{FileDirPath}", false, false, false}, {"Add Git", "git add file", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"add", "{FilePath}"}}}, "{FileDirPath}", false, false, false}, {"Checkout Git", "git checkout file or directory -- WARNING will overwrite local changes!", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"checkout", "{FilePath}"}}}, "{FileDirPath}", false, false, true}, {"Status Git", "git status", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"status"}}}, "{FileDirPath}", false, false, false}, {"Diff Git", "git diff -- see changes since last checkin", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"diff"}}}, "{FileDirPath}", false, false, false}, {"Log Git", "git log", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"log"}}}, "{FileDirPath}", false, false, false}, {"Commit Git", "git commit", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"commit", "-am", "{PromptString1}"}}}, "{FileDirPath}", true, false, false}, {"Pull Git ", "git pull", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"pull"}}}, "{FileDirPath}", false, false, false}, {"Push Git ", "git push", nil, []CmdAndArgs{CmdAndArgs{"git", []string{"push"}}}, "{FileDirPath}", false, false, false}, {"Add SVN", "svn add file", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"add", "{FilePath}"}}}, "{FileDirPath}", false, false, false}, {"Status SVN", "svn status", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"status"}}}, "{FileDirPath}", false, false, false}, {"Info SVN", "svn info", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"info"}}}, "{FileDirPath}", false, false, false}, {"Log SVN", "svn log", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"log", "-v"}}}, "{FileDirPath}", false, false, false}, {"Commit SVN", "svn commit", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"commit", "-m", "{PromptString1}"}}}, "{FileDirPath}", true, false, false}, {"Update SVN", "svn update", nil, []CmdAndArgs{CmdAndArgs{"svn", []string{"update"}}}, "{FileDirPath}", false, false, false}, {"LaTeX PDF", "run PDFLaTeX on file", LangNames{"LaTeX"}, []CmdAndArgs{CmdAndArgs{"pdflatex", []string{"-file-line-error", "-interaction=nonstopmode", "{FilePath}"}}}, "{FileDirPath}", false, false, false}, {"Open File", "open file using OS 'open' command", nil, []CmdAndArgs{CmdAndArgs{"open", []string{"{FilePath}"}}}, "{FileDirPath}", false, false, false}, {"Open Target File", "open project target file using OS 'open' command", nil, []CmdAndArgs{CmdAndArgs{"open", []string{"{RunExecPath}"}}}, "{FileDirPath}", false, false, false}, {"List Dir", "list current dir", nil, []CmdAndArgs{CmdAndArgs{"ls", []string{"-la"}}}, "{FileDirPath}", false, false, false}, {"Grep", "recursive grep of all files for prompted value", nil, []CmdAndArgs{CmdAndArgs{"grep", []string{"-R", "-e", "{PromptString1}", "{FileDirPath}"}}}, "{FileDirPath}", false, false, false}, }
StdCmds is the original compiled-in set of standard commands.
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+/", ""}: 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+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+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+/", ""}: 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+/", ""}: 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+/", ""}: 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.
var StdLangs = Langs{ {"C", "C code", []string{".c", ".h"}, nil, "// "}, {"C++", "C++ code", []string{".cpp", ".cxx", ".cc", ".h", ".hh", ".hpp"}, nil, "// "}, {"Go", "Go code", []string{".go"}, CmdNames{"Imports Go File"}, "// "}, {"HTML", "HTML document", []string{".html", ".htm"}, nil, "<-- "}, {"LaTeX", "LaTeX document", []string{".tex"}, CmdNames{"LaTeX PDF"}, "% "}, {"Markdown", "Markdown document", []string{".md"}, nil, "<--- "}, {"PDF", "PDF document", []string{".pdf"}, CmdNames{"Open File"}, ""}, {"Python", "Python code", []string{".py"}, nil, "# "}, }
StdLangs is the original compiled-in set of standard languages.
var StdSplits = Splits{ {"Code", "2 text views, main tabs, no vis tabs", []float32{.1, .325, .325, .25, 0}}, {"Vis", "1 text view, main and vis tabs", []float32{.1, .3, 0, .3, .3}}, {"Small", "1 text view, and main tabs", []float32{.1, .5, 0, .4, 0}}, {"All", "All panels open", []float32{.1, .25, .25, .2, .2}}, }
StdSplits is the original compiled-in set of standard named splits.
var VersCtrlFiles = map[string]string{
"Git": ".git",
"SVN": ".svn",
}
VersCtrlFiles is a map of signature files that indicate which VC is in use
var VersCtrlSystems = []string{"Git", "SVN"}
VersCtrlSystems is a list of supported Version Control Systems -- use these names in commands to select commands for the current VCS for this project (i.e., use shortest version of name, typically three letters)
Functions ¶
func ArgVarKeys ¶
func ArgVarKeys() []string
func ArgVarPrompts ¶
ArgVarPrompts returns any Prompt* variables required by this string, false if none
func BindArgVars ¶
BindArgVars replaces the variables in the given arg string with their values
func CheckForProjAtPath ¶
CheckForProjAtPath checks if there is a .gide project at the given path returns project path and true if found, otherwise false
func CompleteArg ¶
CompleteArg supplies directory variables to the completer
func CompleteArgEdit ¶
func CompleteArgEdit(data interface{}, text string, cursorPos int, c complete.Completion, seed string) (ed complete.EditData)
CompleteArgEdit edits completer text field after the user chooses from the candidate completions
func FileTreeViewExecCmds ¶
func FileTreeViewExecCmds(it interface{}, vp *gi.Viewport2D) []string
FileTreeViewExecCmds gets list of available commands for given file node, as a submenu-func
func GideExecCmds ¶
func GideExecCmds(it interface{}, vp *gi.Viewport2D) []string
GideExecCmds gets list of available commands for current active file, as a submenu-func
func GideOpenNodes ¶
func GideOpenNodes(it interface{}, vp *gi.Viewport2D) []string
GideOpenNodes gets list of open nodes for submenu-func
func LangNamesMatchFilename ¶
LangNamesMatchFilename returns true if given filename is one of langauges in langs name -- if langs is empty then EVERYTHING matches.
func MarkupCmdOutput ¶
MarkupCmdOutput applies links to the first element in command output line if it looks like a file name / position
func MergeAvailCmds ¶
func MergeAvailCmds()
MergeAvailCmds updates the AvailCmds list from CustomCmds and StdCmds
func PrefsView ¶
func PrefsView(pf *Preferences) (*giv.StructView, *gi.Window)
PrefsView opens a view of user preferences, returns structview and window
func ProjPathParse ¶
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 ProjPrefsView ¶
func ProjPrefsView(pf *ProjPrefs) (*giv.StructView, *gi.Window)
ProjPrefsView opens a view of project preferences (settings), returns structview and window
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 RegistersView ¶
func RegistersView(pt *Registers)
RegistersView opens a view of a commands table
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 SetArgVarVals ¶
SetArgVarVals sets the current values for arg variables -- prompts must be already set!
func TextLinkHandler ¶
TextLinkHandler is the Gide handler for text links -- preferred one b/c directly connects to correct Gide project
func UpdtExtToLangMap ¶
func UpdtExtToLangMap()
UpdtExtToLangMap updates the map from current avail langs list
func VersCtrlCmdNames ¶
func VersCtrlCmdNames(vcnm VersCtrlName, cmds []string) []string
VersCtrlCmdNames returns a slice of commands that contain in their name the specific version control name, but NOT the others -- takes the output of LangCmdNames
Types ¶
type ArgVarInfo ¶
type ArgVarInfo struct { Desc string `desc:"description of arg var"` Type ArgVarTypes `desc:"type of variable -- used for checking usage and other special features such as prompting"` }
ArgVarInfo has info about argument variables that fill in relevant values for commands, used in ArgVars list of variables
type ArgVarTypes ¶
type ArgVarTypes int32
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 ArgVarTypesN )
func (*ArgVarTypes) FromString ¶
func (i *ArgVarTypes) FromString(s string) error
func (ArgVarTypes) MarshalJSON ¶
func (kf ArgVarTypes) MarshalJSON() ([]byte, error)
func (ArgVarTypes) String ¶
func (i ArgVarTypes) String() string
func (*ArgVarTypes) UnmarshalJSON ¶
func (kf *ArgVarTypes) UnmarshalJSON(b []byte) error
type ChangeLog ¶
type ChangeLog []ChangeRec
ChangeLog is a record of changes committed from within the Gide system to the version control system for this project. Use the Log command for your VCS to see all changes.
type ChangeRec ¶
type ChangeRec struct { Date giv.FileTime `desc:"date/time when change made"` CommitID string `desc:"unique identifier for the commit (git SHA, svn rev)"` Author string `desc:"author name"` Email string `desc:"author email"` Message string `desc:"commit message summarizing changes"` Files string `desc:"files changed in this commit"` }
ChangeRec is version control change-log record
type CmdAndArgs ¶
type CmdAndArgs struct { Cmd string `` /* 145-byte string literal not displayed */ Args CmdArgs `` /* 336-byte string literal not displayed */ }
CmdAndArgs contains the name of an external program to execute and args to pass to that program
func (*CmdAndArgs) BindArgs ¶
func (cm *CmdAndArgs) BindArgs() []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
type CmdName ¶
type CmdName string
CmdName has an associated ValueView for selecting from the list of available command names, for use in preferences etc.
func (CmdName) Command ¶
Command returns command associated with command name in AvailCmds, and false if it doesn't exist
type CmdRun ¶
type CmdRun struct { Name string `desc:"Name of command being run -- same as Command.Name"` CmdStr string `desc:"command string"` CmdArgs *CmdAndArgs `desc:"Details of the command and args"` Exec *exec.Cmd `desc:"exec.Cmd for the command"` }
CmdRun tracks running commands
type CmdRuns ¶
type CmdRuns []*CmdRun
CmdRuns is a slice list of running commands
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) DeleteByName ¶
DeleteByName deletes command by name
func (*CmdRuns) KillByName ¶
KillByName kills a running process by name, and removes it from the list of running commands
type CmdValueView ¶
type CmdValueView struct {
giv.ValueViewBase
}
CmdValueView presents an action for displaying an CmdName and selecting
func (*CmdValueView) Activate ¶
func (vv *CmdValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*CmdValueView) ConfigWidget ¶
func (vv *CmdValueView) ConfigWidget(widg gi.Node2D)
func (*CmdValueView) HasAction ¶
func (vv *CmdValueView) HasAction() bool
func (*CmdValueView) UpdateWidget ¶
func (vv *CmdValueView) UpdateWidget()
func (*CmdValueView) WidgetType ¶
func (vv *CmdValueView) WidgetType() reflect.Type
type Command ¶
type Command struct { Name string `width:"20" desc:"name of this command (must be unique in list of commands)"` Desc string `width:"40" desc:"brief description of this command"` Langs LangNames `` /* 149-byte string literal not displayed */ Cmds []CmdAndArgs `tableview-select:"-" desc:"sequence of commands to run for this overall command."` Dir string `` /* 258-byte string literal not displayed */ Wait bool `` /* 206-byte string literal not displayed */ Focus bool `desc:"if true, keyboard focus is directed to the command output tab panel after the command runs."` Confirm bool `desc:"if true, command requires Ok / Cancel confirmation dialog -- only needed for non-prompt commands"` }
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 ¶
AppendCmdOut appends command output to buffer, applying markup for links
func (*Command) HasPrompts ¶
HasPrompts returns true if any prompts are required before running command, and the set of such args
func (*Command) LangMatch ¶
LangMatch returns true if the given languages match those of the command, or command has no language restrictions
func (*Command) PromptUser ¶
PromptUser prompts for values that need prompting for, and then runs RunAfterPrompts if not otherwise cancelled by user
func (*Command) Run ¶
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 ¶
RunAfterPrompts runs after any prompts have been set, if needed
func (*Command) RunBuf ¶
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 ¶
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
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.
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.
func (*Commands) CmdByName ¶
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) FilterCmdNames ¶
func (cm *Commands) FilterCmdNames(langs LangNames, vcnm VersCtrlName) []string
FilterCmdNames returns a slice of commands that are compatible with given language(s) and version control system.
func (*Commands) LangCmdNames ¶
LangCmdNames returns a slice of commands that are compatible with given language(s).
func (*Commands) OpenPrefs ¶
OpenPrefs opens custom Commands from App standard prefs directory, using PrefsCmdsFileName
type Console ¶
type Console struct { StdoutWrite *os.File `json:"-" xml:"-" desc:"std out writer -- set to os.Stdout"` StdoutRead *os.File `json:"-" xml:"-" desc:"std out reader -- used to read os.Stdout"` StderrWrite *os.File `json:"-" xml:"-" desc:"std err writer -- set to os.Stderr"` StderrRead *os.File `json:"-" xml:"-" desc:"std err reader -- used to read os.Stderr"` Buf *giv.TextBuf `json:"-" xml:"-" desc:"text buffer holding all output"` Cancel bool `json:"-" xml:"-" desc:"set to true to cancel monitoring"` Mu sync.Mutex `json:"-" xml:"-" desc:"mutex protecting updating of buffer between out / err"` OrgoutWrite *os.File `json:"-" xml:"-" desc:"original os.Stdout writer"` OrgerrWrite *os.File `json:"-" xml:"-" desc:"original os.Stderr writer"` }
Console redirects our os.Stdout and os.Stderr to a buffer for display within app
var TheConsole Console
func (*Console) Init ¶
func (cn *Console) Init()
Init initializes the console -- sets up the capture, Buf, and starts the routine that monitors output
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 EditorPrefs ¶
type EditorPrefs struct { TabSize int `desc:"size of a tab, in chars -- also determines indent level for space indent"` SpaceIndent bool `desc:"use spaces for indentation, otherwise tabs"` WordWrap bool `desc:"wrap lines at word boundaries -- otherwise long lines scroll off the end"` LineNos bool `desc:"show line numbers"` Completion bool `desc:"use the completion system to suggest options while typing"` SpellCorrect bool `desc:"suggest corrections for unknown words while typing"` AutoIndent bool `desc:"automatically indent lines when enter, tab, }, etc pressed"` EmacsUndo bool `` /* 165-byte string literal not displayed */ }
EditorPrefs contains editor preferences
func (*EditorPrefs) Defaults ¶
func (pf *EditorPrefs) Defaults()
type FileNode ¶
FileNode is Gide version of FileNode for FileTree view
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 ¶
ExecCmdNameFile executes given command name on node
type FilePrefs ¶
type FilePrefs struct {
DirsOnTop bool `desc:"if true, then all directories are placed at the top of the tree view -- otherwise everything is alpha sorted"`
}
FilePrefs contains file view preferences
type FileSearchResults ¶
type FileSearchResults struct { Node *giv.FileNode Count int Matches []giv.FileSearchMatch }
FileSearchResults is used to report search results
func FileTreeSearch ¶
func FileTreeSearch(start *giv.FileNode, find string, ignoreCase bool, loc FindLoc, activeDir string, langs LangNames) []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 FileTreeView ¶
type FileTreeView struct {
giv.FileTreeView
}
FileTreeView is a TreeView that knows how to operate on FileNode nodes
func (*FileTreeView) ExecCmdFiles ¶
func (ft *FileTreeView) ExecCmdFiles(cmdNm string)
ExecCmdFiles calls given command on selected files
func (*FileTreeView) FileNode ¶
func (ft *FileTreeView) FileNode() *FileNode
FileNode returns the SrcNode as a *gide* FileNode
func (*FileTreeView) ViewFiles ¶
func (ft *FileTreeView) ViewFiles()
ViewFiles calls ViewFile on selected files
type FindLoc ¶
type FindLoc int
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 FindLocN )
func (*FindLoc) FromString ¶
func (FindLoc) MarshalJSON ¶
func (*FindLoc) UnmarshalJSON ¶
type FindParams ¶
type FindParams struct { Find string `desc:"find string"` Replace string `desc:"replace string"` IgnoreCase bool `desc:"ignore case"` Langs LangNames `desc:"languages for files to search"` Loc FindLoc `desc:"locations to search in"` FindHist []string `desc:"history of finds"` ReplHist []string `desc:"history of replaces"` }
FindParams are parameters for find / replace
type FindView ¶
type FindView struct { gi.Layout Gide *Gide `json:"-" xml:"-" desc:"parent gide project"` LangVV giv.ValueView `desc:"langs value view"` Time time.Time `desc:"time of last find"` }
FindView is a find / replace widget that displays results in a TextView and has a toolbar for controlling find / replace process.
func (*FindView) FindAction ¶
func (fv *FindView) FindAction()
FindAction runs a new find with current params
func (*FindView) FindNextAct ¶
FindNextAct returns the find next action in toolbar -- selected first
func (*FindView) HighlightFinds ¶
HighlightFinds highlights all the find results in ftv buffer
func (*FindView) OpenFindURL ¶
OpenFindURL opens given find:/// url from Find
func (*FindView) ReplaceAction ¶
ReplaceAction performs the replace
func (*FindView) ReplaceAllAction ¶
func (fv *FindView) ReplaceAllAction()
ReplaceAllAction performs replace all
func (*FindView) SaveFindString ¶
SaveFindString saves the given find string to the find params history and current str
func (*FindView) SaveReplString ¶
SaveReplString saves the given replace string to the find params history and current str
func (*FindView) StdConfig ¶
func (fv *FindView) StdConfig() kit.TypeAndNameList
StdConfig returns a TypeAndNameList for configuring a standard Frame -- can modify as desired before calling ConfigChildren on Frame using this
func (*FindView) StdFindConfig ¶
StdFindConfig configures a standard setup of the overall layout -- returns mods, updt from ConfigChildren and does NOT call UpdateEnd
func (*FindView) TextViewLay ¶
TextViewLay returns the find results TextView layout
func (*FindView) UpdateView ¶
UpdateView updates view with current settings
type Gide ¶
type Gide struct { gi.Frame ProjRoot gi.FileName `` /* 217-byte string literal not displayed */ ProjFilename gi.FileName `` /* 131-byte string literal not displayed */ ActiveFilename gi.FileName `desc:"filename of the currently-active textview"` ActiveLangs LangNames `desc:"languages for current active filename"` Changed bool `json:"-" desc:"has the root changed? we receive update signals from root for changes"` Files giv.FileTree `desc:"all the files in the project directory and subdirectories"` ActiveTextViewIdx int `json:"-" desc:"index of the currently-active textview -- new files will be viewed in other views if available"` OpenNodes OpenNodes `json:"-" desc:"list of open nodes, most recent first"` CmdBufs map[string]*giv.TextBuf `json:"-" desc:"the command buffers for commands run in this project"` CmdHistory CmdNames `json:"-" desc:"history of commands executed in this session"` RunningCmds CmdRuns `json:"-" xml:"-" desc:"currently running commands in this project"` Prefs ProjPrefs `desc:"preferences for this project -- this is what is saved in a .gide project file"` KeySeq1 key.Chord `desc:"first key in sequence if needs2 key pressed"` UpdtMu sync.Mutex `desc:"mutex for protecting overall updates to Gide"` }
Gide 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 NewGideProjPath ¶
NewGideProjPath creates a new Gide window with a new Gide project for given path, returning the window and the path
func NewGideWindow ¶
NewGideWindow is common code for Open GideWindow from Proj or Path
func OpenGideProj ¶
OpenGideProj creates a new Gide window opened to given Gide project, returning the window and the path
func (*Gide) ActiveTextView ¶
ActiveTextView returns the currently-active TextView
func (*Gide) ApplyPrefs ¶
func (ge *Gide) ApplyPrefs()
ApplyPrefs applies current project preference settings into places where they are used -- only for those done prior to loading
func (*Gide) ApplyPrefsAction ¶
func (ge *Gide) ApplyPrefsAction()
ApplyPrefsAction applies current preferences to the project, and updates the project
func (*Gide) AutoSaveCheck ¶
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 (*Gide) CloneActiveView ¶
CloneActiveView sets the next text view to view the same file currently being vieweds in the active view. returns text view and index
func (*Gide) CloseActiveView ¶
func (ge *Gide) CloseActiveView()
CloseActiveView closes the buffer associated with active view
func (*Gide) CloseWindowReq ¶
CurPanel returns the splitter panel that currently has keyboard focus 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 (*Gide) CommentOut ¶
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 (*Gide) Commit ¶
func (ge *Gide) Commit()
Commit commits the current changes using relevant VCS tool, and updates the changelog. Checks for VCS setting and
func (*Gide) CommitNoChecks ¶
func (ge *Gide) CommitNoChecks()
CommitNoChecks does the commit without any further checks for VCS, and unsaved files
func (*Gide) CommitUpdtLog ¶
CommitUpdtLog grabs info from buffer in main tabs about the commit, and updates the changelog record
func (*Gide) ConfigOutputTextView ¶
ConfigOutputTextView configures a command-output textview within given parent layout
func (*Gide) ConfigSplitView ¶
func (ge *Gide) ConfigSplitView()
ConfigSplitView configures the SplitView.
func (*Gide) ConfigStatusBar ¶
func (ge *Gide) ConfigStatusBar()
ConfigStatusBar configures statusbar with label
func (*Gide) ConfigTextBuf ¶
ConfigTextBuf configures the text buf according to prefs
func (*Gide) ConnectEvents2D ¶
func (ge *Gide) ConnectEvents2D()
func (*Gide) CursorToHistNext ¶
CursorToHistNext moves cursor to next position on history list -- returns true if moved
func (*Gide) CursorToHistPrev ¶
CursorToHistPrev moves cursor to previous position on history list -- returns true if moved
func (*Gide) Defaults ¶
func (ge *Gide) Defaults()
Defaults sets new project defaults based on overall preferences
func (*Gide) DiffFileNode ¶
DiffFileNode shows the differences between two given files (currently outputs a context diff but will show a side-by-side view soon..
func (*Gide) DiffFiles ¶
DiffFiles shows the differences between two given files (currently outputs a context diff but will show a side-by-side view soon..
func (*Gide) ExecCmd ¶
func (ge *Gide) ExecCmd()
ExecCmd pops up a menu to select a command appropriate for the current active text view, and shows output in MainTab with name of command
func (*Gide) ExecCmdFileNode ¶
ExecCmdFileNode pops up a menu to select a command appropriate for the given node, and shows output in MainTab with name of command
func (*Gide) ExecCmdName ¶
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 (*Gide) ExecCmdNameActive ¶
ExecCmdNameActive calls given command on current active textview
func (*Gide) ExecCmdNameFileNode ¶
ExecCmdNameFileNode executes command of given name on given node
func (*Gide) ExecCmds ¶
ExecCmds executes a sequence of commands, sel = select tab, clearBuf = clear buffer
func (*Gide) ExecCmdsFileNode ¶
ExecCmdsFileNode executes a sequence of commands on file node, sel = select tab, clearBuf = clear buffer
func (*Gide) FileNodeClosed ¶
func (ge *Gide) FileNodeClosed(fn *giv.FileNode, tvn *FileTreeView)
FileNodeClosed is called whenever file tree browser node is closed
func (*Gide) FileNodeOpened ¶
func (ge *Gide) FileNodeOpened(fn *giv.FileNode, tvn *FileTreeView)
FileNodeOpened is called whenever file node is double-clicked in file tree
func (*Gide) FileNodeSelected ¶
func (ge *Gide) FileNodeSelected(fn *giv.FileNode, tvn *FileTreeView)
FileNodeSelected is called whenever tree browser has file node selected
func (*Gide) Find ¶
Find does Find / Replace in files, using given options and filters -- opens up a main tab with the results and further controls.
func (*Gide) FindOrMakeCmdBuf ¶
FindOrMakeCmdBuf 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 (*Gide) FindOrMakeCmdTab ¶
func (ge *Gide) FindOrMakeCmdTab(cmdNm string, sel bool, clearBuf bool) (*giv.TextBuf, *giv.TextView, int, bool)
FindOrMakeCmdTab 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 (*Gide) FindOrMakeMainTab ¶
FindOrMakeMainTab returns a MainTabs (first set of tabs) tab with given name, first by looking for an existing one, and if not found, making a new one with widget of given type. if sel, then select it. returns widget and tab index.
func (*Gide) FindOrMakeMainTabTextView ¶
FindOrMakeMainTabTextView returns a MainTabs (first set of tabs) tab with given name, first by looking for an existing one, and if not found, making a new one with a Layout and then a TextView in it. if sel, then select it. returns widget and tab index.
func (*Gide) FocusNextPanel ¶
func (ge *Gide) FocusNextPanel()
FocusNextPanel moves the keyboard focus to the next panel to the right
func (*Gide) FocusOnPanel ¶
FocusOnPanel moves keyboard focus to given panel -- returns false if nothing at that tab
func (*Gide) FocusPrevPanel ¶
func (ge *Gide) FocusPrevPanel()
FocusPrevPanel moves the keyboard focus to the previous panel to the left
func (*Gide) GideKeys ¶
func (ge *Gide) GideKeys(kt *key.ChordEvent)
func (*Gide) GrabPrefs ¶
func (ge *Gide) GrabPrefs()
GrabPrefs grabs the current project preference settings from various places, e.g., prior to saving or editing.
func (*Gide) GuessMainLang ¶
GuessMainLang guesses the main language in the project -- returns true if successful
func (*Gide) GuessVersCtrl ¶
GuessVersCtrl guesses the version control system in use
func (*Gide) KeyChordEvent ¶
func (ge *Gide) KeyChordEvent()
func (*Gide) LangDefaults ¶
LangDefaults applies default language settings based on MainLang
func (*Gide) LinkViewFile ¶
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 (*Gide) LinkViewFileNode ¶
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 (*Gide) MainTabByName ¶
MainTabByName returns a MainTabs (first set of tabs) tab with given name, and its index -- returns false if not found
func (*Gide) MainTabDeleted ¶
MainTabDeleted is called when a main tab is deleted -- we cancel any running commmands
func (*Gide) NChangedFiles ¶
NChangedFiles returns number of opened files with unsaved changes
func (*Gide) NewProj ¶
func (ge *Gide) NewProj(path gi.FileName, folder string, mainLang LangName, versCtrl VersCtrlName) (*gi.Window, *Gide)
NewProj creates a new project at given path, making a new folder in that path -- all Gide 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 (*Gide) NextTextView ¶
NextTextView 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 (*Gide) NextViewFile ¶
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 (*Gide) NextViewFileNode ¶
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 (*Gide) OpenConsoleTab ¶
func (ge *Gide) OpenConsoleTab()
OpenConsoleTab opens a main tab displaying console output (stdout, stderr)
func (*Gide) OpenFileNode ¶
OpenFileNode opens file for file node -- returns new bool and error
func (*Gide) OpenFileURL ¶
OpenFileURL opens given file:/// url
func (*Gide) OpenFindURL ¶
OpenFindURL opens given find:/// url from Find -- delegates to FindView
func (*Gide) OpenNodeForTextView ¶
OpenNodeForTextView finds the FileNode that a given TextView is viewing, returning its index within OpenNodes list, or false if not found
func (*Gide) OpenPath ¶
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 Gide object if it is empty, or otherwise opens a new window.
func (*Gide) OpenProj ¶
OpenProj opens .gide project file and its settings from given filename, in a standard JSON-formatted file
func (*Gide) OpenRecent ¶
OpenRecent opens a recently-used file
func (*Gide) OpenSpellURL ¶
OpenSpellURL opens given spell:/// url from Spell -- delegates to SpellView
func (*Gide) PanelIsOpen ¶
PanelIsOpen returns true if the given panel has not been collapsed and is avail and visible for displaying something
func (*Gide) ParseOpenFindURL ¶
func (ge *Gide) ParseOpenFindURL(ur string, ftv *giv.TextView) (tv *giv.TextView, reg giv.TextRegion, 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 (*Gide) ProjPrefs ¶
func (ge *Gide) ProjPrefs()
ProjPrefs allows editing of project preferences (settings specific to this project)
func (*Gide) RegisterCopy ¶
RegisterCopy saves current selection in active text view to register of given name returns true if saved
func (*Gide) RegisterPaste ¶
func (ge *Gide) RegisterPaste(name RegisterName) bool
RegisterPaste pastes register of given name into active text view returns true if pasted
func (*Gide) ReplaceInActive ¶
func (ge *Gide) ReplaceInActive()
ReplaceInActive does query-replace in active file only
func (*Gide) RevertActiveView ¶
func (ge *Gide) RevertActiveView()
RevertActiveView revert active view to saved version
func (*Gide) RunPostCmdsActiveView ¶
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 (*Gide) RunPostCmdsFileNode ¶
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 (*Gide) SaveActiveView ¶
func (ge *Gide) SaveActiveView()
SaveActiveView saves the contents of the currently-active textview
func (*Gide) SaveActiveViewAs ¶
SaveActiveViewAs save with specified filename the contents of the currently-active textview
func (*Gide) SaveAllCheck ¶
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 (*Gide) SaveAllOpenNodes ¶
func (ge *Gide) SaveAllOpenNodes()
SaveAllOpenNodes saves all of the open filenodes to their current file names
func (*Gide) SaveProj ¶
func (ge *Gide) SaveProj()
SaveProj saves project file containing custom project settings, in a standard JSON-formatted file
func (*Gide) SaveProjAs ¶
SaveProjAs saves project custom settings to given filename, in a standard JSON-formatted file saveAllFiles indicates if user should be prompted for saving all files returns true if the user was prompted, false otherwise
func (*Gide) SaveProjIfExists ¶
SaveProjIfExists saves project file containing custom project settings, in a standard JSON-formatted file, only if it already exists -- returns true if saved saveAllFiles indicates if user should be prompted for saving all files
func (*Gide) SelectMainTabByName ¶
SelectMainTabByName Selects given main tab, and returns all of its contents as well.
func (*Gide) SelectOpenNode ¶
func (ge *Gide) SelectOpenNode()
SelectOpenNode pops up a menu to select an open node (aka buffer) to view in current active textview
func (*Gide) SetActiveFilename ¶
SetActiveFilename sets the active filename
func (*Gide) SetActiveTextView ¶
SetActiveTextView sets the given textview as the active one, and returns its index
func (*Gide) SetActiveTextViewIdx ¶
SetActiveTextViewIdx sets the given view index as the currently-active TextView -- returns that textview
func (*Gide) SetArgVarVals ¶
func (ge *Gide) SetArgVarVals()
SetArgVarVals sets the ArgVar values for commands, from Gide values
func (*Gide) SetStatus ¶
SetStatus updates the statusbar label with given message, along with other status info
func (*Gide) SplitViewConfig ¶
func (ge *Gide) SplitViewConfig() kit.TypeAndNameList
SplitViewConfig returns a TypeAndNameList for configuring the SplitView
func (*Gide) SplitsEdit ¶
func (ge *Gide) SplitsEdit()
SplitsEdit opens the SplitsView editor to customize saved splitter settings
func (*Gide) SplitsSave ¶
SplitsSave saves current splitter settings to named splitter settings under existing name, and saves to prefs file
func (*Gide) SplitsSaveAs ¶
SplitsSaveAs saves current splitter settings to new named splitter settings, and saves to prefs file
func (*Gide) SplitsSetView ¶
SplitsSetView sets split view splitters to given named setting
func (*Gide) StatusLabel ¶
StatusLabel returns the statusbar label widget
func (*Gide) StdConfig ¶
StdConfig configures a standard setup of the overall Frame -- returns mods, updt from ConfigChildren and does NOT call UpdateEnd
func (*Gide) StdFrameConfig ¶
func (ge *Gide) StdFrameConfig() kit.TypeAndNameList
StdFrameConfig returns a TypeAndNameList for configuring a standard Frame -- can modify as desired before calling ConfigChildren on Frame using this
func (*Gide) TextViewByIndex ¶
TextViewByIndex returns the TextView by index (0 or 1), nil if not found
func (*Gide) TextViewForFile ¶
TextViewForFile finds FileNode for file, and returns TextView and index that is viewing that FileNode, or false if none is
func (*Gide) TextViewForFileNode ¶
TextViewForFileNode finds a TextView that is viewing given FileNode, and its index, or false if none is
func (*Gide) TextViewIndex ¶
TextViewIndex finds index of given textview (0 or 1)
func (*Gide) TextViewSig ¶
func (ge *Gide) TextViewSig(tv *giv.TextView, sig giv.TextViewSignals)
TextViewSig handles all signals from the textviews
func (*Gide) UpdateFiles ¶
func (ge *Gide) UpdateFiles()
UpdateFiles updates the list of files saved in project
func (*Gide) ViewFile ¶
ViewFile views file in an existing TextView if it is already viewing that file, otherwise opens ViewFileNode in active buffer
func (*Gide) ViewFileNode ¶
ViewFileNode sets the given text view to view file in given node (opens buffer if not already opened)
func (*Gide) ViewOpenNodeName ¶
ViewOpenNodeName views given open node (by name) in active view
func (*Gide) VisTabByName ¶
VisTabByName returns a VisTabs (second set of tabs for visualizations) tab with given name, and its index -- returns false if not found
type KeyFuns ¶
type KeyFuns int32
gide.KeyFuns 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 KeyFunNeeds2 // special internal signal returned by KeyFun indicating need for second key KeyFunNextPanel // move to next panel to the right KeyFunPrevPanel // move to prev panel to the left KeyFunFileOpen // open a new file in active textview KeyFunBufSelect // select an open buffer to edit in active textview KeyFunBufClone // open active file in other view KeyFunBufSave // save active textview buffer to its file KeyFunBufSaveAs // save as active textview buffer to its file KeyFunBufClose // close active textview buffer KeyFunExecCmd // execute a command on active textview buffer KeyFunRegCopy // copy selection to named register KeyFunRegPaste // paste selection from named register KeyFunCommentOut // comment out region KeyFunIndent // indent region KeyFunJump // jump to line (same as gi.KeyFunJump) KeyFunSetSplit // set named splitter config KeyFunBuildProj // build overall project KeyFunRunProj // run overall project KeyFunsN )
func KeyFun ¶
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 (*KeyFuns) FromString ¶
func (KeyFuns) MarshalJSON ¶
func (*KeyFuns) UnmarshalJSON ¶
type KeyMapItem ¶
type KeyMapItem struct { Keys KeySeq `desc:"the key chord sequence that activates a function"` Fun KeyFuns `desc:"the function of that key"` }
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) ValueView ¶
func (kn KeyMapName) ValueView() giv.ValueView
ValueView registers KeyMapValueView as the viewer of KeyMapName
type KeyMapValueView ¶
type KeyMapValueView struct {
giv.ValueViewBase
}
KeyMapValueView presents an action for displaying an KeyMapName and selecting from KeyMapChooserDialog
func (*KeyMapValueView) Activate ¶
func (vv *KeyMapValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*KeyMapValueView) ConfigWidget ¶
func (vv *KeyMapValueView) ConfigWidget(widg gi.Node2D)
func (*KeyMapValueView) HasAction ¶
func (vv *KeyMapValueView) HasAction() bool
func (*KeyMapValueView) UpdateWidget ¶
func (vv *KeyMapValueView) UpdateWidget()
func (*KeyMapValueView) WidgetType ¶
func (vv *KeyMapValueView) WidgetType() reflect.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) 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) OpenPrefs ¶
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.
type KeyMapsItem ¶
type KeyMapsItem struct { Name string `width:"20" desc:"name of keymap"` Desc string `desc:"description of keymap -- good idea to include source it was derived from"` Map KeySeqMap `` /* 127-byte string literal not displayed */ }
KeyMapsItem is an entry in a KeyMaps list
func (KeyMapsItem) Label ¶
func (km KeyMapsItem) Label() string
Label satisfies the Labeler interface
type KeySeq ¶
KeySeq defines a multiple-key sequence to initiate a key function
func ChordForFun ¶
ChordForFun returns first key sequence trigger for given KeyFun in ActiveKeyMap
func (KeySeq) MarshalText ¶
TextMarshaler is required for JSON encoding of struct keys
func (*KeySeq) UnmarshalText ¶
type KeySeqMap ¶
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 ¶
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 Lang ¶
type Lang struct { Name string `desc:"name of this language / data / file type (must be unique)"` Desc string `desc:"<i>brief</i> description of it"` Exts []string `` /* 205-byte string literal not displayed */ PostSaveCmds CmdNames `desc:"command(s) to run after a file of this type is saved"` Comment string `desc:"string used for commenting-out individual lines"` }
Lang defines properties associated with a given language or file type more generally (e.g., image files, data files, etc)
type LangName ¶
type LangName string
LangName has an associated ValueView for selecting from the list of available language names, for use in preferences etc.
type LangNames ¶
type LangNames []LangName
LangNames is a list of language names
func LangNamesForFilename ¶
LangNamesForFilename returns the language(s) associated with given filename
type LangValueView ¶
type LangValueView struct {
giv.ValueViewBase
}
LangValueView presents an action for displaying an LangName and selecting from LangChooserDialog
func (*LangValueView) Activate ¶
func (vv *LangValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*LangValueView) ConfigWidget ¶
func (vv *LangValueView) ConfigWidget(widg gi.Node2D)
func (*LangValueView) HasAction ¶
func (vv *LangValueView) HasAction() bool
func (*LangValueView) UpdateWidget ¶
func (vv *LangValueView) UpdateWidget()
func (*LangValueView) WidgetType ¶
func (vv *LangValueView) WidgetType() reflect.Type
type Langs ¶
type Langs []*Lang
Langs is a list of language types
var AvailLangs Langs
AvailLangs is the current list of available languages defined -- can be loaded / saved / edited with preferences. This is set to StdLangs at startup.
func LangsForExt ¶
LangsForExt returns the language(s) associated with given extension
func LangsForFilename ¶
LangsForFilename returns the language(s) associated with given filename
func (*Langs) CompileExtMap ¶
CompileExtMap compiles a map between extensions and language(s)
func (*Langs) LangByName ¶
LangByName returns a language and index by name -- returns false and emits a message to stdout if not found
func (*Langs) OpenPrefs ¶
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) SavePrefs ¶
SavePrefs saves Langs to App standard prefs directory, using PrefsLangsFileName
type OpenNodes ¶
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 ¶
Add adds given node to list of open nodes -- if already on the list it is moved to the top
func (*OpenNodes) ByStringName ¶
ByStringName returns the open node with given strings name
func (*OpenNodes) Delete ¶
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
type Preferences ¶
type Preferences struct { HiStyle histyle.StyleName `desc:"highilighting style / theme"` FontFamily gi.FontName `desc:"monospaced font family for editor"` Files FilePrefs `desc:"file view preferences"` Editor EditorPrefs `view:"inline" desc:"editor preferences"` KeyMap KeyMapName `desc:"key map for gide-specific keyboard sequences"` SaveKeyMaps bool `` /* 403-byte string literal not displayed */ SaveLangs bool `` /* 230-byte string literal not displayed */ SaveCmds bool `` /* 228-byte string literal not displayed */ Changed bool `` /* 164-byte string literal not displayed */ }
Preferences are the overall user preferences for Gide.
func (*Preferences) Apply ¶
func (pf *Preferences) Apply()
Apply preferences updates things according with settings
func (*Preferences) Defaults ¶
func (pf *Preferences) Defaults()
func (*Preferences) EditCmds ¶
func (pf *Preferences) EditCmds()
EditCmds opens the CmdsView editor to customize commands you can run.
func (*Preferences) EditHiStyles ¶
func (pf *Preferences) EditHiStyles()
EditHiStyles opens the HiStyleView editor to customize highlighting styles
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) EditLangs ¶
func (pf *Preferences) EditLangs()
EditLangs opens the LangsView editor to customize settings 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 ¶ added in v0.5.1
func (pf *Preferences) VersionInfo() string
VersionInfo returns GoGi version information
type ProjPrefs ¶
type ProjPrefs struct { Files FilePrefs `desc:"file view preferences"` Editor EditorPrefs `view:"inline" desc:"editor preferences"` SplitName SplitName `desc:"current named-split config in use for configuring the splitters"` MainLang LangName `` /* 135-byte string literal not displayed */ VersCtrl VersCtrlName `desc:"the type of version control system used in this project (git, svn, etc) -- filters commands available"` ChangeLog ChangeLog `` /* 135-byte string literal not displayed */ ProjFilename gi.FileName `` /* 131-byte string literal not displayed */ ProjRoot gi.FileName `` /* 217-byte string literal not displayed */ BuildCmds CmdNames `desc:"command(s) to run for main Build button"` BuildDir gi.FileName `` /* 165-byte string literal not displayed */ BuildTarg gi.FileName `desc:"build target for main Build button, if relevant for your BuildCmds"` RunExec gi.FileName `desc:"executable to run for this project via main Run button -- called by standard Run Proj command"` RunCmds CmdNames `desc:"command(s) to run for main Run button (typically Run Proj)"` Find FindParams `view:"-" desc:"saved find params"` Spell SpellParams `view:"-" desc:"saved spell params"` OpenDirs giv.OpenDirMap `view:"-" desc:"open directories"` Register RegisterName `view:"-" desc:"last register used"` Splits []float32 `view:"-" desc:"current splitter splits"` Changed bool `` /* 164-byte string literal not displayed */ }
ProjPrefs are the preferences for saving for a project -- this IS the project file
type RegisterName ¶
type RegisterName string
RegisterName has an associated ValueView for selecting from the list of available named registers
func (RegisterName) ValueView ¶
func (kn RegisterName) ValueView() giv.ValueView
ValueView registers RegisterValueView as the viewer of RegisterName
type RegisterValueView ¶
type RegisterValueView struct {
giv.ValueViewBase
}
RegisterValueView presents an action for displaying an RegisterName and selecting
func (*RegisterValueView) Activate ¶
func (vv *RegisterValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*RegisterValueView) ConfigWidget ¶
func (vv *RegisterValueView) ConfigWidget(widg gi.Node2D)
func (*RegisterValueView) HasAction ¶
func (vv *RegisterValueView) HasAction() bool
func (*RegisterValueView) UpdateWidget ¶
func (vv *RegisterValueView) UpdateWidget()
func (*RegisterValueView) WidgetType ¶
func (vv *RegisterValueView) WidgetType() reflect.Type
type Registers ¶
Registers is a list of named strings
var AvailRegisters Registers
AvailRegisters are available named registers. can be loaded / saved / edited with preferences.
func (*Registers) OpenPrefs ¶
OpenPrefs opens Registers from App standard prefs directory, using PrefRegistersFileName
type SpellView ¶
type SpellView struct { gi.Layout Gide *Gide `json:"-" xml:"-" desc:"parent gide project"` Spell SpellParams `desc:"params for spelling"` Unknown gi.TextWord `desc:"current unknown/misspelled word"` Suggestions []string `desc:"a list of suggestions from spell checker"` ChangeOffset int `desc:"compensation for change word length different than original word"` PreviousLine int `desc:"line of previous unknown word"` CurrentLine int `desc:"line of current unknown word"` LastAction *gi.Action `desc:"last user action (ignore, change, learn)"` }
SpellView is a widget that displays results of spell check
func (*SpellView) AcceptSuggestion ¶
func (*SpellView) AdjustTextPos ¶
AdjustTextPos adjust the character position to compensate for replacement text being different length than original text
func (*SpellView) ChangeAction ¶
func (sv *SpellView) ChangeAction()
ChangeAction replaces the known word with the selected suggested word and call CheckNextAction
func (*SpellView) ChangeAllAct ¶
ChangeAct 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) ChangeText ¶
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) IgnoreAction ¶
func (sv *SpellView) IgnoreAction()
IgnoreAction will skip this and future instances of misspelled/unknown word and call CheckNextAction
func (*SpellView) LearnAction ¶
func (sv *SpellView) LearnAction()
LearnAction will add the current unknown word to corpus and call CheckNext
func (*SpellView) OpenSpellURL ¶
OpenFindURL opens given spell:/// url from Find
func (*SpellView) SetUnknownAndSuggest ¶
SetUnknownAndSuggest
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) SpellNextAct ¶
SpellNextAct returns the spell next action from toolbar
func (*SpellView) StdConfig ¶
func (sv *SpellView) StdConfig() kit.TypeAndNameList
StdConfig returns a TypeAndNameList for configuring a standard Frame -- can modify as desired before calling ConfigChildren on Frame using this
func (*SpellView) StdSpellConfig ¶
StdSpellConfig configures a standard setup of the overall layout -- returns mods, updt from ConfigChildren and does NOT call UpdateEnd
func (*SpellView) SuggestBar ¶
SuggestBar returns the suggest toolbar
func (*SpellView) SuggestView ¶
SuggestView returns the view for the list of suggestions
func (*SpellView) TextViewLay ¶
TextViewLay returns the spell check results TextView layout
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) UnknownBar ¶
UnknownBar returns the toolbar that displays the unknown word
func (*SpellView) UnknownEndPos ¶
UnknownEndPos returns the end position of the current unknown word adjusted for any prior replacement text
func (*SpellView) UnknownStartPos ¶
UnknownStartPos returns the start position of the current unknown word adjusted for any prior replacement text
func (*SpellView) UnknownText ¶
UnknownText returns the unknown word textfield from toolbar
func (*SpellView) UpdateView ¶
func (sv *SpellView) UpdateView(ge *Gide, sp SpellParams)
UpdateView updates view with current settings
type Split ¶
type Split struct { Name string `desc:"name of splitter config"` Desc string `desc:"brief description"` Splits []float32 `min:"0" max:"1" step:".05" fixed-len:"5" desc:"splitter panel proportions"` }
Split is a named splitter configuration
func (*Split) SaveSplits ¶
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
type SplitValueView ¶
type SplitValueView struct {
giv.ValueViewBase
}
SplitValueView presents an action for displaying an SplitName and selecting
func (*SplitValueView) Activate ¶
func (vv *SplitValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*SplitValueView) ConfigWidget ¶
func (vv *SplitValueView) ConfigWidget(widg gi.Node2D)
func (*SplitValueView) HasAction ¶
func (vv *SplitValueView) HasAction() bool
func (*SplitValueView) UpdateWidget ¶
func (vv *SplitValueView) UpdateWidget()
func (*SplitValueView) WidgetType ¶
func (vv *SplitValueView) WidgetType() reflect.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) OpenPrefs ¶
OpenPrefs opens Splits from App standard prefs directory, using PrefSplitsFileName
type VersCtrlName ¶
type VersCtrlName string
VersCtrlName is the name of a version control system
func (VersCtrlName) ValueView ¶
func (kn VersCtrlName) ValueView() giv.ValueView
ValueView registers VersCtrlValueView as the viewer of VersCtrlName
type VersCtrlValueView ¶
type VersCtrlValueView struct {
giv.ValueViewBase
}
VersCtrlValueView presents an action for displaying an VersCtrlName and selecting from StringPopup
func (*VersCtrlValueView) Activate ¶
func (vv *VersCtrlValueView) Activate(vp *gi.Viewport2D, dlgRecv ki.Ki, dlgFunc ki.RecvFunc)
func (*VersCtrlValueView) ConfigWidget ¶
func (vv *VersCtrlValueView) ConfigWidget(widg gi.Node2D)
func (*VersCtrlValueView) HasAction ¶
func (vv *VersCtrlValueView) HasAction() bool
func (*VersCtrlValueView) UpdateWidget ¶
func (vv *VersCtrlValueView) UpdateWidget()
func (*VersCtrlValueView) WidgetType ¶
func (vv *VersCtrlValueView) WidgetType() reflect.Type