1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_XULSelectControlAccessible_h__
8 #define mozilla_a11y_XULSelectControlAccessible_h__
10 #include "AccessibleWrap.h"
16 * The basic implementation of accessible selection for XUL select controls.
18 class XULSelectControlAccessible
: public AccessibleWrap
{
20 XULSelectControlAccessible(nsIContent
* aContent
, DocAccessible
* aDoc
);
21 virtual ~XULSelectControlAccessible() {}
24 virtual void Shutdown() override
;
27 virtual void SelectedItems(nsTArray
<Accessible
*>* aItems
) override
;
28 virtual uint32_t SelectedItemCount() override
;
29 virtual Accessible
* GetSelectedItem(uint32_t aIndex
) override
;
30 virtual bool IsItemSelected(uint32_t aIndex
) override
;
31 virtual bool AddItemToSelection(uint32_t aIndex
) override
;
32 virtual bool RemoveItemFromSelection(uint32_t aIndex
) override
;
33 virtual bool SelectAll() override
;
34 virtual bool UnselectAll() override
;
37 virtual LocalAccessible
* CurrentItem() const override
;
38 virtual void SetCurrentItem(const LocalAccessible
* aItem
) override
;
41 RefPtr
<dom::Element
> mSelectControl
;
45 } // namespace mozilla