ide

package
v0.0.0-...-0e176e7 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(elem *dom.Element, editorBuilder EditorBuilder, consoleBuilder ConsoleBuilder, taskConsoleBuilder TaskConsoleBuilder) (Window, TaskConsole)

Types

type Console

type Console interface {
	Tabber
}

type ConsoleBuilder

type ConsoleBuilder interface {
	New(elem *dom.Element, rawName, name string, args ...string) (Console, error)
}

type ConsoleWaiter

type ConsoleWaiter interface {
	Wait() error
}

type Editor

type Editor interface {
	OpenFile(path string) error
	CurrentFile() string
	ReloadFile() error
	GetCursor() int
	SetCursor(i int) error
	Titles() <-chan string
}

type EditorBuilder

type EditorBuilder interface {
	New(elem *dom.Element) Editor
}

type Tab

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

func (*Tab) Close

func (t *Tab) Close()

func (*Tab) Focus

func (t *Tab) Focus()

func (*Tab) Unfocus

func (t *Tab) Unfocus()

type TabBuilder

type TabBuilder func(id int, title, contents *dom.Element) Tabber

type TabOptions

type TabOptions struct {
	NoFocus bool // skips focusing after creating the tab
	NoClose bool // disables the close button
}

type TabPane

type TabPane struct {
	*dom.Element
	// contains filtered or unexported fields
}

func NewTabPane

func NewTabPane(newTabOptions TabOptions, makeDefaultTab TabBuilder, closedTab func(index int)) *TabPane

func (*TabPane) Close

func (p *TabPane) Close()

func (*TabPane) CloseTab

func (p *TabPane) CloseTab(index int)

func (*TabPane) Focus

func (p *TabPane) Focus(index int)

func (*TabPane) NewDefaultTab

func (p *TabPane) NewDefaultTab(options TabOptions) Tabber

func (*TabPane) NewTab

func (p *TabPane) NewTab(options TabOptions, makeTab TabBuilder) Tabber

type Tabber

type Tabber interface {
	Titles() <-chan string
}

type TaskConsole

type TaskConsole interface {
	Tabber
	Start(rawName, name string, args ...string) (context.Context, error)
}

type TaskConsoleBuilder

type TaskConsoleBuilder interface {
	New(elem *dom.Element) TaskConsole
}

type Window

type Window interface {
	NewEditor() Editor
	NewConsole() Console
}

Jump to

Keyboard shortcuts

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