Documentation ¶
Overview ¶
Package code provides all the code infrastructure and supporting gui for filetree, commands, console, and 2-sequence key functions, settings, splitviews, etc.
CodeView is in a separate codev directory so that other packages can tap into the code infrastructure, and be callable directly from the CodeView editor, without creating circular import problems.
Index ¶
- Constants
- Variables
- func ArgVarKeys() []string
- func ArgVarPrompts(arg string) (map[string]struct{}, bool)
- func CmdsView(pt *Commands)
- func CommandMenu(fn *filetree.Node) func(mm *core.Scene)
- func CommandName(cat, cmd string) string
- func CompleteArg(data any, text string, posLn, posCh int) (md complete.Matches)
- func CompleteArgEdit(data any, text string, cursorPos int, c complete.Completion, seed string) (ed complete.Edit)
- func ConfigEditorTextEditor(ed *texteditor.Editor)
- func ConfigOutputTextEditor(ed *texteditor.Editor)
- func DebugSettingsView(pf *cdebug.Params) *views.StructView
- func KeyMapsView(km *KeyMaps)
- func LangsView(pt *Langs)
- func MarkupCmdOutput(out []byte) []byte
- func MarkupStderr(out []byte) []byte
- func MarkupStdout(out []byte) []byte
- func MergeAvailableCmds()
- func NewDebugger(sup fileinfo.Known, path, rootPath string, outbuf *texteditor.Buffer, ...) (cdebug.GiDebug, error)
- func OpenPaths()
- func ProjectSettingsView(pf *ProjectSettings) *views.StructView
- func RegistersView(pt *Registers)
- func RepoCurBranches(repo vcs.Repo) (string, []string, error)
- func SavePaths()
- func SelectSymbol(ge Code, ssym syms.Symbol)
- func SetActiveKeyMap(km *KeySeqMap, kmName KeyMapName)
- func SetActiveKeyMapName(mapnm KeyMapName)
- func SetGoMod(gomod bool)
- func SplitsView(pt *Splits)
- type ArgVarInfo
- type ArgVarTypes
- func (i ArgVarTypes) Desc() string
- func (i ArgVarTypes) Int64() int64
- func (i ArgVarTypes) MarshalText() ([]byte, error)
- func (i *ArgVarTypes) SetInt64(in int64)
- func (i *ArgVarTypes) SetString(s string) error
- func (i ArgVarTypes) String() string
- func (i *ArgVarTypes) UnmarshalText(text []byte) error
- func (i ArgVarTypes) Values() []enums.Enum
- type ArgVarVals
- type BreakView
- func (sv *BreakView) ConfigBreakView(dv *DebugView)
- func (sv *BreakView) DebugVw() *DebugView
- func (t *BreakView) New() tree.Node
- func (t *BreakView) NodeType() *types.Type
- func (t *BreakView) SetTooltip(v string) *BreakView
- func (sv *BreakView) ShowBreaks()
- func (sv *BreakView) TableView() *views.TableView
- 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) DeleteIndex(idx int)
- func (rc *CmdRuns) KillByName(name string) bool
- type CmdValue
- type Code
- type Command
- func (cm *Command) AppendCmdOut(ge Code, buf *texteditor.Buffer, out []byte)
- func (cm *Command) HasPrompts() (map[string]struct{}, bool)
- func (cm Command) Label() string
- func (cm *Command) LangMatch(lang fileinfo.Known) bool
- func (cm *Command) MarkupCmdOutput(out []byte) []byte
- func (cm *Command) PromptUser(ge Code, buf *texteditor.Buffer, pvals map[string]struct{})
- func (cm *Command) Run(ge Code, buf *texteditor.Buffer)
- func (cm *Command) RunAfterPrompts(ge Code, buf *texteditor.Buffer)
- func (cm *Command) RunBuf(ge Code, buf *texteditor.Buffer, cma *CmdAndArgs) bool
- func (cm *Command) RunBufWait(ge Code, buf *texteditor.Buffer, cma *CmdAndArgs) bool
- func (cm *Command) RunNoBuf(ge Code, cma *CmdAndArgs) bool
- func (cm *Command) RunStatus(ge Code, buf *texteditor.Buffer, cmdstr string, err error, out []byte) bool
- func (cmd *Command) SetCompleter(tf *core.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(lang fileinfo.Known, vcnm filetree.VersionControlName) [][]string
- func (cm *Commands) Open(filename core.Filename) error
- func (cm *Commands) OpenSettings() error
- func (cm *Commands) Save(filename core.Filename) error
- func (cm *Commands) SaveSettings() error
- func (cm *Commands) ViewStandard()
- type Console
- type DebugBreakStatus
- type DebugView
- func (dv *DebugView) ActionActivate(act *core.Button)
- func (dv *DebugView) AddBreak(fpath string, line int)
- func (dv *DebugView) AllVarVw() *VarsView
- func (dv *DebugView) BackupBreaks()
- func (dv *DebugView) BreakVw() *BreakView
- func (dv *DebugView) Config()
- func (dv *DebugView) ConfigDebugView(ge Code, sup fileinfo.Known, exePath string)
- func (dv *DebugView) ConfigTabs()
- func (dv *DebugView) ConfigToolbar()
- func (dv *DebugView) ConsoleText() *texteditor.Editor
- func (dv *DebugView) Continue()
- func (dv *DebugView) DbgCanStep() bool
- func (dv *DebugView) DbgIsActive() bool
- func (dv *DebugView) DbgIsAvail() bool
- func (dv *DebugView) DeleteAllBreaks()
- func (dv *DebugView) DeleteBreak(fpath string, line int)
- func (dv *DebugView) DeleteBreakImpl(fpath string, line int)
- func (dv *DebugView) DeleteBreakInBuf(fpath string, line int)
- func (dv *DebugView) DeleteBreakIndex(bidx int)
- func (dv *DebugView) DeleteCurPCInBuf()
- func (dv *DebugView) Destroy()
- func (dv *DebugView) Detach()
- func (dv *DebugView) FindFrames(fpath string, line int)
- func (dv *DebugView) FindFramesVw() *StackView
- func (dv *DebugView) InitState(ds *cdebug.State)
- func (dv *DebugView) ListGlobalVars(filter string)
- func (t *DebugView) New() tree.Node
- func (t *DebugView) NodeType() *types.Type
- func (dv *DebugView) SetBreaks()
- func (dv *DebugView) SetCurPCInBuf(fpath string, line int)
- func (t *DebugView) SetDbgTime(v time.Time) *DebugView
- func (t *DebugView) SetExePath(v string) *DebugView
- func (dv *DebugView) SetFrame(depth int)
- func (dv *DebugView) SetStatus(stat cdebug.Status)
- func (t *DebugView) SetSup(v fileinfo.Known) *DebugView
- func (dv *DebugView) SetThread(threadID int)
- func (dv *DebugView) SetThreadIndex(thridx int)
- func (t *DebugView) SetTooltip(v string) *DebugView
- func (dv *DebugView) ShowBreakFile(bidx int)
- func (dv *DebugView) ShowBreaks(selTab bool)
- func (dv *DebugView) ShowFile(fpath string, line int)
- func (dv *DebugView) ShowFindFrames(selTab bool)
- func (dv *DebugView) ShowGlobalVars(selTab bool)
- func (dv *DebugView) ShowStack(selTab bool)
- func (dv *DebugView) ShowTasks(selTab bool)
- func (dv *DebugView) ShowThreads(selTab bool)
- func (dv *DebugView) ShowVar(name string) error
- func (dv *DebugView) ShowVars(selTab bool)
- func (dv *DebugView) SingleStep()
- func (dv *DebugView) StackVw() *StackView
- func (dv *DebugView) Start()
- func (dv *DebugView) StepInto()
- func (dv *DebugView) StepOut()
- func (dv *DebugView) StepOver()
- func (dv *DebugView) Stop()
- func (dv *DebugView) Tabs() *core.Tabs
- func (dv *DebugView) TaskVw() *TaskView
- func (dv *DebugView) ThreadVw() *ThreadView
- func (dv *DebugView) Toolbar() *core.Toolbar
- func (dv *DebugView) UpdateAllBreaks()
- func (dv *DebugView) UpdateBreakInBuf(fpath string, line int, stat DebugBreakStatus)
- func (dv *DebugView) UpdateFromState()
- func (dv *DebugView) UpdateToolbar()
- func (dv *DebugView) UpdateView()
- func (dv *DebugView) VarValue(varNm string) string
- func (dv *DebugView) VarVw() *VarsView
- type FileNode
- func (fn *FileNode) ContextMenu(m *core.Scene)
- func (fn *FileNode) EditFile()
- func (fn *FileNode) EditFiles()
- func (fn *FileNode) ExecCmdFile()
- func (fn *FileNode) ExecCmdNameFile(cmdNm string)
- func (t *FileNode) New() tree.Node
- func (t *FileNode) NodeType() *types.Type
- func (fn *FileNode) OnDoubleClick(e events.Event)
- func (fn *FileNode) OnInit()
- func (fn *FileNode) RenameFiles()
- func (t *FileNode) SetIcon(v icons.Icon) *FileNode
- func (t *FileNode) SetIconClosed(v icons.Icon) *FileNode
- func (t *FileNode) SetIconLeaf(v icons.Icon) *FileNode
- func (t *FileNode) SetIconOpen(v icons.Icon) *FileNode
- func (t *FileNode) SetIndent(v units.Value) *FileNode
- func (t *FileNode) SetOpenDepth(v int) *FileNode
- func (t *FileNode) SetRootView(v *views.TreeView) *FileNode
- func (fn *FileNode) SetRunExec()
- func (fn *FileNode) SetRunExecs()
- func (t *FileNode) SetSelectedNodes(v ...views.TreeViewer) *FileNode
- func (t *FileNode) SetText(v string) *FileNode
- func (t *FileNode) SetTooltip(v string) *FileNode
- func (t *FileNode) SetViewIndex(v int) *FileNode
- func (t *FileNode) SetWidgetSize(v math32.Vector2) *FileNode
- type FileSearchResults
- type FileSettings
- type FindLoc
- func (i FindLoc) Desc() string
- func (i FindLoc) Int64() int64
- func (i FindLoc) MarshalText() ([]byte, error)
- func (i *FindLoc) SetInt64(in int64)
- func (i *FindLoc) SetString(s string) error
- func (i FindLoc) String() string
- func (i *FindLoc) UnmarshalText(text []byte) error
- func (i FindLoc) Values() []enums.Enum
- type FindParams
- type FindView
- func (fv *FindView) CheckValidRegexp() bool
- func (fv *FindView) CompileRegexp() bool
- func (fv *FindView) Config()
- func (fv *FindView) ConfigFindView()
- func (fv *FindView) ConfigToolbars(fb, rb *core.BasicBar)
- func (fv *FindView) FindAction()
- func (fv *FindView) FindBar() *core.BasicBar
- func (fv *FindView) FindNextAct() *core.Button
- func (fv *FindView) FindText() *core.Chooser
- func (fv *FindView) HighlightFinds(tv, ftv *texteditor.Editor, fbStLn, fCount int, find string)
- func (fv *FindView) IgnoreBox() *core.Switch
- func (fv *FindView) LocCombo() *core.Chooser
- func (t *FindView) New() tree.Node
- func (fv *FindView) NextFind()
- func (t *FindView) NodeType() *types.Type
- func (fv *FindView) OpenFindURL(ur string, ftv *texteditor.Editor) bool
- func (fv *FindView) Params() *FindParams
- func (fv *FindView) PrevFind()
- func (fv *FindView) RegexpBox() *core.Switch
- func (fv *FindView) ReplBar() *core.BasicBar
- func (fv *FindView) ReplText() *core.Chooser
- func (fv *FindView) ReplaceAction() bool
- func (fv *FindView) ReplaceAll()
- func (fv *FindView) ReplaceAllAction()
- func (fv *FindView) SaveFindString(find string)
- func (fv *FindView) SaveReplString(repl string)
- func (t *FindView) SetCode(v Code) *FindView
- func (t *FindView) SetLangVV(v views.Value) *FindView
- func (t *FindView) SetRe(v *regexp.Regexp) *FindView
- func (t *FindView) SetTime(v time.Time) *FindView
- func (t *FindView) SetTooltip(v string) *FindView
- func (fv *FindView) ShowResults(res []FileSearchResults)
- func (fv *FindView) TextEditor() *texteditor.Editor
- func (fv *FindView) UpdateFromParams()
- type KeyFunctions
- func (i KeyFunctions) Desc() string
- func (i KeyFunctions) Int64() int64
- func (i KeyFunctions) MarshalText() ([]byte, error)
- func (i *KeyFunctions) SetInt64(in int64)
- func (i *KeyFunctions) SetString(s string) error
- func (i KeyFunctions) String() string
- func (i *KeyFunctions) UnmarshalText(text []byte) error
- func (i KeyFunctions) Values() []enums.Enum
- type KeyMapItem
- type KeyMapName
- type KeyMapValue
- type KeyMaps
- func (km *KeyMaps) CopyFrom(cp KeyMaps)
- func (km *KeyMaps) MapByName(name KeyMapName) (*KeySeqMap, int, bool)
- func (km *KeyMaps) Open(filename core.Filename) error
- func (km *KeyMaps) OpenSettings() error
- func (km *KeyMaps) RevertToStandard()
- func (km *KeyMaps) Save(filename core.Filename) error
- func (km *KeyMaps) SaveSettings() error
- func (km *KeyMaps) ViewStandard()
- type KeyMapsItem
- type KeySeq
- type KeySeqMap
- type LangOpts
- type Langs
- func (lt *Langs) CopyFrom(cp Langs)
- func (lt *Langs) Open(filename core.Filename) error
- func (lt *Langs) OpenSettings() error
- func (lt *Langs) RevertToStandard()
- func (lt *Langs) Save(filename core.Filename) error
- func (lt *Langs) SaveSettings() error
- func (lt Langs) Validate() bool
- func (lt *Langs) ViewStandard()
- type OpenNodes
- func (on *OpenNodes) Add(fn *filetree.Node) bool
- func (on *OpenNodes) AddImpl(fn *filetree.Node) bool
- func (on *OpenNodes) ByStringName(name string) *filetree.Node
- func (on *OpenNodes) Delete(fn *filetree.Node) bool
- func (on *OpenNodes) DeleteDeleted()
- func (on *OpenNodes) DeleteIndex(idx int)
- func (on *OpenNodes) FindPath(path string) *filetree.Node
- func (on *OpenNodes) NChanged() int
- func (on *OpenNodes) Strings() []string
- type ProjectSettings
- type RegisterName
- type RegisterValue
- type Registers
- type SettingsData
- func (se *SettingsData) Apply()
- func (se *SettingsData) ApplyEnvVars()
- func (se *SettingsData) ConfigToolbar(tb *core.Toolbar)
- func (se *SettingsData) Defaults()
- func (se *SettingsData) EditCmds()
- func (se *SettingsData) EditKeyMaps()
- func (se *SettingsData) EditLangOpts()
- func (se *SettingsData) EditRegisters()
- func (se *SettingsData) EditSplits()
- func (se *SettingsData) Open() error
- func (se *SettingsData) Save() error
- type SpellView
- func (sv *SpellView) AcceptSuggestion(s string)
- func (sv *SpellView) ChangeAct() *core.Button
- func (sv *SpellView) ChangeAction()
- func (sv *SpellView) ChangeAllAct() *core.Button
- func (sv *SpellView) ChangeAllAction()
- func (sv *SpellView) ChangeBar() *core.Toolbar
- func (sv *SpellView) ChangeText() *core.TextField
- func (sv *SpellView) CheckNext()
- func (sv *SpellView) ConfigSpellView(ge Code, atv *TextEditor)
- func (sv *SpellView) ConfigToolbar()
- func (sv *SpellView) Destroy()
- func (sv *SpellView) IgnoreAct() *core.Button
- func (sv *SpellView) IgnoreAction()
- func (sv *SpellView) LearnAct() *core.Button
- func (sv *SpellView) LearnAction()
- func (t *SpellView) New() tree.Node
- func (t *SpellView) NodeType() *types.Type
- func (t *SpellView) SetCode(v Code) *SpellView
- func (t *SpellView) SetCurIndex(v int) *SpellView
- func (t *SpellView) SetCurLn(v int) *SpellView
- func (t *SpellView) SetErrs(v lexer.Line) *SpellView
- func (t *SpellView) SetLastAction(v *core.Button) *SpellView
- func (t *SpellView) SetSuggest(v ...string) *SpellView
- func (t *SpellView) SetText(v *TextEditor) *SpellView
- func (t *SpellView) SetTooltip(v string) *SpellView
- func (t *SpellView) SetUnkLex(v lexer.Lex) *SpellView
- func (t *SpellView) SetUnkWord(v string) *SpellView
- func (sv *SpellView) SkipAct() *core.Button
- func (sv *SpellView) SkipAction()
- func (sv *SpellView) SpellAction()
- func (sv *SpellView) SpellBar() *core.Toolbar
- func (sv *SpellView) SuggestView() *views.SliceView
- func (sv *SpellView) TrainAction()
- func (sv *SpellView) UnkEndPos() lexer.Pos
- func (sv *SpellView) UnkStartPos() lexer.Pos
- func (sv *SpellView) UnknownBar() *core.Toolbar
- func (sv *SpellView) UnknownText() *core.TextField
- type Split
- type SplitName
- type SplitValue
- type Splits
- func (lt *Splits) Add(name, desc string, splits []float32) (*Split, int)
- func (lt *Splits) CopyFrom(cp Splits)
- func (lt *Splits) FixLen()
- func (lt *Splits) Names() []string
- func (lt *Splits) Open(filename core.Filename) error
- func (lt *Splits) OpenSettings() error
- func (lt *Splits) Save(filename core.Filename) error
- func (lt *Splits) SaveSettings() error
- func (lt *Splits) SplitByName(name SplitName) (*Split, int, bool)
- type StackView
- func (sv *StackView) ConfigStackView(dv *DebugView, findFrames bool)
- func (sv *StackView) DebugVw() *DebugView
- func (t *StackView) New() tree.Node
- func (t *StackView) NodeType() *types.Type
- func (t *StackView) SetFindFrames(v bool) *StackView
- func (t *StackView) SetTooltip(v string) *StackView
- func (sv *StackView) ShowStack()
- func (sv *StackView) TableView() *views.TableView
- type SymNode
- type SymScopes
- func (i SymScopes) Desc() string
- func (i SymScopes) Int64() int64
- func (i SymScopes) MarshalText() ([]byte, error)
- func (i *SymScopes) SetInt64(in int64)
- func (i *SymScopes) SetString(s string) error
- func (i SymScopes) String() string
- func (i *SymScopes) UnmarshalText(text []byte) error
- func (i SymScopes) Values() []enums.Enum
- type SymTreeView
- func (t *SymTreeView) New() tree.Node
- func (t *SymTreeView) NodeType() *types.Type
- func (st *SymTreeView) OnInit()
- func (t *SymTreeView) SetIcon(v icons.Icon) *SymTreeView
- func (t *SymTreeView) SetIconClosed(v icons.Icon) *SymTreeView
- func (t *SymTreeView) SetIconLeaf(v icons.Icon) *SymTreeView
- func (t *SymTreeView) SetIconOpen(v icons.Icon) *SymTreeView
- func (t *SymTreeView) SetIndent(v units.Value) *SymTreeView
- func (t *SymTreeView) SetOpenDepth(v int) *SymTreeView
- func (t *SymTreeView) SetRootView(v *views.TreeView) *SymTreeView
- func (t *SymTreeView) SetSelectedNodes(v ...views.TreeViewer) *SymTreeView
- func (st *SymTreeView) SetSymIcon()
- func (t *SymTreeView) SetText(v string) *SymTreeView
- func (t *SymTreeView) SetTooltip(v string) *SymTreeView
- func (t *SymTreeView) SetViewIndex(v int) *SymTreeView
- func (t *SymTreeView) SetWidgetSize(v math32.Vector2) *SymTreeView
- func (st *SymTreeView) SymNode() *SymNode
- func (st *SymTreeView) UpdateBranchIcons()
- type SymbolsParams
- type SymbolsView
- func (sv *SymbolsView) ConfigSymbolsView(ge Code, sp SymbolsParams)
- func (sv *SymbolsView) ConfigToolbar()
- func (sv *SymbolsView) ConfigTree(scope SymScopes)
- func (sv *SymbolsView) Frame() *core.Frame
- func (t *SymbolsView) New() tree.Node
- func (t *SymbolsView) NodeType() *types.Type
- func (sv *SymbolsView) OpenFile()
- func (sv *SymbolsView) OpenPackage()
- func (sv *SymbolsView) Params() *SymbolsParams
- func (sv *SymbolsView) RefreshAction()
- func (sv *SymbolsView) ScopeChooser() *core.Chooser
- func (sv *SymbolsView) SearchText() *core.TextField
- func (t *SymbolsView) SetCode(v Code) *SymbolsView
- func (t *SymbolsView) SetMatch(v string) *SymbolsView
- func (t *SymbolsView) SetSymParams(v SymbolsParams) *SymbolsView
- func (t *SymbolsView) SetSyms(v *SymNode) *SymbolsView
- func (t *SymbolsView) SetTooltip(v string) *SymbolsView
- func (sv *SymbolsView) Toolbar() *core.Toolbar
- type TaskView
- type TextEditor
- func (ed *TextEditor) ClearBreakpoint(ln int)
- func (ed *TextEditor) ContextMenu(m *core.Scene)
- func (ed *TextEditor) CurDebug() (*DebugView, bool)
- func (ed *TextEditor) DebugVarValueAtPos(pos image.Point) string
- func (ed *TextEditor) FindFrames(ln int)
- func (ed *TextEditor) HandleDebugDoubleClick(e events.Event, tpos lexer.Pos)
- func (ed *TextEditor) HandleEvents()
- func (ed *TextEditor) HasBreakpoint(ln int) bool
- func (ed *TextEditor) LineNoDoubleClick(tpos lexer.Pos)
- func (t *TextEditor) New() tree.Node
- func (t *TextEditor) NodeType() *types.Type
- func (ed *TextEditor) OnInit()
- func (ed *TextEditor) SetBreakpoint(ln int)
- func (t *TextEditor) SetCode(v Code) *TextEditor
- func (t *TextEditor) SetCursorColor(v image.Image) *TextEditor
- func (t *TextEditor) SetCursorWidth(v units.Value) *TextEditor
- func (t *TextEditor) SetHighlightColor(v image.Image) *TextEditor
- func (t *TextEditor) SetLineNumberColor(v image.Image) *TextEditor
- func (t *TextEditor) SetLinkHandler(v func(tl *paint.TextLink)) *TextEditor
- func (t *TextEditor) SetSelectColor(v image.Image) *TextEditor
- func (ed *TextEditor) SetStyles()
- func (t *TextEditor) SetTooltip(v string) *TextEditor
- func (ed *TextEditor) ToggleBreakpoint(ln int)
- type ThreadView
- func (sv *ThreadView) ConfigThreadView(dv *DebugView)
- func (sv *ThreadView) DebugVw() *DebugView
- func (t *ThreadView) New() tree.Node
- func (t *ThreadView) NodeType() *types.Type
- func (t *ThreadView) SetTooltip(v string) *ThreadView
- func (sv *ThreadView) ShowThreads()
- func (sv *ThreadView) TableView() *views.TableView
- type VarView
- func (vv *VarView) ConfigSplits()
- func (vv *VarView) ConfigToolbar(tb *core.Toolbar)
- func (vv *VarView) ConfigVarView()
- func (t *VarView) New() tree.Node
- func (t *VarView) NodeType() *types.Type
- func (t *VarView) SetDbgView(v *DebugView) *VarView
- func (vv *VarView) SetFrameInfo(finfo string)
- func (t *VarView) SetTooltip(v string) *VarView
- func (vv *VarView) SetVar(vr *cdebug.Variable, frinfo string)
- func (vv *VarView) Splits() *core.Splits
- func (vv *VarView) StructView() *views.StructView
- func (vv *VarView) TreeView() *views.TreeView
- type VarsView
- func (sv *VarsView) ConfigVarsView(dv *DebugView, globalVars bool)
- func (sv *VarsView) DebugVw() *DebugView
- func (t *VarsView) New() tree.Node
- func (t *VarsView) NodeType() *types.Type
- func (t *VarsView) SetGlobalVars(v bool) *VarsView
- func (t *VarsView) SetTooltip(v string) *VarsView
- func (sv *VarsView) ShowVars()
- func (sv *VarsView) TableView() *views.TableView
Constants ¶
const ( CmdWait = true CmdNoWait = false CmdFocus = true CmdNoFocus = false CmdConfirm = true CmdNoConfirm = false )
Use these for more obvious command options
Variables ¶
var ( // RecentPaths is a slice of recent file paths RecentPaths core.FilePaths // SavedPathsFilename is the name of the saved file paths file in Cogent Code data directory SavedPathsFilename = "saved-paths.json" )
var ArgVars = map[string]ArgVarInfo{ "{FilePath}": {"Current file name with full path.", ArgVarFile}, "{Filename}": {"Current file name only, without path.", ArgVarFile}, "{FileExt}": {"Extension of current file name.", ArgVarExt}, "{FileExtLC}": {"Extension of current file name, lowercase.", ArgVarExt}, "{FilenameNoExt}": {"Current file name without path and extension.", ArgVarFile}, "{FileDir}": {"Name only of current file's directory.", ArgVarDir}, "{FileDirPath}": {"Full path to current file's directory.", ArgVarDir}, "{FileDirProjectRel}": {"Path to current file's directory relative to project root.", ArgVarDir}, "{ProjectDir}": {"Current project directory name, without full path.", ArgVarDir}, "{ProjectPath}": {"Full path to current project directory.", ArgVarDir}, "{BuildDir}": {"Full path to BuildDir specified in project prefs -- the default Build.", ArgVarDir}, "{BuildDirRel}": {"Path to BuildDir relative to project root.", ArgVarDir}, "{BuildTarg}": {"Build target specified in prefs BuildTarg, just filename by itself, without path.", ArgVarFile}, "{BuildTargPath}": {"Full path to build target specified in prefs BuildTarg.", ArgVarFile}, "{BuildTargDirPath}": {"Full path to build target directory, without filename.", ArgVarDir}, "{BuildTargDirPathRel}": {"Project-relative path to build target directory, without filename.", ArgVarDir}, "{RunExec}": {"Run-time executable file RunExec specified in project prefs -- just the raw name of the file, without path.", ArgVarFile}, "{RunExecPath}": {"Full path to the run-time executable file RunExec specified in project prefs.", ArgVarFile}, "{RunExecDirPath}": {"Full path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir}, "{RunExecDirPathRel}": {"Project-root relative path to the directory of the run-time executable file RunExec specified in project prefs.", ArgVarDir}, "{CurLine}": {"Cursor current line number (starts at 1).", ArgVarPos}, "{CurCol}": {"Cursor current column number (starts at 0).", ArgVarPos}, "{SelStartLine}": {"Selection starting line (same as CurLine if no selection).", ArgVarPos}, "{SelStartCol}": {"Selection starting column (same as CurCol if no selection).", ArgVarPos}, "{SelEndLine}": {"Selection ending line (same as CurLine if no selection).", ArgVarPos}, "{SelEndCol}": {"Selection ending column (same as CurCol if no selection).", ArgVarPos}, "{CurSel}": {"Currently selected text.", ArgVarText}, "{CurLineText}": {"Current line text under cursor.", ArgVarText}, "{CurWord}": {"Current word under cursor.", ArgVarText}, "{PromptFilePath}": {"Prompt user for a file, and this is the full path to that file.", ArgVarPrompt}, "{PromptFilename}": {"Prompt user for a file, and this is the filename (only) of that file.", ArgVarPrompt}, "{PromptFileDir}": {"Prompt user for a file, and this is the directory name (only) of that file.", ArgVarPrompt}, "{PromptFileDirPath}": {"Prompt user for a file, and this is the full path to that directory.", ArgVarPrompt}, "{PromptFileDirProjectRel}": {"Prompt user for a file, and this is the path of that directory relative to the project root.", ArgVarPrompt}, "{PromptString1}": {"Prompt user for a string -- this is it.", ArgVarPrompt}, "{PromptString2}": {"Prompt user for another string -- this is it.", ArgVarPrompt}, "{PromptBranch}": {"Prompt user for a VCS branch.", ArgVarPrompt}, }
ArgVars are variables that can be used for arguments to commands in CmdAndArgs
var AvailableKeyMapsChanged = false
AvailableKeyMapsChanged is used to update views.KeyMapsView toolbars via following menu, toolbar properties update methods -- not accurate if editing any other map but works for now..
var AvailableLangsChanged = false
AvailableLangsChanged is used to update views.LangsView toolbars via following menu, toolbar properties update methods -- not accurate if editing any other map but works for now..
var AvailableRegisterNames []string
AvailableRegisterNames are the names of the current AvailRegisters -- used for some choosers
var AvailableRegistersChanged = false
AvailableRegistersChanged is used to update toolbars via following menu, toolbar properties update methods -- not accurate if editing any other map but works for now..
var AvailableSplitNames []string
AvailableSplitNames are the names of the current AvailableSplits -- used for some choosers
var AvailableSplitsChanged = false
AvailableSplitsChanged is used to update toolbars via following menu, toolbar properties update methods -- not accurate if editing any other map but works for now..
var BreakViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.BreakView", IDName: "break-view", Doc: "BreakView is a view of the breakpoints", Embeds: []types.Field{{Name: "Layout"}}, Instance: &BreakView{}})
BreakViewType is the types.Type for BreakView
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 CmdPrompt1Vals = map[string]string{}
CmdPrompt1Vals holds last values for PromptString1 per command, so that each such command has its own appropriate history
var CmdPrompt2Vals = map[string]string{}
CmdPrompt2Vals holds last values for PromptString2 per command, so that each such command has its own appropriate history
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 CommandSettingsFilename = "command-settings.toml"
CommandSettingsFilename is the name of the settings file in the app settings directory for saving / loading your CustomCommands commands list
var CustomCommands = Commands{}
CustomCommands is user-specific list of commands saved in settings available for all Code projects. These will override StdCmds with the same names.
var CustomCommandsChanged = false
CustomCommandsChanged is used to update views.CmdsView toolbars via following menu, toolbar properties update methods.
var DebugBreakColors = [DebugBreakStatusN]string{"pink", "red", "orange", "lightblue"}
DebugBreakColors are the colors indicating different breakpoint statuses
var DebugStatusColors = map[cdebug.Status]color.RGBA{ cdebug.NotInit: colors.Scheme.SurfaceContainerHighest, cdebug.Error: colors.Scheme.Error.Container, cdebug.Building: colors.Scheme.Warn.Container, cdebug.Ready: colors.Scheme.Success.Container, cdebug.Running: colors.Scheme.Tertiary.Container, cdebug.Stopped: colors.Scheme.Warn.Container, cdebug.Breakpoint: colors.Scheme.Warn.Container, cdebug.Finished: colors.Scheme.SurfaceContainerHighest, }
var DebugViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.DebugView", IDName: "debug-view", Doc: "DebugView is the debugger", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "Sup", Doc: "supported file type to determine debugger"}, {Name: "ExePath", Doc: "path to executable / dir to debug"}, {Name: "DbgTime", Doc: "time when dbg was last restarted"}, {Name: "Dbg", Doc: "the debugger"}, {Name: "State", Doc: "all relevant debug state info"}, {Name: "CurFileLoc", Doc: "current ShowFile location -- cleared before next one or run"}, {Name: "BBreaks", Doc: "backup breakpoints list -- to track deletes"}, {Name: "OutputBuffer", Doc: "output from the debugger"}, {Name: "Code", Doc: "parent code project"}}, Instance: &DebugView{}})
DebugViewType is the types.Type for DebugView
var Debuggers = map[fileinfo.Known]func(path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) (cdebug.GiDebug, error){ fileinfo.Go: func(path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) (cdebug.GiDebug, error) { return cdelve.NewGiDelve(path, rootPath, outbuf, pars) }, }
Debuggers is the list of supported debuggers
var DefaultKeyMap = KeyMapName("MacEmacs")
DefaultKeyMap is the overall default keymap -- reinitialized in gimain init() depending on platform
var FileNodeType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.FileNode", IDName: "file-node", Doc: "FileNode is Code version of FileNode for FileTree view", Methods: []types.Method{{Name: "ExecCmdFile", Doc: "ExecCmdFile pops up a menu to select a command appropriate for the given node,\nand shows output in MainTab with name of command", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "EditFiles", Doc: "EditFiles calls EditFile on selected files", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}, {Name: "SetRunExecs", Doc: "SetRunExecs sets executable as the RunExec executable that will be run with Run / Debug buttons", Directives: []types.Directive{{Tool: "types", Directive: "add"}}}}, Embeds: []types.Field{{Name: "Node"}}, Instance: &FileNode{}})
FileNodeType is the types.Type for FileNode
var FindViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.FindView", IDName: "find-view", Doc: "FindView is a find / replace widget that displays results in a TextEditor\nand has a toolbar for controlling find / replace process.", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "Code", Doc: "parent code project"}, {Name: "LangVV", Doc: "langs value view"}, {Name: "Time", Doc: "time of last find"}, {Name: "Re", Doc: "compiled regexp"}}, Instance: &FindView{}})
FindViewType is the types.Type for FindView
var Icons embed.FS
var KeyMapSettingsFilename = "key-map-settings.json"
KeyMapSettingsFilename is the name of the settings file in the app settings directory for saving / loading the default AvailableKeyMaps key maps list
var LangSettingsFilename = "lang-settings.toml"
LangSettingsFilename is the name of the settings file in the app settings directory for saving / loading the default AvailableLangs languages list
var Needs2KeyMap keymap.Map
Needs2KeyMap is a map of the starting key sequences that require a second key -- auto-generated from active keymap
var RegisterSettingsFilename = "register-settings.toml"
RegisterSettingsFilename is the name of the settings file in the app settings directory for saving / loading the default AvailableRegisters
var Settings = &SettingsData{ SettingsBase: core.SettingsBase{ Name: "Code", File: filepath.Join(core.TheApp.DataDir(), "Cogent Code", "settings.toml"), }, }
Settings are the overall Code settings
var SpellViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.SpellView", IDName: "spell-view", Doc: "SpellView is a widget that displays results of spell check", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "Code", Doc: "parent code project"}, {Name: "Text", Doc: "texteditor that we're spell-checking"}, {Name: "Errs", Doc: "current spelling errors"}, {Name: "CurLn", Doc: "current line in text we're on"}, {Name: "CurIndex", Doc: "current index in Errs we're on"}, {Name: "UnkLex", Doc: "current unknown lex token"}, {Name: "UnkWord", Doc: "current unknown word"}, {Name: "Suggest", Doc: "a list of suggestions from spell checker"}, {Name: "LastAction", Doc: "last user action (ignore, change, learn)"}}, Instance: &SpellView{}})
SpellViewType is the types.Type for SpellView
var SplitsSettingsFilename = "splits-settings.json"
SplitsSettingsFilename is the name of the settings file in App prefs directory for saving / loading the default AvailSplits
var StackViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.StackView", IDName: "stack-view", Doc: "StackView is a view of the stack trace", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "FindFrames", Doc: "if true, this is a find frames, not a regular stack"}}, Instance: &StackView{}})
StackViewType is the types.Type for StackView
var StandardCommands = Commands{ {Cat: "Build", Name: "Run Project", Desc: "run RunExec executable set in project", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "{RunExecPath}"}}, Dir: "{RunExecDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Build", Name: "Run Prompt", Desc: "run any command you enter at the prompt", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "{PromptString1}"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Build", Name: "Make", Desc: "run make with no args", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "make"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Build", Name: "Make Prompt", Desc: "run make with prompted make target", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "make", Args: []string{"{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "File", Name: "Grep", Desc: "recursive grep of all files for prompted value", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "grep", Args: []string{"-R", "-e", "{PromptString1}", "{FileDirPath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "File", Name: "Open", Desc: "open file using OS 'open' command", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "open", Args: []string{"{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "File", Name: "Open Target", Desc: "open project target file using OS 'open' command", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "open", Args: []string{"{RunExecPath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Imports File", Desc: "run goimports on file", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "goimports", Args: []string{"-w", "{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Fmt File", Desc: "run go fmt on file", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "gofmt", Args: []string{"-w", "{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Build Dir", Desc: "run go build to build in current dir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"build", "-v"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Build Proj", Desc: "run go build for project BuildDir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"build", "-v"}}}, Dir: "{BuildDir}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Install Dir", Desc: "run go install in current dir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"install", "-v"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Generate", Desc: "run go generate in current dir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"generate"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Test", Desc: "run go test in current dir. Options include: -run TestName or -bench", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"test", "-v", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Vet", Desc: "run go vet in current dir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"vet"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Mod Tidy", Desc: "run go mod tidy in current dir", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"mod", "tidy"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Mod Init", Desc: "run go mod init in current dir with module path from prompt", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"mod", "init", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Get", Desc: "run go get on package(s) you enter at prompt", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"get", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Go", Name: "Get Update", Desc: "run go get -u (updt) on package(s) you enter at prompt. use ./... for all.", Lang: fileinfo.Go, Cmds: []CmdAndArgs{{Cmd: "go", Args: []string{"get", "-u", "{PromptString1}"}, Default: "./..."}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Add", Desc: "git add file", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"add", "{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Switch To Branch", Desc: "git switch to an existing branch", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"switch", "{PromptBranch}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Switch", Desc: "git switch to new branch or existing commit: -c or -C (force) <branch> to create new; --detatch <commit> to switch to older (non-HEAD) commit; --orphan to abandon history", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"switch", "{PromptString1}"}, Default: "-c "}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Restore", Desc: "git restore: file, directory -- undoes any current changes and restores from last commit; -s option specifies source -- also available as revert in file view", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"restore", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Checkout", Desc: "git checkout: file, directory, branch; -b <branch> creates a new branch", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"checkout", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Status", Desc: "git status", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"status"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Diff", Desc: "git diff -- see changes since last checkin", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"diff"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm, Hilight: fileinfo.Diff}, {Cat: "Git", Name: "Log", Desc: "git log", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"log"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Commit", Desc: "git commit", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"commit", "-am", "{PromptString1}"}, PromptIsString: true}}, Dir: "{FileDirPath}", Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Pull Branch", Desc: "git pull from existing branch", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"pull", "origin", "{PromptBranch}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Pull", Desc: "git pull", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"pull", "{PromptString1}"}, Default: "origin"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Push", Desc: "git push to update remote (origin) for given branch", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"push", "origin", "{PromptBranch}"}, Default: "origin"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Push Force", Desc: "git push to update remote (origin) for given branch -- force -- needed for example after rebase or merge with conflicts", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"push", "--force", "origin", "{PromptBranch}"}, Default: "origin"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Stash", Desc: "git stash: push / pop local changes for later without committing, resetting to HEAD: also list, show, drop, clear", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"stash", "{PromptString1}"}, Default: "push"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Branch", Desc: "git branch: -a shows all; --list shows local; <branchname> makes a new one, optionally given sha; -d to delete; -r delete remote; -D force delete", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"branch", "{PromptString1}"}, Default: "-a"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Branch Delete", Desc: "git branch -d -r selected branch name", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"branch", "-d", "-r", "{PromptBranch}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Rebase", Desc: "git rebase: updates current branch to given branch, often master", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"rebase", "{PromptBranch}"}, Default: "master"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Rebase Continue", Desc: "git rebase: updates current branch to given branch, often master -- does --continue to continue process", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"rebase", "--continue"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Reset", Desc: "git reset: resets current state to given source -- use --hard to override -- CAN RESULT IN LOSS OF CHANGES -- make sure everything is committed", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"reset", "{PromptString1}"}, Default: "--hard origin/master"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Remote", Desc: "git remote: prune origin = remove stale branches; show; add <name> <URL>; remove <name>; get-url / set-url <name>", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "git", Args: []string{"remote", "{PromptString1}"}, Default: "prune origin"}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Git", Name: "Count LOC", Desc: "runs bash -c git ls-files with command sequence that counts lines of code in git repository -- edit with extra | grep steps to filter accordingly", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "bash", Args: []string{"-c", "{PromptString1}"}, Default: `"git ls-files | xargs wc -l"`}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Add", Desc: "svn add file", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"add", "{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Status", Desc: "svn status", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"status"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Info", Desc: "svn info", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"info"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Log", Desc: "svn log", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"log", "-v"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Commit Project", Desc: "svn commit for entire project directory", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"commit", "-m", "{PromptString1}"}, PromptIsString: true}}, Dir: "{ProjectPath}", Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Commit Dir", Desc: "svn commit in directory of current file", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"commit", "-m", "{PromptString1}"}, PromptIsString: true}}, Dir: "{FileDirPath}", Wait: CmdWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "SVN", Name: "Update", Desc: "svn update", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "svn", Args: []string{"update"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "LaTeX", Name: "LaTeX PDF", Desc: "run PDFLaTeX on file", Lang: fileinfo.TeX, Cmds: []CmdAndArgs{{Cmd: "pdflatex", Args: []string{"-file-line-error", "-interaction=nonstopmode", "{FilePath}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "LaTeX", Name: "BibTeX", Desc: "run BibTeX on file", Lang: fileinfo.TeX, Cmds: []CmdAndArgs{{Cmd: "bibtex", Args: []string{"{FilenameNoExt}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "LaTeX", Name: "Biber", Desc: "run Biber on file", Lang: fileinfo.TeX, Cmds: []CmdAndArgs{{Cmd: "biber", Args: []string{"{FilenameNoExt}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "LaTeX", Name: "CleanTeX", Desc: "remove aux LaTeX files", Lang: fileinfo.TeX, Cmds: []CmdAndArgs{{Cmd: "rm", Args: []string{"*.aux", "*.log", "*.blg", "*.bbl", "*.fff", "*.lof", "*.ttt", "*.toc", "*.spl"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Run", Desc: "Builds and runs go executable in current directory: core run [ios | android | web | darwin | windows | linux]", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"run", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Install", Desc: "Installs go executable in current directory: core install -t [ios | android | web | darwin | windows | linux]", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"install", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Next-Release", Desc: "increments the patch-level version number and pushes a release tag at this new version", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"next-release"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Release", Desc: "sets the version to the given value at the prompt and pushes a release tag at this version", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"release", "{PromptString1}"}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Generate All", Desc: "runs core generate ./... to update all generated files in current dir and below", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"generate", "./..."}}}, Dir: "{FileDirPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Changed", Desc: "show which packages are changed, at the root project level", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"changed"}}}, Dir: "{ProjectPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, {Cat: "Core", Name: "Pull", Desc: "pull all packages at the root project level", Lang: fileinfo.Any, Cmds: []CmdAndArgs{{Cmd: "core", Args: []string{"pull"}}}, Dir: "{ProjectPath}", Wait: CmdNoWait, Focus: CmdNoFocus, Confirm: CmdNoConfirm}, }
StandardCommands is the original compiled-in set of standard commands.
var StandardKeyMaps = KeyMaps{ {"MacStandard", "Standard Mac KeyMap", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+M", "o"}: KeyNextPanel, KeySeq{"Control+M", "Control+O"}: KeyNextPanel, KeySeq{"Control+M", "p"}: KeyPrevPanel, KeySeq{"Control+M", "Control+P"}: KeyPrevPanel, KeySeq{"Control+O", ""}: KeyFileOpen, KeySeq{"Control+M", "f"}: KeyFileOpen, KeySeq{"Control+M", "Control+F"}: KeyFileOpen, KeySeq{"Control+M", "b"}: KeyBufSelect, KeySeq{"Control+M", "Control+B"}: KeyBufSelect, KeySeq{"Control+S", ""}: KeyBufSave, KeySeq{"Shift+Control+S", ""}: KeyBufSaveAs, KeySeq{"Control+M", "s"}: KeyBufSave, KeySeq{"Control+M", "Control+S"}: KeyBufSave, KeySeq{"Control+M", "w"}: KeyBufSaveAs, KeySeq{"Control+M", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+M", "k"}: KeyBufClose, KeySeq{"Control+M", "Control+K"}: KeyBufClose, KeySeq{"Control+M", "c"}: KeyExecCmd, KeySeq{"Control+M", "Control+C"}: KeyExecCmd, KeySeq{"Control+M", "n"}: KeyBufClone, KeySeq{"Control+M", "Control+N"}: KeyBufClone, KeySeq{"Control+M", "x"}: KeyRegCopy, KeySeq{"Control+M", "g"}: KeyRegPaste, KeySeq{"Control+M", "Control+X"}: KeyRectCut, KeySeq{"Control+M", "Control+Y"}: KeyRectPaste, KeySeq{"Control+M", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+/", ""}: KeyCommentOut, KeySeq{"Control+M", "t"}: KeyCommentOut, KeySeq{"Control+M", "Control+T"}: KeyCommentOut, KeySeq{"Control+M", "i"}: KeyIndent, KeySeq{"Control+M", "Control+I"}: KeyIndent, KeySeq{"Control+M", "j"}: KeyJump, KeySeq{"Control+M", "Control+J"}: KeyJump, KeySeq{"Control+M", "v"}: KeySetSplit, KeySeq{"Control+M", "Control+V"}: KeySetSplit, KeySeq{"Control+M", "m"}: KeyBuildProject, KeySeq{"Control+M", "Control+M"}: KeyBuildProject, KeySeq{"Control+M", "r"}: KeyRunProject, KeySeq{"Control+M", "Control+R"}: KeyRunProject, }}, {"MacEmacs", "Mac with emacs-style navigation -- emacs wins in conflicts", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+X", "o"}: KeyNextPanel, KeySeq{"Control+X", "Control+O"}: KeyNextPanel, KeySeq{"Control+X", "p"}: KeyPrevPanel, KeySeq{"Control+X", "Control+P"}: KeyPrevPanel, KeySeq{"Control+X", "f"}: KeyFileOpen, KeySeq{"Control+X", "Control+F"}: KeyFileOpen, KeySeq{"Control+X", "b"}: KeyBufSelect, KeySeq{"Control+X", "Control+B"}: KeyBufSelect, KeySeq{"Control+X", "s"}: KeyBufSave, KeySeq{"Control+X", "Control+S"}: KeyBufSave, KeySeq{"Control+X", "w"}: KeyBufSaveAs, KeySeq{"Control+X", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+X", "k"}: KeyBufClose, KeySeq{"Control+X", "Control+K"}: KeyBufClose, KeySeq{"Control+X", "c"}: KeyExecCmd, KeySeq{"Control+X", "Control+C"}: KeyExecCmd, KeySeq{"Control+C", "c"}: KeyExecCmd, KeySeq{"Control+C", "Control+C"}: KeyExecCmd, KeySeq{"Control+C", "o"}: KeyBufClone, KeySeq{"Control+C", "Control+O"}: KeyBufClone, KeySeq{"Control+X", "x"}: KeyRegCopy, KeySeq{"Control+X", "g"}: KeyRegPaste, KeySeq{"Control+X", "Control+X"}: KeyRectCut, KeySeq{"Control+X", "Control+Y"}: KeyRectPaste, KeySeq{"Control+X", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+C", "k"}: KeyCommentOut, KeySeq{"Control+C", "Control+K"}: KeyCommentOut, KeySeq{"Control+X", "i"}: KeyIndent, KeySeq{"Control+X", "Control+I"}: KeyIndent, KeySeq{"Control+X", "j"}: KeyJump, KeySeq{"Control+X", "Control+J"}: KeyJump, KeySeq{"Control+X", "v"}: KeySetSplit, KeySeq{"Control+X", "Control+V"}: KeySetSplit, KeySeq{"Control+X", "m"}: KeyBuildProject, KeySeq{"Control+X", "Control+M"}: KeyBuildProject, KeySeq{"Control+X", "r"}: KeyRunProject, KeySeq{"Control+X", "Control+R"}: KeyRunProject, }}, {"LinuxEmacs", "Linux with emacs-style navigation -- emacs wins in conflicts", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+X", "o"}: KeyNextPanel, KeySeq{"Control+X", "Control+O"}: KeyNextPanel, KeySeq{"Control+X", "p"}: KeyPrevPanel, KeySeq{"Control+X", "Control+P"}: KeyPrevPanel, KeySeq{"Control+X", "f"}: KeyFileOpen, KeySeq{"Control+X", "Control+F"}: KeyFileOpen, KeySeq{"Control+X", "b"}: KeyBufSelect, KeySeq{"Control+X", "Control+B"}: KeyBufSelect, KeySeq{"Control+X", "s"}: KeyBufSave, KeySeq{"Control+X", "Control+S"}: KeyBufSave, KeySeq{"Control+X", "w"}: KeyBufSaveAs, KeySeq{"Control+X", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+X", "k"}: KeyBufClose, KeySeq{"Control+X", "Control+K"}: KeyBufClose, KeySeq{"Control+X", "c"}: KeyExecCmd, KeySeq{"Control+X", "Control+C"}: KeyExecCmd, KeySeq{"Control+C", "c"}: KeyExecCmd, KeySeq{"Control+C", "Control+C"}: KeyExecCmd, KeySeq{"Control+C", "o"}: KeyBufClone, KeySeq{"Control+C", "Control+O"}: KeyBufClone, KeySeq{"Control+X", "x"}: KeyRegCopy, KeySeq{"Control+X", "g"}: KeyRegPaste, KeySeq{"Control+X", "Control+X"}: KeyRectCut, KeySeq{"Control+X", "Control+Y"}: KeyRectPaste, KeySeq{"Control+X", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+C", "k"}: KeyCommentOut, KeySeq{"Control+C", "Control+K"}: KeyCommentOut, KeySeq{"Control+X", "i"}: KeyIndent, KeySeq{"Control+X", "Control+I"}: KeyIndent, KeySeq{"Control+X", "j"}: KeyJump, KeySeq{"Control+X", "Control+J"}: KeyJump, KeySeq{"Control+X", "v"}: KeySetSplit, KeySeq{"Control+X", "Control+V"}: KeySetSplit, KeySeq{"Control+M", "m"}: KeyBuildProject, KeySeq{"Control+M", "Control+M"}: KeyBuildProject, KeySeq{"Control+M", "r"}: KeyRunProject, KeySeq{"Control+M", "Control+R"}: KeyRunProject, }}, {"LinuxStandard", "Standard Linux KeySeqMap", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+M", "o"}: KeyNextPanel, KeySeq{"Control+M", "Control+O"}: KeyNextPanel, KeySeq{"Control+M", "p"}: KeyPrevPanel, KeySeq{"Control+M", "Control+P"}: KeyPrevPanel, KeySeq{"Control+O", ""}: KeyFileOpen, KeySeq{"Control+M", "f"}: KeyFileOpen, KeySeq{"Control+M", "Control+F"}: KeyFileOpen, KeySeq{"Control+M", "b"}: KeyBufSelect, KeySeq{"Control+M", "Control+B"}: KeyBufSelect, KeySeq{"Control+S", ""}: KeyBufSave, KeySeq{"Shift+Control+S", ""}: KeyBufSaveAs, KeySeq{"Control+M", "s"}: KeyBufSave, KeySeq{"Control+M", "Control+S"}: KeyBufSave, KeySeq{"Control+M", "w"}: KeyBufSaveAs, KeySeq{"Control+M", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+M", "k"}: KeyBufClose, KeySeq{"Control+M", "Control+K"}: KeyBufClose, KeySeq{"Control+M", "c"}: KeyExecCmd, KeySeq{"Control+M", "Control+C"}: KeyExecCmd, KeySeq{"Control+M", "n"}: KeyBufClone, KeySeq{"Control+M", "Control+N"}: KeyBufClone, KeySeq{"Control+M", "x"}: KeyRegCopy, KeySeq{"Control+M", "g"}: KeyRegPaste, KeySeq{"Control+M", "Control+X"}: KeyRectCut, KeySeq{"Control+M", "Control+Y"}: KeyRectPaste, KeySeq{"Control+M", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+/", ""}: KeyCommentOut, KeySeq{"Control+M", "t"}: KeyCommentOut, KeySeq{"Control+M", "Control+T"}: KeyCommentOut, KeySeq{"Control+M", "i"}: KeyIndent, KeySeq{"Control+M", "Control+I"}: KeyIndent, KeySeq{"Control+M", "j"}: KeyJump, KeySeq{"Control+M", "Control+J"}: KeyJump, KeySeq{"Control+M", "v"}: KeySetSplit, KeySeq{"Control+M", "Control+V"}: KeySetSplit, KeySeq{"Control+M", "m"}: KeyBuildProject, KeySeq{"Control+M", "Control+M"}: KeyBuildProject, KeySeq{"Control+M", "r"}: KeyRunProject, KeySeq{"Control+M", "Control+R"}: KeyRunProject, }}, {"WindowsStandard", "Standard Windows KeySeqMap", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+M", "o"}: KeyNextPanel, KeySeq{"Control+M", "Control+O"}: KeyNextPanel, KeySeq{"Control+M", "p"}: KeyPrevPanel, KeySeq{"Control+M", "Control+P"}: KeyPrevPanel, KeySeq{"Control+O", ""}: KeyFileOpen, KeySeq{"Control+M", "f"}: KeyFileOpen, KeySeq{"Control+M", "Control+F"}: KeyFileOpen, KeySeq{"Control+M", "b"}: KeyBufSelect, KeySeq{"Control+M", "Control+B"}: KeyBufSelect, KeySeq{"Control+S", ""}: KeyBufSave, KeySeq{"Shift+Control+S", ""}: KeyBufSaveAs, KeySeq{"Control+M", "s"}: KeyBufSave, KeySeq{"Control+M", "Control+S"}: KeyBufSave, KeySeq{"Control+M", "w"}: KeyBufSaveAs, KeySeq{"Control+M", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+M", "k"}: KeyBufClose, KeySeq{"Control+M", "Control+K"}: KeyBufClose, KeySeq{"Control+M", "c"}: KeyExecCmd, KeySeq{"Control+M", "Control+C"}: KeyExecCmd, KeySeq{"Control+M", "n"}: KeyBufClone, KeySeq{"Control+M", "Control+N"}: KeyBufClone, KeySeq{"Control+M", "x"}: KeyRegCopy, KeySeq{"Control+M", "g"}: KeyRegPaste, KeySeq{"Control+M", "Control+X"}: KeyRectCut, KeySeq{"Control+M", "Control+Y"}: KeyRectPaste, KeySeq{"Control+M", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+/", ""}: KeyCommentOut, KeySeq{"Control+M", "t"}: KeyCommentOut, KeySeq{"Control+M", "Control+T"}: KeyCommentOut, KeySeq{"Control+M", "i"}: KeyIndent, KeySeq{"Control+M", "Control+I"}: KeyIndent, KeySeq{"Control+M", "j"}: KeyJump, KeySeq{"Control+M", "Control+J"}: KeyJump, KeySeq{"Control+M", "v"}: KeySetSplit, KeySeq{"Control+M", "Control+V"}: KeySetSplit, KeySeq{"Control+M", "m"}: KeyBuildProject, KeySeq{"Control+M", "Control+M"}: KeyBuildProject, KeySeq{"Control+M", "r"}: KeyRunProject, KeySeq{"Control+M", "Control+R"}: KeyRunProject, }}, {"ChromeStd", "Standard chrome-browser and linux-under-chrome bindings", KeySeqMap{ KeySeq{"Control+Tab", ""}: KeyNextPanel, KeySeq{"Shift+Control+Tab", ""}: KeyPrevPanel, KeySeq{"Control+M", "o"}: KeyNextPanel, KeySeq{"Control+M", "Control+O"}: KeyNextPanel, KeySeq{"Control+M", "p"}: KeyPrevPanel, KeySeq{"Control+M", "Control+P"}: KeyPrevPanel, KeySeq{"Control+O", ""}: KeyFileOpen, KeySeq{"Control+M", "f"}: KeyFileOpen, KeySeq{"Control+M", "Control+F"}: KeyFileOpen, KeySeq{"Control+M", "b"}: KeyBufSelect, KeySeq{"Control+M", "Control+B"}: KeyBufSelect, KeySeq{"Control+S", ""}: KeyBufSave, KeySeq{"Shift+Control+S", ""}: KeyBufSaveAs, KeySeq{"Control+M", "s"}: KeyBufSave, KeySeq{"Control+M", "Control+S"}: KeyBufSave, KeySeq{"Control+M", "w"}: KeyBufSaveAs, KeySeq{"Control+M", "Control+W"}: KeyBufSaveAs, KeySeq{"Control+M", "k"}: KeyBufClose, KeySeq{"Control+M", "Control+K"}: KeyBufClose, KeySeq{"Control+M", "c"}: KeyExecCmd, KeySeq{"Control+M", "Control+C"}: KeyExecCmd, KeySeq{"Control+M", "n"}: KeyBufClone, KeySeq{"Control+M", "Control+N"}: KeyBufClone, KeySeq{"Control+M", "x"}: KeyRegCopy, KeySeq{"Control+M", "g"}: KeyRegPaste, KeySeq{"Control+M", "Control+X"}: KeyRectCut, KeySeq{"Control+M", "Control+Y"}: KeyRectPaste, KeySeq{"Control+M", "Alt+∑"}: KeyRectCopy, KeySeq{"Control+/", ""}: KeyCommentOut, KeySeq{"Control+M", "t"}: KeyCommentOut, KeySeq{"Control+M", "Control+T"}: KeyCommentOut, KeySeq{"Control+M", "i"}: KeyIndent, KeySeq{"Control+M", "Control+I"}: KeyIndent, KeySeq{"Control+M", "j"}: KeyJump, KeySeq{"Control+M", "Control+J"}: KeyJump, KeySeq{"Control+M", "v"}: KeySetSplit, KeySeq{"Control+M", "Control+V"}: KeySetSplit, KeySeq{"Control+M", "m"}: KeyBuildProject, KeySeq{"Control+M", "Control+M"}: KeyBuildProject, KeySeq{"Control+M", "r"}: KeyRunProject, KeySeq{"Control+M", "Control+R"}: KeyRunProject, }}, }
StandardKeyMaps is the original compiled-in set of standard keymaps that have the lastest key functions bound to standard key chords.
var StandardLangs = Langs{ fileinfo.Go: {CmdNames{"Go: Imports File"}}, }
StandardLangs is the original compiled-in set of standard language options.
var StandardSplits = Splits{ {"Code", "2 text views, tabs", []float32{.1, .325, .325, .25}}, {"Small", "1 text view, tabs", []float32{.1, .5, 0, .4}}, {"BigTabs", "1 text view, big tabs", []float32{.1, .3, 0, .6}}, {"Debug", "big command panel for debugging", []float32{0.1, 0.29539588, 0.2949658, 0.30963832}}, }
StandardSplits is the original compiled-in set of standard named splits.
var SymNodeType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.SymNode", IDName: "sym-node", Doc: "SymNode represents a language symbol -- the name of the node is\nthe name of the symbol. Some symbols, e.g. type have children", Embeds: []types.Field{{Name: "NodeBase"}}, Fields: []types.Field{{Name: "Symbol", Doc: "the symbol"}}, Instance: &SymNode{}})
SymNodeType is the types.Type for SymNode
var SymTreeViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.SymTreeView", IDName: "sym-tree-view", Doc: "SymTreeView is a TreeView that knows how to operate on FileNode nodes", Embeds: []types.Field{{Name: "TreeView"}}, Instance: &SymTreeView{}})
SymTreeViewType is the types.Type for SymTreeView
var SymbolsViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.SymbolsView", IDName: "symbols-view", Doc: "SymbolsView is a widget that displays results of a file or package parse", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "Code", Doc: "parent code project"}, {Name: "SymParams", Doc: "params for structure display"}, {Name: "Syms", Doc: "all the symbols for the file or package in a tree"}, {Name: "Match", Doc: "only show symbols that match this string"}}, Instance: &SymbolsView{}})
SymbolsViewType is the types.Type for SymbolsView
var TaskViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.TaskView", IDName: "task-view", Doc: "TaskView is a view of the threads", Embeds: []types.Field{{Name: "Layout"}}, Instance: &TaskView{}})
TaskViewType is the types.Type for TaskView
var TextEditorType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.TextEditor", IDName: "text-editor", Doc: "TextEditor is the Code-specific version of the TextEditor, with support for\nsetting / clearing breakpoints, etc", Embeds: []types.Field{{Name: "Editor"}}, Fields: []types.Field{{Name: "Code"}}, Instance: &TextEditor{}})
TextEditorType is the types.Type for TextEditor
var ThreadViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.ThreadView", IDName: "thread-view", Doc: "ThreadView is a view of the threads", Embeds: []types.Field{{Name: "Layout"}}, Instance: &ThreadView{}})
ThreadViewType is the types.Type for ThreadView
var VarViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.VarView", IDName: "var-view", Doc: "VarView shows a debug variable in an inspector-like framework,\nwith sub-variables in a tree.", Embeds: []types.Field{{Name: "Frame"}}, Fields: []types.Field{{Name: "Var", Doc: "variable being edited"}, {Name: "SelectVar"}, {Name: "FrameInfo", Doc: "frame info"}, {Name: "DbgView", Doc: "parent DebugView"}}, Instance: &VarView{}})
VarViewType is the types.Type for VarView
var VarsViewType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/code/code.VarsView", IDName: "vars-view", Doc: "VarsView is a view of the variables", Embeds: []types.Field{{Name: "Layout"}}, Fields: []types.Field{{Name: "GlobalVars", Doc: "if true, this is global vars, not local ones"}}, Instance: &VarsView{}})
VarsViewType is the types.Type for VarsView
Functions ¶
func ArgVarPrompts ¶
ArgVarPrompts returns any Prompt* variables required by this string, false if none
func CommandMenu ¶
CommandMenu returns a menu function for commands for given language and vcs name
func CommandName ¶
CommandName returns a qualified command name as cat: cmd
func CompleteArg ¶
CompleteArg supplies directory variables to the completer
func CompleteArgEdit ¶
func CompleteArgEdit(data any, text string, cursorPos int, c complete.Completion, seed string) (ed complete.Edit)
CompleteArgEdit edits completer text field after the user chooses from the candidate completions
func ConfigEditorTextEditor ¶
func ConfigEditorTextEditor(ed *texteditor.Editor)
ConfigEditorTextEditor configures an editor texteditor
func ConfigOutputTextEditor ¶
func ConfigOutputTextEditor(ed *texteditor.Editor)
ConfigOutputTextEditor configures a command-output texteditor within given parent layout
func DebugSettingsView ¶ added in v0.0.1
func DebugSettingsView(pf *cdebug.Params) *views.StructView
DebugSettingsView opens a view of project Debug settings, returns structview if not already open
func MarkupCmdOutput ¶
MarkupCmdOutput applies links to the first element in command output line if it looks like a file name / position
func MarkupStderr ¶
func MarkupStdout ¶
func MergeAvailableCmds ¶ added in v0.0.2
func MergeAvailableCmds()
MergeAvailableCmds updates the AvailCmds list from CustomCmds and StdCmds
func NewDebugger ¶
func NewDebugger(sup fileinfo.Known, path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) (cdebug.GiDebug, error)
NewDebugger returns a new debugger for given supported file type
func ProjectSettingsView ¶ added in v0.0.2
func ProjectSettingsView(pf *ProjectSettings) *views.StructView
ProjectSettingsView opens a view of project settings, returns structview if not already open
func RegistersView ¶
func RegistersView(pt *Registers)
RegistersView opens a view of a commands table
func RepoCurBranches ¶
RepoCurBranches returns the current branch and a list of all branches ensuring that the current also appears on the list of all. In git, a new branch may not so appear.
func SelectSymbol ¶
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
Types ¶
type ArgVarInfo ¶
type ArgVarInfo struct { // description of arg var Desc string // type of variable -- used for checking usage and other special features such as prompting Type ArgVarTypes }
ArgVarInfo has info about argument variables that fill in relevant values for commands, used in ArgVars list of variables
type ArgVarTypes ¶
type ArgVarTypes int32 //enums:enum -trim-prefix ArgVar
ArgVarTypes describe the type of information in the arg var -- used for checking usage and special features.
const ( // ArgVarFile is a file name, not a directory ArgVarFile ArgVarTypes = iota // ArgVarDir is a directory name, not a file ArgVarDir // ArgVarExt is a file extension ArgVarExt // ArgVarPos is a text position ArgVarPos // ArgVarText is text from a buffer ArgVarText // ArgVarPrompt is a user-prompted variable ArgVarPrompt )
const ArgVarTypesN ArgVarTypes = 6
ArgVarTypesN is the highest valid value for type ArgVarTypes, plus one.
func ArgVarTypesValues ¶
func ArgVarTypesValues() []ArgVarTypes
ArgVarTypesValues returns all possible values for the type ArgVarTypes.
func (ArgVarTypes) Desc ¶
func (i ArgVarTypes) Desc() string
Desc returns the description of the ArgVarTypes value.
func (ArgVarTypes) Int64 ¶
func (i ArgVarTypes) Int64() int64
Int64 returns the ArgVarTypes value as an int64.
func (ArgVarTypes) MarshalText ¶
func (i ArgVarTypes) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ArgVarTypes) SetInt64 ¶
func (i *ArgVarTypes) SetInt64(in int64)
SetInt64 sets the ArgVarTypes value from an int64.
func (*ArgVarTypes) SetString ¶
func (i *ArgVarTypes) SetString(s string) error
SetString sets the ArgVarTypes value from its string representation, and returns an error if the string is invalid.
func (ArgVarTypes) String ¶
func (i ArgVarTypes) String() string
String returns the string representation of this ArgVarTypes value.
func (*ArgVarTypes) UnmarshalText ¶
func (i *ArgVarTypes) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (ArgVarTypes) Values ¶
func (i ArgVarTypes) Values() []enums.Enum
Values returns all possible values for the type ArgVarTypes.
type ArgVarVals ¶
ArgVarVals are current values of arg var vals -- updated on demand when a command is invoked
func (*ArgVarVals) Bind ¶
func (avp *ArgVarVals) Bind(arg string) string
Bind replaces the variables in the given arg string with their values
func (*ArgVarVals) Set ¶
func (avp *ArgVarVals) Set(fpath string, ppref *ProjectSettings, tv *texteditor.Editor)
Set sets the current values for arg variables -- prompts must be already set!
type BreakView ¶
BreakView is a view of the breakpoints
func NewBreakView ¶
NewBreakView adds a new BreakView with the given name to the given parent: BreakView is a view of the breakpoints
func (*BreakView) ConfigBreakView ¶
func (*BreakView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of BreakView
func (*BreakView) SetTooltip ¶
SetTooltip sets the [BreakView.Tooltip]
func (*BreakView) ShowBreaks ¶
func (sv *BreakView) ShowBreaks()
ShowBreaks triggers update of view of State.Breaks
type CmdAndArgs ¶
type CmdAndArgs struct { // external program to execute -- must be on path or have full path specified -- use {RunExec} for the project RunExec executable. Cmd string `width:"25"` // args to pass to the program, one string per arg -- use {Filename} etc to refer to special variables -- just start typing { and you'll get a completion menu of options, and use backslash-quoted bracket to insert a literal curly bracket. Use unix-standard path separators (/) -- they will be replaced with proper os-specific path separator (e.g., on Windows). Args CmdArgs `complete:"arg" width:"25"` // default value for prompt string, for first use -- thereafter it uses last value provided for given command Default string `width:"25"` // if true, then do not split any prompted string into separate space-separated fields -- otherwise do so, except for values within quotes PromptIsString bool }
CmdAndArgs contains the name of an external program to execute and args to pass to that program
func (*CmdAndArgs) BindArgs ¶
func (cm *CmdAndArgs) BindArgs(avp *ArgVarVals) []string
BindArgs replaces any variables in the args with their values, and returns resulting args
func (*CmdAndArgs) HasPrompts ¶
func (cm *CmdAndArgs) HasPrompts() (map[string]struct{}, bool)
HasPrompts returns true if any prompts are required before running command, and the set of such args
func (*CmdAndArgs) PrepCmd ¶
func (cm *CmdAndArgs) PrepCmd(avp *ArgVarVals) (*exec.Cmd, string)
PrepCmd prepares to run command, returning *exec.Cmd and a string of the full command
type CmdName ¶
type CmdName string
CmdName has an associated ValueView for selecting from the list of available command names, for use in settings etc. Formatted as Cat: Name as in Command.Label()
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 of command being run -- same as Command.Name Name string // command string CmdStr string // Details of the command and args CmdArgs *CmdAndArgs // exec.Cmd for the command Exec *exec.Cmd }
CmdRun tracks running commands
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) DeleteIndex ¶ added in v0.0.2
DeleteIndex delete command at given index
func (*CmdRuns) KillByName ¶
KillByName kills a running process by name, and removes it from the list of running commands
type Code ¶
type Code interface { core.Widget // ProjectSettings returns the [ProjectSettings] ProjectSettings() *ProjectSettings // FileTree returns the code.Files file tree FileTree() *filetree.Tree // LastSaveTime returns the time stamp when a file was last saved within project -- // can be used for dirty flag state relative to other time stamps. LastSaveTime() time.Time // VersionControl returns the version control system in effect, using the file tree detected // version or whatever is set in project settings VersionControl() filetree.VersionControlName // CmdRuns returns the CmdRuns manager of running commands, used extensively // in commands.go CmdRuns() *CmdRuns // history of commands executed in this session CmdHist() *CmdNames // ArgVarVals returns the ArgVarVals argument variable values ArgVarVals() *ArgVarVals // SetStatus updates the statusbar label with given message, to be rendered next time SetStatus(msg string) // UpdateStatusLabel updates the statusbar label with current data UpdateStatusLabel() // SelectTabByName Selects given main tab, and returns all of its contents as well. SelectTabByName(label string) core.Widget // FocusOnTabs moves keyboard focus to Tabs panel -- returns false if nothing at that tab FocusOnTabs() bool // ShowFile shows given file name at given line, returning TextEditor showing it // or error if not found. ShowFile(fname string, ln int) (*TextEditor, error) // FileNodeOpened is called whenever file node is double-clicked in file tree FileNodeOpened(fn *filetree.Node) // FileNodeForFile returns file node for given file path. // add: if not found in existing tree and external files, then if add is true, // it is added to the ExtFiles list. FileNodeForFile(fpath string, add bool) *filetree.Node // TextBufForFile returns the TextBuf for given file path // add: if not found in existing tree and external files, then if add is true, // it is added to the ExtFiles list. TextBufForFile(fpath string, add bool) *texteditor.Buffer // NextViewFileNode sets the next text view to view file in given node (opens // buffer if not already opened) -- if already being viewed, that is // activated, returns text view and index NextViewFileNode(fn *filetree.Node) (*TextEditor, int) // ActiveTextEditor returns the currently-active TextEditor ActiveTextEditor() *TextEditor // SetActiveTextEditor sets the given texteditor as the active one, and returns its index SetActiveTextEditor(av *TextEditor) int // ActiveFileNode returns the file node for the active file -- nil if none ActiveFileNode() *filetree.Node // ExecCmdFileNode pops up a menu to select a command appropriate for the given node, // and shows output in Tab with name of command ExecCmdFileNode(fn *filetree.Node) // ExecCmdNameFileNode executes command of given name on given node ExecCmdNameFileNode(fn *filetree.Node, cmdNm CmdName, sel bool, clearBuf bool) // ExecCmdNameFilename executes command of given name on given file name ExecCmdNameFilename(fn string, cmdNm CmdName, sel bool, clearBuf bool) // Find does Find / Replace in files, using given options and filters -- opens up a // main tab with the results and further controls. Find(find, repl string, ignoreCase, regExp bool, loc FindLoc, langs []fileinfo.Known) // ParseOpenFindURL parses and opens given find:/// url from Find, return text // region encoded in url, and starting line of results in find buffer, and // number of results returned -- for parsing all the find results ParseOpenFindURL(ur string, ftv *texteditor.Editor) (tv *TextEditor, reg textbuf.Region, findBufStLn, findCount int, ok bool) // OpenFileAtRegion opens the specified file, highlights the region and sets the cursor OpenFileAtRegion(filename core.Filename, reg textbuf.Region) (tv *TextEditor, ok bool) // SaveAllCheck checks if any files have not been saved, and prompt to save them. // returns true if there were unsaved files, false otherwise. // cancelOpt presents an option to cancel current command, // in which case function is not called. // if function is passed, then it is called in all cases except // if the user selects cancel. SaveAllCheck(cancelOpt bool, fun func()) bool // SaveAllOpenNodes saves all of the open filenodes to their current file names SaveAllOpenNodes() // CloseOpenNodes closes any nodes with open views (including those in directories under nodes). // called prior to rename. CloseOpenNodes(nodes []*FileNode) // CurOpenNodes returns the current open nodes list CurOpenNodes() *OpenNodes // LookupFun is the completion system Lookup function that makes a custom // texteditor dialog that has option to edit resulting file. LookupFun(data any, text string, posLn, posCh int) (ld complete.Lookup) // Spell checks spelling in active text view Spell() // Symbols calls a function to parse file or package Symbols() // Debug runs debugger on default exe Debug() // CurDebug returns the current debug view, or nil CurDebug() *DebugView // ClearDebug clears the current debugger setting -- no more debugger active. ClearDebug() }
Code provides the interface for the CodeView functionality that is needed by the core code infrastructure, to allow CodeView to be in a separate package. It is not intended to be the full functionality of the CodeView.
type Command ¶
type Command struct { // category for the command -- commands are organized in to hierarchical menus according to category Cat string // name of this command (must be unique in list of commands) Name string `width:"20"` // brief description of this command Desc string `width:"40"` // supported language / file type that this command applies to -- choose Any or e.g., AnyCode for subtypes -- filters the list of commands shown based on file language type Lang fileinfo.Known // sequence of commands to run for this overall command. Cmds []CmdAndArgs `tableview-select:"-"` // if specified, will change to this directory before executing the command -- e.g., use {FileDirPath} for current file's directory -- only use directory values here -- if not specified, directory will be project root directory. Dir string `width:"20" complete:"arg"` // if true, we wait for the command to run before displaying output -- mainly for post-save commands and those with subsequent steps: if multiple commands are present, then it uses Wait mode regardless. Wait bool // if true, keyboard focus is directed to the command output tab panel after the command runs. Focus bool // if true, command requires Ok / Cancel confirmation dialog -- only needed for non-prompt commands Confirm bool // what type of file to use for syntax highlighting. Bash is the default. Hilight fileinfo.Known }
Command defines different types of commands that can be run in the project. The output of the commands shows up in an associated tab.
func (*Command) AppendCmdOut ¶
func (cm *Command) AppendCmdOut(ge Code, buf *texteditor.Buffer, out []byte)
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 language matches the command Lang constraints
func (*Command) MarkupCmdOutput ¶
MarkupCmdOutput applies links to the first element in command output line if it looks like a file name / position
func (*Command) PromptUser ¶
func (cm *Command) PromptUser(ge Code, buf *texteditor.Buffer, pvals map[string]struct{})
PromptUser prompts for values that need prompting for, and then runs RunAfterPrompts if not otherwise cancelled by user
func (*Command) Run ¶
func (cm *Command) Run(ge Code, buf *texteditor.Buffer)
Run runs the command and saves the output in the Buf if it is non-nil, which can be displayed -- if !wait, then Buf is updated online as output occurs. Status is updated with status of command exec. User is prompted for any values that might be needed for command.
func (*Command) RunAfterPrompts ¶
func (cm *Command) RunAfterPrompts(ge Code, buf *texteditor.Buffer)
RunAfterPrompts runs after any prompts have been set, if needed
func (*Command) RunBuf ¶
func (cm *Command) RunBuf(ge Code, buf *texteditor.Buffer, cma *CmdAndArgs) bool
RunBuf runs a command with output to the buffer, incrementally updating the buffer with new results line-by-line as they come in
func (*Command) RunBufWait ¶
func (cm *Command) RunBufWait(ge Code, buf *texteditor.Buffer, cma *CmdAndArgs) bool
RunBufWait runs a command with output to the buffer, using CombinedOutput so it waits for completion -- returns overall command success, and logs one line of the command output to code statusbar
func (*Command) RunNoBuf ¶
func (cm *Command) RunNoBuf(ge Code, 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 code statusbar
type Commands ¶
type Commands []*Command
Commands is a list of different commands
var AvailableCommands Commands
AvailableCommands is the current list of ALL available commands for use -- it combines StdCmds and CustomCmds. Custom overrides Std items with the same names.
func (*Commands) CmdByName ¶
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(lang fileinfo.Known, vcnm filetree.VersionControlName) [][]string
FilterCmdNames returns a slice of commands organized by category that are compatible with given language and version control system.
func (*Commands) OpenSettings ¶
OpenSettings opens custom Commands from the app settings directory, using CommandSettingsFilename.
func (*Commands) SaveSettings ¶ added in v0.0.2
SaveSettings saves custom Commands to the app settings directory, using CommandSettingsFilename.
func (*Commands) ViewStandard ¶ added in v0.0.2
func (cm *Commands) ViewStandard()
ViewStandard shows the standard types that are compiled into the program and have all the lastest standards. Useful for comparing against custom lists.
type Console ¶
type Console struct { // std out writer -- set to os.Stdout StdoutWrite *os.File `json:"-" xml:"-"` // std out reader -- used to read os.Stdout StdoutRead *os.File `json:"-" xml:"-"` // std err writer -- set to os.Stderr StderrWrite *os.File `json:"-" xml:"-"` // std err reader -- used to read os.Stderr StderrRead *os.File `json:"-" xml:"-"` // text buffer holding all output Buf *texteditor.Buffer `json:"-" xml:"-"` // set to true to cancel monitoring Cancel bool `json:"-" xml:"-"` // mutex protecting updating of buffer between out / err Mu sync.Mutex `json:"-" xml:"-"` // original os.Stdout writer OrgoutWrite *os.File `json:"-" xml:"-"` // original os.Stderr writer OrgerrWrite *os.File `json:"-" xml:"-"` // log file writer LogWrite *os.File `json:"-" xml:"-"` }
Console redirects our os.Stdout and os.Stderr to a buffer for display within app
var TheConsole Console
func (*Console) Init ¶
Init initializes the console -- sets up the capture, Buf, and starts the routine that monitors output. if logFile is non-empty, writes output to that file as well.
func (*Console) MonitorErr ¶
func (cn *Console) MonitorErr()
MonitorErr monitors std error and appends it to the buffer should be in a separate routine
func (*Console) MonitorOut ¶
func (cn *Console) MonitorOut()
MonitorOut monitors std output and appends it to the buffer should be in a separate routine
type DebugBreakStatus ¶
type DebugBreakStatus int32
DebugBreakStatus is the status of a given breakpoint
const ( // DebugBreakInactive is an inactive break point DebugBreakInactive DebugBreakStatus = iota // DebugBreakActive is an active break point DebugBreakActive // DebugBreakCurrent is the current break point DebugBreakCurrent // DebugPCCurrent is the current program execution point, // updated for every ShowFile action DebugPCCurrent DebugBreakStatusN )
type DebugView ¶
type DebugView struct { core.Layout // supported file type to determine debugger Sup fileinfo.Known // path to executable / dir to debug ExePath string // time when dbg was last restarted DbgTime time.Time // the debugger Dbg cdebug.GiDebug `set:"-" json:"-" xml:"-"` // all relevant debug state info State cdebug.AllState `set:"-" json:"-" xml:"-"` // current ShowFile location -- cleared before next one or run CurFileLoc cdebug.Location `set:"-" json:"-" xml:"-"` // backup breakpoints list -- to track deletes BBreaks []*cdebug.Break `set:"-" json:"-" xml:"-"` // output from the debugger OutputBuffer *texteditor.Buffer `set:"-" json:"-" xml:"-"` // parent code project Code Code `set:"-" json:"-" xml:"-"` }
DebugView is the debugger
func NewDebugView ¶
NewDebugView adds a new DebugView with the given name to the given parent: DebugView is the debugger
func (*DebugView) ActionActivate ¶
ActionActivate is the update function for actions that depend on the debugger being avail for input commands
func (*DebugView) AddBreak ¶
AddBreak adds a breakpoint at given file path and line number. note: all breakpoints are just set in our master list and uploaded to the system right before starting running.
func (*DebugView) BackupBreaks ¶
func (dv *DebugView) BackupBreaks()
BackupBreaks makes a backup copy of current breaks
func (*DebugView) ConfigDebugView ¶
ConfigDebugView configures the view -- parameters for the job must have already been set in [ProjectSettings.Debug].
func (*DebugView) ConfigToolbar ¶
func (dv *DebugView) ConfigToolbar()
func (*DebugView) ConsoleText ¶
func (dv *DebugView) ConsoleText() *texteditor.Editor
ConsoleText returns the console TextEditor
func (*DebugView) Continue ¶
func (dv *DebugView) Continue()
Continue continues running from current point -- this MUST be called in a separate goroutine!
func (*DebugView) DbgCanStep ¶
DbgCanStep means the debugger is started AND process is not currently running, AND it is not already waiting for a next step
func (*DebugView) DbgIsActive ¶
DbgIsActive means debugger is started.
func (*DebugView) DbgIsAvail ¶
DbgIsAvail means the debugger is started AND process is not currently running -- it is available for command input.
func (*DebugView) DeleteAllBreaks ¶
func (dv *DebugView) DeleteAllBreaks()
DeleteAllBreaks deletes all breakpoints
func (*DebugView) DeleteBreak ¶
DeleteBreak deletes given breakpoint. If debugger is not yet activated then it just deletes from master list. Note that breakpoints can be turned on and off directly using On flag.
func (*DebugView) DeleteBreakImpl ¶
DeleteBreakImpl deletes given breakpoint with no other updates
func (*DebugView) DeleteBreakInBuf ¶
DeleteBreakInBuf delete breakpoint in its TextBuf line is 1-based line number
func (*DebugView) DeleteBreakIndex ¶ added in v0.0.2
DeleteBreakIndex deletes break at given index in list of breaks
func (*DebugView) DeleteCurPCInBuf ¶
func (dv *DebugView) DeleteCurPCInBuf()
DeleteCurPCInBuf deletes the current PC location in given file line is 1-based line number
func (*DebugView) FindFrames ¶
FindFrames finds the frames where given file and line are active Selects the one that is closest and shows the others in Find Tab
func (*DebugView) FindFramesVw ¶
FindFramesVw returns the find frames view from tabs
func (*DebugView) InitState ¶
InitState updates the State and View from given debug state Call this when debugger returns from any action update
func (*DebugView) ListGlobalVars ¶
ListGlobalVars lists global vars matching given optional filter in Global Vars tab
func (*DebugView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of DebugView
func (*DebugView) SetBreaks ¶
func (dv *DebugView) SetBreaks()
SetBreaks sets the current breakpoints from State, call this prior to running
func (*DebugView) SetCurPCInBuf ¶
SetCurPCInBuf sets the current PC location in given file line is 1-based line number
func (*DebugView) SetDbgTime ¶
SetDbgTime sets the [DebugView.DbgTime]: time when dbg was last restarted
func (*DebugView) SetExePath ¶
SetExePath sets the [DebugView.ExePath]: path to executable / dir to debug
func (*DebugView) SetSup ¶
SetSup sets the [DebugView.Sup]: supported file type to determine debugger
func (*DebugView) SetThread ¶
SetThread sets the given thread as active -- this must be TaskID if HasTasks and ThreadID if not.
func (*DebugView) SetThreadIndex ¶ added in v0.0.2
SetThreadIndex sets the given thread by index in threads list as active this must be TaskID if HasTasks and ThreadID if not.
func (*DebugView) SetTooltip ¶
SetTooltip sets the [DebugView.Tooltip]
func (*DebugView) ShowBreakFile ¶
ShowBreakFile shows the file for given break index
func (*DebugView) ShowBreaks ¶
ShowBreaks shows the current breaks
func (*DebugView) ShowFindFrames ¶
ShowFindFrames shows the current find frames
func (*DebugView) ShowGlobalVars ¶
ShowGlobalVars shows the current allvars
func (*DebugView) ShowThreads ¶
ShowThreads shows the current threads
func (*DebugView) ShowVar ¶
ShowVar shows info on a given variable within the current frame scope in a text view dialog
func (*DebugView) SingleStep ¶
func (dv *DebugView) SingleStep()
StepSingle steps a single cpu instruction.
func (*DebugView) StepInto ¶
func (dv *DebugView) StepInto()
StepInto continues to the next source line, entering function calls.
func (*DebugView) StepOut ¶
func (dv *DebugView) StepOut()
StepOut continues to the return point of the current function
func (*DebugView) StepOver ¶
func (dv *DebugView) StepOver()
StepOver continues to the next source line, not entering function calls.
func (*DebugView) ThreadVw ¶
func (dv *DebugView) ThreadVw() *ThreadView
ThreadVw returns the thread view from tabs
func (*DebugView) UpdateAllBreaks ¶
func (dv *DebugView) UpdateAllBreaks()
UpdateAllBreaks updates all breakpoints
func (*DebugView) UpdateBreakInBuf ¶
func (dv *DebugView) UpdateBreakInBuf(fpath string, line int, stat DebugBreakStatus)
UpdateBreakInBuf updates break status in its TextBuf line is 1-based line number
func (*DebugView) UpdateFromState ¶ added in v0.0.2
func (dv *DebugView) UpdateFromState()
UpdateFromState updates the view from current debugger state
func (*DebugView) UpdateToolbar ¶
func (dv *DebugView) UpdateToolbar()
func (*DebugView) UpdateView ¶
func (dv *DebugView) UpdateView()
UpdateView updates current view of state
type FileNode ¶
FileNode is Code version of FileNode for FileTree view
func NewFileNode ¶
NewFileNode adds a new FileNode with the given name to the given parent: FileNode is Code version of FileNode for FileTree view
func (*FileNode) ContextMenu ¶
func (*FileNode) EditFiles ¶
func (fn *FileNode) EditFiles()
EditFiles calls EditFile on selected files
func (*FileNode) ExecCmdFile ¶
func (fn *FileNode) ExecCmdFile()
ExecCmdFile pops up a menu to select a command appropriate for the given node, and shows output in MainTab with name of command
func (*FileNode) ExecCmdNameFile ¶
ExecCmdNameFile executes given command name on node
func (*FileNode) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of FileNode
func (*FileNode) OnDoubleClick ¶
func (*FileNode) RenameFiles ¶
func (fn *FileNode) RenameFiles()
RenameFiles calls RenameFile on any selected nodes
func (*FileNode) SetIconClosed ¶ added in v0.0.1
SetIconClosed sets the [FileNode.IconClosed]
func (*FileNode) SetIconLeaf ¶ added in v0.0.1
SetIconLeaf sets the [FileNode.IconLeaf]
func (*FileNode) SetIconOpen ¶ added in v0.0.1
SetIconOpen sets the [FileNode.IconOpen]
func (*FileNode) SetOpenDepth ¶
SetOpenDepth sets the [FileNode.OpenDepth]
func (*FileNode) SetRootView ¶
SetRootView sets the [FileNode.RootView]
func (*FileNode) SetRunExec ¶
func (fn *FileNode) SetRunExec()
SetRunExec sets executable as the RunExec executable that will be run with Run / Debug buttons
func (*FileNode) SetRunExecs ¶
func (fn *FileNode) SetRunExecs()
SetRunExecs sets executable as the RunExec executable that will be run with Run / Debug buttons
func (*FileNode) SetSelectedNodes ¶
func (t *FileNode) SetSelectedNodes(v ...views.TreeViewer) *FileNode
SetSelectedNodes sets the [FileNode.SelectedNodes]
func (*FileNode) SetTooltip ¶
SetTooltip sets the [FileNode.Tooltip]
func (*FileNode) SetViewIndex ¶ added in v0.0.2
SetViewIndex sets the [FileNode.ViewIndex]
type FileSearchResults ¶
FileSearchResults is used to report search results
func FileTreeSearch ¶
func FileTreeSearch(ge Code, start *filetree.Node, find string, ignoreCase, regExp bool, loc FindLoc, activeDir string, langs []fileinfo.Known) []FileSearchResults
FileTreeSearch returns list of all nodes starting at given node of given language(s) that contain the given string, sorted in descending order by number of occurrences -- ignoreCase transforms everything into lowercase
func FindAll ¶ added in v0.0.1
func FindAll(ge Code, start *filetree.Node, find string, ignoreCase, regExp bool, langs []fileinfo.Known) []FileSearchResults
FindAll returns list of all files (regardless of what is currently open) starting at given node of given language(s) that contain the given string, sorted in descending order by number of occurrences. ignoreCase transforms everything into lowercase.
type FileSettings ¶
type FileSettings struct { // if true, then all directories are placed at the top of the tree view -- otherwise everything is alpha sorted DirsOnTop bool }
FileSettings contains file view settings
func (*FileSettings) Defaults ¶
func (se *FileSettings) Defaults()
Defaults are the defaults for FileSettings
type FindLoc ¶
type FindLoc int32 //enums:enum -trim-prefix FindLoc
FindLoc corresponds to the search scope
const ( // FindOpen finds in all open folders in the left file browser FindLocOpen FindLoc = iota // FindLocAll finds in all directories under the root path. can be slow for large file trees FindLocAll // FindLocFile only finds in the current active file FindLocFile // FindLocDir only finds in the directory of the current active file FindLocDir // FindLocNotTop finds in all open folders *except* the top-level folder FindLocNotTop )
const FindLocN FindLoc = 5
FindLocN is the highest valid value for type FindLoc, plus one.
func FindLocValues ¶
func FindLocValues() []FindLoc
FindLocValues returns all possible values for the type FindLoc.
func (FindLoc) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*FindLoc) SetString ¶
SetString sets the FindLoc value from its string representation, and returns an error if the string is invalid.
func (*FindLoc) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type FindParams ¶
type FindParams struct { // find string Find string // replace string Replace string // ignore case IgnoreCase bool // use regexp regular expression search and replace Regexp bool // locations to search in Loc FindLoc // languages for files to search Langs []fileinfo.Known // history of finds FindHist []string // history of replaces ReplHist []string }
FindParams are parameters for find / replace
type FindView ¶
type FindView struct { core.Layout // parent code project Code Code `json:"-" xml:"-"` // langs value view LangVV views.Value // time of last find Time time.Time // compiled regexp Re *regexp.Regexp }
FindView is a find / replace widget that displays results in a TextEditor and has a toolbar for controlling find / replace process.
func NewFindView ¶
NewFindView adds a new FindView with the given name to the given parent: FindView is a find / replace widget that displays results in a TextEditor and has a toolbar for controlling find / replace process.
func (*FindView) CheckValidRegexp ¶
CheckValidRegexp returns false if using regexp and it is not valid
func (*FindView) CompileRegexp ¶
CompileRegexp compiles the regexp if necessary -- returns false if it is invalid
func (*FindView) ConfigToolbars ¶
ConfigToolbars
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 ¶
func (fv *FindView) HighlightFinds(tv, ftv *texteditor.Editor, fbStLn, fCount int, find string)
HighlightFinds highlights all the find results in ftv buffer
func (*FindView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of FindView
func (*FindView) OpenFindURL ¶
func (fv *FindView) OpenFindURL(ur string, ftv *texteditor.Editor) bool
OpenFindURL opens given find:/// url from Find
func (*FindView) ReplaceAction ¶
ReplaceAction performs the replace -- if using regexp mode, regexp must be compiled in advance
func (*FindView) ReplaceAllAction ¶
func (fv *FindView) ReplaceAllAction()
ReplaceAllAction performs replace all, prompting before proceeding
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) SetTooltip ¶
SetTooltip sets the [FindView.Tooltip]
func (*FindView) ShowResults ¶
func (fv *FindView) ShowResults(res []FileSearchResults)
ShowResults shows the results in the buffer
func (*FindView) TextEditor ¶
func (fv *FindView) TextEditor() *texteditor.Editor
TextEditorLay returns the find results TextEditor
func (*FindView) UpdateFromParams ¶
func (fv *FindView) UpdateFromParams()
UpdateFromParams is called in Find function with new params
type KeyFunctions ¶ added in v0.0.2
type KeyFunctions int32 //enums:enum -trim-prefix Key
KeyFunctions are special functions for the overall control of the system: moving between windows, running commands, etc. Multi-key sequences can be used.
const ( KeyNone KeyFunctions = iota // special internal signal returned by KeyFunction indicating need for second key KeyNeeds2 // move to next panel to the right KeyNextPanel // move to prev panel to the left KeyPrevPanel // open a new file in active texteditor KeyFileOpen // select an open buffer to edit in active texteditor KeyBufSelect // open active file in other view KeyBufClone // save active texteditor buffer to its file KeyBufSave // save as active texteditor buffer to its file KeyBufSaveAs // close active texteditor buffer KeyBufClose // execute a command on active texteditor buffer KeyExecCmd // copy rectangle KeyRectCopy // cut rectangle KeyRectCut // paste rectangle KeyRectPaste // copy selection to named register KeyRegCopy // paste selection from named register KeyRegPaste // comment out region KeyCommentOut // indent region KeyIndent // jump to line (same as keyfun.Jump) KeyJump // set named splitter config KeySetSplit // build overall project KeyBuildProject // run overall project KeyRunProject )
const KeyFunctionsN KeyFunctions = 22
KeyFunctionsN is the highest valid value for type KeyFunctions, plus one.
func KeyFunction ¶ added in v0.0.2
func KeyFunction(key1, key2 key.Chord) KeyFunctions
KeyFunction translates chord into keyboard function; use events.Event.KeyChord to get chord; it returns KeyFunNeeds2 if the key sequence requires 2 keys to be entered, and only the first is present
func KeyFunctionsValues ¶ added in v0.0.2
func KeyFunctionsValues() []KeyFunctions
KeyFunctionsValues returns all possible values for the type KeyFunctions.
func (KeyFunctions) Desc ¶ added in v0.0.2
func (i KeyFunctions) Desc() string
Desc returns the description of the KeyFunctions value.
func (KeyFunctions) Int64 ¶ added in v0.0.2
func (i KeyFunctions) Int64() int64
Int64 returns the KeyFunctions value as an int64.
func (KeyFunctions) MarshalText ¶ added in v0.0.2
func (i KeyFunctions) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*KeyFunctions) SetInt64 ¶ added in v0.0.2
func (i *KeyFunctions) SetInt64(in int64)
SetInt64 sets the KeyFunctions value from an int64.
func (*KeyFunctions) SetString ¶ added in v0.0.2
func (i *KeyFunctions) SetString(s string) error
SetString sets the KeyFunctions value from its string representation, and returns an error if the string is invalid.
func (KeyFunctions) String ¶ added in v0.0.2
func (i KeyFunctions) String() string
String returns the string representation of this KeyFunctions value.
func (*KeyFunctions) UnmarshalText ¶ added in v0.0.2
func (i *KeyFunctions) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (KeyFunctions) Values ¶ added in v0.0.2
func (i KeyFunctions) Values() []enums.Enum
Values returns all possible values for the type KeyFunctions.
type KeyMapItem ¶
type KeyMapItem struct { // the key chord sequence that activates a function Keys KeySeq // the function of that key Fun KeyFunctions }
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 settings etc.
var ActiveKeyMapName KeyMapName
ActiveKeyMapName is the name of the active keymap
func (KeyMapName) Value ¶
func (kn KeyMapName) Value() views.Value
Value registers KeyMapValue as the views.Value for KeyMapName.
type KeyMapValue ¶
KeyMapValue represents a KeyMapName value with a button.
func (*KeyMapValue) Config ¶ added in v0.0.1
func (v *KeyMapValue) Config()
func (*KeyMapValue) ConfigDialog ¶
func (vv *KeyMapValue) ConfigDialog(d *core.Body) (bool, func())
func (*KeyMapValue) Update ¶ added in v0.0.1
func (v *KeyMapValue) Update()
type KeyMaps ¶
type KeyMaps []KeyMapsItem //types:add
KeyMaps is a list of KeyMap's -- users can edit these in Settings -- to create a custom one, just duplicate an existing map, rename, and customize
var AvailableKeyMaps KeyMaps
AvailableKeyMaps is the current list of available keymaps for use -- can be loaded / saved / edited with settings. 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) OpenSettings ¶
OpenSettings opens the KeyMaps from the app settings directory, using KeyMapSettingsFilename.
func (*KeyMaps) RevertToStandard ¶ added in v0.0.2
func (km *KeyMaps) RevertToStandard()
RevertToStandard reverts this map to using the StdKeyMaps that are compiled into the program and have all the lastest key functions bound to standard values. If you have edited your maps, and are finding things not working, it is a good idea to save your current maps and try this, or at least do ViewStdMaps to see the current standards. <b>Your current map edits will be lost if you proceed!</b>
func (*KeyMaps) SaveSettings ¶ added in v0.0.2
SaveSettings saves the KeyMaps to the app setttings directory, using KeyMapSettingsFilename.
func (*KeyMaps) ViewStandard ¶ added in v0.0.2
func (km *KeyMaps) ViewStandard()
ViewStandard shows the standard maps that are compiled into the program and have all the lastest key functions bound to standard values. Useful for comparing against custom maps.
type KeyMapsItem ¶
type KeyMapsItem struct { // name of keymap Name string `width:"20"` // description of keymap -- good idea to include source it was derived from Desc string // to edit key sequence click button and type new key combination; to edit function mapped to key sequence choose from menu Map KeySeqMap }
KeyMapsItem is an entry in a KeyMaps list
func (KeyMapsItem) Label ¶
func (km KeyMapsItem) Label() string
Label satisfies the Labeler interface
type KeySeq ¶
KeySeq defines a multiple-key sequence to initiate a key function
func ChordForFunction ¶ added in v0.0.2
func ChordForFunction(kf KeyFunctions) KeySeq
ChordForFunction returns first key sequence trigger for given KeyFunctions in ActiveKeyMap
func (KeySeq) MarshalText ¶
MarshalText is required for encoding of struct keys
func (*KeySeq) UnmarshalText ¶
UnmarshalText is required for decoding of struct keys
type KeySeqMap ¶
type KeySeqMap map[KeySeq]KeyFunctions
KeySeqMap is a map between a multi-key sequence (multiple chords) and a specific key function. This mapping must be unique, in that each chord has a unique key function, 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 Settings
func (*KeySeqMap) ChordForFunction ¶ added in v0.0.2
func (km *KeySeqMap) ChordForFunction(kf KeyFunctions) KeySeq
ChordForFunction returns first key sequence trigger for given KeyFunctions 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 KeyFunctions, grabbing ones from the default map if not, and also eliminates any Nil entries which might reflect out-of-date functions
type LangOpts ¶
type LangOpts struct { // command(s) to run after a file of this type is saved PostSaveCmds CmdNames }
LangOpts defines options associated with a given language / file format only languages in fileinfo.Known list are supported..
type Langs ¶
Langs is a map of language options
var AvailableLangs Langs
AvailableLangs is the current set of language options -- can be loaded / saved / edited with settings. This is set to StandardLangs at startup.
func (*Langs) OpenSettings ¶
OpenSettings opens the Langs from the app settings directory, using LangSettingsFilename.
func (*Langs) RevertToStandard ¶ added in v0.0.2
func (lt *Langs) RevertToStandard()
RevertToStandard reverts this map to using the StdLangs that are compiled into the program and have all the lastest standards.
func (*Langs) SaveSettings ¶ added in v0.0.2
SaveSettings saves the Langs to the app settings directory, using LangSettingsFilename.
func (Langs) Validate ¶
Validate checks to make sure post save command names exist, issuing warnings to log for those that don't
func (*Langs) ViewStandard ¶ added in v0.0.2
func (lt *Langs) ViewStandard()
ViewStandard shows the standard langs that are compiled into the program and have all the lastest standards. Useful for comparing against custom lists.
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 -- returns true if actually added. Connects to fn.TextBuf signal and auto-closes when buffer closes.
func (*OpenNodes) AddImpl ¶
AddImpl adds given node to list of open nodes -- if already on the list it is moved to the top -- returns true if actually added.
func (*OpenNodes) ByStringName ¶
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
func (*OpenNodes) DeleteIndex ¶ added in v0.0.2
DeleteIndex deletes at given index
type ProjectSettings ¶ added in v0.0.2
type ProjectSettings struct { // file view settings Files FileSettings // editor settings Editor core.EditorSettings `view:"inline"` // current named-split config in use for configuring the splitters SplitName SplitName // the language associated with the most frequently-encountered file // extension in the file tree -- can be manually set here as well MainLang fileinfo.Known // the type of version control system used in this project (git, svn, etc). // filters commands available VersionControl filetree.VersionControlName // current project filename for saving / loading specific Code // configuration information in a .code file (optional) ProjectFilename core.Filename `ext:".code"` // root directory for the project. all projects must be organized within // a top-level root directory, with all the files therein constituting // the scope of the project. By default it is the path for ProjectFilename ProjectRoot core.Filename // if true, use Go modules, otherwise use GOPATH -- this sets your effective GO111MODULE environment variable accordingly, dynamically -- updated by toolbar checkbox, dynamically GoMod bool // command(s) to run for main Build button BuildCmds CmdNames // build directory for main Build button -- set this to the directory where you want to build the main target for this project -- avail as {BuildDir} in commands BuildDir core.Filename // build target for main Build button, if relevant for your BuildCmds BuildTarg core.Filename // executable to run for this project via main Run button -- called by standard Run Project command RunExec core.Filename // command(s) to run for main Run button (typically Run Project) RunCmds CmdNames // custom debugger parameters for this project Debug cdebug.Params // saved find params Find FindParams `view:"-"` // saved structure params Symbols SymbolsParams `view:"-"` // directory properties Dirs filetree.DirFlagMap `view:"-"` // last register used Register RegisterName `view:"-"` // current splitter splits Splits []float32 `view:"-"` }
ProjectSettings are the settings for saving for a project. This IS the project file
func (*ProjectSettings) Open ¶ added in v0.0.2
func (se *ProjectSettings) Open(filename core.Filename) error
Open open from file
func (*ProjectSettings) RunExecIsExec ¶ added in v0.0.2
func (se *ProjectSettings) RunExecIsExec() bool
RunExecIsExec returns true if the RunExec is actually executable
func (*ProjectSettings) Save ¶ added in v0.0.2
func (se *ProjectSettings) Save(filename core.Filename) error
Save save to file
func (*ProjectSettings) Update ¶ added in v0.0.2
func (se *ProjectSettings) Update()
type RegisterName ¶
type RegisterName string
RegisterName has an associated ValueView for selecting from the list of available named registers
func (RegisterName) Value ¶
func (rn RegisterName) Value() views.Value
Value registers RegisterValue as the views.Value for RegisterName.
type RegisterValue ¶
RegisterValue represents a RegisterName value with a button.
func (*RegisterValue) Config ¶ added in v0.0.1
func (v *RegisterValue) Config()
func (*RegisterValue) OpenDialog ¶
func (v *RegisterValue) OpenDialog(ctx core.Widget, fun func())
func (*RegisterValue) Update ¶ added in v0.0.1
func (v *RegisterValue) Update()
type Registers ¶
Registers is a list of named strings
var AvailableRegisters Registers
AvailableRegisters are available named registers. can be loaded / saved / edited with settings.
func (*Registers) OpenSettings ¶
OpenSettings opens the Registers from the app settings directory, using RegisterSettingsFilename.
func (*Registers) SaveSettings ¶ added in v0.0.2
SaveSettings saves the Registers to the app settings directory, using RegisterSettingsFilename.
type SettingsData ¶
type SettingsData struct { core.SettingsBase // file view settings Files FileSettings // environment variables to set for this app -- if run from the command line, standard shell environment variables are inherited, but on some OS's (Mac), they are not set when run as a gui app EnvVars map[string]string // key map for code-specific keyboard sequences KeyMap KeyMapName // if set, the current available set of key maps is saved to your settings directory, and automatically loaded at startup -- this should be set if you are using custom key maps, but it may be safer to keep it <i>OFF</i> if you are <i>not</i> using custom key maps, so that you'll always have the latest compiled-in standard key maps with all the current key functions bound to standard key chords SaveKeyMaps bool // if set, the current customized set of language options (see Edit Lang Opts) is saved / loaded along with other settings -- if not set, then you always are using the default compiled-in standard set (which will be updated) SaveLangOpts bool // if set, the current customized set of command parameters (see Edit Cmds) is saved / loaded along with other settings -- if not set, then you always are using the default compiled-in standard set (which will be updated) SaveCmds bool }
SettingsData is the data type for the overall user settings for Code.
func (*SettingsData) Apply ¶
func (se *SettingsData) Apply()
Apply settings updates things according with settings
func (*SettingsData) ApplyEnvVars ¶
func (se *SettingsData) ApplyEnvVars()
ApplyEnvVars applies environment variables set in EnvVars
func (*SettingsData) ConfigToolbar ¶ added in v0.0.1
func (se *SettingsData) ConfigToolbar(tb *core.Toolbar)
func (*SettingsData) Defaults ¶
func (se *SettingsData) Defaults()
Defaults are the defaults for Settings
func (*SettingsData) EditCmds ¶
func (se *SettingsData) EditCmds()
EditCmds opens the CmdsView editor to customize commands you can run.
func (*SettingsData) EditKeyMaps ¶
func (se *SettingsData) EditKeyMaps()
EditKeyMaps opens the KeyMapsView editor to create new keymaps / save / load from other files, etc. Current avail keymaps are saved and loaded with settings automatically.
func (*SettingsData) EditLangOpts ¶
func (se *SettingsData) EditLangOpts()
EditLangOpts opens the LangsView editor to customize options for each type of language / data / file type.
func (*SettingsData) EditRegisters ¶
func (se *SettingsData) EditRegisters()
EditRegisters opens the RegistersView editor to customize saved registers
func (*SettingsData) EditSplits ¶
func (se *SettingsData) EditSplits()
EditSplits opens the SplitsView editor to customize saved splitter settings
func (*SettingsData) Open ¶
func (se *SettingsData) Open() error
func (*SettingsData) Save ¶
func (se *SettingsData) Save() error
type SpellView ¶
type SpellView struct { core.Layout // parent code project Code Code `json:"-" xml:"-" copier:"-"` // texteditor that we're spell-checking Text *TextEditor `json:"-" xml:"-" copier:"-"` // current spelling errors Errs lexer.Line // current line in text we're on CurLn int // current index in Errs we're on CurIndex int // current unknown lex token UnkLex lexer.Lex // current unknown word UnkWord string // a list of suggestions from spell checker Suggest []string // last user action (ignore, change, learn) LastAction *core.Button }
SpellView is a widget that displays results of spell check
func NewSpellView ¶
NewSpellView adds a new SpellView with the given name to the given parent: SpellView is a widget that displays results of spell check
func (*SpellView) AcceptSuggestion ¶
AcceptSuggestion replaces the misspelled word with the word in the ChangeText field
func (*SpellView) ChangeAction ¶
func (sv *SpellView) ChangeAction()
ChangeAction replaces the known word with the selected suggested word and call CheckNextAction
func (*SpellView) ChangeAllAct ¶
ChangeAllAct returns the spell change action from toolbar
func (*SpellView) ChangeAllAction ¶
func (sv *SpellView) ChangeAllAction()
ChangeAllAction replaces the known word with the selected suggested word and call CheckNextAction
func (*SpellView) 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) ConfigSpellView ¶
func (sv *SpellView) ConfigSpellView(ge Code, atv *TextEditor)
Config configures the view
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) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of SpellView
func (*SpellView) SetCurIndex ¶ added in v0.0.2
SetCurIndex sets the [SpellView.CurIndex]: current index in Errs we're on
func (*SpellView) SetLastAction ¶
SetLastAction sets the [SpellView.LastAction]: last user action (ignore, change, learn)
func (*SpellView) SetSuggest ¶
SetSuggest sets the [SpellView.Suggest]: a list of suggestions from spell checker
func (*SpellView) SetText ¶
func (t *SpellView) SetText(v *TextEditor) *SpellView
SetText sets the [SpellView.Text]: texteditor that we're spell-checking
func (*SpellView) SetTooltip ¶
SetTooltip sets the [SpellView.Tooltip]
func (*SpellView) SetUnkWord ¶
SetUnkWord sets the [SpellView.UnkWord]: current unknown word
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) SuggestView ¶
SuggestView returns the view for the list of suggestions
func (*SpellView) TrainAction ¶
func (sv *SpellView) TrainAction()
TrainAction allows you to train on additional text files and also to rebuild the spell model
func (*SpellView) UnkStartPos ¶
UnkStartPos returns the start position of the current unknown word
func (*SpellView) UnknownBar ¶
UnknownBar returns the toolbar that displays the unknown word
func (*SpellView) UnknownText ¶
UnknownText returns the unknown word textfield from toolbar
type Split ¶
type Split struct { // name of splitter config Name string // brief description Desc string // splitter panel proportions Splits []float32 `min:"0" max:"1" step:".05" fixed-len:"4"` }
Split is a named splitter configuration
func (*Split) 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
func (SplitName) Value ¶
Value registers SplitValue as the views.Value for SplitName.
type SplitValue ¶
SplitValue represents a SplitName value with a button.
func (*SplitValue) Config ¶ added in v0.0.1
func (v *SplitValue) Config()
func (*SplitValue) OpenDialog ¶
func (v *SplitValue) OpenDialog(ctx core.Widget, fun func())
func (*SplitValue) Update ¶ added in v0.0.1
func (v *SplitValue) Update()
type Splits ¶
type Splits []*Split
Splits is a list of named splitter configurations
var AvailableSplits Splits
AvailableSplits are available named splitter settings. can be loaded / saved / edited with settings. This is set to StandardSplits at startup.
func (*Splits) FixLen ¶
func (lt *Splits) FixLen()
FixLen ensures that there are exactly 4 splits in each
func (*Splits) OpenSettings ¶
OpenSettings opens Splits from App standard prefs directory, using PrefSplitsFilename
func (*Splits) SaveSettings ¶ added in v0.0.2
SaveSettings saves Splits to App standard prefs directory, using PrefSplitsFilename
type StackView ¶
type StackView struct { core.Layout // if true, this is a find frames, not a regular stack FindFrames bool }
StackView is a view of the stack trace
func NewStackView ¶
NewStackView adds a new StackView with the given name to the given parent: StackView is a view of the stack trace
func (*StackView) ConfigStackView ¶
func (*StackView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of StackView
func (*StackView) SetFindFrames ¶
SetFindFrames sets the [StackView.FindFrames]: if true, this is a find frames, not a regular stack
func (*StackView) SetTooltip ¶
SetTooltip sets the [StackView.Tooltip]
type SymNode ¶
SymNode represents a language symbol -- the name of the node is the name of the symbol. Some symbols, e.g. type have children
func NewSymNode ¶
NewSymNode adds a new SymNode with the given name to the given parent: SymNode represents a language symbol -- the name of the node is the name of the symbol. Some symbols, e.g. type have children
func (*SymNode) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of SymNode
type SymScopes ¶
type SymScopes int32 //enums:enum -trim-prefix SymScope
SymScopes corresponds to the search scope
const SymScopesN SymScopes = 2
SymScopesN is the highest valid value for type SymScopes, plus one.
func SymScopesValues ¶
func SymScopesValues() []SymScopes
SymScopesValues returns all possible values for the type SymScopes.
func (SymScopes) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*SymScopes) SetString ¶
SetString sets the SymScopes value from its string representation, and returns an error if the string is invalid.
func (*SymScopes) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type SymTreeView ¶
SymTreeView is a TreeView that knows how to operate on FileNode nodes
func NewSymTreeView ¶
func NewSymTreeView(parent tree.Node, name ...string) *SymTreeView
NewSymTreeView adds a new SymTreeView with the given name to the given parent: SymTreeView is a TreeView that knows how to operate on FileNode nodes
func (*SymTreeView) New ¶
func (t *SymTreeView) New() tree.Node
New returns a new *SymTreeView value
func (*SymTreeView) NodeType ¶ added in v0.0.2
func (t *SymTreeView) NodeType() *types.Type
NodeType returns the *types.Type of SymTreeView
func (*SymTreeView) OnInit ¶
func (st *SymTreeView) OnInit()
func (*SymTreeView) SetIcon ¶
func (t *SymTreeView) SetIcon(v icons.Icon) *SymTreeView
SetIcon sets the [SymTreeView.Icon]
func (*SymTreeView) SetIconClosed ¶ added in v0.0.1
func (t *SymTreeView) SetIconClosed(v icons.Icon) *SymTreeView
SetIconClosed sets the [SymTreeView.IconClosed]
func (*SymTreeView) SetIconLeaf ¶ added in v0.0.1
func (t *SymTreeView) SetIconLeaf(v icons.Icon) *SymTreeView
SetIconLeaf sets the [SymTreeView.IconLeaf]
func (*SymTreeView) SetIconOpen ¶ added in v0.0.1
func (t *SymTreeView) SetIconOpen(v icons.Icon) *SymTreeView
SetIconOpen sets the [SymTreeView.IconOpen]
func (*SymTreeView) SetIndent ¶
func (t *SymTreeView) SetIndent(v units.Value) *SymTreeView
SetIndent sets the [SymTreeView.Indent]
func (*SymTreeView) SetOpenDepth ¶
func (t *SymTreeView) SetOpenDepth(v int) *SymTreeView
SetOpenDepth sets the [SymTreeView.OpenDepth]
func (*SymTreeView) SetRootView ¶
func (t *SymTreeView) SetRootView(v *views.TreeView) *SymTreeView
SetRootView sets the [SymTreeView.RootView]
func (*SymTreeView) SetSelectedNodes ¶
func (t *SymTreeView) SetSelectedNodes(v ...views.TreeViewer) *SymTreeView
SetSelectedNodes sets the [SymTreeView.SelectedNodes]
func (*SymTreeView) SetSymIcon ¶
func (st *SymTreeView) SetSymIcon()
func (*SymTreeView) SetText ¶
func (t *SymTreeView) SetText(v string) *SymTreeView
SetText sets the [SymTreeView.Text]
func (*SymTreeView) SetTooltip ¶
func (t *SymTreeView) SetTooltip(v string) *SymTreeView
SetTooltip sets the [SymTreeView.Tooltip]
func (*SymTreeView) SetViewIndex ¶ added in v0.0.2
func (t *SymTreeView) SetViewIndex(v int) *SymTreeView
SetViewIndex sets the [SymTreeView.ViewIndex]
func (*SymTreeView) SetWidgetSize ¶
func (t *SymTreeView) SetWidgetSize(v math32.Vector2) *SymTreeView
SetWidgetSize sets the [SymTreeView.WidgetSize]
func (*SymTreeView) SymNode ¶
func (st *SymTreeView) SymNode() *SymNode
SymNode returns the SrcNode as a *code* SymNode
func (*SymTreeView) UpdateBranchIcons ¶
func (st *SymTreeView) UpdateBranchIcons()
type SymbolsParams ¶
type SymbolsParams struct { // scope of symbols to list Scope SymScopes }
SymbolsParams are parameters for structure view of file or package
type SymbolsView ¶
type SymbolsView struct { core.Layout // parent code project Code Code `json:"-" xml:"-"` // params for structure display SymParams SymbolsParams // all the symbols for the file or package in a tree Syms *SymNode // only show symbols that match this string Match string }
SymbolsView is a widget that displays results of a file or package parse
func NewSymbolsView ¶
func NewSymbolsView(parent tree.Node, name ...string) *SymbolsView
NewSymbolsView adds a new SymbolsView with the given name to the given parent: SymbolsView is a widget that displays results of a file or package parse
func (*SymbolsView) ConfigSymbolsView ¶
func (sv *SymbolsView) ConfigSymbolsView(ge Code, sp SymbolsParams)
Config configures the view
func (*SymbolsView) ConfigToolbar ¶
func (sv *SymbolsView) ConfigToolbar()
ConfigToolbar adds toolbar.
func (*SymbolsView) ConfigTree ¶
func (sv *SymbolsView) ConfigTree(scope SymScopes)
ConfigTree adds a treeview to the symbolsview. This is called for refresh action.
func (*SymbolsView) Frame ¶
func (sv *SymbolsView) Frame() *core.Frame
Toolbar returns the spell toolbar
func (*SymbolsView) New ¶
func (t *SymbolsView) New() tree.Node
New returns a new *SymbolsView value
func (*SymbolsView) NodeType ¶ added in v0.0.2
func (t *SymbolsView) NodeType() *types.Type
NodeType returns the *types.Type of SymbolsView
func (*SymbolsView) OpenFile ¶
func (sv *SymbolsView) OpenFile()
OpenFile opens file-level symbols for current active texteditor
func (*SymbolsView) OpenPackage ¶
func (sv *SymbolsView) OpenPackage()
OpenPackage opens package-level symbols for current active texteditor
func (*SymbolsView) Params ¶
func (sv *SymbolsView) Params() *SymbolsParams
Params returns the symbols params
func (*SymbolsView) RefreshAction ¶
func (sv *SymbolsView) RefreshAction()
RefreshAction loads symbols for current file and scope
func (*SymbolsView) ScopeChooser ¶
func (sv *SymbolsView) ScopeChooser() *core.Chooser
ScopeChooser returns the scope Chooser
func (*SymbolsView) SearchText ¶
func (sv *SymbolsView) SearchText() *core.TextField
SearchText returns the unknown word textfield from toolbar
func (*SymbolsView) SetCode ¶
func (t *SymbolsView) SetCode(v Code) *SymbolsView
SetCode sets the [SymbolsView.Code]: parent code project
func (*SymbolsView) SetMatch ¶
func (t *SymbolsView) SetMatch(v string) *SymbolsView
SetMatch sets the [SymbolsView.Match]: only show symbols that match this string
func (*SymbolsView) SetSymParams ¶
func (t *SymbolsView) SetSymParams(v SymbolsParams) *SymbolsView
SetSymParams sets the [SymbolsView.SymParams]: params for structure display
func (*SymbolsView) SetSyms ¶
func (t *SymbolsView) SetSyms(v *SymNode) *SymbolsView
SetSyms sets the [SymbolsView.Syms]: all the symbols for the file or package in a tree
func (*SymbolsView) SetTooltip ¶
func (t *SymbolsView) SetTooltip(v string) *SymbolsView
SetTooltip sets the [SymbolsView.Tooltip]
func (*SymbolsView) Toolbar ¶
func (sv *SymbolsView) Toolbar() *core.Toolbar
Toolbar returns the symbols toolbar
type TaskView ¶
TaskView is a view of the threads
func NewTaskView ¶
NewTaskView adds a new TaskView with the given name to the given parent: TaskView is a view of the threads
func (*TaskView) ConfigTaskView ¶
func (*TaskView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of TaskView
func (*TaskView) SetTooltip ¶
SetTooltip sets the [TaskView.Tooltip]
type TextEditor ¶
type TextEditor struct { texteditor.Editor Code Code }
TextEditor is the Code-specific version of the TextEditor, with support for setting / clearing breakpoints, etc
func NewTextEditor ¶
func NewTextEditor(parent tree.Node, name ...string) *TextEditor
NewTextEditor adds a new TextEditor with the given name to the given parent: TextEditor is the Code-specific version of the TextEditor, with support for setting / clearing breakpoints, etc
func (*TextEditor) ClearBreakpoint ¶
func (ed *TextEditor) ClearBreakpoint(ln int)
func (*TextEditor) ContextMenu ¶
func (ed *TextEditor) ContextMenu(m *core.Scene)
ContextMenu builds the text editor context menu
func (*TextEditor) CurDebug ¶
func (ed *TextEditor) CurDebug() (*DebugView, bool)
CurDebug returns the current debugger, true if it is present
func (*TextEditor) DebugVarValueAtPos ¶
func (ed *TextEditor) DebugVarValueAtPos(pos image.Point) string
DebugVarValueAtPos returns debugger variable value for given mouse position
func (*TextEditor) FindFrames ¶
func (ed *TextEditor) FindFrames(ln int)
FindFrames finds stack frames in the debugger containing this file and line
func (*TextEditor) HandleDebugDoubleClick ¶
func (ed *TextEditor) HandleDebugDoubleClick(e events.Event, tpos lexer.Pos)
DoubleClickEvent processes double-clicks NOT on the line-number section
func (*TextEditor) HandleEvents ¶
func (ed *TextEditor) HandleEvents()
HandleEvents sets connections between mouse and key events and actions
func (*TextEditor) HasBreakpoint ¶
func (ed *TextEditor) HasBreakpoint(ln int) bool
HasBreakpoint checks if line has a breakpoint
func (*TextEditor) LineNoDoubleClick ¶
func (ed *TextEditor) LineNoDoubleClick(tpos lexer.Pos)
LineNoDoubleClick processes double-clicks on the line-number section
func (*TextEditor) NodeType ¶ added in v0.0.2
func (t *TextEditor) NodeType() *types.Type
NodeType returns the *types.Type of TextEditor
func (*TextEditor) OnInit ¶
func (ed *TextEditor) OnInit()
func (*TextEditor) SetBreakpoint ¶
func (ed *TextEditor) SetBreakpoint(ln int)
SetBreakpoint sets breakpoint at given line (e.g., tv.CursorPos.Ln)
func (*TextEditor) SetCode ¶
func (t *TextEditor) SetCode(v Code) *TextEditor
SetCode sets the [TextEditor.Code]
func (*TextEditor) SetCursorColor ¶
func (t *TextEditor) SetCursorColor(v image.Image) *TextEditor
SetCursorColor sets the [TextEditor.CursorColor]
func (*TextEditor) SetCursorWidth ¶
func (t *TextEditor) SetCursorWidth(v units.Value) *TextEditor
SetCursorWidth sets the [TextEditor.CursorWidth]
func (*TextEditor) SetHighlightColor ¶
func (t *TextEditor) SetHighlightColor(v image.Image) *TextEditor
SetHighlightColor sets the [TextEditor.HighlightColor]
func (*TextEditor) SetLineNumberColor ¶
func (t *TextEditor) SetLineNumberColor(v image.Image) *TextEditor
SetLineNumberColor sets the [TextEditor.LineNumberColor]
func (*TextEditor) SetLinkHandler ¶
func (t *TextEditor) SetLinkHandler(v func(tl *paint.TextLink)) *TextEditor
SetLinkHandler sets the [TextEditor.LinkHandler]
func (*TextEditor) SetSelectColor ¶
func (t *TextEditor) SetSelectColor(v image.Image) *TextEditor
SetSelectColor sets the [TextEditor.SelectColor]
func (*TextEditor) SetStyles ¶
func (ed *TextEditor) SetStyles()
func (*TextEditor) SetTooltip ¶
func (t *TextEditor) SetTooltip(v string) *TextEditor
SetTooltip sets the [TextEditor.Tooltip]
func (*TextEditor) ToggleBreakpoint ¶
func (ed *TextEditor) ToggleBreakpoint(ln int)
type ThreadView ¶
ThreadView is a view of the threads
func NewThreadView ¶
func NewThreadView(parent tree.Node, name ...string) *ThreadView
NewThreadView adds a new ThreadView with the given name to the given parent: ThreadView is a view of the threads
func (*ThreadView) ConfigThreadView ¶
func (sv *ThreadView) ConfigThreadView(dv *DebugView)
func (*ThreadView) DebugVw ¶
func (sv *ThreadView) DebugVw() *DebugView
func (*ThreadView) NodeType ¶ added in v0.0.2
func (t *ThreadView) NodeType() *types.Type
NodeType returns the *types.Type of ThreadView
func (*ThreadView) SetTooltip ¶
func (t *ThreadView) SetTooltip(v string) *ThreadView
SetTooltip sets the [ThreadView.Tooltip]
func (*ThreadView) ShowThreads ¶
func (sv *ThreadView) ShowThreads()
ShowThreads triggers update of view of State.Threads
func (*ThreadView) TableView ¶
func (sv *ThreadView) TableView() *views.TableView
TableView returns the tableview
type VarView ¶
type VarView struct { core.Frame // variable being edited Var *cdebug.Variable `set:"-"` SelectVar *cdebug.Variable `set:"-"` // frame info FrameInfo string `set:"-"` // parent DebugView DbgView *DebugView `json:"-" xml:"-"` }
VarView shows a debug variable in an inspector-like framework, with sub-variables in a tree.
func NewVarView ¶
NewVarView adds a new VarView with the given name to the given parent: VarView shows a debug variable in an inspector-like framework, with sub-variables in a tree.
func VarViewDialog ¶
VarViewDialog opens an interactive editor of the given variable.
func (*VarView) ConfigSplits ¶
func (vv *VarView) ConfigSplits()
ConfigSplits configures the Splits.
func (*VarView) ConfigToolbar ¶
func (*VarView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of VarView
func (*VarView) SetDbgView ¶
SetDbgView sets the [VarView.DbgView]: parent DebugView
func (*VarView) SetFrameInfo ¶
SetFrameInfo sets the frame info
func (*VarView) SetTooltip ¶
SetTooltip sets the [VarView.Tooltip]
func (*VarView) StructView ¶
func (vv *VarView) StructView() *views.StructView
StructView returns the main StructView
type VarsView ¶
type VarsView struct { core.Layout // if true, this is global vars, not local ones GlobalVars bool }
VarsView is a view of the variables
func NewVarsView ¶
NewVarsView adds a new VarsView with the given name to the given parent: VarsView is a view of the variables
func (*VarsView) ConfigVarsView ¶
func (*VarsView) NodeType ¶ added in v0.0.2
NodeType returns the *types.Type of VarsView
func (*VarsView) SetGlobalVars ¶
SetGlobalVars sets the [VarsView.GlobalVars]: if true, this is global vars, not local ones
func (*VarsView) SetTooltip ¶
SetTooltip sets the [VarsView.Tooltip]