/** Base class for list- and combo boxes. This class manages the box' children.Theclassedderivedfromthisonehaveonlytoimplementthe IsValidmethodandreturnthecorrectimplementationname.
*/ class VCLXAccessibleBox
: public cppu::ImplInheritanceHelper<
VCLXAccessibleComponent,
css::accessibility::XAccessible,
css::accessibility::XAccessibleValue,
css::accessibility::XAccessibleAction>
{ public: enum BoxType {COMBOBOX, LISTBOX};
/** The constructor is initialized with the box type which may be eitherCOMBOBOXorLISTBOXandaflag indicatingwhethertheboxisadropdownbox.
*/
VCLXAccessibleBox(vcl::Window* pBox, BoxType aType, bool bIsDropDownBox);
/** Each object has one or two children: an optional text field and the actuallist.Thetextfieldisnotprovidedfornondropdownlist boxes.
*/
sal_Int64 SAL_CALL getAccessibleChildCount() final override; /** For drop down list boxes the text field is a not editable VCLXAccessibleTextField,forcomboboxesitisan editableVCLXAccessibleEdit.
*/
css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
getAccessibleChild (sal_Int64 i) override;
sal_Int16 SAL_CALL getAccessibleRole() override;
// XAccessibleAction
/** There is one action for drop down boxes and none for others.
*/ virtual sal_Int32 SAL_CALL getAccessibleActionCount() final override; /** The action for drop down boxes lets the user toggle the visibility of the popupmenu.
*/ virtual sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) override; /** The returned string is associated with resource RID_STR_ACC_ACTION_TOGGLEPOPUP.
*/ virtual OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) override; /** No keybinding returned so far.
*/ virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL
getAccessibleActionKeyBinding( sal_Int32 nIndex ) override;
private: /** Specifies whether the box is a combo box or a list box. List boxes havemultiselection.
*/
BoxType m_aBoxType;
/// Specifies whether the box is a drop down box and thus has an action. bool m_bIsDropDownBox;
/// The child that represents the text field if there is one.
css::uno::Reference< css::accessibility::XAccessible>
m_xText;
/// The child that contains the items of this box.
rtl::Reference<VCLXAccessibleList> m_xList;
/** This flag specifies whether an object has a text field as child regardlessofwhetherthatchildbeingcurrentlyinstantiatedor not.
*/ bool m_bHasTextChild;
/** This flag specifies whether an object has a list as child regardless ofwhetherthatchildbeingcurrentlyinstantiatedornot.This flagisalwaystrueinthecurrentimplementationbecausethelist childisjustanotherwrapperaroundthisobjectandthushasthe samelifetime.
*/ bool m_bHasListChild;
};
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.