Re: undo/redo




Seth Alves <alves@Hungry.COM> writes:

> Federico Mena:
> >>  Hello.  Is there any interest in a general undo/redo mechanism being
> >>  in the gnome libraries?  Does anyone know of a nice interface for
> >>  this, or existing GPLed implementations (in C)?
> >Wouldn't that just be a stack?  Or can the mechanism be generalized to
> >be useful to different types of applications?
> 
> If it held on to generic data (void * and size), I think it could be
> useful to a variety of programs.  I was intrigued by the comments
> about the undo/redo code saving the undo information to disk as a
> method for crash recovery.

As soon as you say "crash recovery" - I think transactions - which
takes us to the CORBAServices transaction service.

I wonder if the OMG has any other standards or proposals for doing
"Undo" sort of stuff?

Here's the dream system:

 - every user action/event is "recordable", some are reverseable (some
   aren't)
 - there'd be a nice little Gtk "recorder" widget you could use to
   record macros
 - you can dump the macros out to a scripting language, and edit them
 - there would be a way of viewing the previous transactions, and undoing
   them
 - you could selectively undo stuff deeper in the undo stack (skipping
   over the stuff at the top)
 - you could set "checkpoints" - and even name them.  You would be able
   to revert to a checkpoint.
 - you could clear the undo stack before a certain point (I wish the Gimp
   could do this - maybe it can - the Undo stack gets rather huge)

I've used some applications that come close to achieving this.  But it
would be cool to see it implemented in a consistent, system-wide
manner.

Both the Gimp and Emacs do similar stuff (always steal code if possible).

Cheers,

 - Jim


PGP signature



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