mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ListBox: Send AccessibilityEvent::rowSelectionChanged events
This commit is contained in:
parent
a192e27961
commit
8dfb916e9a
1 changed files with 20 additions and 2 deletions
|
|
@ -594,8 +594,14 @@ void ListBox::updateContent()
|
|||
viewport->updateVisibleArea (isVisible());
|
||||
viewport->resized();
|
||||
|
||||
if (selectionChanged && model != nullptr)
|
||||
model->selectedRowsChanged (lastRowSelected);
|
||||
if (selectionChanged)
|
||||
{
|
||||
if (model != nullptr)
|
||||
model->selectedRowsChanged (lastRowSelected);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -630,6 +636,9 @@ void ListBox::selectRowInternal (const int row,
|
|||
|
||||
lastRowSelected = row;
|
||||
model->selectedRowsChanged (row);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -650,6 +659,9 @@ void ListBox::deselectRow (const int row)
|
|||
|
||||
viewport->updateContents();
|
||||
model->selectedRowsChanged (lastRowSelected);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -666,6 +678,9 @@ void ListBox::setSelectedRows (const SparseSet<int>& setOfRowsToBeSelected,
|
|||
|
||||
if (model != nullptr && sendNotificationEventToModel == sendNotification)
|
||||
model->selectedRowsChanged (lastRowSelected);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged);
|
||||
}
|
||||
|
||||
SparseSet<int> ListBox::getSelectedRows() const
|
||||
|
|
@ -709,6 +724,9 @@ void ListBox::deselectAllRows()
|
|||
|
||||
if (model != nullptr)
|
||||
model->selectedRowsChanged (lastRowSelected);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue