[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Protux-devel] Stuff to work on, undo??
From: |
Luciano Giordana |
Subject: |
Re: [Protux-devel] Stuff to work on, undo?? |
Date: |
Mon, 15 Sep 2003 09:39:42 -0300 |
User-agent: |
KMail/1.5 |
> as most(all?) of the (jmb) actions are processed here.
> Can we put this in a seperate class, and link it in some way with
> MustuxObject?
>
> Just an idea..
>
you are saying the essential of it. The idea of action/anti-action scheduling.
All actions will
have a anti-action counter-part, and a stack will save objects instead of
deleting them.
for example (pseudo-code)
A clip c1 is deleted. instead of "delete c1", there will be
"undo_push(c1,MustuxAction::DELETE_CLIP)"
if a undo is performed, there will be a call
MustuxObject ob = undo_pop();
MustuxAction ma = ob->get_action()
MustuxAction m2 = MustuxAction::get_anti_action(ma);
jmb_process_action(m2,ob);
it is brute code, but it can show the general idea.