author Mozilla Releng Treescript <>
Mon, 28 Nov 2022 00:39:51 +0000
changeset 713334 85930461c853525b6441c635d0a5cd23b32e5ebe
parent 678016 1d982c86554b1023a22509cdca9c16e90ed5c0cd
permissions -rw-r--r--
No bug - Tagging 24af110397612c8d87bd4a7d4aa6234f431ab1cf with FIREFOX_108_0b7_RELEASE a=release CLOSED TREE DONTBUILD

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_a11y_XULSelectControlAccessible_h__
#define mozilla_a11y_XULSelectControlAccessible_h__

#include "AccessibleWrap.h"

namespace mozilla {
namespace a11y {

 * The basic implementation of accessible selection for XUL select controls.
class XULSelectControlAccessible : public AccessibleWrap {
  XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
  virtual ~XULSelectControlAccessible() {}

  // LocalAccessible
  virtual void Shutdown() override;

  // SelectAccessible
  virtual void SelectedItems(nsTArray<Accessible*>* aItems) override;
  virtual uint32_t SelectedItemCount() override;
  virtual Accessible* GetSelectedItem(uint32_t aIndex) override;
  virtual bool IsItemSelected(uint32_t aIndex) override;
  virtual bool AddItemToSelection(uint32_t aIndex) override;
  virtual bool RemoveItemFromSelection(uint32_t aIndex) override;
  virtual bool SelectAll() override;
  virtual bool UnselectAll() override;

  // Widgets
  virtual LocalAccessible* CurrentItem() const override;
  virtual void SetCurrentItem(const LocalAccessible* aItem) override;

  RefPtr<dom::Element> mSelectControl;

}  // namespace a11y
}  // namespace mozilla