Package limn.backend.spi
Interface SystemMenuBar
public interface SystemMenuBar
The menu bar a system keeps outside the windows, one for the application, as a backend offers
it to the toolkit. A backend on a system with none offers none:
BackendPeer.systemMenuBar() answers null.
Each window contributes at most one bar. Which one the system shows is the backend's to decide from the window the user is working in; a window with none shows the application's menu and little else.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanattach(NativeWindow window, MenuBarHost host) A window's bar asks for the system's.voidchanged(MenuBarHost host) What the bar shows without being opened, its titles, may have changed.voiddetach(NativeWindow window, MenuBarHost host) The bar left its window, or asked to be drawn in it.booleanholds(NativeWindow window, MenuBarHost host) booleanWhether the system runs an accelerator of a bar it holds.
-
Method Details
-
attach
A window's bar asks for the system's.- Returns:
- whether it was taken;
falsewhen the window already contributes another, which then stays in the window
-
detach
The bar left its window, or asked to be drawn in it. Unknown pairs are ignored. -
holds
- Returns:
- whether the system's bar holds this bar now. A bar that was taken is not held
while its window is fullscreen in a way that covers the system's bar;
MenuBarHost.heldChanged()says when the answer changes
-
changed
What the bar shows without being opened, its titles, may have changed. -
runs
Whether the system runs an accelerator of a bar it holds. What it does not run is the toolkit's to run, the focused widget first.- Parameters:
key- the key's name with no modifier, asMenuRow.shortcutKey()modifiers- theKeysmodifier bits
-