22#include <com/sun/star/accessibility/AccessibleEventId.hpp>
23#include <com/sun/star/accessibility/AccessibleRole.hpp>
24#include <com/sun/star/accessibility/AccessibleStateType.hpp>
25#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
46 ImplInheritanceHelper( _rIconCtrl.GetWindowPeer() ),
47 m_xParent ( _xParent )
56 switch ( rVclWindowEvent.
GetId() )
58 case VclEventId::ListboxSelect :
71 sal_Int32
nPos =
getCtrl()->GetEntryListPos( pEntry );
75 NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
77 NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, aOldValue, aNewValue );
83 case VclEventId::WindowGetFocus :
86 if ( pCtrl && pCtrl->HasFocus() )
89 if ( pEntry ==
nullptr )
91 pEntry =
getCtrl()->GetSelectedEntry();
95 sal_Int32
nPos = pCtrl->GetEntryListPos( pEntry );
99 NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
100 NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, aOldValue, aNewValue );
106 VCLXAccessibleComponent::ProcessWindowChildEvent (rVclWindowEvent);
114 ::osl::MutexGuard aGuard(
m_aMutex );
123 return "com.sun.star.comp.svtools.AccessibleIconChoiceControl";
128 return {
"com.sun.star.accessibility.AccessibleContext",
129 "com.sun.star.accessibility.AccessibleComponent",
130 "com.sun.star.awt.AccessibleIconChoiceControl"};
152 return getCtrl()->GetEntryCount();
160 throw IndexOutOfBoundsException();
166 + OUString::number(
i) +
" not found",
174 ::osl::MutexGuard aGuard(
m_aMutex );
183 return AccessibleRole::LIST;
190 return getCtrl()->GetAccessibleDescription();
198 if (
sName.isEmpty() )
199 sName =
"IconChoiceControl";
210 throw IndexOutOfBoundsException();
215 throw IndexOutOfBoundsException();
217 pCtrl->SetCursor( pEntry );
225 throw IndexOutOfBoundsException();
230 throw IndexOutOfBoundsException();
232 return ( pCtrl->GetCursor() == pEntry );
246 sal_Int32
nCount = pCtrl->GetEntryCount();
250 if ( pCtrl->GetCursor() != pEntry )
251 pCtrl->SetCursor( pEntry );
259 sal_Int64 nSelCount = 0;
261 sal_Int32
nCount = pCtrl->GetEntryCount();
265 if ( pCtrl->GetCursor() == pEntry )
277 throw IndexOutOfBoundsException();
280 sal_Int32 nSelCount = 0;
282 sal_Int32
nCount = pCtrl->GetEntryCount();
286 if ( pCtrl->GetCursor() == pEntry )
289 if ( nSelCount == ( nSelectedChildIndex + 1 ) )
304 throw IndexOutOfBoundsException();
306 sal_Int32 nSelCount = 0;
308 sal_Int32
nCount = pCtrl->GetEntryCount();
316 if (
i == nSelectedChildIndex )
322 if ( nSelCount == 1 && bFound )
323 pCtrl->SetNoSelection();
328 VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet );
331 rStateSet |= AccessibleStateType::FOCUSABLE;
332 rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
333 rStateSet |= AccessibleStateType::SELECTABLE;
339 return GetAs<SvtIconChoiceCtrl >();
the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void FillAccessibleStateSet(sal_Int64 &rStateSet) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
virtual void SAL_CALL disposing() override
this function is called upon disposing the component
virtual OUString SAL_CALL getAccessibleName() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
AccessibleIconChoiceCtrl(SvtIconChoiceCtrl const &_rIconCtrl, const css::uno::Reference< css::accessibility::XAccessible > &_xParent)
OAccessibleBase needs a valid view.
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
VclPtr< SvtIconChoiceCtrl > getCtrl() const
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
css::uno::Reference< css::accessibility::XAccessible > m_xParent
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
void SAL_CALL selectAllAccessibleChildren() override
sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
void SAL_CALL clearAccessibleSelection() override
virtual OUString SAL_CALL getImplementationName() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)