Re: Generic undo stack for GTK+



On Mo, 21.06.2010 16:29, Tristan Van Berkom wrote:

>What happens when you have multiple buffers editing separate
>but interdependent project data ? Is the new code introduced
>to be so complex that it will handle the interleaving of commands
>on separate datasets into a single stack ?

No, I don't think it should be overly complex. It would be a neat start
if GtkTextView/GtkTextBuffer would support the same level of undo/redo
functionality that people are enjoying in third-party widgets for
quite a while now (most famously GtkSourceView).

If people need something more complex / more specific, they have to
build it on their own. Kind of like it works for most classes, doesn't
it?

>How does this approach help you design an overall clean
>separation between your model, display and command code ?

It is just an undo stack. A container. Not more, not less. It does
neither impose nor solve design issues of the application.

> a.) why should undo/redo be buffer centric instead of document centric or
>      session centric ?

That's application specific. Some applications could want a stack per
document, some per window, some per application.

Holger


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