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

80 commits

Author SHA1 Message Date
reuk
9cfbccca8e
Accessibility: Make createAccessibilityHandler public to allow calls from derived classes 2023-02-09 17:54:18 +00:00
reuk
06798ab897
TextInputTarget: Add password keyboard type 2022-12-07 13:12:02 +00:00
reuk
dc8bc918d2
TextEditor: Fix bug where text could be pasted twice from the popup menu
This bug was introduced in 140f8fedb1
2022-09-29 12:05:43 +01:00
reuk
5cf1a964fc
iOS: Add proper UITextInput implementation
This provides an improved user experience, allowing cursor movement
directly from the keyboard.
2022-07-29 18:54:50 +01:00
reuk
1c10e0c79b
Android: Fix problems with accessible text navigation
Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.

Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.

Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
2022-06-13 15:29:57 +01: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
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
ed
90eb878d16 Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
ed
3fd4f7a231 TextEditor: Take border size into account when calculating text bounds 2021-06-01 11:22:35 +01:00
ed
361b29edb6 Offset TextEditor::getTextBounds() by viewport position 2021-05-20 18:24:57 +01:00
ed
533f68219b Fixed some Doxygen issues 2021-05-11 11:48:52 +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
7c96f18663 TextEditor: Fixed a bug where the horizontal viewport scrollbar could be shown unnecessarily 2021-02-23 17:02:55 +00: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
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
9a06be6d61 Some minor cleanups 2019-06-17 15:48:56 +01:00
ed
c6502e2a83 Added a TextEditor::getTextToShowWhenEmpty() method 2019-04-29 14:21:47 +01:00
ed
a234721110 Added various clang-tidy modernize-* fixes 2019-01-31 15:15:31 +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
Tom Poole
ab863a6dc2 Replaced all usage of ScopedPointer with std::unique_ptr 2018-04-19 20:27:47 +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
ed
cdbc28c18b Add documentation tags 2018-03-15 12:10:32 +00:00
jules
80a7718286 Added some event lambda callbacks for TextEditor and simplified a bit more code using them 2018-01-03 16:34:11 +00:00
jules
a7e3339f86 Got rid of some very old legacy VC6 workaround typedefs 2018-01-03 09:25:19 +00:00
jules
d73f9bdd74 Fix to TextEditor caret positioning 2017-10-13 10:41:21 +01:00
jules
dd4230586f Noticed that we still had some template whitespace workarounds for older compilers, so tidied them up 2017-10-11 12:26:05 +01:00
jules
d00a459480 Added method TextEditor::setJustification() 2017-09-22 14:37:13 +01:00
jules
6290e95152 Whitespace 2017-09-21 19:49:18 +01:00
jules
c309a5b244 Avoided forcing TextEditor to be always opaque 2017-09-21 19:48:19 +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
ed
919e3e36ec Added TextEditor::applyColourToAllText() method 2017-06-02 11:39:02 +01:00
hogliux
b5afccc37c Updated file headers and the README with the JUCE 5 license 2017-04-27 14:43:04 +01:00
jules
d6bf2e8cf9 Added line spacing to TextEditor and methods to set/get the current line spacing 2017-03-10 17:07:34 +00:00
hogliux
2da1bc5f41 Replace include guards with "#pragma once" 2017-02-01 17:18:07 +00:00
tpoole
255dc1d1ba Fixed documentation typo 2016-10-19 15:49:03 +01:00
hogliux
62ac568b77 Made sure that colours are updated when the look and feel of a TextEditor changes 2016-10-16 12:50:42 +02:00
luigisambuy
ed0c032a01 Added a styleChanged flag to enable setText() to take effect after setColor() 2016-09-05 11:50:18 +01:00
jules
fcf1683f48 Moved a method in LengthAndCharacterRestriction to be public. 2016-01-12 15:20:34 +00:00
Joshua Gerrard
854e8af44a Documentation: changed insertText to insertTextAtCaret 2015-12-03 13:54:03 +00:00
jules
f8b5da8b1e Minor fixes + cleanups to TextEditor. 2015-09-30 14:31:31 +01:00
jules
7edb1b5614 Cleaned up some caret code in TextEditor. 2015-09-24 16:32:38 -07:00
hogliux
c7b8e77031 Update copyright notice 2015-07-22 15:59:34 +01:00
jules
db4a0ffec5 Added method UndoManager::getCurrentTransactionName 2015-05-14 15:29:27 +01:00
jules
395cf7ac46 Added a small comment to TextEditor 2015-05-13 10:28:16 +01:00
jules
ac8bc1a7b4 Added methods to Label and TextEditor to specify the type of virtual keyboard they require. 2015-01-07 12:03:02 +00:00