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

523 commits

Author SHA1 Message Date
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
921d86e586
Accessibility: Improve table navigation, row/column index/header reporting 2022-07-29 18:54:50 +01:00
reuk
dd92f66387
Accessibility: Correctly report number of disclosed rows in TreeView on macOS 2022-07-29 18:54:10 +01:00
reuk
707767fa4c
Accessibility: Multiple table fixes
- Fixes an off-by-one error when navigating by rows, caused by treating
  the table header as a row. The table header now has the header
  accessibility role.
- Fixes a bug where reordering table columns would cause the table to
  become inaccessible.
- Fixes a bug where the screen reader would try to navigate hidden table
  columns.
- Fixes an issue where moving the VoiceOver cursor to a partially hidden
  cell would cause the focus to move to the table itself, rather than to
  the cell.
2022-07-29 18:54:09 +01:00
Tom Poole
4f884c8a54 TextEditor: Call repaint on clear 2022-07-11 13:18:59 +01:00
Tom Poole
2eee1c1bd9 Slider: Respect setNumDecimalPlaces after setRange 2022-07-11 13:18:59 +01:00
Tom Poole
975bdecae5 Remove some debug logging 2022-07-05 17:22:34 +01:00
Tom Poole
3ab2ef5924 DemoRunner: Fix a crash in MidiDemo 2022-07-05 15:24:33 +01:00
reuk
6265f86d33 Accessibility: Add missing accessibility handler in TreeView Item 2022-06-24 18:37:27 +01:00
reuk
53484db875
Accessibility: Avoid allowing TextEditor and Viewport internal components to be accessibility-focused
The TextHolderComponent and Viewport::componentHolder don't have any
accessible semantics, so they shouldn't be included in the accessible
component hierarchy.
2022-06-13 15:29:57 +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
2b1745272e
Android: Fix a couple of accessibility-related crashes
These crashes could be seen in the DemoRunner when selecting items in
nested PopupMenu windows.
2022-06-13 15:29:56 +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
attila
7c66dc8e15 Slider: Add keyboard control even without accessibility 2022-06-09 16:24:00 +02:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
reuk
acefc92f88 TableListBox: Avoid calling virtual functions in constructor 2022-05-13 09:44:33 +01:00
reuk
81ae759298
TableHeaderComponent: Use high-resolution image when header is dragged 2022-05-04 20:04:14 +01:00
reuk
a1e72b70df
TableListBox: Fix spurious ListBox assertions 2022-04-28 11:05:39 +01:00
attila
627afffeb4 Android: Fix dismissing screen keyboard when interacting with TextEditor 2022-04-27 18:49:44 +02:00
reuk
e02561c958
ListBox: Add checks to ensure that the ListBoxModel remains valid 2022-04-25 17:03:29 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
eb58b471c7
Toolbar: Add accessible name for custom popup menu item 2022-02-23 10:56:10 +00:00
reuk
6d404236e2
Toolbar: Fix missing-items button when LookAndFeel changes after construction of toolbar
Previously, setting a new look and feel would create a new missing-items
button, but would not add it to the toolbar or set the onClick callback.
2022-02-23 10:56:09 +00:00
Attila Szarvas
101a886821 MouseInputSource: Eliminate superfluous drag events caused by pressure change
The bug was triggered on Monterey where a pressure of 1 is reported
while a mouse button is being held down. This caused an extra drag
event being triggered between mouse down and up events, even if no
movement occurred.
2022-02-15 10:53:32 +00:00
reuk
4cf74dfff6 Viewport: Improve drag-to-scroll on devices that can accept simultaneous mouse and touch input
Some Windows 11 devices have both touch screens and mouse inputs, and
these can be used simultaneously.

The Viewport (and ListBox) now check the input source of each mouse
down. If the source is not a mouse, the viewport will always enter
drag-to-scroll mode, regardless of the result of isScrollOnDragEnabled.
2022-02-07 14:24:11 +00:00
reuk
b2f318a775
TreeView: Allow built-in mouse handling to be enabled/disabled for custom components 2022-01-28 16:09:59 +00:00
reuk
ef7c3c6947
TreeView: Support TooltipClient interface 2022-01-28 16:09:59 +00:00
Tom Poole
c072b1bc8e Fix some typos 2022-01-25 11:48:46 +00:00
reuk
cd34f1b00b
TreeView: Reset itemUnderMouse when deleting TreeViewItems to avoid dereferencing dangling pointers 2022-01-06 16:32:43 +00:00
attila
2b3abd3ca6 MacOS: Fix TextEditor when using marked text (e.g. Korean) 2022-01-04 17:20:11 +01:00
ed
b421159be3 Accessibility: Use ignored AccessibilityHandler for slider text boxes to fix keyboard focus/accessible focus sync issue 2021-12-13 12:56:15 +00:00
reuk
34fdea0708
DragAndDropContainer: Allow custom scaling 2021-12-01 15:35:54 +00:00
ed
1fe8fa467b TextEditor: Fix floating-point -> integer bounds conversion of text selection bounds 2021-11-09 15:35:52 +00:00
ed
b70fbb9bca TreeView: Fix drag-to-scroll viewport jump on mouse exit 2021-10-25 16:40:18 +01:00
reuk
7f0a305199
Slider: Ensure that current Value is always treated as a double 2021-10-25 09:51:21 +01:00
ed
6218e2f92b Fix bug in LabelKeyboardFocusTraverser causing editable labels to consume focus traversal events 2021-10-25 08:20:21 +01:00
ed
de375ab6d7 TreeView: Prevent dragging items from scrolling viewport on mobile and fix issue with dragged item component being deleted during drag operations 2021-10-20 16:36:40 +01:00
ed
1e0acdf83d Accessibility: Update ComboBox label accessibility when editable state changed 2021-10-15 10:11:13 +01:00
ed
428260a6fd Whitespace 2021-10-14 12:31:17 +01:00
ed
70968d46c8 TreeView: Coalesce item position recalculation to fix performance issues with large trees 2021-10-13 15:06:18 +01:00
ed
b3a6e796f9 Fix potential nullptr dereference in Slider::ScopedDragNotification destructor 2021-10-08 17:19:04 +01:00
ed
7a8a4944cb ComboBox: Hide active menu when disabled 2021-10-08 17:19:04 +01:00
ed
e6360ca4cf Accessibility: Send AccessibilityEvent::valueChanged when ComboBox selection is changed 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
c933ad5a16 Accessibility: Fix issue with ListBox selection duplication 2021-09-29 11:46:10 +01:00
ed
5801cf7d09 Accessibility: Fix issue with ListBox custom components not being accessible 2021-09-29 11:46:10 +01:00
ed
55ffe91db8 TreeView: Don't add MouseListener for nested custom components
This restores the behaviour of TreeViews with custom item components prior to ec990202
2021-09-23 10:20:36 +01:00
reuk
32322a51e8
TableHeaderComponent: Avoid repainting in setColumnWidth if requested size is outside limits 2021-09-22 10:23:04 +01:00
ed
8370542eb2 Accessibility: Only use AccessibilityRole::toggleButton role and add AccessibilityActionType::toggle for ToggleButtons 2021-09-07 17:33:02 +01:00
ed
90eb878d16 Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00