- Add AlertWindow::show() and showAsync() methods that take a MessageBoxOptions argument
- Add NativeMessageBox::show() and showAsync() methods that take a MessageBoxOptions argument
- Update the DialogsDemo to demonstrate the new methods
- Deprecate AlertWindow::showNativeDialogBox() in favour of the NativeMessageBox methods
- Pass button strings specified in MesssageBoxOptions to native dialog boxes correctly
- Use modern TaskDialog on Windows for the native dialog box where available
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.
In cases where internalClickCallback() modified the state of the button this was not being updated until the next call to updateState(). Calling it a second time after the click callback will make sure the state is up to date.
X11 cannot maximise windows that have their maximum size set. When not
using the native titlebar we now revert to setting the window bounds
without involving the X11 maximise function.
In particularly unfortunate cases, the fonts used for laying out and
drawing an AttributedString could end up differing, meaning that
incorrect glyph indices would be used during rendering. The rendered
text would end up using incorrect character symbols, making it
unreadable.
The problem seems to be:
- The AttributedString fetched a typeface during the getOrCreateFont
call in createCFAttributedString.
- Details of the typeface (its style and name) were stored into the
CFAttributedString.
- During `createLayout`, a new `Font` object was created using the
stored typeface name and style.
- When calling `getTypeface` on this new font, during rendering,
a different typeface was returned.
The fix implemented here stores the Font objects used during the
creating of the CFAttributedString, so that the fonts written to
the juce::AttributedString are guaranteed to match the fonts used
to compute the layout.
Previously, we were always adding a #version 150 directive to shaders
when the GLSL version was higher than 1.2, which could cause compilation
to fail on platforms with GLSL versions between 1.2 and 1.5.
Some plugins (Izotope Relay, some older DPF plugins) use NSTrackingAreas
to handle mouse events, but unprocessed events seemingly get passed up
to outer views. Processing these events was causing unexpected
behaviour. For example, if the cursor entered a plugin view while
dragging a JUCE window border, a mouseEnter event was be generated,
interrupting the drag.
We now check whether mouse events were generated by an NSTrackingArea
which does not belong to the JUCE view, and ignore the event in this
case.