editor

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeEditor

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

func (*CodeEditor) Carets

func (e *CodeEditor) Carets() []int

func (*CodeEditor) CreateLine

func (e *CodeEditor) CreateLine(theme gxui.Theme, index int) (mixins.TextBoxLine, gxui.Control)

func (*CodeEditor) DataChanged

func (e *CodeEditor) DataChanged(recreate bool)

func (*CodeEditor) Elements

func (e *CodeEditor) Elements() []interface{}

func (*CodeEditor) Filepath

func (e *CodeEditor) Filepath() string

func (*CodeEditor) FlushedChanges

func (e *CodeEditor) FlushedChanges()

func (*CodeEditor) HasChanges

func (e *CodeEditor) HasChanges() bool

func (*CodeEditor) Init

func (e *CodeEditor) Init(driver gxui.Driver, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font, file, headerText string)

func (*CodeEditor) KeyPress

func (e *CodeEditor) KeyPress(event gxui.KeyboardEvent) bool

func (*CodeEditor) KeyStroke

func (e *CodeEditor) KeyStroke(event gxui.KeyStrokeEvent) (consume bool)

func (*CodeEditor) LastKnownMTime

func (e *CodeEditor) LastKnownMTime() time.Time

func (*CodeEditor) OnRename

func (e *CodeEditor) OnRename(callback func(newPath string))

func (*CodeEditor) Paint

func (e *CodeEditor) Paint(c gxui.Canvas)

func (*CodeEditor) SetCarets

func (e *CodeEditor) SetCarets(carets ...int)

func (*CodeEditor) SetSyntaxLayers

func (e *CodeEditor) SetSyntaxLayers(layers []text.SyntaxLayer)

func (*CodeEditor) SyntaxLayers

func (e *CodeEditor) SyntaxLayers() []text.SyntaxLayer

type Commander

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

type Direction

type Direction int
const (
	Up Direction = 1 + iota
	Right
	Down
	Left
)

type MultiEditor

type MultiEditor interface {
	gxui.Control
	outer.LayoutChildren
	Has(hiddenPrefix, path string) bool
	Open(hiddenPrefix, path, headerText string, environ []string) (editor text.Editor, existed bool)
	Editors() uint
	CurrentEditor() text.Editor
	CurrentFile() string
	CloseCurrentEditor() (name string, editor text.Editor)
	Add(name string, editor text.Editor)
	SaveAll()
}

type MultiProjectEditor

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

func New

func New(driver gxui.Driver, window gxui.Window, cmdr Commander, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font) *MultiProjectEditor

func (*MultiProjectEditor) CurrentEditor

func (e *MultiProjectEditor) CurrentEditor() text.Editor

func (*MultiProjectEditor) CurrentFile

func (e *MultiProjectEditor) CurrentFile() string

func (*MultiProjectEditor) CurrentProject

func (e *MultiProjectEditor) CurrentProject() setting.Project

func (*MultiProjectEditor) Elements

func (e *MultiProjectEditor) Elements() []interface{}

func (*MultiProjectEditor) Open

func (e *MultiProjectEditor) Open(file string) (ed text.Editor, existed bool)

func (*MultiProjectEditor) SetProject

func (e *MultiProjectEditor) SetProject(project setting.Project)

type Opener

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

type Orienter

type Orienter interface {
	SetOrientation(gxui.Orientation)
}

type ProjectEditor

type ProjectEditor struct {
	SplitEditor
	// contains filtered or unexported fields
}

func NewProjectEditor

func NewProjectEditor(driver gxui.Driver, window gxui.Window, cmdr Commander, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font, project setting.Project) *ProjectEditor

func (*ProjectEditor) Open

func (p *ProjectEditor) Open(path string) (e text.Editor, existed bool)

func (*ProjectEditor) Project

func (p *ProjectEditor) Project() setting.Project

type SplitEditor

type SplitEditor struct {
	mixins.SplitterLayout
	// contains filtered or unexported fields
}

func NewSplitEditor

func NewSplitEditor(driver gxui.Driver, cmdr Commander, window gxui.Window, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font) *SplitEditor

func (*SplitEditor) Add

func (e *SplitEditor) Add(name string, editor text.Editor)

func (*SplitEditor) AddChild

func (e *SplitEditor) AddChild(child gxui.Control) *gxui.Child

func (*SplitEditor) ChildIndex

func (e *SplitEditor) ChildIndex(c gxui.Control) int

func (*SplitEditor) CloseCurrentEditor

func (e *SplitEditor) CloseCurrentEditor() (name string, editor text.Editor)

func (*SplitEditor) CreateSplitterBar

func (l *SplitEditor) CreateSplitterBar() gxui.Control

func (*SplitEditor) CurrentEditor

func (e *SplitEditor) CurrentEditor() text.Editor

func (*SplitEditor) CurrentFile

func (e *SplitEditor) CurrentFile() string

func (*SplitEditor) Editors

func (e *SplitEditor) Editors() (count uint)

func (*SplitEditor) Elements

func (e *SplitEditor) Elements() []interface{}

func (*SplitEditor) Has

func (e *SplitEditor) Has(hiddenPrefix, path string) bool

func (*SplitEditor) MouseUp

func (e *SplitEditor) MouseUp(event gxui.MouseEvent)

func (*SplitEditor) NextEditor

func (e *SplitEditor) NextEditor(direction Direction) text.Editor

func (*SplitEditor) Open

func (e *SplitEditor) Open(hiddenPrefix, path, headerText string, environ []string) (editor text.Editor, existed bool)

func (*SplitEditor) ReFocus

func (e *SplitEditor) ReFocus()

func (*SplitEditor) SaveAll

func (e *SplitEditor) SaveAll()

func (*SplitEditor) SetOrientation

func (e *SplitEditor) SetOrientation(o gxui.Orientation)

func (*SplitEditor) Split

func (e *SplitEditor) Split(orientation gxui.Orientation)

type Splitter

type Splitter interface {
	Split(orientation gxui.Orientation)
}

type SplitterBar

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

func NewSplitterBar

func NewSplitterBar(viewport gxui.Viewport, theme gxui.Theme) *SplitterBar

func (*SplitterBar) MouseEnter

func (s *SplitterBar) MouseEnter(gxui.MouseEvent)

func (*SplitterBar) MouseExit

func (s *SplitterBar) MouseExit(gxui.MouseEvent)

func (*SplitterBar) SetOrientation

func (s *SplitterBar) SetOrientation(o gxui.Orientation)

type TabbedEditor

type TabbedEditor struct {
	mixins.PanelHolder
	// contains filtered or unexported fields
}

func NewTabbedEditor

func NewTabbedEditor(driver gxui.Driver, cmdr Commander, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font) *TabbedEditor

func (*TabbedEditor) Add

func (e *TabbedEditor) Add(name string, editor text.Editor)

func (*TabbedEditor) AddPanelAt

func (e *TabbedEditor) AddPanelAt(c gxui.Control, n string, i int)

func (*TabbedEditor) CloseCurrentEditor

func (e *TabbedEditor) CloseCurrentEditor() (name string, editor text.Editor)

func (*TabbedEditor) CreatePanelTab

func (e *TabbedEditor) CreatePanelTab() mixins.PanelTab

func (*TabbedEditor) CurrentEditor

func (e *TabbedEditor) CurrentEditor() text.Editor

func (*TabbedEditor) CurrentFile

func (e *TabbedEditor) CurrentFile() string

func (*TabbedEditor) EditorAt

func (e *TabbedEditor) EditorAt(d Direction) text.Editor

func (*TabbedEditor) Editors

func (e *TabbedEditor) Editors() uint

func (*TabbedEditor) Elements

func (e *TabbedEditor) Elements() []interface{}

func (*TabbedEditor) Files

func (e *TabbedEditor) Files() []string

func (*TabbedEditor) Has

func (e *TabbedEditor) Has(hiddenPrefix, path string) bool

func (*TabbedEditor) Init

func (e *TabbedEditor) Init(outer mixins.PanelHolderOuter, driver gxui.Driver, cmdr Commander, theme *basic.Theme, syntaxTheme theme.Theme, font gxui.Font)

func (*TabbedEditor) Open

func (e *TabbedEditor) Open(hiddenPrefix, path, headerText string, environ []string) (editor text.Editor, existed bool)

func (*TabbedEditor) RemovePanel

func (e *TabbedEditor) RemovePanel(panel gxui.Control)

func (*TabbedEditor) SaveAll

func (e *TabbedEditor) SaveAll()

Jump to

Keyboard shortcuts

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