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
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
attila
2b3abd3ca6
MacOS: Fix TextEditor when using marked text (e.g. Korean)
2022-01-04 17:20:11 +01:00
ed
1fe8fa467b
TextEditor: Fix floating-point -> integer bounds conversion of text selection bounds
2021-11-09 15:35:52 +00:00
ed
6f8c464747
TextEditor: Fix a highlighting bug
2021-08-16 16:07:40 +01:00
ed
c3cb59d6ae
TextEditor: Avoid some potential nullptr dereferences in the Iterator class
2021-08-16 16:07:40 +01:00
ed
a5c3b81f82
Use C++14 lambda capture initialisers for initialising deletion checkers
2021-07-12 11:58:29 +01:00
ed
c559d31e90
Accessibility: Override Accessibility::getHelp() for JUCE widgets that support tooltips
2021-07-05 12:07:30 +01:00
ed
a7f33da900
Accessibility: Set caret position when passed an empty range selection in CodeEditorComponent and TextEditor AccessibilityTextInterface implementations
2021-06-11 13:48:07 +01:00
ed
8b2f3088d7
Accessibility: Added AccessibilityTextInterface::isReadOnly() method and AccessibilityRole::label to distinguish between navigable and selectable read-only text elements and simple labels
2021-06-07 19:38:29 +01:00
ed
3fd4f7a231
TextEditor: Take border size into account when calculating text bounds
2021-06-01 11:22:35 +01:00
ed
13e7ffbdfb
Accessibility: Use AccessibilityTextValueInterface for read-only text in Label, TextEditor and CodeEditorComponent
2021-05-28 14:48:59 +01:00
ed
083a5af323
TextEditor: Offset selection fill bounds by viewport position to fix bug with multi-line highlighting
2021-05-26 16:54:38 +01:00
ed
361b29edb6
Offset TextEditor::getTextBounds() by viewport position
2021-05-20 18:24:57 +01:00
ed
333983947e
Accessibility: Removed widget_handlers
2021-05-20 18:24:56 +01:00
ed
ec990202b1
Accessibility: Added VoiceOver (macOS) and Narrator (Windows) accessibility screen reader support to juce_gui_basics
2021-05-10 10:53:14 +01:00
ed
665fac678f
TextEditor: Enable horizontal scrollbars for multi-line editors with word wrapping disabled
2021-04-29 17:05:00 +01:00
ed
f5dac0780d
TextEditor: Only start new lines when shouldStartNewLine == true when splitting long atoms
2021-04-26 15:05:00 +01:00
ed
7fb45db0d2
TextEditor: Always return positive integers from getMaximumTextWidth/Height()
2021-04-26 15:03:52 +01:00
ed
b9c8a1475f
TextEditor: New line atoms should have zero width
2021-04-23 16:17:23 +01:00
ed
b644d7b675
TextEditor: Fixed a wrapping bug when right-justified
2021-04-23 16:17:23 +01:00
ed
b5bb5273c1
TextEditor: Use caret position relative to the Component top-left when calculating scroll amounts in scrollEditorToPositionCaret() and scrollToMakeSureCursorIsVisible()
2021-04-20 17:24:49 +01:00
ed
24c2953369
TextEditor: Call checkLayout() before moving caret and repainting text in remove()
2021-04-20 17:24:49 +01:00
ed
841aae5b18
TextEditor: Call scrollToMakeSureCursorIsVisible() after updating layout when undoing/redoing
2021-04-20 17:24:49 +01:00
ed
c145434adf
TextEditor: Fixed a bug causing the caret to disappear at the end of lines
2021-04-20 17:24:49 +01:00
ed
a533e86044
TextEditor: Fixed a bug updating the text holder size for single-line editors
2021-04-07 14:12:11 +01:00
ed
7c96f18663
TextEditor: Fixed a bug where the horizontal viewport scrollbar could be shown unnecessarily
2021-02-23 17:02:55 +00:00
reuk
46d24cc1ab
TextEditor: Avoid starting timer unnecessarily when setting text
2021-02-18 10:54:29 +00:00
ed
8ee13b78ba
Avoid drawing TextEditor "empty" text when it isn't visible
2020-11-16 16:10:13 +00:00
ed
56252ca098
Fixed a bug in TextEditor::setSelectAllWhenFocused()
2020-10-09 14:46:23 +01:00
reuk
c897a4f2cb
Linux: Fix some clang 10 warnings
2020-09-24 12:52:45 +01:00
ed
508d6de04e
Underline whitespace atoms in TextEditor when font is underlined
2020-08-04 10:26:41 +01:00
ed
12bff68e34
Added vertical justification support to TextEditor
2020-08-03 18:28:21 +01:00
reuk
394c4fd475
Clang: Fix warnings when building with clang 10
2020-07-01 10:00:43 +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
ed
6881795d40
Ensure that font width is correct when changing the TextEditor password character
2019-07-12 17:53:19 +01:00
Tom Poole
79d3e8b3f5
Windows: Removed some VS2013 workarounds
2019-07-11 15:28:41 +01:00
jules
9a06be6d61
Some minor cleanups
2019-06-17 15:48:56 +01:00
ed
b88d5adab7
Always call TextEditor::checkFocus() when focus is gained to ensure that the software keyboard is shown on Android when a TextEditor has content
2019-04-16 10:24:55 +01:00
ed
9715e77e0f
Only call ComponentPeer::textInputRequired() from TextEditor::checkFocus() if the focus status has changed to fix the soft input keyboard constantly re-opening on Android
2019-03-19 17:48:52 +00: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
eaf0f990d4
Replaced all uses of static_cast<Type&&> with std::move
2018-11-28 17:29:20 +00:00
jules
6fda0bffca
Fixed some stray zeros that were still being passed as null pointers
2018-10-05 12:15:04 +01:00
ed
481221a256
Cleaned up the ModifierKeys class and removed the peer-specific implementations of ModifierKeys::getCurrentModifiersRealtime() and ModifierKeys::updateCurrentModifiers()
2018-05-09 10:04:27 +01:00
Lukasz Kozakiewicz
c8b9bc79ba
AlertWindow: ensure a native keyboard is hidden when alert window gets dismissed.
2018-04-09 18:56:38 +02:00
Lukasz Kozakiewicz
4469217b3e
Android: un-focus TextEditor when keyboard is hidden from nav bar. Ensure immersive mode is properly restored. Fix TextEditor not hiding keyboard if deleted immediately after getting focus.
2018-03-02 11:48:37 +00:00