On Wed, Jul 31, 2002 at 06:28:41PM +0100, John Levon wrote:
> 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

Fine. I just wonder whether this mechanism is not too complicated.

Each type of inset could have a class-static map<action, callback> [This
is the "one function handles one action"] 

Let's assume we have an easy way do go from a cursor or mouse click
position up the hierarchy of insets. Each inset is asked whether it want to
handle (or modify(?)) the action. If someone answer "DONE", we are done.

I would not think that we'd need more than 100 or 200 lines for that
mechanism.

> 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 ;) ]

Well... I won't in the end ;-}

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to