Skip to content

package memento

import "kaiju/editor/memento"

Types

History

struct

type History struct {
    // Has unexported fields.
}

NewHistory

func NewHistory(limit int) History

History.Add

func (h *History) Add(m Memento)

History.Clear

func (h *History) Clear()

History.Redo

func (h *History) Redo()

History.Undo

func (h *History) Undo()

Memento

interface

type Memento interface {
    Redo()   // Called to redo the action
    Undo()   // Called to undo the action
    Delete() // Called when the undo state is overridden by new undo data
    Exit()   // Called when the undo state falls off the history list
}