1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00
Commit graph

91 commits

Author SHA1 Message Date
reuk
41ef5b7fd5
macOS: Remove macOS 10.14 preprocessor checks
The current minimum-supported Xcode (10.1) includes the macOS 10.14.1
SDK, so APIs from macOS 10.14 will always be available.
2022-08-04 22:51:17 +01:00
reuk
7545fbcf3e
macOS: Remove macOS 10.13 preprocessor checks
The current minimum-supported Xcode (10.1) includes the macOS 10.14.1
SDK, so APIs from macOS 10.13 will always be available.
2022-08-04 22:51:17 +01:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
81fa777ff7
ObjC Helpers: Automatically derive appropriate signature for function 2021-11-24 11:51:11 +00:00
reuk
c1cd432703
Mac Menu: Avoid errant beeps when triggering menu items 2021-10-06 16:59:06 +01:00
ed
a435026b24 macOS: Use available keyword instead of preprocessor version checks where possible 2021-09-29 16:13:48 +01:00
reuk
836b6edbce
Mac MainMenu: Allow main menu items to be disabled 2021-09-28 11:31:48 +01:00
reuk
85226c33d4
Mac MainMenu: Allow commands without modifiers to be passed to peer
Ideally, we want to pass shortcut keys to the component to handle, and
only fall back to invoking a menu item if the component was unable to
handle the keyboard event, or if the action was triggered by
clicking/selecting an item in the menu itself. The old implementation
tried to work out whether the action was triggered by a shortcut by
checking the event's characters and modifiers. This method was
inaccurate, because some shortcuts (such as arrow keys) may add
unexpected numpad/function modifier flags.

We now try handling shortcut keys directly in the peer, and pass events
up to the superclass (which will forward them to the main menu) if the
event could not be handled.

This commit also adjusts some Objective-C method signatures to use the
correct string encoding for the BOOL type.
2021-07-14 14:49:05 +01:00
reuk
1e606ddb32
MainMenu: Allow components to directly handle shortcut keys which trigger menu items
This fixes a regression introduced by
6e9261ea66 which meant that components
were not given a chance to respond to shortcut keypresses if those same
keypresses were registered for a menu item. This resulted in behaviour
where shortcuts such as 'cmd+c' would not be passed to a focused
TextEditor if a different command with the same shortcut was registered
in the main menu.

With this change in place, we now check whether the menu item's shortcut
keys match the current event's pressed keys. If the keypresses match, we
can assume that the event was triggered by the keyboard, and dispatch
the keypresses to the ComponentPeer. If the keypresses do not match,
then the menu item was likely selected using space/return, or by
clicking, in which case the event is dispatched directly to the
ApplicationCommandManager.
2021-04-20 17:21:08 +01:00
ed
088e100c1f Narrowed the scoped of some undeclared Objective-C selector warnings 2020-12-10 12:48:42 +00:00
reuk
fdf09a6dde FileChooser: Ensure that macOS preview component always receives user events
Previously, when a file dialog was launched synchronously, the 'dummy' modal
component was preventing user input events from reaching the preview component.

Now, we explicitly allow input events to reach the file preview component, if
it exists.
2020-10-20 10:16:13 +01:00
ed
6e9261ea66 macOS: Don't pass native menu key events to currently focused Component 2020-07-10 18:47:06 +01:00
ed
009d685179 Updated all license headers 2020-06-29 08:30:22 +01:00
Tom Poole
894e7d2bd2 Updated all license headers 2020-04-23 17:30:39 +01:00
reuk
327f817b9b Copyrights: Update commercial/gpl headers to be gpl-only 2020-04-09 15:22:56 +01:00
jules
cce26202ab Fix for using menu action lambdas in the Mac menu bar 2019-06-20 10:13:59 +01:00
ed
b0934f896c macOS: Prevent mac menu bar submenus with empty names being used as the recent items menu 2019-06-18 16:03:16 +01:00
Tom Poole
7c45ad695c MacOS: Better support for SystemTrayIconComponent on Mojave 2019-04-25 12:54:54 +01:00
Tom Poole
3c0ccda6a5 macOS: Cleaned up old 10.6 support ifdefs 2019-04-05 10:05:21 +01:00
jules
cadac817c6 Enabled some more warning flags in Xcode, and fixed the problems they caused 2019-01-11 09:52:10 +00:00
ed
acd3c0b8ee Fixed some Objective-C id -> auto* conversion warnings 2018-10-24 16:20:45 +01:00
jules
87042769b6 Tidied up some more old typedefs 2018-05-11 14:44:51 +01:00
Tom Poole
ab863a6dc2 Replaced all usage of ScopedPointer with std::unique_ptr 2018-04-19 20:27:47 +01:00
hogliux
5b0b97473c macOS: Fixed a bug which would prevent a SystemTrayIconComponent from creating a native popup window 2018-03-29 10:45:09 +01:00
hogliux
506425fdbe macOS: Fixed an issue where the native file chooser's Edit menu would not be deleted after it completed 2018-02-07 10:00:23 +00:00
jules
1a60fa9765 More ScopedPointer/unique_ptr compatibility work 2018-01-10 17:35:08 +00:00
jules
48a5fbd333 Another batch of ScopedPointer cleanups 2018-01-10 14:49:57 +00:00
jules
4fcedf7be5 Standardised some lambda syntax 2018-01-08 10:28:41 +00:00
jules
58a99ff139 Dragged the singleton macros into the 21st century.. Cleaned up their implementation and gave them new upper-case names to match juce official style. The old names are still defined to avoid breaking old code, but please update before they get deprecated! 2017-12-12 16:24:40 +00:00
jules
2fcb8fa71b Added some prototype function definitions to avoid compiler warnings for people who enable the "missing prototype" flag 2017-10-09 15:39:22 +01:00
hogliux
e0b0920819 macOS: Fixed an issue where the CustomCallback of a menu item would not be called if the menu item belongs to a native macOS menu 2017-09-29 18:14:02 +01:00
hogliux
6ae99f4343 macOS: Fixed a memory leak of native mac menu items 2017-09-29 18:13:24 +01:00
jules
eda613c6db Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools 2017-09-08 08:59:55 +01:00
hogliux
51311ce8f7 macOS: Fixed an issue where the menuIndex was shifted by one when using the native macOS menu bar 2017-08-17 11:17:53 +01:00
jules
01e18b1c23 Fixed a problem with the Mac main menu bar showing menus in the wrong position 2017-05-24 14:37:30 +01:00
hogliux
b5afccc37c Updated file headers and the README with the JUCE 5 license 2017-04-27 14:43:04 +01:00
jules
81bc630ba1 Avoided a spurious assertion when launching OSX file dialogs 2017-04-04 11:19:07 +01:00
jules
fc844d949c Refactored the way OSX main menu updating happens, to avoid some issues when refreshing the whole menu bar 2017-03-27 15:38:02 +01:00
jules
eb07aaf1ed Added some TRANS macros to some internal OSX menu item strings 2016-12-30 11:38:03 +00:00
tpoole
8e7ed3ae7d Fixed MacOS 10.12 deprecations 2016-12-02 11:37:52 +00:00
jules
9fa0d49be7 Added an option JUCE_ALLOW_STATIC_NULL_VARIABLES that can be used to turn off dangerous statics like String::empty, var::null, etc. 2016-09-16 12:03:02 +01:00
jules
a46191ad97 Native OSX menu bar: avoided some duplicated menu bar flashes when invoking commands, and some incorrect tagging of items in the menu 2016-08-17 16:19:48 +01:00
hogliux
b936786f80 Remove the recently added shouldReleaseFocusOnMainMenuBarAccess flag and replace with something less intrusive 2016-08-09 09:26:29 +01:00
hogliux
17a07a0057 Add a flag to release the focus of a component when the user accesses the main menu bar on mac 2016-08-04 12:08:43 +01:00
jules
e5fd6d6e01 Simplification/refactoring of the PopupMenu class by adding a subclass PopupMenu::Item which holds all the info about an item. You can now use this for more control over adding items and the PopupMenu::MenuItemIterator uses it to return info about existing items. 2016-03-02 18:04:48 +00:00
jules
02492b36b9 Lots of small whitespace tweaks. 2015-12-13 19:32:05 +00:00
jules
31381c6864 Stripped out some defunct OSX 10.4 fallback code 2015-12-01 12:48:01 +00:00
jules
9178fe9a1a Some minor refactoring inside OSX MainMenu code. 2015-07-28 12:52:29 +01:00
Joshua Gerrard
d41d0dfc0d Fixed issue in JuceMainMenuHandler where menuItemsChanged would do nothing if the menu was open at the time of the call. 2015-07-27 09:35:38 +01:00