workspace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor interface {
	ID() string
	Name() string

	CanSave() bool
	Save() error
}

type EditorAddedEvent

type EditorAddedEvent struct {
	Model  *Model
	Editor Editor
}

type EditorModifiedEvent

type EditorModifiedEvent struct {
	Editor Editor
}

type EditorRemovedEvent

type EditorRemovedEvent struct {
	Model  *Model
	Editor Editor
}

type EditorSelectedEvent

type EditorSelectedEvent struct {
	Model  *Model
	Editor Editor
}

type Model

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

func NewModel

func NewModel(eventBus *mvc.EventBus) *Model

func (*Model) AppendEditor

func (m *Model) AppendEditor(editor Editor)

func (*Model) EachEditor

func (m *Model) EachEditor(cb func(editor Editor))

func (*Model) Editors

func (m *Model) Editors() []Editor

func (*Model) FindEditor

func (m *Model) FindEditor(id string) Editor

func (Model) IsDirty

func (m Model) IsDirty() bool

func (*Model) RemoveEditor

func (m *Model) RemoveEditor(editor Editor)

func (*Model) SelectedEditor

func (m *Model) SelectedEditor() Editor

func (*Model) SelectedID

func (m *Model) SelectedID() string

func (*Model) SetSelectedID

func (m *Model) SetSelectedID(id string)

type NoSaveEditor

type NoSaveEditor struct{}

func (NoSaveEditor) CanSave

func (NoSaveEditor) CanSave() bool

func (NoSaveEditor) Save

func (NoSaveEditor) Save() error

Jump to

Keyboard shortcuts

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