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

315 commits

Author SHA1 Message Date
Anthony Nicholls
ba50a35364 Widgets: stop calling repaint in lookAndFeelChanged()
- A repaint will always occur from a lookAndFeelChanged
2023-03-22 14:59:15 +00:00
Anthony Nicholls
cff722a4af GUI Basics: Refactor juce_gui_basics file structure
- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
2023-03-16 08:53:12 +00:00
reuk
3816b095a8
MessageBoxOptions: DRY implementation 2023-02-22 21:02:41 +00:00
reuk
882c2aa01d
AlertWindow: Allow parent component to be specified 2023-02-22 21:00:17 +00:00
reuk
39a731de46
ScopedMessageBox: Replace old AlertWindow uses with new API 2023-02-22 21:00:17 +00:00
reuk
79ed81c24a
ScopedMessageBox: Add new helper type to bound alert window lifetimes
The biggest new feature in this commit is the addition of
NativeMessageBox::scopedAsync and AlertWindow::scopedAsync, both of
which return an instance of ScopedMessageBox that will hide the message
box in its destructor.

The code for displaying modal dialogs on Windows has also been updated.
Now, the dialog itself is run from a new thread with its own message
loop. This means that when the dialog is dismissed, the background
thread can be joined safely. In plugins, this means that there's no
danger of the plugin view being destroyed from within the message box
runloop, for example.
2023-02-22 21:00:08 +00:00
reuk
9cfbccca8e
Accessibility: Make createAccessibilityHandler public to allow calls from derived classes 2023-02-09 17:54:18 +00:00
reuk
0033e52179
VBlankAttachment: Make isEmpty const 2023-02-06 10:21:37 +00:00
Tom Poole
e669fb117e Docs: Fix some Doxygen warnings 2022-12-22 14:00:38 +00:00
reuk
da38c1ed2a
TextInputTarget: Improve IME support on Android 2022-12-07 13:12:02 +00:00
reuk
28f2157912
Convert ignoreUnused to [[maybe_unused]] 2022-12-01 11:41:50 +00:00
chroma
d3cff375be Thread: Introduce a new Thread backend
This is a breaking change - see BREAKING-CHANGES.txt
2022-10-18 11:49:47 +01:00
attila
1da9ccd36c Make it possible to attach Component updates to vblank events 2022-10-17 12:32:55 +02:00
attila
d15e152da5 Fix TopLevelWindow::centreAroundComponent 2022-09-22 18:18:59 +02:00
reuk
8b8ae10059
Build: Replace JUCE_NODISCARD with [[nodiscard]] 2022-09-12 16:14:57 +01:00
attila
29447dd7f3 DefaultDialogWindow: Avoid bad positioning on Linux
This change avoids a situation where a standalone plugin's Audio/Midi
settings window could appear in a wrong position.
2022-07-19 14:30:14 +02:00
reuk
140f8fedb1
TextEditor: Add option to dismiss the virtual keyboard on touches outside
Previously, individual components had to ask the peer to hide and show
the keyboard, by calling textInputRequired() and
dismissPendingTextInput() respectively. When an onscreen keyboard (OSK)
was required, most Peer implementation would directly hide/show the OSK
inside these function. However, the iOS ComponentPeer implementation
instead listened to the application's global keyboard focus, and only
opened the OSK when the focused component was also a TextInputTarget
with active input.

The iOS scheme seems like a better design, as it enforces that the OSK
hiding and showing is synced with the keyboard focus of the application.
In the other implementations, it was possible for a Component to call
textInputRequired even when it didn't have the keyboard focus, putting
the application into an inconsistent state. The iOS scheme also makes
the TextInputTarget interface more useful, as it enforces that the OSK
will only display for components that implement TextInputTarget, and
return true from isTextInputActive().

This patch changes all Peer implementations to match the iOS
implementation, improving consistency. Each time the global keyboard
focus changes, refreshTextInputTarget is called automatically, and the
OSK is shown if the focused component is a TextInputTarget that returns
true from isTextInputActive, and hidden otherwise. Components can also
call refreshTextInputTarget manually. This should be done whenever the
component updates the return value of isTextInputActive(). Effectively,
the Peer is now responsible for keeping track of the focused
TextInputTarget, rather than allowing individual components to hide and
show the OSK at will.

Additionally, this patch adds an option to the TextEditor to
automatically dismiss the OSK when the mouse is clicked outside of the
editor. This should improve user experience on mobile platforms, where
touches on sibling components may cause a TextEditor to gain keyboard
focus and unnecessarily display the OSK.
2022-06-09 16:55:19 +01:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
attila
627afffeb4 Android: Fix dismissing screen keyboard when interacting with TextEditor 2022-04-27 18:49:44 +02:00
reuk
858aab823a
ComponentBoundsConstrainer: Properly constrain secondary windows in plugins 2022-04-22 14:18:50 +01:00
Tom Poole
89a67ec556 macOS/iOS: Enable asynchronous Core Graphics rendering by default
The helper function setComponentAsyncLayerBackedViewDisabled has been replaced
by a windowRequiresSynchronousCoreGraphicsRendering ComponentPeer style flag.
2022-04-04 12:36:32 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
Tom Poole
165d8b0ecd macOS: Make the behaviour of ComponentPeer::grabFocus match the other platforms
This partially reverts f43784dc: "macOS:  Propagate focus loss message when resigning key window status and only grab focus if window can become the key window"
2022-03-17 21:52:33 +00:00
reuk
eb8a419ac7
TooltipWindow: Avoid potential use-after-free of lastComponentUnderMouse
Showing the tip will in turn call getDesktopScaleFactor(), accessing the
lastComponentUnderMouse. In some cases, it was possible for
lastComponentUnderMouse to point to a deleted component, resulting in
UB.

There are two changes in this PR:
- Using a SafePointer rather than a raw pointer ensures that calls to
  getDesktopScaleFactor() will always be safe, regardless of when they
  happen.
- Moving the assignment of lastComponentUnderMouse to before the call to
  displayTipInternal() ensures that the returned scale factor is that of
  the component that the mouse is currently hovering.
2022-02-18 16:43:26 +00:00
attila
4cf036bb8b ComponentPeer: Add documentation for OptionalBorderSize 2022-02-07 12:39:51 +01:00
attila
6575d24a81 ComponentPeer: Deprecate getFrameSize() 2022-02-03 21:46:36 +01:00
attila
a7811661c5 Linux: Fix restoreWindowFromStateString() when the peer already exists 2022-02-02 19:53:31 +01:00
reuk
53f8650ba3
DocumentWindow: Update documentation 2022-01-27 18:43:21 +00:00
reuk
b80927fc91
Nodiscard: Add to builder-pattern functions 2022-01-27 18:43:21 +00:00
Tom Poole
c072b1bc8e Fix some typos 2022-01-25 11:48:46 +00:00
ed
461192b355 Add FocusOutline class for indicating Component keyboard focus 2022-01-20 15:46:53 +00:00
reuk
05676c862a
UIViewComponentPeer: Allow setting an app style, to ensure the status bar can be seen over the app background 2022-01-10 22:15:20 +00:00
ed
81df4560dd Tooltip: Fix bug where tip would not be updated for new components 2021-11-30 17:07:31 +00:00
reuk
d0590b5fc5
ComponentPeer: Add facility for displaying document save state in the titlebar 2021-11-25 11:42:39 +00:00
ed
b4bc2c8710 Tooltip: Show manually shown tips until a dismissal mouse event occurs 2021-11-23 12:22:25 +00:00
ed
d49d203974 Tooltip: Ignore dismissal mouse events when tooltip window is not showing 2021-11-10 09:30:13 +00:00
ed
057b555f08 Tooltip: Track mouse clicks using global Desktop mouse listener callbacks to fix bug with Timer callbacks missing events 2021-11-09 09:36:58 +00:00
ed
903657b0b8 Tooltip: Prevent tip from being immediately dismissed when shown from TooltipWindow::displayTip() 2021-11-09 09:36:58 +00:00
ed
274ce967e4 AlertWindow: Prevent accessible label component from intercepting mouse clicks 2021-11-02 12:35:36 +00:00
ed
49db3ce12e AlertWindow: Make accessible label component colours fully transparent to prevent it from drawing over custom L&Fs 2021-11-02 12:19:56 +00:00
ed
bc64c30df6 Accessibility: Use more specific AccessibilityRole::dialogWindow for CallOutBox 2021-10-08 17:19:03 +01:00
ed
b9542ccc4c Update code to use C++14 [[deprecated]] attribute
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
2021-09-29 16:14:00 +01:00
ed
8d75a7a400 Fix auxiliary desktop windows scaling and centring when Desktop::globalScaleFactor != 1.0 2021-09-29 11:46:24 +01:00
reuk
9360c3f4ff
Windows: Fix issue where minimising a window could overwrite the last "normal" window bounds
Previously, the following series of steps would leave the window at
full-size on Windows:

- Open a JUCE Window
- Maximise it
- Minimise it
- Click the maximise button

The expected behaviour is that the window should return to its initial
size and position, but instead the window still fills the screen.

This issue wasn't present on Ubuntu/Unity because minimising does not
invoke ComponentPeer::handleMovedOrResized on that platform. It was not
present on macOS because the system is responsible for restoring the
previous window size on that platform.
2021-09-28 11:31:49 +01:00
reuk
10a26b7584
TooltipWindow: Avoid re-showing a tooltip if the mouse has not moved since it was last clicked
This behaviour more closely mirrors the behaviour of other applications.
2021-09-27 15:46:28 +01:00
reuk
9199fa3c51
Warnings: Avoid triggering missing-prototypes warnings on macOS/iOS 2021-09-23 10:28:47 +01:00
Tom Poole
f1fecfdc88 Add some missing Doxygen tags 2021-09-20 11:36:56 +01:00
ed
90eb878d16 Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
ed
8d6ba3b54e Accessibility: Use AccessibilityRole::ignored for UI elements that should not be accessible to screen readers but have accessible children 2021-09-07 11:23:17 +01:00
ed
f5eee033ba NativeMessageBox: Return correctly mapped value when shown modally 2021-09-02 08:35:14 +01:00