In order to reduce code replication in menu frontends, I just thought
we could move to MenuBackend the code which deals with special entries
(at least lastfiles, documents, export, view, update). The idea is to
have a new function MenuBackend::getExpandedMenu(), which is used by
the frontend instead of MenuBackend::getMenu(). This function would
create a copy of the menu, where all the special entries would be
replaced with the corresponding plain menu items. This means that all
special handling of the said special entries could be removed from
frontends.

I am not sure at this point how to do that with refs and toc, which
use also submenus... 

A cleaner version would be to define a smart iterator on Menu, but as
I already said, I don't know how to do that.

So, do the people who had to work on frontends menus think it is a
good idea? Would it cause problems wrt tearable menus?

JMarc

Reply via email to