class IComboListBoxHelper; class VCLXAccessibleListItem;
/** Base class for the list contained in list- and combo boxes. This class doesnotsupportselectionbecauselistsofcomboboxesgivenodirect accesstotheirunderlyinglistimplementation.Lookintoderived classesforselection.
*/ class VCLXAccessibleList final
: public cppu::ImplInheritanceHelper<
VCLXAccessibleComponent,
css::accessibility::XAccessible,
css::accessibility::XAccessibleSelection>
{ public: enum BoxType {COMBOBOX, LISTBOX};
/** The index that is passed to this method is returned on following callstogetAccessibleIndexInParent.
*/ void SetIndexInParent (sal_Int32 nIndex);
/** Process some of the events and delegate the rest to the base classes.
*/ virtualvoid ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; virtualvoid FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override;
/** Called on reception of selection events this method checks all known listitemsforapossiblechangeintheirselectionstateand updatesthataccordingly.Noaccessibilityeventsaresentbecause theXAccessibleSelectioninterfaceisnotsupportedandtheitems aretransient. @paramsTextOfSelectedItem Thisstringcontainsthetextofthecurrentlyselected item.Itisusedtoretrievetheindexofthatitem.
*/ void UpdateSelection (std::u16string_view sTextOfSelectedItem);
/** The index returned as index in parent is always the one set with the SetIndexInParent()method.
*/ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override; virtual sal_Int16 SAL_CALL getAccessibleRole() override;
// XServiceInfo virtual OUString SAL_CALL getImplementationName() override; // Return list specific services. virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
staticvoid NotifyListItem(css::uno::Any const & val);
IComboListBoxHelper* getListBoxHelper() { return m_pListBoxHelper.get(); } private:
BoxType m_aBoxType;
std::unique_ptr<IComboListBoxHelper> m_pListBoxHelper;
std::vector<rtl::Reference<VCLXAccessibleListItem>> m_aAccessibleChildren;
sal_Int32 m_nVisibleLineCount; /// Index in parent. This is settable from the outside.
sal_Int32 m_nIndexInParent;
sal_Int32 m_nLastTopEntry;
sal_Int32 m_nLastSelectedPos; bool m_bDisableProcessEvent; bool m_bVisible;
sal_Int32 m_nCurSelectedPos;
virtual ~VCLXAccessibleList() override = default;
sal_Int64 implGetAccessibleChildCount();
/** This function is called from the implementation helper during a XComponent::disposecall.Freethelistofitemsandtheitemsthemselves.
*/ virtualvoid SAL_CALL disposing() override;
void disposeChildren();
/** This method adds the states AccessibleStateType::FOCUSABLEandpossibly AccessibleStateType::MULTI_SELECTABLEtothestateset ofthebaseclasses.
*/ virtualvoid FillAccessibleStateSet (sal_Int64& rStateSet) override;
/** Create the specified child and insert it into the list of children. Setsthechild'sstates.
*/
rtl::Reference<VCLXAccessibleListItem> CreateChild (sal_Int32 i);
/** Call this method when the item list has been changed, i.e. items havebeendeletedorinserted.
*/ void HandleChangedItemList();
/** We need to save the accessible parent to return it in getAccessibleParent(), becausethismethodofthebaseclassreturnsthewrongparent.
*/
rtl::Reference<VCLXAccessibleBox> m_xParent;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.