On Wed, Jul 31, 2002 at 07:20:47PM +0200, Andre Poenitz wrote:

> Well, some introduction in the concept might be in order. If not, you risk
> that stuff being rejected on gut feelings like 'I don't want <map> included
> in inset/inset.h' etc.

Yes OK.

Basically we remove this horrible switch fan-in fan-out thing i.e.
localDispatch dies, in favour of methods for each lfun.

For each lfun there is a handler for it. We find the right handler to
use based upon the current "context" - for now there is a context
dervied from the locking inset, and a buffer context, and a lyxview
context. We prefer the most specific context, and we dispatch to the
function object that was registered there.

This should hopefully remove (eventually) all of the container-inset
code dealing with passing lfuns backwards and forwards between child and
parent insets.

Note LFUN_TAB is an interesting example, because we need override to
allow the containing tabular to override the text's default handler.

Eventually this will remove the total inclusion of commandtags.h, allow
more fine-grained dynamic contexts, and more

I think it's possible to do this step-by-step, as is done here, too. Of
course there are difficult cases, especially during a transition period

Note that with a class heirarchy of actions, we can inherit traits for
get_status() etc. that DTRT by default, hopefully reducing the "oops we
left this out of the switch" problem that has caused so many minor bugs

[But of course things like <map> inclusion is little things I would like
you to ignore for now ;) ]

regards
john

-- 
"The simpler it is, the harder it is." 
        - Tim Van Holder

Reply via email to