Ticket #632 (closed defect: fixed)
Add access to menus and make them more dynamic
| Reported by: | gharris | Owned by: | curtis |
|---|---|---|---|
| Priority: | critical | Milestone: | imagej-2.0.0-beta1 |
| Component: | ij-ui | Version: | |
| Severity: | serious | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: |
Description (last modified by curtis) (diff)
For both #441 (Implement IJ1's Window menu functionality) and #584 (Get Open Recent menu working) we need a reference to the menubar, or at least the File:Recent and Window menus.
We could add getMenus() or getMenuX() to UserInterface, but then we need gui-toolkit-independent Menu (akin to Toolbar), and perhaps a MenuManager.
Change History
comment:1 Changed 10 months ago by curtis
- Description modified (diff)
- Summary changed from Add Access to Menus to Add access to menus and make them more dynamic
comment:2 Changed 10 months ago by curtis
- Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12
comment:4 Changed 10 months ago by curtis
- Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5
Milestone biweekly-2011: Aug-01 to Aug-12 deleted
comment:5 Changed 10 months ago by gharris
Curious... On Windows, at least, after opening an image, the menubar stops responding to mouse clicks. Alt-F opens the File menu, then I can use the mouse to select something. And when the menubar (inappropriately) appears in the Display window, the mouse clicks work on it... But not in the ImageJ App. window.
That said, the Open Recent dynamic menu works... Cool! I'll look at the code.
comment:6 Changed 10 months ago by curtis
Initial support for dynamic menus was added in r3642, and earlier commits which developed the MenuService.
There is still one big bug, which is that multiple menu bars are not kept synced. That is, the main ImageJ application menu bar updates, but other copies added to individual image windows are not.

Fortunately, we have a GUI toolkit independent menu called ShadowMenu. It consists of menu entries for all available modules from the ModuleService (which includes plugins, scripts, etc.). By updating this to be kept in better sync with the UI's toolbar, it will become possible to add and remove modules from the ModuleService and see the menus update themselves accordingly. We can also provide a getter for accessing the ShadowMenu directly if desired (though this may be discouraged).