LibreOffice Module accessibility (master) 1
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
VCLXAccessibleBox Class Referenceabstract

Base class for list- and combo boxes. More...

#include <vclxaccessiblebox.hxx>

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

Public Types

enum  BoxType {
  COMBOBOX ,
  LISTBOX
}
 

Public Member Functions

 VCLXAccessibleBox (VCLXWindow *pVCLXindow, BoxType aType, bool bIsDropDownBox)
 The constructor is initialized with the box type which may be either COMBOBOX or LISTBOX and a flag indicating whether the box is a drop down box. More...
 
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext () override
 
sal_Int64 SAL_CALL getAccessibleChildCount () final override
 Each object has one or two children: an optional text field and the actual list. More...
 
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild (sal_Int64 i) override
 For drop down list boxes the text field is a not editable VCLXAccessibleTextField, for combo boxes it is an editable VCLXAccessibleEdit. More...
 
sal_Int16 SAL_CALL getAccessibleRole () override
 The role is always AccessibleRole::COMBO_BOX. More...
 
virtual sal_Int32 SAL_CALL getAccessibleActionCount () final override
 There is one action for drop down boxes and none for others. More...
 
virtual sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) override
 The action for drop down boxes lets the user toggle the visibility of the popup menu. More...
 
virtual OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) override
 The returned string is associated with resource RID_STR_ACC_ACTION_TOGGLEPOPUP. More...
 
virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding (sal_Int32 nIndex) override
 No keybinding returned so far. More...
 
virtual css::uno::Any SAL_CALL getCurrentValue () override
 
virtual sal_Bool SAL_CALL setCurrentValue (const css::uno::Any &aNumber) override
 
virtual css::uno::Any SAL_CALL getMaximumValue () override
 
virtual css::uno::Any SAL_CALL getMinimumValue () override
 
virtual css::uno::Any SAL_CALL getMinimumIncrement () override
 

Protected Member Functions

virtual ~VCLXAccessibleBox () override=default
 
virtual bool IsValid () const =0
 Returns true when the object is valid. More...
 
virtual void ProcessWindowChildEvent (const VclWindowEvent &rVclWindowEvent) override
 
virtual void ProcessWindowEvent (const VclWindowEvent &rVclWindowEvent) override
 
virtual void FillAccessibleStateSet (sal_Int64 &rStateSet) override
 
sal_Int64 implGetAccessibleChildCount ()
 

Private Attributes

BoxType m_aBoxType
 Specifies whether the box is a combo box or a list box. More...
 
bool m_bIsDropDownBox
 Specifies whether the box is a drop down box and thus has an action. More...
 
css::uno::Reference< css::accessibility::XAccessible > m_xText
 The child that represents the text field if there is one. More...
 
css::uno::Reference< css::accessibility::XAccessible > m_xList
 The child that contains the items of this box. More...
 
bool m_bHasTextChild
 This flag specifies whether an object has a text field as child regardless of whether that child being currently instantiated or not. More...
 
bool m_bHasListChild
 This flag specifies whether an object has a list as child regardless of whether that child being currently instantiated or not. More...
 

Detailed Description

Base class for list- and combo boxes.

This class manages the box' children. The classed derived from this one have only to implement the IsValid method and return the correct implementation name.

Definition at line 34 of file vclxaccessiblebox.hxx.

Member Enumeration Documentation

◆ BoxType

Enumerator
COMBOBOX 
LISTBOX 

Definition at line 42 of file vclxaccessiblebox.hxx.

Constructor & Destructor Documentation

◆ VCLXAccessibleBox()

VCLXAccessibleBox::VCLXAccessibleBox ( VCLXWindow pVCLXindow,
BoxType  aType,
bool  bIsDropDownBox 
)

The constructor is initialized with the box type which may be either COMBOBOX or LISTBOX and a flag indicating whether the box is a drop down box.

Definition at line 40 of file vclxaccessiblebox.cxx.

References LISTBOX, m_aBoxType, m_bHasListChild, m_bHasTextChild, and m_bIsDropDownBox.

◆ ~VCLXAccessibleBox()

virtual VCLXAccessibleBox::~VCLXAccessibleBox ( )
overrideprotectedvirtualdefault

Member Function Documentation

◆ doAccessibleAction()

sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction ( sal_Int32  nIndex)
overridevirtual

The action for drop down boxes lets the user toggle the visibility of the popup menu.

Definition at line 362 of file vclxaccessiblebox.cxx.

References Any, COMBOBOX, getAccessibleActionCount(), LISTBOX, m_aBoxType, m_bIsDropDownBox, and nIndex.

◆ FillAccessibleStateSet()

void VCLXAccessibleBox::FillAccessibleStateSet ( sal_Int64 &  rStateSet)
overrideprotectedvirtual

Definition at line 491 of file vclxaccessiblebox.cxx.

References COMBOBOX, Edit::GetText(), LISTBOX, m_aBoxType, and m_bIsDropDownBox.

◆ getAccessibleActionCount()

sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount ( )
finaloverridevirtual

There is one action for drop down boxes and none for others.

Definition at line 353 of file vclxaccessiblebox.cxx.

References m_bIsDropDownBox.

Referenced by doAccessibleAction(), and getAccessibleActionKeyBinding().

◆ getAccessibleActionDescription()

OUString SAL_CALL VCLXAccessibleBox::getAccessibleActionDescription ( sal_Int32  nIndex)
overridevirtual

The returned string is associated with resource RID_STR_ACC_ACTION_TOGGLEPOPUP.

Definition at line 403 of file vclxaccessiblebox.cxx.

References m_bIsDropDownBox, nIndex, and RID_STR_ACC_ACTION_TOGGLEPOPUP.

◆ getAccessibleActionKeyBinding()

Reference< XAccessibleKeyBinding > VCLXAccessibleBox::getAccessibleActionKeyBinding ( sal_Int32  nIndex)
overridevirtual

No keybinding returned so far.

Definition at line 412 of file vclxaccessiblebox.cxx.

References getAccessibleActionCount().

◆ getAccessibleChild()

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

For drop down list boxes the text field is a not editable VCLXAccessibleTextField, for combo boxes it is an editable VCLXAccessibleEdit.

Definition at line 288 of file vclxaccessiblebox.cxx.

References COMBOBOX, VCLXAccessibleList::COMBOBOX, i, implGetAccessibleChildCount(), IsValid(), LISTBOX, VCLXAccessibleList::LISTBOX, m_aBoxType, m_bHasTextChild, m_bIsDropDownBox, m_xList, and m_xText.

Referenced by ProcessWindowChildEvent(), and ProcessWindowEvent().

◆ getAccessibleChildCount()

sal_Int64 VCLXAccessibleBox::getAccessibleChildCount ( )
finaloverride

Each object has one or two children: an optional text field and the actual list.

The text field is not provided for non drop down list boxes.

Definition at line 260 of file vclxaccessiblebox.cxx.

References implGetAccessibleChildCount().

◆ getAccessibleContext()

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

Definition at line 251 of file vclxaccessiblebox.cxx.

◆ getAccessibleRole()

sal_Int16 SAL_CALL VCLXAccessibleBox::getAccessibleRole ( )
override

The role is always AccessibleRole::COMBO_BOX.

Definition at line 337 of file vclxaccessiblebox.cxx.

References COMBOBOX, m_aBoxType, and m_bIsDropDownBox.

◆ getCurrentValue()

Any VCLXAccessibleBox::getCurrentValue ( )
overridevirtual

◆ getMaximumValue()

Any VCLXAccessibleBox::getMaximumValue ( )
overridevirtual

Definition at line 473 of file vclxaccessiblebox.cxx.

References Any.

◆ getMinimumIncrement()

Any VCLXAccessibleBox::getMinimumIncrement ( )
overridevirtual

Definition at line 485 of file vclxaccessiblebox.cxx.

References Any.

◆ getMinimumValue()

Any VCLXAccessibleBox::getMinimumValue ( )
overridevirtual

Definition at line 479 of file vclxaccessiblebox.cxx.

References Any.

◆ implGetAccessibleChildCount()

sal_Int64 VCLXAccessibleBox::implGetAccessibleChildCount ( )
protected

◆ IsValid()

virtual bool VCLXAccessibleBox::IsValid ( ) const
protectedpure virtual

◆ ProcessWindowChildEvent()

void VCLXAccessibleBox::ProcessWindowChildEvent ( const VclWindowEvent rVclWindowEvent)
overrideprotectedvirtual

◆ ProcessWindowEvent()

void VCLXAccessibleBox::ProcessWindowEvent ( const VclWindowEvent rVclWindowEvent)
overrideprotectedvirtual

◆ setCurrentValue()

sal_Bool VCLXAccessibleBox::setCurrentValue ( const css::uno::Any &  aNumber)
overridevirtual

Definition at line 462 of file vclxaccessiblebox.cxx.

Member Data Documentation

◆ m_aBoxType

BoxType VCLXAccessibleBox::m_aBoxType
private

Specifies whether the box is a combo box or a list box.

List boxes have multi selection.

Definition at line 122 of file vclxaccessiblebox.hxx.

Referenced by doAccessibleAction(), FillAccessibleStateSet(), getAccessibleChild(), getAccessibleRole(), getCurrentValue(), ProcessWindowChildEvent(), ProcessWindowEvent(), and VCLXAccessibleBox().

◆ m_bHasListChild

bool VCLXAccessibleBox::m_bHasListChild
private

This flag specifies whether an object has a list as child regardless of whether that child being currently instantiated or not.

This flag is always true in the current implementation because the list child is just another wrapper around this object and thus has the same life time.

Definition at line 147 of file vclxaccessiblebox.hxx.

Referenced by implGetAccessibleChildCount(), and VCLXAccessibleBox().

◆ m_bHasTextChild

bool VCLXAccessibleBox::m_bHasTextChild
private

This flag specifies whether an object has a text field as child regardless of whether that child being currently instantiated or not.

Definition at line 139 of file vclxaccessiblebox.hxx.

Referenced by getAccessibleChild(), implGetAccessibleChildCount(), ProcessWindowEvent(), and VCLXAccessibleBox().

◆ m_bIsDropDownBox

bool VCLXAccessibleBox::m_bIsDropDownBox
private

◆ m_xList

css::uno::Reference< css::accessibility::XAccessible> VCLXAccessibleBox::m_xList
private

The child that contains the items of this box.

Definition at line 133 of file vclxaccessiblebox.hxx.

Referenced by getAccessibleChild(), getCurrentValue(), implGetAccessibleChildCount(), and ProcessWindowEvent().

◆ m_xText

css::uno::Reference< css::accessibility::XAccessible> VCLXAccessibleBox::m_xText
private

The child that represents the text field if there is one.

Definition at line 129 of file vclxaccessiblebox.hxx.

Referenced by getAccessibleChild(), getCurrentValue(), implGetAccessibleChildCount(), ProcessWindowChildEvent(), and ProcessWindowEvent().


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