1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Remove the recently added shouldReleaseFocusOnMainMenuBarAccess flag and replace with something less intrusive

This commit is contained in:
hogliux 2016-08-09 09:26:29 +01:00
parent ec9c033cdf
commit b936786f80
10 changed files with 69 additions and 46 deletions

View file

@ -88,6 +88,10 @@ public:
*/
virtual void menuCommandInvoked (MenuBarModel* menuBarModel,
const ApplicationCommandTarget::InvocationInfo& info) = 0;
/** Called when the menu bar is first activated or when the user finished interacting
with the menu bar. */
virtual void menuBarActivated (MenuBarModel* menuBarModel, bool isActive);
};
/** Registers a listener for callbacks when the menu items in this model change.
@ -126,6 +130,12 @@ public:
virtual void menuItemSelected (int menuItemID,
int topLevelMenuIndex) = 0;
/** This is called when the user starts/stops navigating the maenu bar.
@param isActive true when the user starts navigating the menu bar
*/
virtual void menuBarActivated (bool isActive);
//==============================================================================
#if JUCE_MAC || DOXYGEN
/** OSX ONLY - Sets the model that is currently being shown as the main
@ -167,7 +177,8 @@ public:
void applicationCommandListChanged() override;
/** @internal */
void handleAsyncUpdate() override;
/** @internal */
void handleMenuBarActivate (bool isActive);
private:
ApplicationCommandManager* manager;
ListenerList<Listener> listeners;