tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

XULSelectControlAccessible.h (1537B)


      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/. */
      6 
      7 #ifndef mozilla_a11y_XULSelectControlAccessible_h__
      8 #define mozilla_a11y_XULSelectControlAccessible_h__
      9 
     10 #include "AccessibleWrap.h"
     11 
     12 namespace mozilla {
     13 namespace a11y {
     14 
     15 /**
     16 * The basic implementation of accessible selection for XUL select controls.
     17 */
     18 class XULSelectControlAccessible : public AccessibleWrap {
     19 public:
     20  XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
     21  virtual ~XULSelectControlAccessible() {}
     22 
     23  // LocalAccessible
     24  virtual void Shutdown() override;
     25 
     26  // SelectAccessible
     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;
     35 
     36  // Widgets
     37  virtual LocalAccessible* CurrentItem() const override;
     38  virtual void SetCurrentItem(const LocalAccessible* aItem) override;
     39 
     40 protected:
     41  RefPtr<dom::Element> mSelectControl;
     42 };
     43 
     44 }  // namespace a11y
     45 }  // namespace mozilla
     46 
     47 #endif