LibreOffice Module accessibility (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
VCLXAccessibleList Class Referencefinal

Base class for the list contained in list- and combo boxes. More...

#include <vclxaccessiblelist.hxx>

Inheritance diagram for VCLXAccessibleList:
[legend]
Collaboration diagram for VCLXAccessibleList:
[legend]

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::IComboListBoxHelpergetListBoxHelper ()
 

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::IComboListBoxHelperm_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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ BoxType

Enumerator
COMBOBOX 
LISTBOX 

Definition at line 49 of file vclxaccessiblelist.hxx.

Constructor & Destructor Documentation

◆ VCLXAccessibleList()

VCLXAccessibleList::VCLXAccessibleList ( VCLXWindow pVCLXindow,
BoxType  aBoxType,
const css::uno::Reference< css::accessibility::XAccessible > &  _xParent 
)

◆ ~VCLXAccessibleList()

virtual VCLXAccessibleList::~VCLXAccessibleList ( )
overrideprivatevirtualdefault

Member Function Documentation

◆ checkEntrySelected()

bool VCLXAccessibleList::checkEntrySelected ( sal_Int32  _nPos,
css::uno::Any &  _rNewValue,
css::uno::Reference< css::accessibility::XAccessible > &  _rxNewAcc 
)
private

Definition at line 636 of file vclxaccessiblelist.cxx.

References _nPos, CreateChild(), and m_pListBoxHelper.

Referenced by UpdateSelection_Impl(), and UpdateSelection_Impl_Acc().

◆ clearAccessibleSelection()

void SAL_CALL VCLXAccessibleList::clearAccessibleSelection ( )
overridevirtual

Definition at line 762 of file vclxaccessiblelist.cxx.

References m_pListBoxHelper, and UpdateSelection_Impl().

◆ CreateChild()

Reference< XAccessible > VCLXAccessibleList::CreateChild ( sal_Int32  i)
private

◆ deselectAccessibleChild()

void SAL_CALL VCLXAccessibleList::deselectAccessibleChild ( sal_Int64  nSelectedChildIndex)
overridevirtual

◆ disposing()

void SAL_CALL VCLXAccessibleList::disposing ( )
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.

◆ FillAccessibleRelationSet()

void VCLXAccessibleList::FillAccessibleRelationSet ( utl::AccessibleRelationSetHelper rRelationSet)
overridevirtual

◆ FillAccessibleStateSet()

void VCLXAccessibleList::FillAccessibleStateSet ( sal_Int64 &  rStateSet)
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.

◆ getAccessibleChild()

Reference< XAccessible > SAL_CALL VCLXAccessibleList::getAccessibleChild ( sal_Int64  i)
override

◆ getAccessibleChildCount()

sal_Int64 SAL_CALL VCLXAccessibleList::getAccessibleChildCount ( )
finaloverridevirtual

Definition at line 519 of file vclxaccessiblelist.cxx.

References implGetAccessibleChildCount().

Referenced by getAccessibleChild(), and VCLXAccessibleList().

◆ getAccessibleContext()

Reference< XAccessibleContext > SAL_CALL VCLXAccessibleList::getAccessibleContext ( )
overridevirtual

Definition at line 511 of file vclxaccessiblelist.cxx.

◆ getAccessibleIndexInParent()

sal_Int64 SAL_CALL VCLXAccessibleList::getAccessibleIndexInParent ( )
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.

◆ getAccessibleParent()

Reference< XAccessible > SAL_CALL VCLXAccessibleList::getAccessibleParent ( )
overridevirtual

Definition at line 557 of file vclxaccessiblelist.cxx.

References m_xParent.

◆ getAccessibleRole()

sal_Int16 SAL_CALL VCLXAccessibleList::getAccessibleRole ( )
overridevirtual

Definition at line 572 of file vclxaccessiblelist.cxx.

◆ getImplementationName()

OUString VCLXAccessibleList::getImplementationName ( )
overridevirtual

Definition at line 578 of file vclxaccessiblelist.cxx.

◆ getListBoxHelper()

::accessibility::IComboListBoxHelper * VCLXAccessibleList::getListBoxHelper ( )
inline

Definition at line 116 of file vclxaccessiblelist.hxx.

References m_pListBoxHelper.

◆ getLocationOnScreen()

awt::Point VCLXAccessibleList::getLocationOnScreen ( )
overridevirtual

Definition at line 886 of file vclxaccessiblelist.cxx.

References AWTPoint(), COMBOBOX, m_aBoxType, m_pListBoxHelper, and WB_DROPDOWN.

◆ getSelectedAccessibleChild()

Reference< XAccessible > SAL_CALL VCLXAccessibleList::getSelectedAccessibleChild ( sal_Int64  nSelectedChildIndex)
overridevirtual

Definition at line 817 of file vclxaccessiblelist.cxx.

References getAccessibleChild(), and m_pListBoxHelper.

Referenced by VCLXAccessibleBox::getCurrentValue().

◆ getSelectedAccessibleChildCount()

sal_Int64 SAL_CALL VCLXAccessibleList::getSelectedAccessibleChildCount ( )
overridevirtual

Definition at line 806 of file vclxaccessiblelist.cxx.

References m_pListBoxHelper, and nCount.

Referenced by VCLXAccessibleBox::getCurrentValue().

◆ getSupportedServiceNames()

Sequence< OUString > VCLXAccessibleList::getSupportedServiceNames ( )
overridevirtual

Definition at line 583 of file vclxaccessiblelist.cxx.

References comphelper::concatSequences().

◆ HandleChangedItemList()

void VCLXAccessibleList::HandleChangedItemList ( )
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().

◆ HandleDropOpen()

void VCLXAccessibleList::HandleDropOpen ( )

◆ implGetAccessibleChildCount()

sal_Int64 VCLXAccessibleList::implGetAccessibleChildCount ( )
private

Definition at line 526 of file vclxaccessiblelist.cxx.

References m_pListBoxHelper, and nCount.

Referenced by getAccessibleChildCount().

◆ implGetBounds()

awt::Rectangle VCLXAccessibleList::implGetBounds ( )
overrideprivatevirtual

◆ isAccessibleChildSelected()

sal_Bool SAL_CALL VCLXAccessibleList::isAccessibleChildSelected ( sal_Int64  nChildIndex)
overridevirtual

Definition at line 747 of file vclxaccessiblelist.cxx.

References m_pListBoxHelper.

◆ IsInDropDown()

bool VCLXAccessibleList::IsInDropDown ( ) const

Definition at line 914 of file vclxaccessiblelist.cxx.

References m_pListBoxHelper.

Referenced by VCLXAccessibleBox::getCurrentValue().

◆ NotifyListItem()

void VCLXAccessibleList::NotifyListItem ( css::uno::Any const &  val)
static

◆ notifyVisibleStates()

void VCLXAccessibleList::notifyVisibleStates ( bool  _bSetNew)
private

◆ ProcessWindowEvent() [1/2]

void VCLXAccessibleList::ProcessWindowEvent ( const VclWindowEvent rVclWindowEvent)
overridevirtual

◆ ProcessWindowEvent() [2/2]

void VCLXAccessibleList::ProcessWindowEvent ( const VclWindowEvent rVclWindowEvent,
bool  b_IsDropDownList 
)

◆ selectAccessibleChild()

void SAL_CALL VCLXAccessibleList::selectAccessibleChild ( sal_Int64  nChildIndex)
overridevirtual

◆ selectAllAccessibleChildren()

void SAL_CALL VCLXAccessibleList::selectAllAccessibleChildren ( )
overridevirtual

◆ SetIndexInParent()

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.

◆ UpdateEntryRange_Impl()

void VCLXAccessibleList::UpdateEntryRange_Impl ( )
private

◆ UpdateSelection()

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.

Parameters
sTextOfSelectedItemThis 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().

◆ UpdateSelection_Acc()

void VCLXAccessibleList::UpdateSelection_Acc ( std::u16string_view  sTextOfSelectedItem,
bool  b_IsDropDownList 
)

◆ UpdateSelection_Impl()

void VCLXAccessibleList::UpdateSelection_Impl ( sal_Int32  nPos = 0)
private

◆ UpdateSelection_Impl_Acc()

void VCLXAccessibleList::UpdateSelection_Impl_Acc ( bool  b_IsDropDownList)

◆ UpdateVisibleLineCount()

void VCLXAccessibleList::UpdateVisibleLineCount ( )
private

Member Data Documentation

◆ m_aAccessibleChildren

ListItems VCLXAccessibleList::m_aAccessibleChildren
private

◆ m_aBoxType

BoxType VCLXAccessibleList::m_aBoxType
private

◆ m_bDisableProcessEvent

bool VCLXAccessibleList::m_bDisableProcessEvent
private

◆ m_bVisible

bool VCLXAccessibleList::m_bVisible
private

◆ m_nCurSelectedPos

sal_Int32 VCLXAccessibleList::m_nCurSelectedPos
private

◆ m_nIndexInParent

sal_Int32 VCLXAccessibleList::m_nIndexInParent
private

Index in parent. This is settable from the outside.

Definition at line 123 of file vclxaccessiblelist.hxx.

Referenced by getAccessibleIndexInParent(), and SetIndexInParent().

◆ m_nLastSelectedPos

sal_Int32 VCLXAccessibleList::m_nLastSelectedPos
private

◆ m_nLastTopEntry

sal_Int32 VCLXAccessibleList::m_nLastTopEntry
private

Definition at line 124 of file vclxaccessiblelist.hxx.

Referenced by UpdateEntryRange_Impl().

◆ m_nVisibleLineCount

sal_Int32 VCLXAccessibleList::m_nVisibleLineCount
private

◆ m_pListBoxHelper

std::unique_ptr<::accessibility::IComboListBoxHelper> VCLXAccessibleList::m_pListBoxHelper
private

◆ m_xParent

css::uno::Reference< css::accessibility::XAccessible > VCLXAccessibleList::m_xParent
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().


The documentation for this class was generated from the following files: