Issue 96641 - [RFE] support css.frame.PopupMenuController for root PopupMenus in MenuBars
Summary: [RFE] support css.frame.PopupMenuController for root PopupMenus in MenuBars
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-27 03:30 UTC by Ariel Constenla-Haile
Modified: 2013-01-29 21:40 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2008-11-27 03:30:26 UTC
Currently, css.frame.PopupMenuControllers are not supported for *root*
PopupMenus (== a PopupMenu that is activated when a MenuBar item is selected).

There may be several scenarios where an extensions developer wants to fill his
own root menu at runtime (and this will be more easy and give him more
customization than just adding a new menu in the Addons.xcu and then
disabling/removing items at runtime).

There is an API way of achieving something similar: The css.awt.MenuBar is
accessible as a property of the UIElement (not null when it is a MenuBar, of
course) returned by XLayoutManager.getElement().

But this way implies accessing OOo menu bar, what in general is dangerous; and
it is much more work than a PopupMenuController: one has to access the MenuBar
via the LayoutManager, create a new MenuBar item, and add the root PopupMenu to
the MenuBar.
This PopupMenu is transient, as the LayoutManager destroys and
recreates the MenuBar under certain circumstances, so one has to listen
to frame actions and recreate the MenuBar item added...

In conclusion, a css.frame.PopupMenuController is easier and safer.
This feature should be available for both add-on root PopupMenu and Office
MenuBar merging.