LibreOffice Module accessibility (master) 1
|
Base class for the list contained in list- and combo boxes. More...
#include <vclxaccessiblelist.hxx>
Public Types | |
enum | BoxType { COMBOBOX , LISTBOX } |
Public Member Functions | |
VCLXAccessibleList (VCLXWindow *pVCLXindow, BoxType aBoxType, const css::uno::Reference< css::accessibility::XAccessible > &_xParent) | |
void | SetIndexInParent (sal_Int32 nIndex) |
The index that is passed to this method is returned on following calls to getAccessibleIndexInParent. More... | |
virtual void | ProcessWindowEvent (const VclWindowEvent &rVclWindowEvent) override |
Process some of the events and delegate the rest to the base classes. More... | |
virtual void | FillAccessibleRelationSet (utl::AccessibleRelationSetHelper &rRelationSet) override |
void | UpdateSelection (std::u16string_view sTextOfSelectedItem) |
Called on reception of selection events this method checks all known list items for a possible change in their selection state and updates that accordingly. More... | |
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL | getAccessibleContext () override |
virtual sal_Int64 SAL_CALL | getAccessibleChildCount () override final |
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL | getAccessibleChild (sal_Int64 i) override |
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL | getAccessibleParent () override |
virtual sal_Int64 SAL_CALL | getAccessibleIndexInParent () override |
The index returned as index in parent is always the one set with the SetIndexInParent() method. More... | |
virtual sal_Int16 SAL_CALL | getAccessibleRole () override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | selectAccessibleChild (sal_Int64 nChildIndex) override |
virtual sal_Bool SAL_CALL | isAccessibleChildSelected (sal_Int64 nChildIndex) override |
virtual void SAL_CALL | clearAccessibleSelection () override |
virtual void SAL_CALL | selectAllAccessibleChildren () override |
virtual sal_Int64 SAL_CALL | getSelectedAccessibleChildCount () override |
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL | getSelectedAccessibleChild (sal_Int64 nSelectedChildIndex) override |
virtual void SAL_CALL | deselectAccessibleChild (sal_Int64 nSelectedChildIndex) override |
virtual css::awt::Point SAL_CALL | getLocationOnScreen () override |
bool | IsInDropDown () const |
void | HandleDropOpen () |
void | ProcessWindowEvent (const VclWindowEvent &rVclWindowEvent, bool b_IsDropDownList) |
void | UpdateSelection_Acc (std::u16string_view sTextOfSelectedItem, bool b_IsDropDownList) |
void | UpdateSelection_Impl_Acc (bool b_IsDropDownList) |
::accessibility::IComboListBoxHelper * | getListBoxHelper () |
Static Public Member Functions | |
static void | NotifyListItem (css::uno::Any const &val) |
Private Member Functions | |
virtual | ~VCLXAccessibleList () override=default |
sal_Int64 | implGetAccessibleChildCount () |
virtual void SAL_CALL | disposing () override |
This function is called from the implementation helper during a XComponent::dispose call. More... | |
virtual void | FillAccessibleStateSet (sal_Int64 &rStateSet) override |
This method adds the states AccessibleStateType::FOCUSABLE and possibly AccessibleStateType::MULTI_SELECTABLE to the state set of the base classes. More... | |
css::uno::Reference< css::accessibility::XAccessible > | CreateChild (sal_Int32 i) |
Create the specified child and insert it into the list of children. More... | |
void | HandleChangedItemList () |
Call this method when the item list has been changed, i.e. More... | |
virtual css::awt::Rectangle | implGetBounds () override |
void | UpdateEntryRange_Impl () |
void | UpdateSelection_Impl (sal_Int32 nPos=0) |
bool | checkEntrySelected (sal_Int32 _nPos, css::uno::Any &_rNewValue, css::uno::Reference< css::accessibility::XAccessible > &_rxNewAcc) |
void | notifyVisibleStates (bool _bSetNew) |
void | UpdateVisibleLineCount () |
Private Attributes | |
BoxType | m_aBoxType |
std::unique_ptr<::accessibility::IComboListBoxHelper > | m_pListBoxHelper |
ListItems | m_aAccessibleChildren |
sal_Int32 | m_nVisibleLineCount |
sal_Int32 | m_nIndexInParent |
Index in parent. This is settable from the outside. More... | |
sal_Int32 | m_nLastTopEntry |
sal_Int32 | m_nLastSelectedPos |
bool | m_bDisableProcessEvent |
bool | m_bVisible |
sal_Int32 | m_nCurSelectedPos |
css::uno::Reference< css::accessibility::XAccessible > | m_xParent |
We need to save the accessible parent to return it in getAccessibleParent(), because this method of the base class returns the wrong parent. More... | |
Base class for the list contained in list- and combo boxes.
This class does not support selection because lists of combo boxes give no direct access to their underlying list implementation. Look into derived classes for selection.
Definition at line 42 of file vclxaccessiblelist.hxx.
Enumerator | |
---|---|
COMBOBOX | |
LISTBOX |
Definition at line 49 of file vclxaccessiblelist.hxx.
VCLXAccessibleList::VCLXAccessibleList | ( | VCLXWindow * | pVCLXindow, |
BoxType | aBoxType, | ||
const css::uno::Reference< css::accessibility::XAccessible > & | _xParent | ||
) |
Definition at line 55 of file vclxaccessiblelist.cxx.
References COMBOBOX, getAccessibleChildCount(), LISTBOX, LISTBOX_ENTRY_NOTFOUND, m_aAccessibleChildren, m_aBoxType, m_nCurSelectedPos, m_pListBoxHelper, nCount, and UpdateVisibleLineCount().
|
overrideprivatevirtualdefault |
|
private |
Definition at line 636 of file vclxaccessiblelist.cxx.
References _nPos, CreateChild(), and m_pListBoxHelper.
Referenced by UpdateSelection_Impl(), and UpdateSelection_Impl_Acc().
|
overridevirtual |
Definition at line 762 of file vclxaccessiblelist.cxx.
References m_pListBoxHelper, and UpdateSelection_Impl().
|
private |
Create the specified child and insert it into the list of children.
Sets the child's states.
Definition at line 455 of file vclxaccessiblelist.cxx.
References bVisible, m_aAccessibleChildren, m_bVisible, m_nCurSelectedPos, m_nVisibleLineCount, m_pListBoxHelper, o3tl::make_unsigned(), nPos, VCLXAccessibleListItem::SetSelected(), VCLXAccessibleListItem::SetVisible(), and UpdateVisibleLineCount().
Referenced by checkEntrySelected(), getAccessibleChild(), ProcessWindowEvent(), and UpdateEntryRange_Impl().
|
overridevirtual |
Definition at line 831 of file vclxaccessiblelist.cxx.
References m_bDisableProcessEvent, m_pListBoxHelper, and UpdateSelection_Impl().
|
overrideprivatevirtual |
This function is called from the implementation helper during a XComponent::dispose call.
Free the list of items and the items themselves.
Definition at line 105 of file vclxaccessiblelist.cxx.
References m_aAccessibleChildren, and m_pListBoxHelper.
|
overridevirtual |
Definition at line 415 of file vclxaccessiblelist.cxx.
References utl::AccessibleRelationSetHelper::AddRelation(), LISTBOX, m_aBoxType, m_pListBoxHelper, and WB_DROPDOWN.
|
overrideprivatevirtual |
This method adds the states AccessibleStateType::FOCUSABLE and possibly AccessibleStateType::MULTI_SELECTABLE to the state set of the base classes.
Definition at line 116 of file vclxaccessiblelist.cxx.
References m_bVisible, m_pListBoxHelper, and WB_DROPDOWN.
|
override |
Definition at line 535 of file vclxaccessiblelist.cxx.
References CreateChild(), getAccessibleChildCount(), i, m_aAccessibleChildren, and o3tl::make_unsigned().
Referenced by getSelectedAccessibleChild(), HandleDropOpen(), UpdateSelection_Impl(), and UpdateSelection_Impl_Acc().
|
finaloverridevirtual |
Definition at line 519 of file vclxaccessiblelist.cxx.
References implGetAccessibleChildCount().
Referenced by getAccessibleChild(), and VCLXAccessibleList().
|
overridevirtual |
Definition at line 511 of file vclxaccessiblelist.cxx.
|
overridevirtual |
The index returned as index in parent is always the one set with the SetIndexInParent() method.
Definition at line 564 of file vclxaccessiblelist.cxx.
References DEFAULT_INDEX_IN_PARENT, and m_nIndexInParent.
|
overridevirtual |
Definition at line 557 of file vclxaccessiblelist.cxx.
References m_xParent.
|
overridevirtual |
Definition at line 572 of file vclxaccessiblelist.cxx.
|
overridevirtual |
Definition at line 578 of file vclxaccessiblelist.cxx.
|
inline |
Definition at line 116 of file vclxaccessiblelist.hxx.
References m_pListBoxHelper.
|
overridevirtual |
Definition at line 886 of file vclxaccessiblelist.cxx.
References AWTPoint(), COMBOBOX, m_aBoxType, m_pListBoxHelper, and WB_DROPDOWN.
|
overridevirtual |
Definition at line 817 of file vclxaccessiblelist.cxx.
References getAccessibleChild(), and m_pListBoxHelper.
Referenced by VCLXAccessibleBox::getCurrentValue().
|
overridevirtual |
Definition at line 806 of file vclxaccessiblelist.cxx.
References m_pListBoxHelper, and nCount.
Referenced by VCLXAccessibleBox::getCurrentValue().
|
overridevirtual |
Definition at line 583 of file vclxaccessiblelist.cxx.
References comphelper::concatSequences().
|
private |
Call this method when the item list has been changed, i.e.
items have been deleted or inserted.
Definition at line 500 of file vclxaccessiblelist.cxx.
References Any, and m_aAccessibleChildren.
Referenced by ProcessWindowEvent().
void VCLXAccessibleList::HandleDropOpen | ( | ) |
Definition at line 920 of file vclxaccessiblelist.cxx.
References getAccessibleChild(), LISTBOX_ENTRY_NOTFOUND, m_bDisableProcessEvent, m_nCurSelectedPos, m_nLastSelectedPos, and UpdateSelection_Impl().
Referenced by VCLXAccessibleBox::ProcessWindowEvent().
|
private |
Definition at line 526 of file vclxaccessiblelist.cxx.
References m_pListBoxHelper, and nCount.
Referenced by getAccessibleChildCount().
|
overrideprivatevirtual |
Definition at line 856 of file vclxaccessiblelist.cxx.
References AWTRectangle(), COMBOBOX, Size::Height(), m_aBoxType, m_pListBoxHelper, and WB_DROPDOWN.
|
overridevirtual |
Definition at line 747 of file vclxaccessiblelist.cxx.
References m_pListBoxHelper.
bool VCLXAccessibleList::IsInDropDown | ( | ) | const |
Definition at line 914 of file vclxaccessiblelist.cxx.
References m_pListBoxHelper.
Referenced by VCLXAccessibleBox::getCurrentValue().
|
static |
Definition at line 286 of file vclxaccessiblelist.cxx.
References Any, and VCLXAccessibleListItem::NotifyAccessibleEvent().
Referenced by UpdateSelection_Impl_Acc().
|
private |
Definition at line 144 of file vclxaccessiblelist.cxx.
References Any, bVisible, m_aAccessibleChildren, m_bVisible, m_nVisibleLineCount, m_pListBoxHelper, nPos, VCLXAccessibleListItem::SetVisible(), and UpdateVisibleLineCount().
Referenced by ProcessWindowEvent().
|
overridevirtual |
Process some of the events and delegate the rest to the base classes.
Definition at line 346 of file vclxaccessiblelist.cxx.
References CreateChild(), dispose(), VclSimpleEvent::GetId(), HandleChangedItemList(), LISTBOX, LISTBOX_ENTRY_NOTFOUND, m_aBoxType, m_nCurSelectedPos, m_pListBoxHelper, notifyVisibleStates(), nPos, UpdateEntryRange_Impl(), and WB_DROPDOWN.
Referenced by VCLXAccessibleBox::ProcessWindowEvent().
void VCLXAccessibleList::ProcessWindowEvent | ( | const VclWindowEvent & | rVclWindowEvent, |
bool | b_IsDropDownList | ||
) |
Definition at line 300 of file vclxaccessiblelist.cxx.
References COMBOBOX, CreateChild(), VclSimpleEvent::GetId(), LISTBOX, LISTBOX_ENTRY_NOTFOUND, m_aBoxType, m_bDisableProcessEvent, m_nCurSelectedPos, m_pListBoxHelper, nPos, and UpdateSelection_Impl_Acc().
|
overridevirtual |
Definition at line 722 of file vclxaccessiblelist.cxx.
References m_bDisableProcessEvent, m_pListBoxHelper, and UpdateSelection_Impl().
|
overridevirtual |
Definition at line 781 of file vclxaccessiblelist.cxx.
References i, m_bDisableProcessEvent, m_pListBoxHelper, nCount, and UpdateSelection_Impl().
void VCLXAccessibleList::SetIndexInParent | ( | sal_Int32 | nIndex | ) |
The index that is passed to this method is returned on following calls to getAccessibleIndexInParent.
Definition at line 99 of file vclxaccessiblelist.cxx.
References m_nIndexInParent, and nIndex.
|
private |
Definition at line 605 of file vclxaccessiblelist.cxx.
References bVisible, CreateChild(), i, m_aAccessibleChildren, m_bVisible, m_nLastTopEntry, m_nVisibleLineCount, m_pListBoxHelper, o3tl::make_unsigned(), and UpdateVisibleLineCount().
Referenced by ProcessWindowEvent().
void VCLXAccessibleList::UpdateSelection | ( | std::u16string_view | sTextOfSelectedItem | ) |
Called on reception of selection events this method checks all known list items for a possible change in their selection state and updates that accordingly.
To find out which item is currently selected and to update the SELECTED state of the associated accessibility objects accordingly we exploit the fact that the.
No accessibility events are sent because the XAccessibleSelection interface is not supported and the items are transient.
sTextOfSelectedItem | This string contains the text of the currently selected item. It is used to retrieve the index of that item. |
Definition at line 437 of file vclxaccessiblelist.cxx.
References COMBOBOX, LISTBOX_ENTRY_NOTFOUND, m_aBoxType, nIndex, and UpdateSelection_Impl().
Referenced by VCLXAccessibleBox::ProcessWindowEvent().
void VCLXAccessibleList::UpdateSelection_Acc | ( | std::u16string_view | sTextOfSelectedItem, |
bool | b_IsDropDownList | ||
) |
Definition at line 176 of file vclxaccessiblelist.cxx.
References COMBOBOX, m_aBoxType, and UpdateSelection_Impl_Acc().
Referenced by VCLXAccessibleBox::ProcessWindowEvent().
|
private |
Definition at line 653 of file vclxaccessiblelist.cxx.
References checkEntrySelected(), getAccessibleChild(), uno::Any::hasValue(), i, VCLXAccessibleListItem::IsSelected(), LISTBOX_ENTRY_NOTFOUND, m_aAccessibleChildren, m_nCurSelectedPos, m_nLastSelectedPos, m_pListBoxHelper, nCount, and VCLXAccessibleListItem::SetSelected().
Referenced by clearAccessibleSelection(), deselectAccessibleChild(), HandleDropOpen(), selectAccessibleChild(), selectAllAccessibleChildren(), and UpdateSelection().
void VCLXAccessibleList::UpdateSelection_Impl_Acc | ( | bool | b_IsDropDownList | ) |
Definition at line 196 of file vclxaccessiblelist.cxx.
References checkEntrySelected(), COMBOBOX, getAccessibleChild(), uno::Any::hasValue(), i, VCLXAccessibleListItem::IsSelected(), LISTBOX, LISTBOX_ENTRY_NOTFOUND, m_aAccessibleChildren, m_aBoxType, m_nCurSelectedPos, m_nLastSelectedPos, m_pListBoxHelper, nCount, NotifyListItem(), and VCLXAccessibleListItem::SetSelected().
Referenced by ProcessWindowEvent(), and UpdateSelection_Acc().
|
private |
Definition at line 589 of file vclxaccessiblelist.cxx.
References m_nVisibleLineCount, m_pListBoxHelper, and WB_DROPDOWN.
Referenced by CreateChild(), notifyVisibleStates(), UpdateEntryRange_Impl(), and VCLXAccessibleList().
|
private |
Definition at line 120 of file vclxaccessiblelist.hxx.
Referenced by CreateChild(), disposing(), getAccessibleChild(), HandleChangedItemList(), notifyVisibleStates(), UpdateEntryRange_Impl(), UpdateSelection_Impl(), UpdateSelection_Impl_Acc(), and VCLXAccessibleList().
|
private |
Definition at line 118 of file vclxaccessiblelist.hxx.
Referenced by FillAccessibleRelationSet(), getLocationOnScreen(), implGetBounds(), ProcessWindowEvent(), UpdateSelection(), UpdateSelection_Acc(), UpdateSelection_Impl_Acc(), and VCLXAccessibleList().
|
private |
Definition at line 126 of file vclxaccessiblelist.hxx.
Referenced by deselectAccessibleChild(), HandleDropOpen(), ProcessWindowEvent(), selectAccessibleChild(), and selectAllAccessibleChildren().
|
private |
Definition at line 127 of file vclxaccessiblelist.hxx.
Referenced by CreateChild(), FillAccessibleStateSet(), notifyVisibleStates(), and UpdateEntryRange_Impl().
|
private |
Definition at line 128 of file vclxaccessiblelist.hxx.
Referenced by CreateChild(), HandleDropOpen(), ProcessWindowEvent(), UpdateSelection_Impl(), UpdateSelection_Impl_Acc(), and VCLXAccessibleList().
|
private |
Index in parent. This is settable from the outside.
Definition at line 123 of file vclxaccessiblelist.hxx.
Referenced by getAccessibleIndexInParent(), and SetIndexInParent().
|
private |
Definition at line 125 of file vclxaccessiblelist.hxx.
Referenced by HandleDropOpen(), UpdateSelection_Impl(), and UpdateSelection_Impl_Acc().
|
private |
Definition at line 124 of file vclxaccessiblelist.hxx.
Referenced by UpdateEntryRange_Impl().
|
private |
Definition at line 121 of file vclxaccessiblelist.hxx.
Referenced by CreateChild(), notifyVisibleStates(), UpdateEntryRange_Impl(), and UpdateVisibleLineCount().
|
private |
Definition at line 119 of file vclxaccessiblelist.hxx.
Referenced by checkEntrySelected(), clearAccessibleSelection(), CreateChild(), deselectAccessibleChild(), disposing(), FillAccessibleRelationSet(), FillAccessibleStateSet(), getListBoxHelper(), getLocationOnScreen(), getSelectedAccessibleChild(), getSelectedAccessibleChildCount(), implGetAccessibleChildCount(), implGetBounds(), isAccessibleChildSelected(), IsInDropDown(), notifyVisibleStates(), ProcessWindowEvent(), selectAccessibleChild(), selectAllAccessibleChildren(), UpdateEntryRange_Impl(), UpdateSelection_Impl(), UpdateSelection_Impl_Acc(), UpdateVisibleLineCount(), and VCLXAccessibleList().
|
private |
We need to save the accessible parent to return it in getAccessibleParent(), because this method of the base class returns the wrong parent.
Definition at line 164 of file vclxaccessiblelist.hxx.
Referenced by getAccessibleParent().