On Mon, Oct 01, 2007 at 12:18:01PM +0200, Jean-Marc Lasgouttes wrote:
> Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> 
> >> why not use signals: if a tabular gets focucs it sends an enabled
> >> signal to the associated actions, and a disabled signal when it
> >> looses focus?
> >
> > That would be the best solution but we would need an "LFUN manager" that
> > will receive the different signals and properly enable/disable the
> > associated LFUN. That could be LyXFunc of course :-)
> 
> I think this means that many places of the code have to be aware of
> what lfuns exist. For example move-paragraph-up is disabled at the top
> of the document. Does it mean that every time the cursor is moved, one
> has to emit a 'i am at the top of the document' signal?

No, at every cursor move every action is asked to check whether it
should change it's activation state. This could be done by, say a 
signal passing a reference to a vector<> indexed by lfun and each
connected actions setting a bit or two in there.

> Are we going to declare a new signal for each and every situation that
> might be relevant to some lfun?

No.

Andre'

Reply via email to