command

package
v0.0.0-...-bbcbdef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bindables

func Bindables(cmdr command.Commander, driver gxui.Driver, theme *basic.Theme) []bind.Bindable

Bindables returns all known bindables, in the order they should be added to the menu.

func NewLineEnd

func NewLineEnd() bind.Command

func NewLineStart

func NewLineStart() bind.Command

func NewNextChar

func NewNextChar() bind.Command

func NewNextLine

func NewNextLine() bind.Command

func NewNextWord

func NewNextWord() bind.Command

func NewPrevChar

func NewPrevChar() bind.Command

func NewPrevLine

func NewPrevLine() bind.Command

func NewPrevWord

func NewPrevWord() bind.Command

func NewSelectLineEnd

func NewSelectLineEnd() bind.Command

func NewSelectLineStart

func NewSelectLineStart() bind.Command

func NewSelectNextChar

func NewSelectNextChar() bind.Command

func NewSelectNextLine

func NewSelectNextLine() bind.Command

func NewSelectNextWord

func NewSelectNextWord() bind.Command

func NewSelectPrevChar

func NewSelectPrevChar() bind.Command

func NewSelectPrevLine

func NewSelectPrevLine() bind.Command

func NewSelectPrevWord

func NewSelectPrevWord() bind.Command

Types

type AfterSaver

type AfterSaver interface {
	Name() string
	AfterSave(proj setting.Project, path, contents string) error
}

type AllSaver

type AllSaver interface {
	SaveAll()
}

type Applier

type Applier interface {
	Apply(text.Editor, ...text.Edit)
}

type BeforeSaver

type BeforeSaver interface {
	Name() string
	BeforeSave(proj setting.Project, path, contents string) (newContents string, err error)
}

type BindManager

type BindManager interface {
	Bindable(string) bind.Bindable
	Execute(bind.Bindable)
}

type BindPopper

type BindPopper interface {
	Pop() []bind.Bindable
}

type Careter

type Careter interface {
	FirstCaret() int
	Deselect(bool) bool
}

type ChangeFocus

type ChangeFocus struct {
	// contains filtered or unexported fields
}

func NewFocusDown

func NewFocusDown() *ChangeFocus

func NewFocusLeft

func NewFocusLeft() *ChangeFocus

func NewFocusRight

func NewFocusRight() *ChangeFocus

func NewFocusUp

func NewFocusUp() *ChangeFocus

func (*ChangeFocus) Defaults

func (p *ChangeFocus) Defaults() []fmt.Stringer

func (*ChangeFocus) Exec

func (p *ChangeFocus) Exec() error

func (*ChangeFocus) Menu

func (p *ChangeFocus) Menu() string

func (*ChangeFocus) Name

func (p *ChangeFocus) Name() string

func (*ChangeFocus) Reset

func (p *ChangeFocus) Reset()

func (*ChangeFocus) Store

func (p *ChangeFocus) Store(target interface{}) bind.Status

type ChangeTab

type ChangeTab struct {
	// contains filtered or unexported fields
}

func NewNextTab

func NewNextTab() *ChangeTab

func NewPrevTab

func NewPrevTab() *ChangeTab

func (*ChangeTab) Defaults

func (t *ChangeTab) Defaults() []fmt.Stringer

func (*ChangeTab) Exec

func (t *ChangeTab) Exec() error

func (*ChangeTab) Menu

func (t *ChangeTab) Menu() string

func (*ChangeTab) Name

func (t *ChangeTab) Name() string

func (*ChangeTab) Reset

func (t *ChangeTab) Reset()

func (*ChangeTab) Store

func (t *ChangeTab) Store(target interface{}) bind.Status

type CloseTab

type CloseTab struct {
	// contains filtered or unexported fields
}

func NewCloseTab

func NewCloseTab() *CloseTab

func (*CloseTab) Defaults

func (s *CloseTab) Defaults() []fmt.Stringer

func (*CloseTab) Exec

func (s *CloseTab) Exec() error

func (*CloseTab) Menu

func (s *CloseTab) Menu() string

func (*CloseTab) Name

func (s *CloseTab) Name() string

func (*CloseTab) Reset

func (s *CloseTab) Reset()

func (*CloseTab) Store

func (s *CloseTab) Store(target interface{}) bind.Status

type Copy

type Copy struct {
	// contains filtered or unexported fields
}

func NewCopy

func NewCopy(driver gxui.Driver) *Copy

func (*Copy) Defaults

func (c *Copy) Defaults() []fmt.Stringer

func (*Copy) Exec

func (c *Copy) Exec(target interface{}) bind.Status

func (*Copy) Menu

func (c *Copy) Menu() string

func (*Copy) Name

func (c *Copy) Name() string

type CurrentEditorCloser

type CurrentEditorCloser interface {
	CloseCurrentEditor() (string, text.Editor)
	CurrentEditor() text.Editor
}

type Cut

type Cut struct {
	Copy
	// contains filtered or unexported fields
}

func NewCut

func NewCut(driver gxui.Driver) *Cut

func (*Cut) Defaults

func (c *Cut) Defaults() []fmt.Stringer

func (*Cut) Exec

func (c *Cut) Exec() error

func (*Cut) Name

func (c *Cut) Name() string

func (*Cut) Reset

func (c *Cut) Reset()

func (*Cut) Store

func (c *Cut) Store(target interface{}) bind.Status

type EditHook

type EditHook struct {
	Driver gxui.Driver
	Theme  *basic.Theme
}

func (EditHook) FileBindables

func (h EditHook) FileBindables(string) []bind.Bindable

func (EditHook) Name

func (h EditHook) Name() string

func (EditHook) OpName

func (h EditHook) OpName() string

type Editor

type Editor interface {
	text.Editor
	Controller() *gxui.TextBoxController
}

type EditorChooser

type EditorChooser interface {
	NextEditor(editor.Direction) text.Editor
}

type EditorRedraw

type EditorRedraw struct{}

func (EditorRedraw) Applied

func (EditorRedraw) Applied(e text.Editor, edits []text.Edit)

func (EditorRedraw) Name

func (EditorRedraw) Name() string

func (EditorRedraw) OpName

func (EditorRedraw) OpName() string

type Executor

type Executor interface {
	Execute(bind.Bindable)
}

type FileHook

type FileHook struct {
	Theme *basic.Theme
}

func (FileHook) FileBindables

func (h FileHook) FileBindables(string) []bind.Bindable

func (FileHook) Name

func (h FileHook) Name() string

func (FileHook) OpName

func (h FileHook) OpName() string

type FileOpener

type FileOpener struct {
	status.General
	// contains filtered or unexported fields
}

func NewFileOpener

func NewFileOpener(driver gxui.Driver, theme *basic.Theme) *FileOpener

func (*FileOpener) Defaults

func (f *FileOpener) Defaults() []fmt.Stringer

func (*FileOpener) Exec

func (f *FileOpener) Exec() error

func (*FileOpener) Menu

func (f *FileOpener) Menu() string

func (*FileOpener) Name

func (f *FileOpener) Name() string

func (*FileOpener) Next

func (f *FileOpener) Next() gxui.Focusable

func (*FileOpener) Reset

func (f *FileOpener) Reset()

func (*FileOpener) Start

func (f *FileOpener) Start(control gxui.Control) gxui.Control

func (*FileOpener) Store

func (f *FileOpener) Store(elem interface{}) bind.Status

type Find

type Find struct {
	mixins.LinearLayout
	// contains filtered or unexported fields
}

func NewFind

func NewFind(driver gxui.Driver, theme *basic.Theme) *Find

func (*Find) Defaults

func (f *Find) Defaults() []fmt.Stringer

func (*Find) GainedFocus

func (f *Find) GainedFocus()

func (*Find) HasFocus

func (f *Find) HasFocus() bool

func (*Find) Init

func (f *Find) Init(driver gxui.Driver, theme *basic.Theme)

func (*Find) IsFocusable

func (f *Find) IsFocusable() bool

func (*Find) KeyDown

func (f *Find) KeyDown(event gxui.KeyboardEvent)

func (*Find) KeyPress

func (f *Find) KeyPress(event gxui.KeyboardEvent) bool

func (*Find) KeyRepeat

func (f *Find) KeyRepeat(event gxui.KeyboardEvent)

func (*Find) KeyStroke

func (f *Find) KeyStroke(event gxui.KeyStrokeEvent) bool

func (*Find) KeyUp

func (f *Find) KeyUp(event gxui.KeyboardEvent)

func (*Find) LostFocus

func (f *Find) LostFocus()

func (*Find) Menu

func (f *Find) Menu() string

func (*Find) Name

func (f *Find) Name() string

func (*Find) Next

func (f *Find) Next() gxui.Focusable

func (*Find) OnGainedFocus

func (f *Find) OnGainedFocus(callback func()) gxui.EventSubscription

func (*Find) OnLostFocus

func (f *Find) OnLostFocus(callback func()) gxui.EventSubscription

func (*Find) Paint

func (f *Find) Paint(c gxui.Canvas)

func (*Find) Start

func (f *Find) Start(control gxui.Control) gxui.Control

type Focuser

type Focuser interface {
	For(...focus.Opt) bind.Bindable
}

type Fullscreen

type Fullscreen struct {
}

func (Fullscreen) Defaults

func (f Fullscreen) Defaults() []fmt.Stringer

func (Fullscreen) Exec

func (f Fullscreen) Exec(e interface{}) bind.Status

func (Fullscreen) Menu

func (f Fullscreen) Menu() string

func (Fullscreen) Name

func (f Fullscreen) Name() string

type Fullscreener

type Fullscreener interface {
	Fullscreen() bool
	SetFullscreen(bool)
}

type GotoLine

type GotoLine struct {
	status.General
	// contains filtered or unexported fields
}

func NewGotoLine

func NewGotoLine(theme gxui.Theme) *GotoLine

func (*GotoLine) Defaults

func (g *GotoLine) Defaults() []fmt.Stringer

func (*GotoLine) Exec

func (g *GotoLine) Exec() error

func (*GotoLine) Menu

func (g *GotoLine) Menu() string

func (*GotoLine) Name

func (g *GotoLine) Name() string

func (*GotoLine) Next

func (g *GotoLine) Next() gxui.Focusable

func (*GotoLine) Reset

func (g *GotoLine) Reset()

func (*GotoLine) Start

func (g *GotoLine) Start(on gxui.Control) gxui.Control

func (*GotoLine) Store

func (g *GotoLine) Store(elem interface{}) bind.Status

type LabelCreator

type LabelCreator interface {
	CreateLabel() gxui.Label
}

type LineControl

type LineControl interface {
	LineCount() int
	SetCaret(int)
}

type Locationer

type Locationer interface {
	bind.Bindable
	For(...focus.Opt) bind.Bindable
}

type Mover

type Mover interface {
	For(caret.Direction, caret.Mod) bind.Bindable
}
type NavHook struct {
	Commander command.Commander
}
func (n NavHook) FileBindables(string) []bind.Bindable
func (n NavHook) Name() string
func (n NavHook) OpName() string

type Paste

type Paste struct {
	status.General
	// contains filtered or unexported fields
}

func NewPaste

func NewPaste(driver gxui.Driver, theme gxui.Theme) *Paste

func (*Paste) Defaults

func (p *Paste) Defaults() []fmt.Stringer

func (*Paste) Exec

func (p *Paste) Exec() error

func (*Paste) Menu

func (p *Paste) Menu() string

func (*Paste) Name

func (p *Paste) Name() string

func (*Paste) Reset

func (p *Paste) Reset()

func (*Paste) Store

func (p *Paste) Store(target interface{}) bind.Status

type ProjectFinder

type ProjectFinder interface {
	CurrentEditor() text.Editor
	Project() setting.Project
}

type Projecter

type Projecter interface {
	Project() setting.Project
}

type Quit

type Quit struct {
}

func (Quit) Defaults

func (q Quit) Defaults() []fmt.Stringer

func (Quit) Exec

func (q Quit) Exec(interface{}) bind.Status

func (Quit) Menu

func (q Quit) Menu() string

func (Quit) Name

func (q Quit) Name() string

type RedrawableEditor

type RedrawableEditor interface {
	text.Editor
	Redraw()
	DataChanged(recreateControls bool)
}

type RegexFind

type RegexFind struct {
	// contains filtered or unexported fields
}

func NewRegexFind

func NewRegexFind(driver gxui.Driver, theme *basic.Theme) *RegexFind

func (*RegexFind) Defaults

func (f *RegexFind) Defaults() []fmt.Stringer

func (*RegexFind) Menu

func (f *RegexFind) Menu() string

func (*RegexFind) Name

func (f *RegexFind) Name() string

func (*RegexFind) Next

func (f *RegexFind) Next() gxui.Focusable

func (*RegexFind) Start

func (f *RegexFind) Start(control gxui.Control) gxui.Control

type Replace

type Replace struct {
	// contains filtered or unexported fields
}

func NewReplace

func NewReplace(driver gxui.Driver, theme *basic.Theme) *Replace

func (*Replace) Defaults

func (f *Replace) Defaults() []fmt.Stringer

func (*Replace) Exec

func (f *Replace) Exec() error

func (*Replace) Init

func (f *Replace) Init(driver gxui.Driver, theme *basic.Theme)

func (*Replace) Menu

func (f *Replace) Menu() string

func (*Replace) Name

func (f *Replace) Name() string

func (*Replace) Next

func (f *Replace) Next() gxui.Focusable

func (*Replace) Reset

func (c *Replace) Reset()

func (*Replace) Start

func (f *Replace) Start(control gxui.Control) gxui.Control

func (*Replace) Store

func (c *Replace) Store(target interface{}) bind.Status

type RuneScroller

type RuneScroller interface {
	ScrollToRune(int)
}

type SaveAll

type SaveAll struct{}

func NewSaveAll

func NewSaveAll(theme gxui.Theme) *SaveAll

func (*SaveAll) Defaults

func (s *SaveAll) Defaults() []fmt.Stringer

func (*SaveAll) Exec

func (s *SaveAll) Exec(target interface{}) bind.Status

func (*SaveAll) Menu

func (s *SaveAll) Menu() string

func (*SaveAll) Name

func (s *SaveAll) Name() string

type SaveCurrent

type SaveCurrent struct {
	status.General
	// contains filtered or unexported fields
}

func NewSave

func NewSave(theme LabelCreator) *SaveCurrent

func (*SaveCurrent) Bind

func (*SaveCurrent) Defaults

func (s *SaveCurrent) Defaults() []fmt.Stringer

func (*SaveCurrent) Exec

func (s *SaveCurrent) Exec() error

func (*SaveCurrent) Menu

func (s *SaveCurrent) Menu() string

func (*SaveCurrent) Name

func (s *SaveCurrent) Name() string

func (*SaveCurrent) Reset

func (s *SaveCurrent) Reset()

func (*SaveCurrent) Store

func (s *SaveCurrent) Store(target interface{}) bind.Status

type SaveEditor

type SaveEditor interface {
	text.Editor
	FlushedChanges()
	LastKnownMTime() time.Time
}

type Scroll

type Scroll struct {
	// contains filtered or unexported fields
}

func (*Scroll) Defaults

func (s *Scroll) Defaults() []fmt.Stringer

func (*Scroll) Exec

func (s *Scroll) Exec() error

func (*Scroll) Menu

func (s *Scroll) Menu() string

func (*Scroll) Name

func (s *Scroll) Name() string

func (*Scroll) Reset

func (s *Scroll) Reset()

func (*Scroll) Store

func (s *Scroll) Store(elem interface{}) bind.Status

type ScrollDeselect

type ScrollDeselect struct {
	Scroll
}

func (*ScrollDeselect) Exec

func (s *ScrollDeselect) Exec() error

type Scroller

type Scroller interface {
	LineStart(int) int
	ScrollToLine(int)
}

type SelectAll

type SelectAll struct{}

func NewSelectAll

func NewSelectAll() *SelectAll

func (*SelectAll) Defaults

func (s *SelectAll) Defaults() []fmt.Stringer

func (*SelectAll) Exec

func (s *SelectAll) Exec(target interface{}) bind.Status

func (*SelectAll) Menu

func (s *SelectAll) Menu() string

func (*SelectAll) Name

func (s *SelectAll) Name() string

type Selecter

type Selecter interface {
	SelectAll()
}

type SelectionEditor

type SelectionEditor interface {
	text.Editor
	Controller() *gxui.TextBoxController
	SelectSlice([]gxui.TextSelection)
	ScrollToRune(int)
}

type Split

type Split struct {
	// contains filtered or unexported fields
}

func NewHorizontalSplit

func NewHorizontalSplit() *Split

func NewVerticalSplit

func NewVerticalSplit() *Split

func (*Split) Defaults

func (s *Split) Defaults() []fmt.Stringer

func (*Split) Exec

func (s *Split) Exec(target interface{}) bind.Status

func (*Split) Menu

func (s *Split) Menu() string

func (*Split) Name

func (s *Split) Name() string

type Splitter

type Splitter interface {
	Split(gxui.Orientation)
}

type TabChooser

type TabChooser interface {
	EditorAt(editor.Direction) text.Editor
}

type ViewHook

type ViewHook struct{}

func (ViewHook) FileBindables

func (h ViewHook) FileBindables(string) []bind.Bindable

func (ViewHook) Name

func (h ViewHook) Name() string

func (ViewHook) OpName

func (h ViewHook) OpName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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