On Wed, Jul 24, 2002 at 11:34:09AM +0200, Jean-Marc Lasgouttes wrote:

> It is not very complicated actually.

Hmm

> The main difference now is that expand only has to get called _once_
> and that it physically (and recursively) builds the whole menu tree. 

It gets called once ...

> Basically, the code for populating one item of the menubar goes like
> this:
> 
>       Menu tomenu;
>       Menu const frommenu = menubackend_->getMenu(item->submenuname());
>       menubackend_->expand(frommenu, tomenu, view->buffer());
>         create_submenu(tomenu);

... but it gets called for each item in the menubar. Eh ??

> Is that clearer now?

Not really ...

> I plan to remove toc code from menu frontend this
> evening, so that all the menuitem kinds you should have to worry about
> are Command, Submenu and Separator. Will that be simple enough?

Hopefully.

> Then of course will come the problems of when we want the TOCs to be
> updated. But this is a separate problem, to be solved at MenuBackend
> level. I'll try to do some profiling/optimization of the code, to see
> if we _really_ need to be clever there.

Of course, it can't be solved entirely at MBE level, because I have to
be able to find my current menus to clear and repopulate them. And I
don't want to have to do a full menu re-do each time !

regards
john

-- 
"Hungarian notation is the tactical nuclear weapon of source code obfuscation
techniques." 
        - Roedy Green 

Reply via email to