state

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 Change

type Change interface {
	Apply()
	Revert()
}

func CombinedChange

func CombinedChange(changes ...Change) Change

func FuncChange

func FuncChange(apply, revert func()) Change

type ExtendableChange

type ExtendableChange interface {
	Extend(change Change) bool
}

type History

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

func NewHistory

func NewHistory() *History

func (*History) CanRedo

func (h *History) CanRedo() bool

func (*History) CanUndo

func (h *History) CanUndo() bool

func (*History) Do

func (h *History) Do(change Change)

func (*History) LastChange

func (h *History) LastChange() Change

func (*History) Redo

func (h *History) Redo()

func (*History) Undo

func (h *History) Undo()

Jump to

Keyboard shortcuts

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