Re: Undo and the text widget

Alexander Larsson <alla lysator liu se> writes: 
> There is a gundo widget you might want to look at for ideas.
> I haven't looked at it though, so it might suck.

Will do.

> The normal way of implementing Undo/Redo is by making each "change" an
> Action. An Action is an abstract representation of the change, and can be
> applied and after it has been applied it can be unapplied.
> Then when the user runs undo you unapply all Actions since the last time
> the user started doing something. This might be done by placing
> transaction points in the undo stack, or having an group action which
> contains other actions.

OK. What I want to do is provide minimal hooks for implementing undo,
I don't want to actually implement it. So this API I'm talking about
would allow you to distinguish a single user action in order to record
it, right?

Though it won't let you see which action it is, I suppose.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]